md
This commit is contained in:
parent
0f5e171a46
commit
b8964e54cc
@ -15,6 +15,7 @@ import com.alibaba.fastjson.JSONArray;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.xdadan.erp.common.annotation.Log;
|
import com.xdadan.erp.common.annotation.Log;
|
||||||
import com.xdadan.erp.common.core.domain.AjaxResult;
|
import com.xdadan.erp.common.core.domain.AjaxResult;
|
||||||
|
import com.xdadan.erp.common.core.domain.entity.SysUser;
|
||||||
import com.xdadan.erp.common.core.redis.RedissonService;
|
import com.xdadan.erp.common.core.redis.RedissonService;
|
||||||
import com.xdadan.erp.common.enums.BusinessType;
|
import com.xdadan.erp.common.enums.BusinessType;
|
||||||
import com.xdadan.erp.common.utils.DateUtils;
|
import com.xdadan.erp.common.utils.DateUtils;
|
||||||
@ -30,7 +31,10 @@ import com.xdadan.erp.emis.service.kefu.RL7moorService;
|
|||||||
import com.xdadan.erp.emis.service.print.IXddTplPrint;
|
import com.xdadan.erp.emis.service.print.IXddTplPrint;
|
||||||
import com.xdadan.erp.emis.service.print.tanex.TanexPdfPrinter;
|
import com.xdadan.erp.emis.service.print.tanex.TanexPdfPrinter;
|
||||||
import com.xdadan.erp.emis.utils.WaybillHelper;
|
import com.xdadan.erp.emis.utils.WaybillHelper;
|
||||||
|
import com.xdadan.erp.framework.manager.AsyncManager;
|
||||||
|
import com.xdadan.erp.framework.manager.factory.AsyncFactory;
|
||||||
import com.xdadan.erp.system.service.ISysConfigService;
|
import com.xdadan.erp.system.service.ISysConfigService;
|
||||||
|
import com.xdadan.erp.system.service.ISysNoticeService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -98,6 +102,10 @@ public class EmisCommonController extends EmisBaseController
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IEmisSettleBillService emisSettleBillService;
|
private IEmisSettleBillService emisSettleBillService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISysNoticeService sysNoticeService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -1042,4 +1050,30 @@ public class EmisCommonController extends EmisBaseController
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新订单通知
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/autoDoNotifyNewOrderTrigger")
|
||||||
|
public AjaxResult autoDoNotifyNewOrderTrigger() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// sysNoticeService.
|
||||||
|
|
||||||
|
// if(empcodes!=null && empcodes.length>0) {
|
||||||
|
// for(int i=0;i<empcodes.length;i++){
|
||||||
|
// String empCode=empcodes[i];
|
||||||
|
// if (!com.xdadan.erp.common.utils.StringUtils.isEmpty(empCode) && !com.xdadan.erp.common.utils.StringUtils.isEmpty(message)) {
|
||||||
|
// SysUser user=userService.selectUserByUserName(empCode);
|
||||||
|
// AsyncManager.me().execute(AsyncFactory.sendAlertMsgToUser(user.getUserId().toString(), message));
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
return AjaxResult.success("发送成功");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -45,6 +45,7 @@ package com.xdadan.erp.emis.service.impl;
|
|||||||
import com.xdadan.erp.emis.utils.sensitive.Convert;
|
import com.xdadan.erp.emis.utils.sensitive.Convert;
|
||||||
import com.xdadan.erp.system.domain.SysFileInfo;
|
import com.xdadan.erp.system.domain.SysFileInfo;
|
||||||
import com.xdadan.erp.system.service.ISysFileInfoService;
|
import com.xdadan.erp.system.service.ISysFileInfoService;
|
||||||
|
import com.xdadan.erp.system.service.ISysNoticeService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
@ -113,6 +114,9 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ISysFileInfoService sysFileInfoService;
|
private ISysFileInfoService sysFileInfoService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISysNoticeService sysNoticeService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取稽核数据
|
* 获取稽核数据
|
||||||
* @param id
|
* @param id
|
||||||
@ -1390,14 +1394,6 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
|||||||
emisWaybillSave.setCalcFeeType("1");
|
emisWaybillSave.setCalcFeeType("1");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 如果是仓库收货
|
|
||||||
if("1".equals(emisWaybillSave.getPickupMethod()) ){
|
|
||||||
if(StringUtils.isEmpty(emisWaybillSave.getIntoWarehouseCode()) ) {
|
|
||||||
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1, "仓库不能为空");
|
|
||||||
}else{
|
|
||||||
emisWaybillSave.setSendSiteCode(emisWaybillSave.getIntoWarehouseCode());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 寄件地址
|
// 寄件地址
|
||||||
if(StringUtils.isAnyEmpty(
|
if(StringUtils.isAnyEmpty(
|
||||||
@ -1458,20 +1454,30 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 如果专属业务员不为空,则寄件网点使用业务员的网点
|
// 如果专属业务员不为空,则寄件网点使用业务员的网点
|
||||||
if(!StringUtils.isEmpty(emisWaybillSave.getTakePieceEmployeeCode())){
|
if(!StringUtils.isEmpty(emisWaybillSave.getTakePieceEmployeeCode()) && "2".equals(emisWaybillSave.getPickupMethod()) ){
|
||||||
SysUser empUser = getEmisStaffByCode(emisWaybillSave.getTakePieceEmployeeCode());
|
SysUser empUser = getEmisStaffByCode(emisWaybillSave.getTakePieceEmployeeCode());
|
||||||
if(empUser!=null) {
|
if(empUser!=null) {
|
||||||
emisWaybillSave.setSendSiteCode(empUser.getOwnerSiteCode());
|
emisWaybillSave.setSendSiteCode(empUser.getOwnerSiteCode());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!StringUtils.isEmpty(emisWaybillSave.getOperateEmployeeCode())){
|
if(!StringUtils.isEmpty(emisWaybillSave.getOperateEmployeeCode()) && "1".equals(emisWaybillSave.getPickupMethod()) ){
|
||||||
SysUser empUser = getEmisStaffByCode(emisWaybillSave.getOperateEmployeeCode());
|
SysUser empUser = getEmisStaffByCode(emisWaybillSave.getOperateEmployeeCode());
|
||||||
if(empUser!=null) {
|
if(empUser!=null) {
|
||||||
emisWaybillSave.setSendSiteCode(empUser.getOwnerSiteCode());
|
emisWaybillSave.setSendSiteCode(empUser.getOwnerSiteCode());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 如果是仓库收货,寄件网点使用仓库编号
|
||||||
|
if( "1".equals(emisWaybillSave.getPickupMethod()) ){
|
||||||
|
if(StringUtils.isEmpty(emisWaybillSave.getIntoWarehouseCode()) ) {
|
||||||
|
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1, "仓库不能为空");
|
||||||
|
}else{
|
||||||
|
emisWaybillSave.setSendSiteCode(emisWaybillSave.getIntoWarehouseCode());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 发件网点
|
// 发件网点
|
||||||
if(!StringUtils.isEmpty(emisWaybillSave.getSendSiteCode())){
|
if(!StringUtils.isEmpty(emisWaybillSave.getSendSiteCode())){
|
||||||
// 寄件网点财务中心
|
// 寄件网点财务中心
|
||||||
@ -2705,6 +2711,27 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
|||||||
emisWaybillAttachmentMapper.insertEmisWaybillAttachment(attachmentItem);
|
emisWaybillAttachmentMapper.insertEmisWaybillAttachment(attachmentItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 通知网点有新的订单
|
||||||
|
// sysNoticeService.addNoticeToUser(title,content,clickPath,user.getUserId());
|
||||||
|
|
||||||
|
// 用户新下单
|
||||||
|
Long userId=null;
|
||||||
|
String userEmpCode=null;
|
||||||
|
String title="有新的运单,请接单,单号【"+emisWaybillSave.getBillCode()+"】";
|
||||||
|
if("1".equals(emisWaybillSave.getPickupMethod())){
|
||||||
|
userEmpCode=emisWaybillSave.getOperateEmployeeCode();
|
||||||
|
}
|
||||||
|
else if("2".equals(emisWaybillSave.getPickupMethod())){
|
||||||
|
userEmpCode=emisWaybillSave.getTakePieceEmployeeCode();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!StringUtils.isEmpty(userEmpCode)){
|
||||||
|
SysUser empUser=getEmisStaffByCode(userEmpCode);
|
||||||
|
userId=empUser.getUserId();
|
||||||
|
sysNoticeService.addNoticeToUser(title,title,"d24/orderManagement/UserOrderList",userId);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user