|
@@ -12,6 +12,7 @@ import com.sckw.contract.model.dto.res.QueryListResDto;
|
|
|
import com.sckw.contract.model.entity.KwcContractLogistics;
|
|
import com.sckw.contract.model.entity.KwcContractLogistics;
|
|
|
import com.sckw.contract.model.entity.KwcContractLogisticsGoods;
|
|
import com.sckw.contract.model.entity.KwcContractLogisticsGoods;
|
|
|
import com.sckw.contract.model.entity.KwcContractLogisticsUnit;
|
|
import com.sckw.contract.model.entity.KwcContractLogisticsUnit;
|
|
|
|
|
+import com.sckw.contract.model.entity.KwcContractTrade;
|
|
|
import com.sckw.contract.model.report.LogisticsListExport;
|
|
import com.sckw.contract.model.report.LogisticsListExport;
|
|
|
import com.sckw.contract.model.vo.req.*;
|
|
import com.sckw.contract.model.vo.req.*;
|
|
|
import com.sckw.contract.model.vo.res.*;
|
|
import com.sckw.contract.model.vo.res.*;
|
|
@@ -31,6 +32,8 @@ import com.sckw.core.web.context.LoginUserHolder;
|
|
|
import com.sckw.excel.utils.EasyExcelUtil;
|
|
import com.sckw.excel.utils.EasyExcelUtil;
|
|
|
import com.sckw.excel.utils.ExcelUtil;
|
|
import com.sckw.excel.utils.ExcelUtil;
|
|
|
import com.sckw.product.api.dubbo.GoodsInfoService;
|
|
import com.sckw.product.api.dubbo.GoodsInfoService;
|
|
|
|
|
+import com.sckw.stream.enums.MessageEnum;
|
|
|
|
|
+import com.sckw.stream.model.UserInfo;
|
|
|
import com.sckw.system.api.RemoteSystemService;
|
|
import com.sckw.system.api.RemoteSystemService;
|
|
|
import com.sckw.system.api.RemoteUserService;
|
|
import com.sckw.system.api.RemoteUserService;
|
|
|
import com.sckw.system.api.model.dto.res.EntCacheResDto;
|
|
import com.sckw.system.api.model.dto.res.EntCacheResDto;
|
|
@@ -40,6 +43,7 @@ import jakarta.servlet.http.HttpServletResponse;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.dubbo.config.annotation.DubboReference;
|
|
import org.apache.dubbo.config.annotation.DubboReference;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
@@ -69,8 +73,8 @@ public class KwcContractLogisticsService {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private KwcContractLogisticsUnitService kwcContractLogisticsUnitService;
|
|
private KwcContractLogisticsUnitService kwcContractLogisticsUnitService;
|
|
|
|
|
|
|
|
- @Autowired
|
|
|
|
|
- private RemoteContractServiceImpl remoteContractService;
|
|
|
|
|
|
|
+ //@Autowired
|
|
|
|
|
+ //private RemoteContractServiceImpl remoteContractService;
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private CommonBusinessService commonBusinessService;
|
|
private CommonBusinessService commonBusinessService;
|
|
@@ -84,6 +88,9 @@ public class KwcContractLogisticsService {
|
|
|
@DubboReference(version = "1.0.0", group = "design", check = false)
|
|
@DubboReference(version = "1.0.0", group = "design", check = false)
|
|
|
private GoodsInfoService goodsInfoService;
|
|
private GoodsInfoService goodsInfoService;
|
|
|
|
|
|
|
|
|
|
+ @Value(value = "${jumpUrl.tradeSendContract}")
|
|
|
|
|
+ private String tradeSendContract;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* @param reqVo 新增入参
|
|
* @param reqVo 新增入参
|
|
|
* @desc: 新增托运合同
|
|
* @desc: 新增托运合同
|
|
@@ -118,6 +125,24 @@ public class KwcContractLogisticsService {
|
|
|
|
|
|
|
|
//存单位信息
|
|
//存单位信息
|
|
|
kwcContractLogisticsUnitService.saveContractLogisticsUnit(kwcContractLogistics.getId(), baseInfo);
|
|
kwcContractLogisticsUnitService.saveContractLogisticsUnit(kwcContractLogistics.getId(), baseInfo);
|
|
|
|
|
+
|
|
|
|
|
+ //发送消息
|
|
|
|
|
+ Long entId = kwcContractLogistics.getEntId();
|
|
|
|
|
+ EntCacheResDto entCacheResDto = remoteSystemService.queryEntTreeById(entId);
|
|
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
|
|
+ map.put("entName", entCacheResDto.getFirmName());
|
|
|
|
|
+ map.put("contract_no", baseInfo.getContractCode());
|
|
|
|
|
+ map.put("name", baseInfo.getContractName());
|
|
|
|
|
+ MessageEnum messageEnum;
|
|
|
|
|
+ if (Objects.nonNull(reqVo.getPid())) {
|
|
|
|
|
+ messageEnum = MessageEnum.SAELCONTRACT_SUBMIT_DATA;//检测到PID时为补充合同
|
|
|
|
|
+ }else{
|
|
|
|
|
+ messageEnum = MessageEnum.SAELCONTRACT_SEND_CONTRACT;
|
|
|
|
|
+ }
|
|
|
|
|
+ commonBusinessService.sendSystemMessage(Collections.singletonList(new UserInfo().setUserId(kwcContractLogistics.getCreateBy()).setEntId(entId)),
|
|
|
|
|
+ messageEnum,
|
|
|
|
|
+ map,
|
|
|
|
|
+ tradeSendContract);
|
|
|
return contactId;
|
|
return contactId;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -384,6 +409,21 @@ public class KwcContractLogisticsService {
|
|
|
eSignCallBackReqVo.setContractId(id);
|
|
eSignCallBackReqVo.setContractId(id);
|
|
|
eSignCallBackReqVo.setStatus(ContractStatusEnum.SIGNED.getCode());
|
|
eSignCallBackReqVo.setStatus(ContractStatusEnum.SIGNED.getCode());
|
|
|
commonBusinessService.approval(eSignCallBackReqVo);
|
|
commonBusinessService.approval(eSignCallBackReqVo);
|
|
|
|
|
+
|
|
|
|
|
+ //发送消息
|
|
|
|
|
+ KwcContractLogistics kwcContractLogistic = kwcContractLogisticsMapper.selectById(id);
|
|
|
|
|
+ Long entId = kwcContractLogistic.getEntId();
|
|
|
|
|
+ EntCacheResDto entCacheResDto = remoteSystemService.queryEntTreeById(entId);
|
|
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
|
|
+ map.put("entName", entCacheResDto.getFirmName());
|
|
|
|
|
+ map.put("contract_no", kwcContractLogistic.getContractNo());
|
|
|
|
|
+ map.put("name", kwcContractLogistic.getName());
|
|
|
|
|
+ MessageEnum messageEnum = MessageEnum.SAELCONTRACT_COMPLETE_CONTRACT;
|
|
|
|
|
+
|
|
|
|
|
+ commonBusinessService.sendSystemMessage(Collections.singletonList(new UserInfo().setUserId(kwcContractLogistic.getCreateBy()).setEntId(entId)),
|
|
|
|
|
+ messageEnum,
|
|
|
|
|
+ map,
|
|
|
|
|
+ tradeSendContract);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -504,9 +544,23 @@ public class KwcContractLogisticsService {
|
|
|
if (kwcContractLogisticsMapper.updateById(kwcContractLogistic) <= 0) {
|
|
if (kwcContractLogisticsMapper.updateById(kwcContractLogistic) <= 0) {
|
|
|
throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.UPDATE_FAIL);
|
|
throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.UPDATE_FAIL);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
kwcContractLogisticsTrackService.saveContractLogisticsTrack(kwcContractLogistic.getId(), ContractTrackEnum.OVER.getCode());
|
|
kwcContractLogisticsTrackService.saveContractLogisticsTrack(kwcContractLogistic.getId(), ContractTrackEnum.OVER.getCode());
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ //发送消息
|
|
|
|
|
+ Long entId = kwcContractLogistic.getEntId();
|
|
|
|
|
+ EntCacheResDto entCacheResDto = remoteSystemService.queryEntTreeById(entId);
|
|
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
|
|
+ map.put("entName", entCacheResDto.getFirmName());
|
|
|
|
|
+ map.put("contract_no", kwcContractLogistic.getContractNo());
|
|
|
|
|
+ map.put("name", kwcContractLogistic.getName());
|
|
|
|
|
+ MessageEnum messageEnum = MessageEnum.SAELCONTRACT_COMPLETE_CONTRACT;
|
|
|
|
|
+
|
|
|
|
|
+ commonBusinessService.sendSystemMessage(Collections.singletonList(new UserInfo().setUserId(kwcContractLogistic.getCreateBy()).setEntId(entId)),
|
|
|
|
|
+ messageEnum,
|
|
|
|
|
+ map,
|
|
|
|
|
+ tradeSendContract);
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|