|
|
@@ -28,16 +28,9 @@ import org.springblade.core.tool.api.R;
|
|
|
import org.springblade.core.tool.utils.BeanUtil;
|
|
|
import org.springblade.core.tool.utils.Func;
|
|
|
import org.springblade.los.Util.IDeptUtils;
|
|
|
-import org.springblade.los.Util.RegularUtils;
|
|
|
import org.springblade.los.basic.business.entity.BusinessType;
|
|
|
import org.springblade.los.basic.business.service.IBusinessTypeService;
|
|
|
-import org.springblade.los.basic.corps.entity.BCorps;
|
|
|
-import org.springblade.los.basic.corps.service.IBCorpsService;
|
|
|
import org.springblade.los.basic.cur.service.IBCurrencyService;
|
|
|
-import org.springblade.los.basic.ports.entity.BPorts;
|
|
|
-import org.springblade.los.basic.ports.service.IBPortsService;
|
|
|
-import org.springblade.los.basic.vessels.entity.BVessels;
|
|
|
-import org.springblade.los.basic.vessels.service.IBVesselsService;
|
|
|
import org.springblade.los.billno.entity.BusinessBillNo;
|
|
|
import org.springblade.los.billno.service.IBusinessBillNoService;
|
|
|
import org.springblade.los.business.files.entity.FilesCenter;
|
|
|
@@ -53,8 +46,6 @@ import org.springblade.los.check.entity.LosAuditPathsLevels;
|
|
|
import org.springblade.los.check.service.IAuditPathsActsService;
|
|
|
import org.springblade.los.check.service.IAuditPathsLevelsService;
|
|
|
import org.springblade.los.check.service.IAuditProecessService;
|
|
|
-import org.springblade.los.edi.api.EDISender;
|
|
|
-import org.springblade.los.edi.dto.InttraSoDto;
|
|
|
import org.springblade.los.finance.fee.entity.FeeCenter;
|
|
|
import org.springblade.los.finance.fee.entity.FinAccBills;
|
|
|
import org.springblade.los.finance.fee.service.IFeeCenterService;
|
|
|
@@ -66,7 +57,6 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
-import java.text.SimpleDateFormat;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
@@ -113,12 +103,6 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
|
|
|
|
|
|
private final IAuditProecessService auditProecessService;
|
|
|
|
|
|
- private final IBPortsService bPortsService;
|
|
|
-
|
|
|
- private final IBCorpsService bCorpsService;
|
|
|
-
|
|
|
- private final IBVesselsService bVesselsService;
|
|
|
-
|
|
|
|
|
|
@Override
|
|
|
public IPage<BillsVO> selectBillsPage(IPage<BillsVO> page, BillsVO bills) {
|
|
|
@@ -156,9 +140,9 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
|
|
|
.eq(Bills::getMblno, bills.getMblno())
|
|
|
.eq(Bills::getBookingNo, bills.getBookingNo())
|
|
|
);
|
|
|
- if ("SE".equals(bills.getBusinessType())){
|
|
|
+ if ("SE".equals(bills.getBusinessType())) {
|
|
|
bills.setBillDate(bills.getEtd());
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
bills.setBillDate(bills.getEta());
|
|
|
}
|
|
|
if (bills.getId() == null) {
|
|
|
@@ -342,7 +326,7 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
|
|
|
Integer HC40 = 0;
|
|
|
Integer GP45 = 0;
|
|
|
Integer GP48 = 0;
|
|
|
- String boxTypeSum = "";
|
|
|
+ StringBuilder boxTypeSum = new StringBuilder();
|
|
|
if (ObjectUtils.isNotNull(bills.getPreContainersList())) {
|
|
|
for (PreContainers item : bills.getPreContainersList()) {
|
|
|
item.setPid(bills.getId());
|
|
|
@@ -357,29 +341,15 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
|
|
|
} else if ("48GP".equals(item.getCntrTypeCode())) {
|
|
|
GP48 += item.getQuantity();
|
|
|
}
|
|
|
+ boxTypeSum.append(item.getCntrTypeCode()).append("*").append(item.getQuantity()).append(",");
|
|
|
}
|
|
|
R res = preContainersService.submitList(bills.getPreContainersList());
|
|
|
if (!res.isSuccess()) {
|
|
|
throw new RuntimeException("保存失败");
|
|
|
}
|
|
|
- if (GP20 > 0) {
|
|
|
- boxTypeSum += "20GP * " + GP20 + ",";
|
|
|
- }
|
|
|
- if (GP40 > 0) {
|
|
|
- boxTypeSum += "40GP * " + GP40 + ",";
|
|
|
- }
|
|
|
- if (HC40 > 0) {
|
|
|
- boxTypeSum += "40HC * " + HC40 + ",";
|
|
|
- }
|
|
|
- if (GP45 > 0) {
|
|
|
- boxTypeSum += "45GP * " + GP45 + ",";
|
|
|
- }
|
|
|
- if (GP48 > 0) {
|
|
|
- boxTypeSum += "48GP * " + GP48 + ",";
|
|
|
- }
|
|
|
if (boxTypeSum.length() > 0) {
|
|
|
- boxTypeSum = boxTypeSum.substring(0, boxTypeSum.length() - 1);
|
|
|
- bills.setQuantityCntrDescr(boxTypeSum);
|
|
|
+ boxTypeSum = new StringBuilder(boxTypeSum.substring(0, boxTypeSum.length() - 1));
|
|
|
+ bills.setQuantityCntrDescr(boxTypeSum.toString());
|
|
|
}
|
|
|
}
|
|
|
bills.setQuantityV20(GP20);
|
|
|
@@ -1445,5 +1415,42 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
|
|
|
return R.data("操作成功");
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Bills getDetail(Bills bills) {
|
|
|
+ if (ObjectUtils.isNull(bills.getMblno()) &&
|
|
|
+ ObjectUtils.isNull(bills.getHblno()) &&
|
|
|
+ ObjectUtils.isNull(bills.getBookingNo()) &&
|
|
|
+ ObjectUtils.isNull(bills.getRefno())
|
|
|
+ ) {
|
|
|
+ throw new RuntimeException("缺少必要参数");
|
|
|
+ }
|
|
|
+ Bills detail = baseMapper.selectOne(new LambdaQueryWrapper<Bills>()
|
|
|
+ .eq(ObjectUtils.isNotNull(bills.getMblno()), Bills::getMblno, bills.getMblno())
|
|
|
+ .eq(ObjectUtils.isNotNull(bills.getHblno()), Bills::getHblno, bills.getHblno())
|
|
|
+ .eq(ObjectUtils.isNotNull(bills.getBookingNo()), Bills::getBookingNo, bills.getBookingNo())
|
|
|
+ .eq(ObjectUtils.isNotNull(bills.getRefno()), Bills::getRefno, bills.getRefno())
|
|
|
+ );
|
|
|
+ if (detail == null) {
|
|
|
+ throw new RuntimeException("未查到单据信息");
|
|
|
+ }
|
|
|
+ detail.setFeeCenterListC(feeCenterService.list(new LambdaQueryWrapper<FeeCenter>()
|
|
|
+ .eq(FeeCenter::getIsDeleted, 0)
|
|
|
+ .eq(FeeCenter::getTenantId, AuthUtil.getTenantId())
|
|
|
+ .eq(FeeCenter::getBillType, detail.getBillType())
|
|
|
+ .eq(FeeCenter::getPid, detail.getId())
|
|
|
+ .eq(FeeCenter::getDc, "C")
|
|
|
+ .eq(FeeCenter::getBillNo, detail.getBillNo())
|
|
|
+ ));
|
|
|
+ detail.setFeeCenterListD(feeCenterService.list(new LambdaQueryWrapper<FeeCenter>()
|
|
|
+ .eq(FeeCenter::getIsDeleted, 0)
|
|
|
+ .eq(FeeCenter::getTenantId, AuthUtil.getTenantId())
|
|
|
+ .eq(FeeCenter::getBillType, detail.getBillType())
|
|
|
+ .eq(FeeCenter::getPid, detail.getId())
|
|
|
+ .eq(FeeCenter::getDc, "D")
|
|
|
+ .eq(FeeCenter::getBillNo, detail.getBillNo())
|
|
|
+ ));
|
|
|
+ return detail;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|