|
|
@@ -40,6 +40,7 @@ import org.springblade.los.business.amends.service.IAmendsService;
|
|
|
import org.springblade.los.business.amends.vo.AmendsVO;
|
|
|
import org.springblade.los.business.sea.entity.Bills;
|
|
|
import org.springblade.los.business.sea.mapper.BillsMapper;
|
|
|
+import org.springblade.los.business.sea.service.IDataProcessingService;
|
|
|
import org.springblade.los.check.dto.LosAuditProecessDTO;
|
|
|
import org.springblade.los.check.entity.LosAuditPathsActs;
|
|
|
import org.springblade.los.check.entity.LosAuditPathsLevels;
|
|
|
@@ -106,6 +107,8 @@ public class AmendsServiceImpl extends ServiceImpl<AmendsMapper, Amends> impleme
|
|
|
|
|
|
private final FinPeriodMapper finPeriodMapper;
|
|
|
|
|
|
+ private final IDataProcessingService dataProcessingUtil;
|
|
|
+
|
|
|
@Override
|
|
|
public IPage<AmendsVO> selectAmendsPage(IPage<AmendsVO> page, AmendsVO amends) {
|
|
|
return page.setRecords(baseMapper.selectAmendsPage(page, amends));
|
|
|
@@ -114,17 +117,7 @@ public class AmendsServiceImpl extends ServiceImpl<AmendsMapper, Amends> impleme
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public R submit(Amends amends) {
|
|
|
- String deptId = "";
|
|
|
- String deptName = "";
|
|
|
String branchId = deptUtils.getDeptPid() + "";
|
|
|
- //获取部门ids对应中文名
|
|
|
- if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
|
|
|
- deptId = deptUtils.getDeptPid()+"";
|
|
|
- R<List<String>> res = sysClient.getDeptNames(deptUtils.getDeptPid()+"");
|
|
|
- if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
|
|
|
- deptName = String.join(",", res.getData());
|
|
|
- }
|
|
|
- }
|
|
|
amends.setBillDate(new Date());
|
|
|
if (ObjectUtils.isNotNull(amends.getBillDate())) {
|
|
|
LocalDate date = amends.getBillDate().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
|
|
|
@@ -165,11 +158,7 @@ public class AmendsServiceImpl extends ServiceImpl<AmendsMapper, Amends> impleme
|
|
|
//amends.setCreateTime(new Date());
|
|
|
amends.setCreateUser(AuthUtil.getUserId());
|
|
|
amends.setCreateUserName(AuthUtil.getUserName());
|
|
|
- if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
|
|
|
- amends.setBranchId(branchId);
|
|
|
- amends.setCreateDept(deptId);
|
|
|
- amends.setCreateDeptName(deptName);
|
|
|
- }
|
|
|
+ amends.setBranchId(branchId);
|
|
|
} else {
|
|
|
amends.setUpdateUser(AuthUtil.getUserId());
|
|
|
amends.setUpdateTime(new Date());
|
|
|
@@ -179,7 +168,7 @@ public class AmendsServiceImpl extends ServiceImpl<AmendsMapper, Amends> impleme
|
|
|
if (ObjectUtils.isNotNull(amends.getFeeCenterList())) {
|
|
|
for (FeeCenter item : amends.getFeeCenterList()) {
|
|
|
item.setBillNo(amends.getBillNo());
|
|
|
- if ("SEA".equals(amends.getBusinessType())){
|
|
|
+ if ("SEA".equals(amends.getBusinessType())) {
|
|
|
item.setBillDate(amends.getEtd());
|
|
|
} else if ("SIA".equals(amends.getBusinessType())) {
|
|
|
item.setBillDate(amends.getEta());
|
|
|
@@ -250,35 +239,35 @@ public class AmendsServiceImpl extends ServiceImpl<AmendsMapper, Amends> impleme
|
|
|
actId = 1112;
|
|
|
processType = "空运进口AMEND";
|
|
|
checkType = "aia-approve";
|
|
|
- }else if ("EXPA".equals(declare.getBusinessType())) {
|
|
|
+ } else if ("EXPA".equals(declare.getBusinessType())) {
|
|
|
actId = 1129;
|
|
|
processType = "快递业务amend审核";
|
|
|
checkType = "EXPA";
|
|
|
- }else if ("TRUCKA".equals(declare.getBusinessType())) {
|
|
|
+ } else if ("TRUCKA".equals(declare.getBusinessType())) {
|
|
|
actId = 1135;
|
|
|
processType = "海运派车amend审核";
|
|
|
checkType = "TRUCKA";
|
|
|
- }else if ("MFAA".equals(declare.getBusinessType())) {
|
|
|
+ } else if ("MFAA".equals(declare.getBusinessType())) {
|
|
|
actId = 1133;
|
|
|
processType = "空运舱单amend审核";
|
|
|
checkType = "MFAA";
|
|
|
- }else if ("MFSA".equals(declare.getBusinessType())) {
|
|
|
+ } else if ("MFSA".equals(declare.getBusinessType())) {
|
|
|
actId = 1131;
|
|
|
processType = "海运舱单amend审核";
|
|
|
checkType = "MFSA";
|
|
|
- }else if ("BGSEA".equals(declare.getBusinessType())) {
|
|
|
+ } else if ("BGSEA".equals(declare.getBusinessType())) {
|
|
|
actId = 1136;
|
|
|
processType = "海运出口报关amend审核";
|
|
|
checkType = "BGSEA";
|
|
|
- }else if ("BGSIA".equals(declare.getBusinessType())) {
|
|
|
+ } else if ("BGSIA".equals(declare.getBusinessType())) {
|
|
|
actId = 1137;
|
|
|
processType = "海运进口报关amend审核";
|
|
|
checkType = "BGSIA";
|
|
|
- }else if ("BGAEA".equals(declare.getBusinessType())) {
|
|
|
+ } else if ("BGAEA".equals(declare.getBusinessType())) {
|
|
|
actId = 1138;
|
|
|
processType = "空运出口报关amend审核";
|
|
|
checkType = "BGAEA";
|
|
|
- }else if ("BGAIA".equals(declare.getBusinessType())) {
|
|
|
+ } else if ("BGAIA".equals(declare.getBusinessType())) {
|
|
|
actId = 1139;
|
|
|
processType = "空运进口报关amend审核";
|
|
|
checkType = "BGAIA";
|
|
|
@@ -295,18 +284,22 @@ public class AmendsServiceImpl extends ServiceImpl<AmendsMapper, Amends> impleme
|
|
|
.eq(LosAuditPathsActs::getIsEnable, 1)
|
|
|
.eq(LosAuditPathsActs::getFidStatus, "status")
|
|
|
.eq(LosAuditPathsActs::getTenantId, AuthUtil.getTenantId())
|
|
|
- .eq(LosAuditPathsActs::getSalesCompanyId, deptUtils.getDeptPid()+"")
|
|
|
+ .eq(LosAuditPathsActs::getSalesCompanyId, deptUtils.getDeptPid() + "")
|
|
|
.eq(LosAuditPathsActs::getActId, actId);
|
|
|
pathsActs = auditPathsActsService.getOne(auditPathsActsLambdaQueryWrapper);
|
|
|
//获取审批信息
|
|
|
LosAuditPathsActs losAuditPathsActs = auditPathsActsService.getOne(new LambdaQueryWrapper<LosAuditPathsActs>()
|
|
|
.eq(LosAuditPathsActs::getActId, actId)
|
|
|
.eq(LosAuditPathsActs::getFidStatus, "status")
|
|
|
- .eq(LosAuditPathsActs::getSalesCompanyId, deptUtils.getDeptPid()+"")
|
|
|
+ .eq(LosAuditPathsActs::getSalesCompanyId, deptUtils.getDeptPid() + "")
|
|
|
.eq(LosAuditPathsActs::getTenantId, AuthUtil.getTenantId()));
|
|
|
Long pathId = losAuditPathsActs.getPathId();
|
|
|
auditPathsLevels = auditPathsLevelsService.list(new LambdaQueryWrapper<LosAuditPathsLevels>()
|
|
|
.eq(LosAuditPathsLevels::getTenantId, AuthUtil.getTenantId()).eq(LosAuditPathsLevels::getPathId, pathId));
|
|
|
+ String business = sysClient.getParamServiceNew("business");
|
|
|
+ if ("1".equals(business) && !auditPathsLevels.isEmpty()) {
|
|
|
+ auditPathsLevels = dataProcessingUtil.toExamine(auditPathsLevels, declare.getCreateDept());
|
|
|
+ }
|
|
|
auditProecessDTO.setTimes(1);
|
|
|
auditProecessDTO.setProcessType(processType);
|
|
|
// 没开启审批流直接走 通过流程
|
|
|
@@ -384,7 +377,7 @@ public class AmendsServiceImpl extends ServiceImpl<AmendsMapper, Amends> impleme
|
|
|
|
|
|
auditProecessDTO.setGrossProfit(amountCnyD.subtract(amountCnyC));
|
|
|
auditProecessDTO.setGrossProfitUsd(amountUsdD.subtract(amountUsdC));
|
|
|
- auditProecessDTO.setGrossProfitLoc(auditProecessDTO.getGrossProfit().add(bCurrencyService.converterCny("USD", auditProecessDTO.getGrossProfitUsd(), "","1")));
|
|
|
+ auditProecessDTO.setGrossProfitLoc(auditProecessDTO.getGrossProfit().add(bCurrencyService.converterCny("USD", auditProecessDTO.getGrossProfitUsd(), "", "1")));
|
|
|
auditProecessDTO.setSalesCompanyName(declare.getCreateDeptName());
|
|
|
auditProecessDTO.setSrcId(declare.getSrcId());
|
|
|
auditProecessDTO.setSrcCnName(declare.getSrcCnName());
|