|
@@ -157,7 +157,7 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public R<Map<String, Object>> getReportData(String billId, String reportCode, String groupCode, String corpIds,
|
|
public R<Map<String, Object>> getReportData(String billId, String reportCode, String groupCode, String corpIds,
|
|
|
- String itemIds, String type) {
|
|
|
|
|
|
|
+ String itemIds, String type) {
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
R<Dept> res = sysClient.getDept(deptUtils.getDeptPid());
|
|
R<Dept> res = sysClient.getDept(deptUtils.getDeptPid());
|
|
|
Dept dept;
|
|
Dept dept;
|
|
@@ -574,6 +574,44 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
|
|
|
} else {
|
|
} else {
|
|
|
map.put(MagicValues.DATA, null);
|
|
map.put(MagicValues.DATA, null);
|
|
|
}
|
|
}
|
|
|
|
|
+ } else if (MagicValues.DOCUMENT.equals(reportCode) && MagicValues.BILLS_DETAIL.equals(groupCode) && (MagicValues.HYCK.equals(type) || MagicValues.HYJK.equals(type))) {
|
|
|
|
|
+ Bills bills = billsService.getById(billId);
|
|
|
|
|
+ if (bills != null) {
|
|
|
|
|
+// bills.setFM(MagicValues.FM);
|
|
|
|
|
+ bills.setVesselCnName(bills.getVesselEnName() + "/" + bills.getVoyageNo());
|
|
|
|
|
+ BigDecimal boxWeightSum = BigDecimal.ZERO;
|
|
|
|
|
+ List<Containers> containersList = containersService.list(new LambdaQueryWrapper<Containers>()
|
|
|
|
|
+ .eq(Containers::getTenantId, AuthUtil.getTenantId())
|
|
|
|
|
+ .eq(Containers::getIsDeleted, 0)
|
|
|
|
|
+ .eq(Containers::getPid, bills.getId()));
|
|
|
|
|
+ List<PreContainers> preContainersList = preContainersService.list(new LambdaQueryWrapper<PreContainers>()
|
|
|
|
|
+ .eq(PreContainers::getTenantId, AuthUtil.getTenantId())
|
|
|
|
|
+ .eq(PreContainers::getIsDeleted, 0)
|
|
|
|
|
+ .eq(PreContainers::getPid, bills.getId()));
|
|
|
|
|
+ if (!containersList.isEmpty()) {
|
|
|
|
|
+ boxWeightSum = boxWeightSum.add(containersList.get(0).getGrossWeight());
|
|
|
|
|
+ if (!preContainersList.isEmpty()) {
|
|
|
|
|
+ List<PreContainers> preContainers = preContainersList.stream().filter(e -> e.getCntrTypeCode().equals(containersList.get(0).getCntrTypeCode()))
|
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
|
|
+ if (!preContainers.isEmpty()) {
|
|
|
|
|
+ boxWeightSum = boxWeightSum.add(containersList.get(0).getGrossWeight());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ bills.setBoxWeightSum(boxWeightSum);
|
|
|
|
|
+ StringBuilder text = new StringBuilder();
|
|
|
|
|
+ for (Containers item : containersList) {
|
|
|
|
|
+ text.append(item.getCntrNo()).append("/").append(item.getSealNo())
|
|
|
|
|
+ .append(item.getQuantity()).append(item.getPackingUnit()).append("/")
|
|
|
|
|
+ .append(item.getGrossWeight()).append(item.getPackingUnit()).append("/")
|
|
|
|
|
+ .append(item.getMeasurement()).append("CBM");
|
|
|
|
|
+ }
|
|
|
|
|
+ bills.setCntryString(text.toString());
|
|
|
|
|
+ bills.setDept(dept);
|
|
|
|
|
+ map.put(MagicValues.DATA, bills);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ map.put(MagicValues.DATA, null);
|
|
|
|
|
+ }
|
|
|
} else if (MagicValues.DOCUMENT.equals(reportCode) && MagicValues.DISPATCH_NOTICE.equals(groupCode) && (MagicValues.HYCK.equals(type) || MagicValues.HYJK.equals(type))) {
|
|
} else if (MagicValues.DOCUMENT.equals(reportCode) && MagicValues.DISPATCH_NOTICE.equals(groupCode) && (MagicValues.HYCK.equals(type) || MagicValues.HYJK.equals(type))) {
|
|
|
Bills bills = billsService.getById(billId);
|
|
Bills bills = billsService.getById(billId);
|
|
|
if (bills != null) {
|
|
if (bills != null) {
|