md
This commit is contained in:
parent
b8964e54cc
commit
f2902be494
@ -48,6 +48,8 @@ package com.xdadan.erp.emis.service;
|
|||||||
import com.xdadan.erp.emis.utils.sensitive.Convert;
|
import com.xdadan.erp.emis.utils.sensitive.Convert;
|
||||||
import com.xdadan.erp.system.mapper.SysUserMapper;
|
import com.xdadan.erp.system.mapper.SysUserMapper;
|
||||||
import com.xdadan.erp.system.service.ISysConfigService;
|
import com.xdadan.erp.system.service.ISysConfigService;
|
||||||
|
import com.xdadan.erp.system.service.ISysNoticeService;
|
||||||
|
import com.xdadan.erp.system.service.ISysUserService;
|
||||||
import jdk.nashorn.internal.runtime.Undefined;
|
import jdk.nashorn.internal.runtime.Undefined;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections.MapUtils;
|
import org.apache.commons.collections.MapUtils;
|
||||||
@ -188,6 +190,12 @@ public class EmisBaseService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
RedissonService redissonService;
|
RedissonService redissonService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISysUserService userService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISysNoticeService sysNoticeService;
|
||||||
|
|
||||||
public EmisExchangeRate getValidExchangeRate(String from, String to,String rateDate){
|
public EmisExchangeRate getValidExchangeRate(String from, String to,String rateDate){
|
||||||
return emisExchangeRateMapper.getValidExchangeRate(from, to,rateDate);
|
return emisExchangeRateMapper.getValidExchangeRate(from, to,rateDate);
|
||||||
}
|
}
|
||||||
@ -2324,6 +2332,63 @@ public class EmisBaseService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送消息给用户
|
||||||
|
* @param empCode
|
||||||
|
* @param title
|
||||||
|
* @param msg
|
||||||
|
* @param clickPath
|
||||||
|
*/
|
||||||
|
public void sendNoticeToEmpUser(String empCode,String title,String msg,String clickPath){
|
||||||
|
Long userId=null;
|
||||||
|
if(!StringUtils.isEmpty(empCode)){
|
||||||
|
SysUser empUser=getEmisStaffByCode(empCode);
|
||||||
|
userId=empUser.getUserId();
|
||||||
|
sysNoticeService.addNoticeToUser(title,msg,clickPath,userId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送消息给网点用户
|
||||||
|
* @param siteCode
|
||||||
|
* @param title
|
||||||
|
* @param msg
|
||||||
|
* @param clickPath
|
||||||
|
*/
|
||||||
|
public void sendNoticeToSite(String siteCode,String title,String msg,String clickPath){
|
||||||
|
if(!StringUtils.isEmpty(siteCode)){
|
||||||
|
SysUser queryUser = new SysUser();
|
||||||
|
queryUser.setOwnerSiteCode(siteCode);
|
||||||
|
List<SysUser> sysUserList = userService.selectUserList(queryUser);
|
||||||
|
if(!CollectionUtils.isEmpty(sysUserList)) {
|
||||||
|
for (SysUser empUser:sysUserList) {
|
||||||
|
sysNoticeService.addNoticeToUser(title, msg, clickPath, empUser.getUserId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送消息给销售联系人
|
||||||
|
* @param salesmen
|
||||||
|
* @param title
|
||||||
|
* @param msg
|
||||||
|
* @param clickPath
|
||||||
|
*/
|
||||||
|
public void sendNoticeToSalemenUser(String salesmen,String title,String msg,String clickPath){
|
||||||
|
if(!StringUtils.isEmpty(salesmen)){
|
||||||
|
SysUser queryUser = new SysUser();
|
||||||
|
queryUser.setEmpName(salesmen);
|
||||||
|
List<SysUser> sysUserList = userService.selectUserList(queryUser);
|
||||||
|
if(!CollectionUtils.isEmpty(sysUserList)) {
|
||||||
|
for (SysUser empUser:sysUserList) {
|
||||||
|
sysNoticeService.addNoticeToUser(title, msg, clickPath, empUser.getUserId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检查是否签收
|
* 检查是否签收
|
||||||
@ -2335,6 +2400,9 @@ public class EmisBaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 改变运单上站点
|
* 改变运单上站点
|
||||||
* @param billCode
|
* @param billCode
|
||||||
@ -2476,7 +2544,6 @@ public class EmisBaseService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 产生客户编码 规则: siteCode+ 000000
|
* 产生客户编码 规则: siteCode+ 000000
|
||||||
* @param siteCode
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private String genCustomerCode(){
|
private String genCustomerCode(){
|
||||||
|
|||||||
@ -14,6 +14,7 @@ import java.util.Date;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.xdadan.erp.common.core.domain.entity.SysUser;
|
||||||
import com.xdadan.erp.emis.domain.*;
|
import com.xdadan.erp.emis.domain.*;
|
||||||
import com.xdadan.erp.emis.domain.enumtype.EmisBizErrorType;
|
import com.xdadan.erp.emis.domain.enumtype.EmisBizErrorType;
|
||||||
import com.xdadan.erp.emis.domain.exception.EmisBizError;
|
import com.xdadan.erp.emis.domain.exception.EmisBizError;
|
||||||
@ -233,6 +234,12 @@ public class EmisWaybillAjustApplyServiceImpl extends EmisBaseService implements
|
|||||||
|
|
||||||
emisWaybillService.reUpdateWayBill(emisWaybillOld,emisWaybillSave);
|
emisWaybillService.reUpdateWayBill(emisWaybillOld,emisWaybillSave);
|
||||||
|
|
||||||
|
// if(!StringUtils.isEmpty(userEmpCode)){
|
||||||
|
// SysUser empUser=getEmisStaffByCode(userEmpCode);
|
||||||
|
// userId=empUser.getUserId();
|
||||||
|
// sysNoticeService.addNoticeToUser(title,title,"d24/orderManagement/UserOrderList",userId);
|
||||||
|
// }
|
||||||
|
|
||||||
// 审核通过
|
// 审核通过
|
||||||
return emisWaybillAjustApplyMapper.auditCenterPass(emisWaybillAjustApply);
|
return emisWaybillAjustApplyMapper.auditCenterPass(emisWaybillAjustApply);
|
||||||
|
|
||||||
|
|||||||
@ -2713,10 +2713,7 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 通知网点有新的订单
|
// 通知网点有新的订单
|
||||||
// sysNoticeService.addNoticeToUser(title,content,clickPath,user.getUserId());
|
|
||||||
|
|
||||||
// 用户新下单
|
// 用户新下单
|
||||||
Long userId=null;
|
|
||||||
String userEmpCode=null;
|
String userEmpCode=null;
|
||||||
String title="有新的运单,请接单,单号【"+emisWaybillSave.getBillCode()+"】";
|
String title="有新的运单,请接单,单号【"+emisWaybillSave.getBillCode()+"】";
|
||||||
if("1".equals(emisWaybillSave.getPickupMethod())){
|
if("1".equals(emisWaybillSave.getPickupMethod())){
|
||||||
@ -2725,13 +2722,12 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
|||||||
else if("2".equals(emisWaybillSave.getPickupMethod())){
|
else if("2".equals(emisWaybillSave.getPickupMethod())){
|
||||||
userEmpCode=emisWaybillSave.getTakePieceEmployeeCode();
|
userEmpCode=emisWaybillSave.getTakePieceEmployeeCode();
|
||||||
}
|
}
|
||||||
|
if(!StringUtils.isEmpty(userEmpCode)) {
|
||||||
if(!StringUtils.isEmpty(userEmpCode)){
|
sendNoticeToEmpUser(userEmpCode, title, title, "d24/orderManagement/UserOrderList");
|
||||||
SysUser empUser=getEmisStaffByCode(userEmpCode);
|
}
|
||||||
userId=empUser.getUserId();
|
else{
|
||||||
sysNoticeService.addNoticeToUser(title,title,"d24/orderManagement/UserOrderList",userId);
|
sendNoticeToSite(emisWaybillSave.getSendSiteCode(), title, title, "d24/orderManagement/UserOrderList");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user