Browse Source

1.箱轨迹增加导出接口
2.海运进出口,客户订舱保存接口收发通自动换行
3.未收明细增加操作员检索字段
4.超期箱使费-付费备注修改
5.计算超期箱使费逻辑修改
6.放箱号增加导出接口
7.OW箱生成放箱号箱东取值修改

纪新园 1 day ago
parent
commit
79405b7865

+ 8 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/statisticAnalysis/FeeSummaryQ.java

@@ -90,5 +90,13 @@ public class FeeSummaryQ {
 	 * 单据类型
 	 */
 	private String billType;
+	/**
+	 * 操作 Id
+	 */
+	private Long operatorId;
+	/**
+	 * 操作
+	 */
+	private String operatorName;
 
 }

+ 10 - 4
blade-service/blade-los/src/main/java/org/springblade/los/Util/OwBoxUsageFeeUtils.java

@@ -427,6 +427,8 @@ public class OwBoxUsageFeeUtils {
 							feeCenterC.setAmount(feeCenterC.getQuantity().multiply(feeCenterC.getPrice()));
 							feeCenterC.setAmountLoc(feeCenterC.getAmount().multiply(feeCenter.getExrate()));
 							feeCenterC.setUnsettledAmount(feeCenterC.getAmount());
+							feeCenterC.setRemarks(feeCenterC.getRemarks() + " 合计金额:" + feeCenter.getAmount() + "*" + new BigDecimal(overdueProportion)
+								.divide(new BigDecimal("100"), 2, RoundingMode.HALF_UP));
 							feeCenterListD.add(feeCenter);
 							feeCenterListC.add(feeCenterC);
 							item.setPolOverdueBoxUseDays(Integer.parseInt(overdueDays + ""));
@@ -747,6 +749,8 @@ public class OwBoxUsageFeeUtils {
 						feeCenterC.setAmount(feeCenterC.getQuantity().multiply(feeCenterC.getPrice()));
 						feeCenterC.setAmountLoc(feeCenterC.getAmount().multiply(feeCenter.getExrate()));
 						feeCenterC.setUnsettledAmount(feeCenterC.getAmount());
+						feeCenterC.setRemarks(feeCenterC.getRemarks() + " 合计金额:" + feeCenter.getAmount() + "*" + new BigDecimal(overdueProportion)
+							.divide(new BigDecimal("100"), 2, RoundingMode.HALF_UP));
 						feeCenterListD.add(feeCenter);
 						feeCenterListC.add(feeCenterC);
 						item.setPolOverdueBoxUseDays(Integer.parseInt(overdueDays + ""));
@@ -1056,6 +1060,8 @@ public class OwBoxUsageFeeUtils {
 						feeCenterC.setAmount(feeCenterC.getQuantity().multiply(feeCenterC.getPrice()));
 						feeCenterC.setAmountLoc(feeCenterC.getAmount().multiply(feeCenter.getExrate()));
 						feeCenterC.setUnsettledAmount(feeCenterC.getAmount());
+						feeCenterC.setRemarks(feeCenterC.getRemarks() + " 合计金额:" + feeCenter.getAmount() + "*" + new BigDecimal(overdueProportion)
+							.divide(new BigDecimal("100"), 2, RoundingMode.HALF_UP));
 						feeCenterListD.add(feeCenter);
 						feeCenterListC.add(feeCenterC);
 						item.setPodFreeBoxUseDays(feeCenter.getOverdueBoxUseDays());
@@ -1300,10 +1306,10 @@ public class OwBoxUsageFeeUtils {
 		}
 		//开始计费-第一档应计费天数
 		int firstTierChargeableFeeDays;
-		if (overdueDays+1 < feesItems.getEndDay()) {
+		if (overdueDays + 1 < feesItems.getEndDay()) {
 			firstTierChargeableFeeDays = overdueDays + 1 - overdueBoxUseDays;
 		} else {
-			firstTierChargeableFeeDays = feesItems.getEndDay()+1 - feesItems.getStartDay();
+			firstTierChargeableFeeDays = feesItems.getEndDay() + 1 - feesItems.getStartDay();
 		}
 		//计算过程
 		String text;
@@ -1323,7 +1329,7 @@ public class OwBoxUsageFeeUtils {
 			return null;
 		}
 		//剩余计费天数
-		int days = overdueDays+1 - feesItems.getEndDay();
+		int days = overdueDays + 1 - feesItems.getEndDay();
 		if (days > 0) {
 			for (StorageFeesItems term : storageFeesItems) {
 				BigDecimal rate;
@@ -1340,7 +1346,7 @@ public class OwBoxUsageFeeUtils {
 				//剩余计费天数需从免箱使天数所在下一档次开始计算
 				if (term.getStartDay() > finalOverdueBoxUseDays) {
 					//本档次需计费天数
-					int dayLength = term.getEndDay() - term.getStartDay() ;
+					int dayLength = term.getEndDay() - term.getStartDay();
 					//剩余计费天数是否大于本档次计费天数
 					if (days > dayLength) {
 						days -= dayLength;

+ 47 - 0
blade-service/blade-los/src/main/java/org/springblade/los/Util/StringTools.java

@@ -325,4 +325,51 @@ public class StringTools {
 		}
 		return sb.toString();
 	}
+
+
+	public static String wrapText(String text, int maxLineLength) {
+		if (text == null) return null;
+		if (maxLineLength <= 0) throw new IllegalArgumentException("maxLineLength must be > 0");
+
+		StringBuilder result = new StringBuilder();
+		String[] paragraphs = text.split("\n", -1); // 保留原有换行
+
+		for (int p = 0; p < paragraphs.length; p++) {
+			if (p > 0) {
+				result.append("\n"); // 保留段落间的原换行
+			}
+
+			String paragraph = paragraphs[p];
+			int start = 0;
+			int length = paragraph.length();
+
+			while (start < length) {
+				// 计算理论结束位置
+				int end = Math.min(start + maxLineLength, length);
+
+				// 如果不是最后一行,且结束位置不是空格,则回退到前一个空格
+				if (end < length && !Character.isWhitespace(paragraph.charAt(end))) {
+					int lastSpace = paragraph.lastIndexOf(' ', end);
+					// 如果找不到空格,则强制在 end 处断行(避免死循环)
+					if (lastSpace > start) {
+						end = lastSpace;
+					}
+				}
+
+				// 添加当前行
+				result.append(paragraph, start, end);
+
+				// 如果不是最后一段的最后一行,添加换行符
+				start = end;
+				if (start < length) {
+					result.append("\n");
+					// 跳过行首空格
+					while (start < length && Character.isWhitespace(paragraph.charAt(start))) {
+						start++;
+					}
+				}
+			}
+		}
+		return result.toString();
+	}
 }

+ 74 - 0
blade-service/blade-los/src/main/java/org/springblade/los/box/controller/ArchivesTrajectoryController.java

@@ -26,17 +26,29 @@ import io.swagger.annotations.ApiParam;
 import lombok.AllArgsConstructor;
 import org.springblade.common.annotation.RepeatSubmit;
 import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.excel.util.ExcelUtil;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
 import org.springblade.core.secure.utils.AuthUtil;
 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.box.entity.ArchivesTrajectory;
 import org.springblade.los.box.service.IArchivesTrajectoryService;
 import org.springblade.los.business.sea.entity.Bills;
+import org.springblade.los.business.sea.entity.SeaBillsDetail;
+import org.springblade.los.excel.ArchivesTrajectoryExcel;
+import org.springblade.los.excel.BBusinessTypeExcel;
+import org.springblade.los.excel.BillsExcel;
+import org.springblade.system.entity.DictBiz;
 import org.springframework.web.bind.annotation.*;
 
+import javax.servlet.http.HttpServletResponse;
 import javax.validation.Valid;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * 箱轨迹表 控制器
@@ -127,6 +139,68 @@ public class ArchivesTrajectoryController extends BladeController {
 	}
 
 	/**
+	 * 导出
+	 */
+	@GetMapping("/exportArchivesTrajectory")
+	public void exportArchivesTrajectory(ArchivesTrajectory archivesTrajectory, HttpServletResponse response) {
+		if (ObjectUtils.isNotNull(archivesTrajectory.getCode())){
+			archivesTrajectory.setCode(archivesTrajectory.getCode().replaceAll(" ",","));
+		}
+		LambdaQueryWrapper<ArchivesTrajectory> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+		lambdaQueryWrapper.eq(ArchivesTrajectory::getTenantId, AuthUtil.getTenantId()).eq(ArchivesTrajectory::getIsDeleted, 0)
+			.and(ObjectUtils.isNotNull(archivesTrajectory.getPortCname()), i -> i.like(ArchivesTrajectory::getPortCname, archivesTrajectory.getPortCname()).or()
+				.like(ArchivesTrajectory::getPortEname, archivesTrajectory.getPortCname()).or().like(ArchivesTrajectory::getPortCode, archivesTrajectory.getPortCname()))
+			.like(ObjectUtils.isNotNull(archivesTrajectory.getPortId()), ArchivesTrajectory::getPortId, archivesTrajectory.getPortId())
+			.like(ObjectUtils.isNotNull(archivesTrajectory.getStationCname()), ArchivesTrajectory::getStationCname, archivesTrajectory.getStationCname())
+			.like(ObjectUtils.isNotNull(archivesTrajectory.getContainerNumber()), ArchivesTrajectory::getContainerNumber, archivesTrajectory.getContainerNumber())
+			.eq(ObjectUtils.isNotNull(archivesTrajectory.getBoxCategory()), ArchivesTrajectory::getBoxCategory, archivesTrajectory.getBoxCategory())
+			.like(ObjectUtils.isNotNull(archivesTrajectory.getMblno()), ArchivesTrajectory::getMblno, archivesTrajectory.getMblno())
+			.like(ObjectUtils.isNotNull(archivesTrajectory.getHblno()), ArchivesTrajectory::getHblno, archivesTrajectory.getHblno())
+			.apply(ObjectUtils.isNotNull(archivesTrajectory.getCode()), "find_in_set(code,'" + archivesTrajectory.getCode() + "')")
+			.eq(ObjectUtils.isNotNull(archivesTrajectory.getBillType()), ArchivesTrajectory::getBillType, archivesTrajectory.getBillType())
+			.eq(ObjectUtils.isNotNull(archivesTrajectory.getStatus()), ArchivesTrajectory::getStatus, archivesTrajectory.getStatus())
+			.eq(ObjectUtils.isNotNull(archivesTrajectory.getTrajectoryStatus()), ArchivesTrajectory::getTrajectoryStatus, archivesTrajectory.getTrajectoryStatus())
+			.eq(ObjectUtils.isNotNull(archivesTrajectory.getBoxStatus()), ArchivesTrajectory::getBoxStatus, archivesTrajectory.getBoxStatus())
+			.eq(ObjectUtils.isNotNull(archivesTrajectory.getCorpId()), ArchivesTrajectory::getCorpId, archivesTrajectory.getCorpId());
+		if (ObjectUtils.isNotNull(archivesTrajectory.getBoxDynamics())){
+			if ("进场".equals(archivesTrajectory.getBoxDynamics())){
+				lambdaQueryWrapper.apply("find_in_set(box_dynamics,'客户还箱,场内退租进场,无货返空,调拨新箱,驳空箱,新箱,直接退租进场,直接调运进场,起租箱进场,场内起租进场,退租箱进场')");
+			}else if ("出场".equals(archivesTrajectory.getBoxDynamics())){
+				lambdaQueryWrapper.apply("find_in_set(box_dynamics,'内点摆箱,外点背箱,空箱集港,退租出场,起租箱出场,场内起租出场,新箱出场,直接调运出场,直接退租出场,场内退租出场')");
+			}else{
+				lambdaQueryWrapper.apply("find_in_set(box_dynamics,'更改放箱号,箱档案-更改箱状态,海运出口-拆单,装船,卸船')");
+			}
+		}
+
+		if (archivesTrajectory.getNewDateList() != null && archivesTrajectory.getNewDateList().size() > 1) {//日期
+			lambdaQueryWrapper.ge(ArchivesTrajectory::getNewDate, archivesTrajectory.getNewDateList().get(0));
+			lambdaQueryWrapper.le(ArchivesTrajectory::getNewDate, archivesTrajectory.getNewDateList().get(1));
+		}
+		if (archivesTrajectory.getEntryDateList() != null && archivesTrajectory.getEntryDateList().size() > 1) {
+			lambdaQueryWrapper.ge(ArchivesTrajectory::getPolPreAppearanceDate, archivesTrajectory.getEntryDateList().get(0));
+			lambdaQueryWrapper.le(ArchivesTrajectory::getPolPreAppearanceDate, archivesTrajectory.getEntryDateList().get(1));
+		}
+		if (archivesTrajectory.getAppearDateList() != null && archivesTrajectory.getAppearDateList().size() > 1) {
+			lambdaQueryWrapper.ge(ArchivesTrajectory::getPolStationEmptyContainerExitDate, archivesTrajectory.getAppearDateList().get(0));
+			lambdaQueryWrapper.le(ArchivesTrajectory::getPolStationEmptyContainerExitDate, archivesTrajectory.getAppearDateList().get(1));
+		}
+		if ("1".equals(archivesTrajectory.getWhetherStillBox())){
+			lambdaQueryWrapper.eq(ArchivesTrajectory::getBoxDynamics,"客户还箱");
+		}
+
+		if (ObjectUtils.isNotNull(archivesTrajectory.getCode())){
+			lambdaQueryWrapper.last("GROUP BY code,box_type,bill_type,box_dynamics,box_category,DATE_FORMAT(new_date, '%Y-%m-%d')," +
+				"port_id,station_id,container_number,IFNULL(mblno, ''),IFNULL(hblno, ''),src_id ORDER BY code DESC,new_date DESC");
+		}else{
+			lambdaQueryWrapper.last("GROUP BY code,box_type,bill_type,box_dynamics,box_category,DATE_FORMAT(new_date, '%Y-%m-%d')," +
+				"port_id,station_id,container_number,IFNULL(mblno, ''),IFNULL(hblno, ''),src_id ORDER BY new_date DESC");
+		}
+		List<ArchivesTrajectory> list = archivesTrajectoryService.list(lambdaQueryWrapper);
+		ExcelUtil.export(response, "箱轨迹", "箱轨迹", BeanUtil.copy(list, ArchivesTrajectoryExcel.class), ArchivesTrajectoryExcel.class);
+
+	}
+
+	/**
 	 * 新增或修改 箱轨迹表
 	 */
 	@PostMapping("/submit")

+ 58 - 0
blade-service/blade-los/src/main/java/org/springblade/los/box/controller/PutBoxController.java

@@ -25,18 +25,24 @@ import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
 import lombok.AllArgsConstructor;
 import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.excel.util.ExcelUtil;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
 import org.springblade.core.secure.utils.AuthUtil;
 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.box.entity.ArchivesTrajectory;
 import org.springblade.los.box.entity.PutBox;
 import org.springblade.los.box.entity.PutBoxItems;
 import org.springblade.los.box.service.IPutBoxItemsService;
 import org.springblade.los.box.service.IPutBoxService;
 import org.springblade.los.business.sea.entity.SeaContainerNumberItem;
+import org.springblade.los.excel.ArchivesTrajectoryExcel;
+import org.springblade.los.excel.PutBoxExcel;
 import org.springframework.web.bind.annotation.*;
 
+import javax.servlet.http.HttpServletResponse;
 import javax.validation.Valid;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
@@ -123,6 +129,58 @@ public class PutBoxController extends BladeController {
 	}
 
 	/**
+	 * 导出
+	 */
+	@GetMapping("/exportPutBox")
+	public void exportPutBox(PutBox putBox, HttpServletResponse response) {
+		LambdaQueryWrapper<PutBox> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+		lambdaQueryWrapper.eq(PutBox::getTenantId, AuthUtil.getTenantId())
+			.eq(PutBox::getIsDeleted, 0)
+			.eq(ObjectUtils.isNotNull(putBox.getBoxType()), PutBox::getBoxType, putBox.getBoxType())
+			.eq(ObjectUtils.isNotNull(putBox.getBoxClass()), PutBox::getBoxClass, putBox.getBoxClass())
+			.like(ObjectUtils.isNotNull(putBox.getContainerNumber()), PutBox::getContainerNumber, putBox.getContainerNumber())
+			.like(ObjectUtils.isNotNull(putBox.getInternalContainerNumber()), PutBox::getInternalContainerNumber, putBox.getInternalContainerNumber())
+			.like(ObjectUtils.isNotNull(putBox.getBoxEastName()), PutBox::getBoxEastName, putBox.getBoxEastName())
+			.eq(ObjectUtils.isNotNull(putBox.getBoxBelongsTo()), PutBox::getBoxBelongsTo, putBox.getBoxBelongsTo())
+			.eq(ObjectUtils.isNotNull(putBox.getPodId()), PutBox::getPodId, putBox.getPodId())
+//			.like(ObjectUtils.isNotNull(putBox.getPodCname()), PutBox::getPodCname, putBox.getPodCname())
+			.and(ObjectUtils.isNotNull(putBox.getPodCname()), i -> i.like(PutBox::getPodCname, putBox.getPodCname()).or()
+				.like(PutBox::getPodEname, putBox.getPodCname()).or().like(PutBox::getPodCode, putBox.getPodCname()))
+			.eq(ObjectUtils.isNotNull(putBox.getPolId()), PutBox::getPolId, putBox.getPolId())
+			.like(ObjectUtils.isNotNull(putBox.getPolCname()), PutBox::getPolCname, putBox.getPolCname())
+			.eq(ObjectUtils.isNotNull(putBox.getPodStationId()), PutBox::getPodStationId, putBox.getPodStationId())
+			.like(ObjectUtils.isNotNull(putBox.getPodStationCname()), PutBox::getPodStationCname, putBox.getPodStationCname())
+			.eq(ObjectUtils.isNotNull(putBox.getPolStationId()), PutBox::getPolStationId, putBox.getPolStationId())
+			.like(ObjectUtils.isNotNull(putBox.getPolStationCname()), PutBox::getPolStationCname, putBox.getPolStationCname())
+			.eq(ObjectUtils.isNotNull(putBox.getSrcType()), PutBox::getSrcType, putBox.getSrcType())
+			.like(ObjectUtils.isNotNull(putBox.getSrcContainerNumber()), PutBox::getSrcContainerNumber, putBox.getSrcContainerNumber())
+			.like(ObjectUtils.isNotNull(putBox.getSrcNo()), PutBox::getSrcNo, putBox.getSrcNo())
+			.like(ObjectUtils.isNotNull(putBox.getCode()), PutBox::getCode, putBox.getCode())
+			.eq(ObjectUtils.isNotNull(putBox.getPriorityLevel()), PutBox::getPriorityLevel, putBox.getPriorityLevel());
+		lambdaQueryWrapper.orderByDesc(PutBox::getCreateTime);
+		lambdaQueryWrapper.orderByAsc(PutBox::getPolCname);
+		lambdaQueryWrapper.orderByAsc(PutBox::getPodCname);
+		lambdaQueryWrapper.orderByAsc(PutBox::getPriorityLevel);
+		if ("1".equals(putBox.getWhetherDisplay())) {
+			lambdaQueryWrapper.ne(PutBox::getRemainingNum, 0);
+			lambdaQueryWrapper.eq(PutBox::getWhetherDeactivate, "0");
+		} else if ("2".equals(putBox.getWhetherDisplay())) {
+			lambdaQueryWrapper.eq(PutBox::getRemainingNum, 0);
+			lambdaQueryWrapper.eq(PutBox::getWhetherDeactivate, "0");
+		} else if ("3".equals(putBox.getWhetherDisplay())) {
+			lambdaQueryWrapper.eq(PutBox::getWhetherDeactivate, "1");
+		}
+		if (ObjectUtils.isNotNull(putBox.getEffectiveStartDate()) && ObjectUtils.isNotNull(putBox.getEffectiveEndDate())) {
+			SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
+			lambdaQueryWrapper.apply(ObjectUtils.isNotNull(putBox.getEffectiveStartDate()), "DATE_FORMAT(effective_start_date,'%Y-%m-%d') >= '" + formatter.format(putBox.getEffectiveStartDate()) + "'")
+				.apply(ObjectUtils.isNotNull(putBox.getEffectiveEndDate()), "DATE_FORMAT(effective_end_date,'%Y-%m-%d') <= '" + formatter.format(putBox.getEffectiveEndDate()) + "'");
+		}
+		List<PutBox> list = putBoxService.list(lambdaQueryWrapper);
+		ExcelUtil.export(response, "放箱号", "放箱号", BeanUtil.copy(list, PutBoxExcel.class), PutBoxExcel.class);
+
+	}
+
+	/**
 	 * 新增或修改 放箱表
 	 */
 	@PostMapping("/submit")

+ 2 - 0
blade-service/blade-los/src/main/java/org/springblade/los/box/service/impl/TradingBoxServiceImpl.java

@@ -1768,6 +1768,8 @@ public class TradingBoxServiceImpl extends ServiceImpl<TradingBoxMapper, Trading
 				} else {
 					putBox.setSrcContainerNumber(tradingBox.getContainerNumber());
 				}
+				putBox.setBoxEastId(tradingBox.getPurchaseCompanyId()+"");
+				putBox.setBoxEastName(tradingBox.getPurchaseCompanyName());
 				putBox.setPolId(detail.getPolId());
 				putBox.setPolCname(detail.getPolCname());
 				putBox.setPolEname(detail.getPolEname());

+ 50 - 10
blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/impl/BillsServiceImpl.java

@@ -843,9 +843,9 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 					}
 				}
 				if ("SE".equals(bills.getBusinessType()) && statusEtd) {
-					updateCorpsUtils.updateCorps(bills.getCorpId(),bills.getBusinessType(),bills.getEtd());
+					updateCorpsUtils.updateCorps(bills.getCorpId(), bills.getBusinessType(), bills.getEtd());
 				} else if ("SI".equals(bills.getBusinessType()) && statusEta) {
-					updateCorpsUtils.updateCorps(bills.getCorpId(),bills.getBusinessType(),bills.getEta());
+					updateCorpsUtils.updateCorps(bills.getCorpId(), bills.getBusinessType(), bills.getEta());
 				}
 				List<FeeCenter> feeCenterList = feeCenterService.list(new LambdaQueryWrapper<FeeCenter>()
 					.eq(FeeCenter::getTenantId, AuthUtil.getTenantId())
@@ -926,6 +926,26 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 		if (ObjectUtils.isNotNull(bills.getDetail())) {
 			Object seaBillsDetailObject = StringTools.handle(bills.getDetail(), "SeaBillsDetail");
 			SeaBillsDetail seaBillsDetail = JSONObject.parseObject(JSONObject.toJSONString(seaBillsDetailObject), SeaBillsDetail.class);
+			String lineLength = sysClient.getParamService("line.length");
+			if ("获取数据失败".equals(lineLength)) {
+				throw new RuntimeException("请先维护收发通每行长度参数");
+			}
+			if (ObjectUtils.isNotNull(bills.getForeignAgencyDetails())) {
+				String foreignAgencyDetails = StringTools.wrapText(bills.getForeignAgencyDetails(), Integer.parseInt(lineLength));
+				bills.setForeignAgencyDetails(foreignAgencyDetails);
+			}
+			if (ObjectUtils.isNotNull(seaBillsDetail.getHshipperDetails())) {
+				String hshipperDetails = StringTools.wrapText(seaBillsDetail.getHshipperDetails(), Integer.parseInt(lineLength));
+				seaBillsDetail.setHshipperDetails(hshipperDetails);
+			}
+			if (ObjectUtils.isNotNull(seaBillsDetail.getHconsigneeDetails())) {
+				String hconsigneeDetails = StringTools.wrapText(seaBillsDetail.getHconsigneeDetails(), Integer.parseInt(lineLength));
+				seaBillsDetail.setHconsigneeDetails(hconsigneeDetails);
+			}
+			if (ObjectUtils.isNotNull(seaBillsDetail.getHnotifyDetails())) {
+				String hnotifyDetails = StringTools.wrapText(seaBillsDetail.getHnotifyDetails(), Integer.parseInt(lineLength));
+				seaBillsDetail.setHnotifyDetails(hnotifyDetails);
+			}
 			if (ObjectUtils.isNotNull(seaBillsDetail.getId())) {
 				seaBillsDetail.setUpdateUser(AuthUtil.getUserId());
 				seaBillsDetail.setUpdateUserName(AuthUtil.getUserName());
@@ -1143,9 +1163,9 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 							}
 						}
 						if ("SE".equals(bills.getBusinessType()) && statusEtd) {
-							updateCorpsUtils.updateCorps(item.getCorpId(),bills.getBusinessType(),bills.getEtd());
+							updateCorpsUtils.updateCorps(item.getCorpId(), bills.getBusinessType(), bills.getEtd());
 						} else if ("SI".equals(bills.getBusinessType()) && statusEta) {
-							updateCorpsUtils.updateCorps(item.getCorpId(),bills.getBusinessType(),bills.getEta());
+							updateCorpsUtils.updateCorps(item.getCorpId(), bills.getBusinessType(), bills.getEta());
 						}
 						item.setMblno(bills.getMblno());
 						item.setActualEta(bills.getActualEta());
@@ -1456,9 +1476,9 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 			this.synchronous(bills);
 		}
 		if ("SE".equals(bills.getBusinessType())) {
-			updateCorpsUtils.updateCorps(bills.getCorpId(),bills.getBusinessType(),bills.getEtd());
+			updateCorpsUtils.updateCorps(bills.getCorpId(), bills.getBusinessType(), bills.getEtd());
 		} else if ("SI".equals(bills.getBusinessType())) {
-			updateCorpsUtils.updateCorps(bills.getCorpId(),bills.getBusinessType(),bills.getEta());
+			updateCorpsUtils.updateCorps(bills.getCorpId(), bills.getBusinessType(), bills.getEta());
 		}
 		List<FeeCenter> feeCenterList = feeCenterService.list(new LambdaQueryWrapper<FeeCenter>()
 			.eq(FeeCenter::getTenantId, AuthUtil.getTenantId())
@@ -3012,9 +3032,9 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 						.in(FeeCenter::getPid, billIds));
 					for (Bills item : details) {
 						if ("SE".equals(bills.getBusinessType())) {
-							updateCorpsUtils.updateCorps(item.getCorpId(),bills.getBusinessType(),bills.getEtd());
+							updateCorpsUtils.updateCorps(item.getCorpId(), bills.getBusinessType(), bills.getEtd());
 						} else if ("SI".equals(bills.getBusinessType())) {
-							updateCorpsUtils.updateCorps(item.getCorpId(),bills.getBusinessType(),bills.getEta());
+							updateCorpsUtils.updateCorps(item.getCorpId(), bills.getBusinessType(), bills.getEta());
 						}
 						item.setMblno(bills.getMblno());
 						BigDecimal amountDrMH = new BigDecimal("0.00");
@@ -3205,9 +3225,9 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 			}
 			finAccBillsService.updateBatchById(finAccBillsList);
 			if ("SE".equals(bills.getBusinessType())) {
-				updateCorpsUtils.updateCorps(bills.getCorpId(),bills.getBusinessType(),bills.getEtd());
+				updateCorpsUtils.updateCorps(bills.getCorpId(), bills.getBusinessType(), bills.getEtd());
 			} else if ("SI".equals(bills.getBusinessType())) {
-				updateCorpsUtils.updateCorps(bills.getCorpId(),bills.getBusinessType(),bills.getEta());
+				updateCorpsUtils.updateCorps(bills.getCorpId(), bills.getBusinessType(), bills.getEta());
 			}
 		}
 		baseMapper.updateById(bills);
@@ -5332,6 +5352,26 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 		if (ObjectUtils.isNotNull(bills.getDetail())) {
 			Object seaBillsDetailObject = StringTools.handle(bills.getDetail(), "SeaBillsDetail");
 			SeaBillsDetail seaBillsDetail = JSONObject.parseObject(JSONObject.toJSONString(seaBillsDetailObject), SeaBillsDetail.class);
+			String lineLength = sysClient.getParamService("line.length");
+			if ("获取数据失败".equals(lineLength)) {
+				throw new RuntimeException("请先维护收发通每行长度参数");
+			}
+			if (ObjectUtils.isNotNull(bills.getForeignAgencyDetails())) {
+				String foreignAgencyDetails = StringTools.wrapText(bills.getForeignAgencyDetails(), Integer.parseInt(lineLength));
+				bills.setForeignAgencyDetails(foreignAgencyDetails);
+			}
+			if (ObjectUtils.isNotNull(seaBillsDetail.getHshipperDetails())) {
+				String hshipperDetails = StringTools.wrapText(seaBillsDetail.getHshipperDetails(), Integer.parseInt(lineLength));
+				seaBillsDetail.setHshipperDetails(hshipperDetails);
+			}
+			if (ObjectUtils.isNotNull(seaBillsDetail.getHconsigneeDetails())) {
+				String hconsigneeDetails = StringTools.wrapText(seaBillsDetail.getHconsigneeDetails(), Integer.parseInt(lineLength));
+				seaBillsDetail.setHconsigneeDetails(hconsigneeDetails);
+			}
+			if (ObjectUtils.isNotNull(seaBillsDetail.getHnotifyDetails())) {
+				String hnotifyDetails = StringTools.wrapText(seaBillsDetail.getHnotifyDetails(), Integer.parseInt(lineLength));
+				seaBillsDetail.setHnotifyDetails(hnotifyDetails);
+			}
 			if (ObjectUtils.isNotNull(seaBillsDetail.getId())) {
 				seaBillsDetail.setUpdateUser(AuthUtil.getUserId());
 				seaBillsDetail.setUpdateUserName(AuthUtil.getUserName());

+ 92 - 0
blade-service/blade-los/src/main/java/org/springblade/los/excel/ArchivesTrajectoryExcel.java

@@ -0,0 +1,92 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.los.excel;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
+import com.alibaba.excel.annotation.write.style.ContentRowHeight;
+import com.alibaba.excel.annotation.write.style.HeadRowHeight;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+import java.util.Date;
+
+/**
+ * 物流-业务-协议价管理主表实体类
+ *
+ * @author BladeX
+ * @since 2023-10-10
+ */
+@Data
+@ColumnWidth(25)
+@HeadRowHeight(20)
+@ContentRowHeight(18)
+public class ArchivesTrajectoryExcel implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+
+
+	@ExcelProperty(value = "箱号")
+	private String code;
+
+	@ExcelProperty(value = "放箱号")
+	private String containerNumber;
+
+	@ExcelProperty(value = "箱型")
+	private String boxType;
+
+	@ExcelProperty(value = "放箱号类型")
+	private String boxCategory;
+
+	@ExcelProperty(value = "状态")
+	private String status;
+
+	@ExcelProperty(value = "箱动态")
+	private String boxDynamics;
+
+	@ExcelProperty(value = "动态日期")
+	private Date newDate;
+
+	@ExcelProperty(value = "箱好坏")
+	private String boxStatus;
+
+	@ExcelProperty(value = "港口")
+	private String portCname;
+
+	@ExcelProperty(value = "场站")
+	private String stationCname;
+
+	@ExcelProperty(value = "提单号")
+	private String mblno;
+
+	@ExcelProperty(value = "分单号")
+	private String hblno;
+
+	@ExcelProperty(value = "船名")
+	private String shipCname;
+
+	@ExcelProperty(value = "航次")
+	private String voyage;
+
+	@ExcelProperty(value = "POD港口")
+	private String podCname;
+
+
+}

+ 106 - 0
blade-service/blade-los/src/main/java/org/springblade/los/excel/PutBoxExcel.java

@@ -0,0 +1,106 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.los.excel;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
+import com.alibaba.excel.annotation.write.style.ContentRowHeight;
+import com.alibaba.excel.annotation.write.style.HeadRowHeight;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 物流-业务-协议价管理主表实体类
+ *
+ * @author BladeX
+ * @since 2023-10-10
+ */
+@Data
+@ColumnWidth(25)
+@HeadRowHeight(20)
+@ContentRowHeight(18)
+public class PutBoxExcel implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+
+
+	@ExcelProperty(value = "放箱号")
+	private String containerNumber;
+
+	@ExcelProperty(value = "放箱号类型")
+	private String boxCategory;
+
+	@ExcelProperty(value = "箱型")
+	private String boxType;
+
+	@ExcelProperty(value = "可用箱量")
+	private Integer remainingNum;
+
+	@ExcelProperty(value = "操作占用")
+	private Integer occupyNum;
+
+	@ExcelProperty(value = "场地盘存")
+	private Integer storageNum;
+
+	@ExcelProperty(value = "起运港")
+	private String polCname;
+
+	@ExcelProperty(value = "目的港")
+	private String podCname;
+
+	@ExcelProperty(value = "预计起运港场站")
+	private String estimatedPolStationCname;
+
+	@ExcelProperty(value = "实际起运港场站")
+	private String polStationCname;
+
+	@ExcelProperty(value = "有效日期起")
+	private Date effectiveStartDate;
+
+	@ExcelProperty(value = "有效日期止")
+	private Date effectiveEndDate;
+
+	@ExcelProperty(value = "系统号")
+	private String sysNo;
+
+	@ExcelProperty(value = "优先等级")
+	private String priorityLevel;
+
+	@ExcelProperty(value = "箱号")
+	private String code;
+
+	@ExcelProperty(value = "内部放箱号")
+	private String internalContainerNumber;
+
+	@ExcelProperty(value = "来源类型")
+	private String srcType;
+
+	@ExcelProperty(value = "来源系统号")
+	private String srcNo;
+
+	@ExcelProperty(value = "来源放箱号")
+	private String srcContainerNumber;
+
+	@ExcelProperty(value = "箱属")
+	private String boxBelongsTo;
+
+
+}

+ 6 - 0
blade-service/blade-los/src/main/java/org/springblade/los/finance/fee/mapper/FinAccBillsMapper.xml

@@ -709,6 +709,9 @@
         <if test='fee.srcId != null'>
             and acc.src_id = #{fee.srcId}
         </if>
+        <if test='fee.operatorId != null'>
+            and acc.operator_id = #{fee.operatorId}
+        </if>
         <if test='fee.isBusinessDate != null and fee.isBusinessDate != "" and fee.isBusinessDate == "1"'>
             <if test='fee.etdStart != null and fee.etdStart != ""'>
                 and acc.business_date &gt;= #{fee.etdStart}
@@ -817,6 +820,9 @@
         <if test='fee.srcId != null'>
             and acc.src_id = #{fee.srcId}
         </if>
+        <if test='fee.operatorId != null'>
+            and acc.operator_id = #{fee.operatorId}
+        </if>
         <if test='fee.isBusinessDate != null and fee.isBusinessDate != "" and fee.isBusinessDate == "1"'>
             <if test='fee.etdStart != null and fee.etdStart != ""'>
                 and acc.business_date &gt;= #{fee.etdStart}