Jelajahi Sumber

1.客户删除增加判断是否使用过
2.分单添加到主单同步费用,账单数据
3.客户订舱-增加提交订舱,撤销订舱,提交确认接口
4.客户订舱保存接口,详情增加配箱逻辑
5.费用-申请删除逻辑问题修改
6.决策分析业务编号值改为单据号
7.ftp进场,出场导入调试及修改
8.空想返场增加更新唛头按钮
9.海运进出口保存主单同步分单账单数据问题修改

纪新园 6 bulan lalu
induk
melakukan
2a91a7d3c8
15 mengubah file dengan 900 tambahan dan 570 penghapusan
  1. 12 7
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/business/sea/entity/Bills.java
  2. 10 1
      blade-service/blade-los/src/main/java/org/springblade/los/basic/corps/controller/BCorpsController.java
  3. 8 10
      blade-service/blade-los/src/main/java/org/springblade/los/box/service/impl/ExpenseApplicationServiceImpl.java
  4. 498 450
      blade-service/blade-los/src/main/java/org/springblade/los/box/service/impl/PutBoxServiceImpl.java
  5. 30 0
      blade-service/blade-los/src/main/java/org/springblade/los/business/sea/controller/BookingCabinController.java
  6. 4 2
      blade-service/blade-los/src/main/java/org/springblade/los/business/sea/mapper/ContainersMapper.xml
  7. 4 0
      blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/IBillsService.java
  8. 178 31
      blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/impl/BillsServiceImpl.java
  9. 26 22
      blade-service/blade-los/src/main/java/org/springblade/los/excel/BoxNumberProfitExcel.java
  10. 12 0
      blade-service/blade-los/src/main/java/org/springblade/los/excel/PodStationR.java
  11. 5 0
      blade-service/blade-los/src/main/java/org/springblade/los/excel/UpdatePodStationExcel.java
  12. 2 2
      blade-service/blade-los/src/main/java/org/springblade/los/finance/fee/mapper/FinAccBillsMapper.xml
  13. 13 11
      blade-service/blade-los/src/main/java/org/springblade/los/finance/fee/service/impl/FeeCenterUpdateRecordServiceImpl.java
  14. 4 0
      blade-service/blade-los/src/main/java/org/springblade/los/ftp/service/CyFtpService.java
  15. 94 34
      blade-service/blade-los/src/main/java/org/springblade/los/ftp/service/impl/CyFtpServiceImpl.java

+ 12 - 7
blade-service-api/blade-los-api/src/main/java/org/springblade/los/business/sea/entity/Bills.java

@@ -750,24 +750,24 @@ public class Bills implements Serializable {
 	@ApiModelProperty(value = "分单已配箱体积 (CBM)")
 	private BigDecimal cfsMeasurement;
 	/**
-	 * 20"集装箱箱数
+	 * 20GP"集装箱箱数
 	 */
 	@ApiModelProperty(value = "20集装箱箱数")
 	private Integer quantityV20;
 	/**
-	 * 40"集装箱箱数
+	 * 40GP"集装箱箱数
 	 */
-	@ApiModelProperty(value = "40集装箱箱数")
+	@ApiModelProperty(value = "40GP集装箱箱数")
 	private Integer quantityV40;
 	/**
-	 * 45"集装箱箱数
+	 * 20HC"集装箱箱数
 	 */
-	@ApiModelProperty(value = "45集装箱箱数")
+	@ApiModelProperty(value = "20HC集装箱箱数")
 	private Integer quantityV45;
 	/**
-	 * 48"集装箱箱数
+	 * 40FR"集装箱箱数
 	 */
-	@ApiModelProperty(value = "48集装箱箱数")
+	@ApiModelProperty(value = "40FR集装箱箱数")
 	private Integer quantityV48;
 	/**
 	 * 40HC 集装箱箱数
@@ -1179,6 +1179,11 @@ public class Bills implements Serializable {
 	@ApiModelProperty(value = "签单状态")
 	private String issueStatus;
 	/**
+	 * 提交确认状态0否1是
+	 */
+	@ApiModelProperty(value = "提交确认状态")
+	private String confirmStatus;
+	/**
 	 * 是否开船  未开船 已开船
 	 */
 	@ApiModelProperty(value = "是否开船")

+ 10 - 1
blade-service/blade-los/src/main/java/org/springblade/los/basic/corps/controller/BCorpsController.java

@@ -36,7 +36,6 @@ 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.Util.IDeptUtils;
 import org.springblade.los.basic.corps.entity.BCorps;
 import org.springblade.los.basic.corps.entity.BCorpsTypeDefine;
 import org.springblade.los.basic.corps.entity.BCorpsTypes;
@@ -46,6 +45,8 @@ import org.springblade.los.basic.corps.service.IBCorpsTypesService;
 import org.springblade.los.basic.corps.vo.BCorpsVO;
 import org.springblade.los.basic.utils.ExtendedData;
 import org.springblade.los.excel.BCorpsExcel;
+import org.springblade.los.finance.fee.entity.FeeCenter;
+import org.springblade.los.finance.fee.service.IFeeCenterService;
 import org.springblade.system.feign.ISysClient;
 import org.springblade.system.user.entity.User;
 import org.springblade.system.user.feign.IUserClient;
@@ -79,6 +80,7 @@ public class BCorpsController extends BladeController {
 	private final IUserClient iUserClient;
 
 	private final ISysClient sysClient;
+	private final IFeeCenterService feeCenterService;
 
 	/**
 	 * 详情
@@ -279,6 +281,13 @@ public class BCorpsController extends BladeController {
 	@ApiOperation(value = "删除", notes = "传入ids")
 	@RepeatSubmit
 	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		List<FeeCenter> feeCenterList = feeCenterService.list(new LambdaQueryWrapper<FeeCenter>()
+			.eq(FeeCenter::getTenantId, AuthUtil.getTenantId())
+			.eq(FeeCenter::getIsDeleted, 0)
+			.in(FeeCenter::getCorpId, Func.toLongList(ids)));
+		if (!feeCenterList.isEmpty()) {
+			throw new RuntimeException("客户已被使用,删除失败");
+		}
 		return R.status(bCorpsService.removeByIds(Func.toLongList(ids)));
 	}
 

+ 8 - 10
blade-service/blade-los/src/main/java/org/springblade/los/box/service/impl/ExpenseApplicationServiceImpl.java

@@ -571,21 +571,19 @@ public class ExpenseApplicationServiceImpl extends ServiceImpl<ExpenseApplicatio
 			FinAccBills finAccBills = new FinAccBills();
 			finAccBills.setFeeCenterList(feeCenterList);
 			finAccBillsService.revokeBill(finAccBills);
-		} else {
-			for (FeeCenter item : expenseApplication.getFeeCenterList()) {
-				item.setStlPid(null);
-				item.setAuditStatus("0");
-				item.setApplyId(0L);
-				item.setApplyName("");
-				item.setApplyTime(null);
-			}
-			feeCenterService.updateBatchById(expenseApplication.getFeeCenterList());
 		}
+		for (FeeCenter item : feeCenterListOld) {
+			item.setStlPid(null);
+			item.setAuditStatus("0");
+			item.setApplyId(0L);
+			item.setApplyName("");
+			item.setApplyTime(null);
+		}
+		feeCenterService.updateBatchById(feeCenterListOld);
 		if (idList.isEmpty()) {
 			throw new RuntimeException("未查到请核费用单据id");
 		}
 		this.removeByIds(idList);
-		baseMapper.insert(expenseApplication);
 		for (Long item : idList) {
 			R financeProcess = auditProecessService.deteleBySrcBillId(item);
 			if (!financeProcess.isSuccess()) {

File diff ditekan karena terlalu besar
+ 498 - 450
blade-service/blade-los/src/main/java/org/springblade/los/box/service/impl/PutBoxServiceImpl.java


+ 30 - 0
blade-service/blade-los/src/main/java/org/springblade/los/business/sea/controller/BookingCabinController.java

@@ -36,6 +36,7 @@ import org.springblade.los.business.sea.service.ISeaBillsDetailService;
 import org.springframework.web.bind.annotation.*;
 
 import javax.validation.Valid;
+import java.util.Date;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -208,5 +209,34 @@ public class BookingCabinController extends BladeController {
 		return R.data(declare);
 	}
 
+	/**
+	 * 提交客户订舱
+	 */
+	@PostMapping("/submitCustomerBooking")
+	public R submitCustomerBooking(@Valid @RequestBody Bills bills) {
+		return billsService.submitCustomerBooking(bills);
+	}
+
+	/**
+	 * 撤销客户订舱
+	 */
+	@PostMapping("/revokeCustomerBooking")
+	public R revokeCustomerBooking(@Valid @RequestBody Bills bills) {
+		return billsService.revokeCustomerBooking(bills);
+	}
+
+	/**
+	 * 提交确认
+	 */
+	@PostMapping("/submitConfirm")
+	public R submitConfirm(@Valid @RequestBody Bills bills) {
+		bills.setUpdateUserName(AuthUtil.getUserName());
+		bills.setUpdateUser(AuthUtil.getUserId());
+		bills.setUpdateTime(new Date());
+		bills.setConfirmStatus("1");
+		billsService.updateById(bills);
+		return R.data(bills);
+	}
+
 }
 

+ 4 - 2
blade-service/blade-los/src/main/java/org/springblade/los/business/sea/mapper/ContainersMapper.xml

@@ -97,7 +97,8 @@
         se.id as id,
         se.eta as eta,
         se.etd as etd,
-        se.business_type as businessType
+        se.business_type as businessType,
+        sc.marks as marks
         FROM
         los_sea_containers sc
         LEFT JOIN los_sea_bills se ON sc.pid = se.id
@@ -193,7 +194,8 @@
         se.id as id,
         se.eta as eta,
         se.etd as etd,
-        se.business_type as businessType
+        se.business_type as businessType,
+        sc.marks as marks
         FROM
         los_sea_containers sc
         LEFT JOIN los_sea_bills se ON sc.pid = se.id

+ 4 - 0
blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/IBillsService.java

@@ -189,4 +189,8 @@ public interface IBillsService extends IService<Bills> {
 	R updateBillType(String ids, String billType);
 
 	Bills copyBillsBooking(Bills bills);
+
+	R submitCustomerBooking(Bills bills);
+
+	R revokeCustomerBooking(Bills bills);
 }

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

@@ -339,15 +339,15 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 					item.setUpdateUserName(AuthUtil.getUserName());
 				}
 				item.setPid(bills.getId());
-				if (item.getCntrTypeCode().contains("20")) {
+				if (item.getCntrTypeCode().equals("20GP")) {
 					V20 += item.getQuantity();
-				} else if (item.getCntrTypeCode().contains("45")) {
+				} else if (item.getCntrTypeCode().equals("20HC")) {
 					V45 += item.getQuantity();
-				} else if (item.getCntrTypeCode().contains("48")) {
+				} else if (item.getCntrTypeCode().equals("40FR")) {
 					V48 += item.getQuantity();
-				} else if (item.getCntrTypeCode().contains("40")) {
+				} else if (item.getCntrTypeCode().equals("40GP")) {
 					V40 += item.getQuantity();
-				} else if (item.getCntrTypeCode().contains("40") && item.getCntrTypeCode().contains("HC")) {
+				} else if (item.getCntrTypeCode().equals("40HC")) {
 					V40HC += item.getQuantity();
 				} else {
 					other += item.getQuantity();
@@ -966,20 +966,23 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 					List<FinAccBills> finAccBillsList = finAccBillsService.list(new LambdaQueryWrapper<FinAccBills>()
 						.eq(FinAccBills::getTenantId, AuthUtil.getTenantId())
 						.eq(FinAccBills::getIsDeleted, 0)
-						.eq(FinAccBills::getBusinessBillDivideId, billIds));
+						.in(FinAccBills::getBusinessBillId, billIds));
 					for (FinAccBills item : finAccBillsList) {
-						item.setVesselId(bills.getVesselId());
-						item.setVesselCnName(bills.getVesselCnName());
-						item.setVesselEnName(bills.getVesselEnName());
-						item.setVoyageNo(bills.getVoyageNo());
-						item.setPolId(bills.getPolId());
-						item.setPolCnName(bills.getPolCnName());
-						item.setPolEnName(bills.getPolEnName());
-						item.setPolCode(bills.getPolCode());
-						item.setPodId(bills.getPodId());
-						item.setPodCnName(bills.getPodCnName());
-						item.setPodEnName(bills.getPodEnName());
-						item.setPodCode(bills.getPodCode());
+						Bills bill = billsList.stream().filter(e-> e.getId().equals(item.getBusinessBillId())).findFirst().orElse(null);
+						if (bill != null){
+							item.setVesselId(bill.getVesselId());
+							item.setVesselCnName(bill.getVesselCnName());
+							item.setVesselEnName(bill.getVesselEnName());
+							item.setVoyageNo(bill.getVoyageNo());
+							item.setPolId(bill.getPolId());
+							item.setPolCnName(bill.getPolCnName());
+							item.setPolEnName(bill.getPolEnName());
+							item.setPolCode(bill.getPolCode());
+							item.setPodId(bill.getPodId());
+							item.setPodCnName(bill.getPodCnName());
+							item.setPodEnName(bill.getPodEnName());
+							item.setPodCode(bill.getPodCode());
+						}
 					}
 					finAccBillsService.updateBatchById(finAccBillsList);
 				}
@@ -1447,11 +1450,115 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 				containersBillsService.saveBatch(containersBillsListNew);
 			}
 		}
-		for (Bills item : billsList){
+		List<FeeCenter> feeCenterList = feeCenterService.list(new LambdaQueryWrapper<FeeCenter>()
+			.eq(FeeCenter::getTenantId, AuthUtil.getTenantId())
+			.eq(FeeCenter::getIsDeleted, 0)
+			.in(FeeCenter::getPid, billsList.stream().map(Bills::getId).collect(Collectors.toList())));
+		if (!feeCenterList.isEmpty()) {
+			List<FinAccBills> finAccBillsList = finAccBillsService.list(new LambdaQueryWrapper<FinAccBills>()
+				.eq(FinAccBills::getTenantId, AuthUtil.getTenantId())
+				.eq(FinAccBills::getIsDeleted, 0)
+				.in(FinAccBills::getBusinessBillId, billsList.stream().map(Bills::getId).collect(Collectors.toList())));
+			List<FeeCenter> FeeCenterListNew = new ArrayList<>();
+			List<FinAccBills> finAccBillsListNew = new ArrayList<>();
+			for (FeeCenter item : feeCenterList) {
+				Bills bill = billsList.stream().filter(e -> e.getId().equals(item.getPid())).findFirst().orElse(null);
+				if (bill != null) {
+					item.setBillNo(bill.getBillNo());
+					item.setBusinessType(bill.getBusinessType());
+					item.setBillType(bill.getBillType());
+					item.setBillDate(bill.getBillDate());
+					item.setSrcType(bill.getSrcType());
+					item.setSrcId(bill.getSrcId());
+					item.setBookingAgentId(bill.getBookingAgentId());
+					item.setBookingAgentCnName(bill.getBookingAgentCnName());
+					item.setBookingAgentEnName(bill.getBookingAgentEnName());
+					item.setSrcCnName(bill.getSrcCnName());
+					item.setSrcEnName(bill.getSrcEnName());
+					item.setBillCorpId(bill.getCorpId());
+					item.setBillCorpCnName(bill.getCorpCnName());
+					item.setBillCorpEnName(bill.getCorpEnName());
+					item.setBillShortName(bill.getShortName());
+					item.setLineId(bill.getLineId());
+					item.setLineCnName(bill.getLineCnName());
+					item.setLineEnName(bill.getLineEnName());
+					item.setVesselId(bill.getVesselId());
+					item.setVesselEnName(bill.getVesselEnName());
+					item.setVesselCnName(bill.getVesselCnName());
+					item.setVoyageNo(bill.getVoyageNo());
+					item.setMblno(bill.getMblno());
+					item.setHblno(bill.getHblno());
+					item.setEtd(bill.getEtd());
+					item.setEta(bill.getEta());
+					item.setPolId(bill.getPolId());
+					item.setPolCode(bill.getPolCode());
+					item.setPolCnName(bill.getPolCnName());
+					item.setPolEnName(bill.getPolEnName());
+					item.setPodId(bill.getPodId());
+					item.setPodCode(bill.getPodCode());
+					item.setPodCnName(bill.getPodCnName());
+					item.setPodEnName(bill.getPodEnName());
+					item.setPaymode(bill.getMpaymode());
+					item.setPayplace(bill.getMpayplace());
+					item.setRefno(bill.getRefno());
+					item.setBookingNo(bill.getBookingNo());
+					item.setCntrNo(bill.getQuantityCntrTypesDescr());
+					item.setQuantityCntrDescr(bill.getQuantityCntrDescr());
+					item.setTeu(bill.getTeu());
+				}
+				FeeCenterListNew.add(item);
+				if (!finAccBillsList.isEmpty()) {
+					List<FinAccBills> finAccBills = finAccBillsList.stream().filter(e -> e.getId().equals(item.getAccBillId())).collect(Collectors.toList());
+					for (FinAccBills data : finAccBills) {
+						data.setBookingAgentId(item.getBookingAgentId());
+						data.setBookingAgentCnName(item.getBookingAgentCnName());
+						data.setBookingAgentEnName(item.getBookingAgentEnName());
+						data.setQuantityCntrDescr(item.getQuantityCntrDescr());
+						data.setTeu(item.getTeu());
+						data.setWarehousingDate(item.getStorageDate());
+						data.setOutboundDate(item.getOutboundDate());
+						data.setSrcId(item.getSrcId());
+						data.setSrcCnName(item.getSrcCnName());
+						data.setSrcEnName(item.getSrcEnName());
+						data.setSrcType(item.getSrcType());
+						data.setPaymode(item.getPaymode());
+						data.setCorpId(item.getCorpId());
+						data.setCorpCnName(item.getCorpCnName());
+						data.setCorpEnName(item.getCorpEnName());
+						data.setBillCorpId(item.getBillCorpId());
+						data.setBillCorpCnName(item.getBillCorpCnName());
+						data.setBillCorpEnName(item.getBillCorpEnName());
+						data.setVesselId(item.getVesselId());
+						data.setVesselCnName(item.getVesselCnName());
+						data.setVesselEnName(item.getVesselEnName());
+						data.setVoyageNo(item.getVoyageNo());
+						data.setMblno(item.getMblno());
+						data.setHblno(item.getHblno());
+						data.setRefno(item.getRefno());
+						data.setBookingNo(item.getBookingNo());
+						data.setEtd(item.getEtd());
+						data.setEta(item.getEta());
+						data.setPolId(item.getPolId());
+						data.setPolCnName(item.getPolCnName());
+						data.setPolEnName(item.getPolEnName());
+						data.setPodId(item.getPodId());
+						data.setPodCnName(item.getPodCnName());
+						data.setPodCode(item.getPodCode());
+						data.setPodEnName(item.getPodEnName());
+						finAccBillsListNew.add(data);
+					}
+				}
+			}
+			feeCenterService.updateBatchById(FeeCenterListNew);
+			if (!finAccBillsListNew.isEmpty()) {
+				finAccBillsService.updateBatchById(finAccBillsListNew);
+			}
+		}
+		for (Bills item : billsList) {
 			item.setEta(bills.getEta());
 			item.setActualEta(bills.getActualEta());
 		}
-		if (!billsList.isEmpty()){
+		if (!billsList.isEmpty()) {
 			this.updateBatchById(billsList);
 		}
 	}
@@ -4283,6 +4390,10 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 			.eq(PreContainers::getIsDeleted, 0)
 			.eq(PreContainers::getTenantId, AuthUtil.getTenantId())
 			.eq(PreContainers::getPid, detail.getId())));
+		detail.setContainersList(containersService.list(new LambdaQueryWrapper<Containers>()
+			.eq(Containers::getIsDeleted, 0)
+			.eq(Containers::getTenantId, AuthUtil.getTenantId())
+			.eq(Containers::getPid, detail.getId())));
 		detail.setFilesList(filesCenterService.list(new LambdaQueryWrapper<FilesCenter>()
 			.eq(FilesCenter::getIsDeleted, 0)
 			.eq(FilesCenter::getTenantId, AuthUtil.getTenantId())
@@ -4290,7 +4401,6 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 		detail.setFeeCenterListC(new ArrayList<>());
 		detail.setFeeCenterListD(new ArrayList<>());
 		detail.setFeeCenterList(new ArrayList<>());
-		detail.setContainersList(new ArrayList<>());
 		detail.setContainersReportsList(new ArrayList<>());
 		detail.setWaitingBoxList(new ArrayList<>());
 		detail.setFeeCenterAmendList(new ArrayList<>());
@@ -4545,7 +4655,7 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 				filesCenterService.saveBatch(filesCenterList);
 			}
 		}
-		if (!feeCenterListSum.isEmpty()){
+		if (!feeCenterListSum.isEmpty()) {
 			String exrateType = currencyUtils.standardCurrency(copyBills.getBranchId());
 			BigDecimal amountDr;
 			BigDecimal amountCr;
@@ -4670,14 +4780,14 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 			this.save(bills);
 		} else {
 			Bills dataSourceBill = baseMapper.selectOne(new LambdaQueryWrapper<Bills>().select(Bills::getId, Bills::getVersion,
-				Bills::getIssueStatus,Bills::getStatus).eq(Bills::getId, bills.getId()));
+				Bills::getIssueStatus, Bills::getStatus).eq(Bills::getId, bills.getId()));
 			if (!Objects.equals(dataSourceBill.getVersion(), bills.getVersion())) {
 				return R.fail(601, "数据已被其他用户更新,请等待刷新后重试");
 			}
-			if ("1".equals(dataSourceBill.getIssueStatus())){
+			if ("1".equals(dataSourceBill.getIssueStatus())) {
 				throw new RuntimeException("单据已生成订单");
 			}
-			if (0 != dataSourceBill.getStatus()){
+			if (0 != dataSourceBill.getStatus()) {
 				throw new RuntimeException("单据状态不是录入,保存失败");
 			}
 			// 每更新一次往上累加一次版本
@@ -4716,15 +4826,15 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 					item.setUpdateUserName(AuthUtil.getUserName());
 				}
 				item.setPid(bills.getId());
-				if (item.getCntrTypeCode().contains("20")) {
+				if (item.getCntrTypeCode().equals("20GP")) {
 					V20 += item.getQuantity();
-				} else if (item.getCntrTypeCode().contains("45")) {
+				} else if (item.getCntrTypeCode().equals("20HC")) {
 					V45 += item.getQuantity();
-				} else if (item.getCntrTypeCode().contains("48")) {
+				} else if (item.getCntrTypeCode().equals("40FR")) {
 					V48 += item.getQuantity();
-				} else if (item.getCntrTypeCode().contains("40")) {
+				} else if (item.getCntrTypeCode().equals("40GP")) {
 					V40 += item.getQuantity();
-				} else if (item.getCntrTypeCode().contains("40") && item.getCntrTypeCode().contains("HC")) {
+				} else if (item.getCntrTypeCode().equals("40HC")) {
 					V40HC += item.getQuantity();
 				} else {
 					other += item.getQuantity();
@@ -4747,7 +4857,24 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 		bills.setQuantityV48(V48);
 		bills.setQuantityOther(other);
 		bills.setTeu(teu.intValue());
-
+		if (ObjectUtils.isNotNull(bills.getContainersList())) {
+			for (Containers item : bills.getContainersList()) {
+				item.setPid(bills.getId());
+				if (item.getId() == null) {
+					item.setCreateTime(new Date());
+					item.setCreateUser(AuthUtil.getUserId());
+					item.setCreateUserName(AuthUtil.getUserName());
+					if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
+						item.setCreateDeptName(deptName);
+					}
+				} else {
+					item.setUpdateUser(AuthUtil.getUserId());
+					item.setUpdateTime(new Date());
+					item.setUpdateUserName(AuthUtil.getUserName());
+				}
+			}
+			containersService.saveOrUpdateBatch(bills.getContainersList());
+		}
 		if (ObjectUtils.isNotNull(bills.getDetail())) {
 			Object seaBillsDetailObject = StringTools.handle(bills.getDetail(), "SeaBillsDetail");
 			SeaBillsDetail seaBillsDetail = JSONObject.parseObject(JSONObject.toJSONString(seaBillsDetailObject), SeaBillsDetail.class);
@@ -5033,6 +5160,26 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 		return copyBills;
 	}
 
+	@Override
+	public R submitCustomerBooking(Bills bills) {
+		bills.setUpdateUserName(AuthUtil.getUserName());
+		bills.setUpdateUser(AuthUtil.getUserId());
+		bills.setUpdateTime(new Date());
+		bills.setIssueStatus("2");
+		baseMapper.updateById(bills);
+		return R.data(bills);
+	}
+
+	@Override
+	public R revokeCustomerBooking(Bills bills) {
+		bills.setUpdateUserName(AuthUtil.getUserName());
+		bills.setUpdateUser(AuthUtil.getUserId());
+		bills.setUpdateTime(new Date());
+		bills.setIssueStatus("0");
+		baseMapper.updateById(bills);
+		return R.data(bills);
+	}
+
 	/**
 	 * 删除海运进出口明细表
 	 *

+ 26 - 22
blade-service/blade-los/src/main/java/org/springblade/los/excel/BoxNumberProfitExcel.java

@@ -2,9 +2,11 @@ package org.springblade.los.excel;
 
 import com.alibaba.excel.annotation.ExcelIgnore;
 import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.format.DateTimeFormat;
 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 com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
 
 import java.math.BigDecimal;
@@ -84,11 +86,13 @@ public class BoxNumberProfitExcel {
 	 * etd
 	 */
 	@ExcelProperty(value = "etd")
+	@DateTimeFormat("yyyy-MM-dd")
 	private Date etd;
 	/**
 	 * eta
 	 */
 	@ExcelProperty(value = "eta")
+	@DateTimeFormat("yyyy-MM-dd")
 	private Date eta;
 	/**
 	 * teu
@@ -96,29 +100,29 @@ public class BoxNumberProfitExcel {
 	@ExcelProperty(value = "teu")
 	private Integer teu;
 	/**
-	 * 20
+	 * 20GP
 	 */
-	@ExcelProperty(value = "V20")
+	@ExcelProperty(value = "20GP")
 	private Integer quantityV20;
 	/**
-	 * 40
+	 * 40GP
 	 */
-	@ExcelProperty(value = "V40")
+	@ExcelProperty(value = "40GP")
 	private Integer quantityV40;
 	/**
-	 * 45
+	 * 20HC
 	 */
-	@ExcelProperty(value = "V45")
+	@ExcelProperty(value = "20HC")
 	private Integer quantityV45;
 	/**
-	 * 48
+	 * 40FR
 	 */
-	@ExcelProperty(value = "V48")
+	@ExcelProperty(value = "40FR")
 	private Integer quantityV48;
 	/**
-	 * 40Hc
+	 * 40HC
 	 */
-	@ExcelProperty(value = "V40HC")
+	@ExcelProperty(value = "40HC")
 	private Integer quantityV40hc;
 	/**
 	 * 其他
@@ -141,34 +145,34 @@ public class BoxNumberProfitExcel {
 	@ExcelProperty(value = "体积")
 	private BigDecimal measurement;
 	/**
-	 * 人民币应收
+	 * 币应收
 	 */
-	@ExcelProperty(value = "人民币应收")
+	@ExcelProperty(value = "币应收")
 	private BigDecimal amountDr;
 	/**
-	 * 人民币应付
+	 * 币应付
 	 */
-	@ExcelProperty(value = "人民币应付")
+	@ExcelProperty(value = "币应付")
 	private BigDecimal amountCr;
 	/**
-	 * 人民币利润
+	 * 币利润
 	 */
-	@ExcelProperty(value = "人民币利润")
+	@ExcelProperty(value = "币利润")
 	private BigDecimal amountProfit;
 	/**
-	 * 美金应收
+	 * 外币应收
 	 */
-	@ExcelProperty(value = "美金应收")
+	@ExcelProperty(value = "外币应收")
 	private BigDecimal amountDrUsd;
 	/**
-	 * 美金应付
+	 * 外币应付
 	 */
-	@ExcelProperty(value = "美金应付")
+	@ExcelProperty(value = "外币应付")
 	private BigDecimal amountCrUsd;
 	/**
-	 * 美金利润
+	 * 外币利润
 	 */
-	@ExcelProperty(value = "美金利润")
+	@ExcelProperty(value = "外币利润")
 	private BigDecimal amountProfitUsd;
 	/**
 	 * 合计应收

+ 12 - 0
blade-service/blade-los/src/main/java/org/springblade/los/excel/PodStationR.java

@@ -2,7 +2,9 @@ package org.springblade.los.excel;
 
 import com.alibaba.excel.annotation.ExcelIgnore;
 import com.alibaba.excel.annotation.ExcelProperty;
+import com.baomidou.mybatisplus.annotation.FieldStrategy;
 import com.baomidou.mybatisplus.annotation.TableField;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.util.Date;
@@ -40,9 +42,19 @@ public class PodStationR {
 	private String businessType;
 
 	/**
+	 * 类型 0批量修改POD场站1批量确认返场
+	 */
+	private String type;
+
+	/**
 	 * pod场站返空时间
 	 */
 	private Date returnEmptyTime;
 
+	/**
+	 * 唛头
+	 */
+	private String marks;
+
 
 }

+ 5 - 0
blade-service/blade-los/src/main/java/org/springblade/los/excel/UpdatePodStationExcel.java

@@ -104,6 +104,11 @@ public class UpdatePodStationExcel {
 	@ExcelProperty(value = "pod场站")
 	private String podStationCname;
 	/**
+	 * 唛头
+	 */
+	@ExcelProperty(value = "唛头")
+	private String marks;
+	/**
 	 * 单据类型
 	 */
 	@ExcelIgnore

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

@@ -574,7 +574,7 @@
         <if test='fee.type == null or fee.type == ""'>
             acc.corp_cn_name corpName,
         </if>
-            acc.bill_no billNo,
+            acc.business_bill_no billNo,
             acc.vessel_en_name vesselName,
             acc.voyage_no voyageNo,
             acc.mblno mblNo,
@@ -687,7 +687,7 @@
         <if test='fee.type == null or fee.type == ""'>
             acc.corp_cn_name corpName,
         </if>
-        acc.bill_no billNo,
+        acc.business_bill_no billNo,
         acc.vessel_en_name vesselName,
         acc.voyage_no voyageNo,
         acc.mblno mblNo,

+ 13 - 11
blade-service/blade-los/src/main/java/org/springblade/los/finance/fee/service/impl/FeeCenterUpdateRecordServiceImpl.java

@@ -211,19 +211,21 @@ public class FeeCenterUpdateRecordServiceImpl extends ServiceImpl<FeeCenterUpdat
 		feeCenterUpdateRecord.setBranchId(feeCenter.getBranchId());
 		feeCenterUpdateRecord.setBranchName(feeCenter.getBranchName());
 		feeCenterUpdateRecord.setStatus("1");
-		// 金额
-		BigDecimal amount = feeCenterUpdateRecord.getAmountUpdate();
+		if ("0".equals(feeCenterUpdateRecord.getType())) {
+			// 金额
+			BigDecimal amount = feeCenterUpdateRecord.getAmountUpdate();
 
-		//计算字段null值处理
-		feeCenterUpdateRecord.setQuantityUpdate(ObjectUtils.isNotNull(feeCenterUpdateRecord.getQuantityUpdate()) ? feeCenterUpdateRecord.getQuantityUpdate() : new BigDecimal("0.00"));
-		feeCenterUpdateRecord.setPriceUpdate(ObjectUtils.isNotNull(feeCenterUpdateRecord.getPriceUpdate()) ? feeCenterUpdateRecord.getPriceUpdate() : new BigDecimal("0.00"));
-		//判断是否是本位币
-		if (exrateType.equals(feeCenterUpdateRecord.getCurCodeUpdate())) {
-			feeCenterUpdateRecord.setAmountLocUpdate(amount);
-		} else {
-			feeCenterUpdateRecord.setAmountLocUpdate(feeCenterUpdateRecord.getAmountUpdate().multiply(feeCenterUpdateRecord.getExrateUpdate()));
+			//计算字段null值处理
+			feeCenterUpdateRecord.setQuantityUpdate(ObjectUtils.isNotNull(feeCenterUpdateRecord.getQuantityUpdate()) ? feeCenterUpdateRecord.getQuantityUpdate() : new BigDecimal("0.00"));
+			feeCenterUpdateRecord.setPriceUpdate(ObjectUtils.isNotNull(feeCenterUpdateRecord.getPriceUpdate()) ? feeCenterUpdateRecord.getPriceUpdate() : new BigDecimal("0.00"));
+			//判断是否是本位币
+			if (exrateType.equals(feeCenterUpdateRecord.getCurCodeUpdate())) {
+				feeCenterUpdateRecord.setAmountLocUpdate(amount);
+			} else {
+				feeCenterUpdateRecord.setAmountLocUpdate(feeCenterUpdateRecord.getAmountUpdate().multiply(feeCenterUpdateRecord.getExrateUpdate()));
+			}
+			feeCenterUpdateRecord.setAmountUpdate(amount);
 		}
-		feeCenterUpdateRecord.setAmountUpdate(amount);
 		baseMapper.insert(feeCenterUpdateRecord);
 		int actId;
 		String processType;

+ 4 - 0
blade-service/blade-los/src/main/java/org/springblade/los/ftp/service/CyFtpService.java

@@ -4,6 +4,8 @@ import org.springblade.core.tool.api.R;
 import org.springblade.los.ftp.dto.FtpDto;
 import org.springframework.web.multipart.MultipartFile;
 
+import java.util.List;
+
 /**
  * @author :jixinyuan
  * @date : 2024/3/5
@@ -12,4 +14,6 @@ public interface CyFtpService {
 
 
 	R ftpFilesHandle(Long corpId,String type);
+
+	R ftpFilescopy(Long corpId,List<String> filesName, String type);
 }

+ 94 - 34
blade-service/blade-los/src/main/java/org/springblade/los/ftp/service/impl/CyFtpServiceImpl.java

@@ -1,9 +1,11 @@
 package org.springblade.los.ftp.service.impl;
 
-import com.alibaba.cloud.commons.io.IOUtils;
+//import com.alibaba.cloud.commons.io.IOUtils;
+
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import lombok.AllArgsConstructor;
+import org.apache.commons.io.IOUtils;
 import org.apache.commons.net.ftp.FTP;
 import org.apache.commons.net.ftp.FTPClient;
 import org.apache.commons.net.ftp.FTPFile;
@@ -22,9 +24,12 @@ import org.springframework.stereotype.Service;
 
 import java.io.IOException;
 import java.io.InputStream;
-import java.nio.charset.StandardCharsets;
-import java.rmi.RemoteException;
-import java.util.*;
+import java.io.InputStreamReader;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
 import java.util.stream.Collectors;
 
 /**
@@ -65,41 +70,43 @@ public class CyFtpServiceImpl implements CyFtpService {
 			ftpClient.login(user, pass);
 			ftpClient.enterLocalPassiveMode();
 			ftpClient.setFileType(FTP.BINARY_FILE_TYPE);
+			ftpClient.setControlEncoding("UTF-8");
 
 			// 获取文件列表
 			FTPFile[] files = ftpClient.listFiles(remoteDir);
-			Calendar calendar = Calendar.getInstance();
+			SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
 			for (FTPFile file : files) {
 				if (file.isFile() && file.getName().endsWith(".txt")) {
 					// 下载文件
 					InputStream inputStream = ftpClient.retrieveFileStream(remoteDir + "/" + file.getName());
-					// 解析EDIFACT内容
-					List<ContainerMovement> movements = parseEdifactMessage(inputStream);
-					// 输出解析结果
-					for (ContainerMovement movement : movements) {
-						EmptyContainerAppearanceAnalysis analysis = new EmptyContainerAppearanceAnalysis();
-						analysis.setContainerNumber(movement.getBookingNumber());
-						analysis.setBoxCode(movement.getContainerNumber());
-						analysis.setBoxType(movement.getContainerType());
-						analysis.setPortName(movement.getFromLocation());
-						analysis.setStationName(bCorps.getCnName());
-						analysis.setMblno(movement.getBillOfLading());
-						analysis.setBoxStatus(boxStatus);
-						if (ObjectUtils.isNotNull(movement.getMovementDateTime())){
-							calendar.setTimeInMillis(Long.parseLong(movement.getMovementDateTime()));
-							analysis.setBoxStatusDate(calendar.getTime());
+					if (inputStream != null) {
+						// 解析EDIFACT内容
+						List<ContainerMovement> movements = parseEdifactMessage(inputStream);
+						// 输出解析结果
+						for (ContainerMovement movement : movements) {
+							EmptyContainerAppearanceAnalysis analysis = new EmptyContainerAppearanceAnalysis();
+							analysis.setContainerNumber(movement.getBookingNumber());
+							analysis.setBoxCode(movement.getContainerNumber());
+							analysis.setBoxType(movement.getContainerType());
+							analysis.setPortName(movement.getFromLocation());
+							analysis.setStationName(bCorps.getCnName());
+							analysis.setMblno(movement.getBillOfLading());
+							analysis.setBoxStatus(boxStatus);
+							if (ObjectUtils.isNotNull(movement.getMovementDateTime())) {
+								analysis.setBoxStatusDate(sdf.parse(movement.getMovementDateTime()));
+							}
+							analysis.setSrcFile(file.getName());
+							if (ObjectUtils.isNotNull(analysis.getContainerNumber())) {
+								analysisList.add(analysis);
+							}
 						}
-						analysis.setSrcFile(file.getName());
-						analysisList.add(analysis);
-						System.out.println(movement);
-						System.out.println("----------------------------------------");
+						inputStream.close();
+						ftpClient.completePendingCommand();
 					}
-					inputStream.close();
-					ftpClient.completePendingCommand();
 				}
 			}
-		} catch (IOException ex) {
-			ex.printStackTrace();
+		} catch (IOException | ParseException ex) {
+			throw new RuntimeException(ex);
 		} finally {
 			try {
 				if (ftpClient.isConnected()) {
@@ -110,12 +117,12 @@ public class CyFtpServiceImpl implements CyFtpService {
 				ex.printStackTrace();
 			}
 		}
-		if (!analysisList.isEmpty()){
+		if (!analysisList.isEmpty()) {
 			List<String> boxType = analysisList.stream().map(EmptyContainerAppearanceAnalysis::getBoxType).filter(Objects::nonNull)
 				.distinct().collect(Collectors.toList());
 			List<BCntrTypes> cntrTypesList = new ArrayList<>();
 			if (!boxType.isEmpty()) {
-				 cntrTypesList = bCntrTypesService.list(new LambdaQueryWrapper<BCntrTypes>()
+				cntrTypesList = bCntrTypesService.list(new LambdaQueryWrapper<BCntrTypes>()
 					.eq(BCntrTypes::getTenantId, AuthUtil.getTenantId())
 					.eq(BCntrTypes::getIsDeleted, 0)
 					.in(BCntrTypes::getCode95, boxType));
@@ -129,17 +136,17 @@ public class CyFtpServiceImpl implements CyFtpService {
 					.eq(BPorts::getIsDeleted, 0)
 					.in(BPorts::getUnCode, portName));
 			}
-			for (EmptyContainerAppearanceAnalysis item : analysisList){
+			for (EmptyContainerAppearanceAnalysis item : analysisList) {
 				BCntrTypes cntrTypes = cntrTypesList.stream().filter(e -> e.getCode95().equals(item.getBoxType())).findFirst().orElse(null);
 				if (cntrTypes == null) {
 					throw new RuntimeException("请先维护箱型:" + item.getBoxType() + "基础资料");
-				}else{
+				} else {
 					item.setBoxType(cntrTypes.getCntrType());
 				}
 				BPorts ports = portsList.stream().filter(e -> e.getUnCode().equals(item.getPortName())).findFirst().orElse(null);
 				if (ports == null) {
 					throw new RuntimeException("请先维护港口:" + item.getPortName() + "基础资料");
-				}else{
+				} else {
 					item.setPortName(ports.getCnName());
 				}
 			}
@@ -147,9 +154,62 @@ public class CyFtpServiceImpl implements CyFtpService {
 		return R.data(analysisList);
 	}
 
+	@Override
+	public R ftpFilescopy(Long corpId, List<String> filesName, String type) {
+		BCorps bCorps = bCorpsService.getById(corpId);
+		String server = bCorps.getEdiFtp();
+		int port = 21;
+		String user = bCorps.getUsernameFtp();
+		String pass = bCorps.getPasswordFtp();
+		String remoteDir = "/WFL";
+		String targetDir = "/WFL/HIS/";
+		if ("IN".equals(type)) {
+			remoteDir = remoteDir + "/IN/";
+		} else if ("OUT".equals(type)) {
+			remoteDir = remoteDir + "/OUT/";
+		}
+		FTPClient ftpClient = new FTPClient();
+		try {
+			// 连接FTP服务器
+			ftpClient.connect(server, port);
+			ftpClient.login(user, pass);
+			ftpClient.enterLocalPassiveMode();
+			ftpClient.setFileType(FTP.BINARY_FILE_TYPE);
+			ftpClient.setControlEncoding("UTF-8");
+
+			// 获取文件列表
+			FTPFile[] files = ftpClient.listFiles(remoteDir);
+			for (FTPFile file : files) {
+				if (file.isFile() && file.getName().endsWith(".txt") && filesName.contains(file.getName())) {
+					ftpClient.rename(
+						remoteDir + file.getName(),
+						targetDir + file.getName()
+					);
+				}
+			}
+		} catch (IOException ex) {
+			throw new RuntimeException(ex);
+		} finally {
+			try {
+				if (ftpClient.isConnected()) {
+					ftpClient.logout();
+					ftpClient.disconnect();
+				}
+			} catch (IOException ex) {
+				ex.printStackTrace();
+			}
+		}
+		return R.data("操作成功");
+	}
+
 	public static List<ContainerMovement> parseEdifactMessage(InputStream inputStream) throws IOException {
 		List<ContainerMovement> movements = new ArrayList<>();
-		String content = IOUtils.toString(inputStream, StandardCharsets.UTF_8);
+		if (inputStream == null) {
+			return new ArrayList<>();
+		}
+//		String content = IOUtils.toString(inputStream, StandardCharsets.UTF_8);
+		InputStreamReader reader = new InputStreamReader(inputStream, "GBK");  // 根据实际编码调整
+		String content = IOUtils.toString(reader);
 
 		// 分割每个消息(以UNH开头,UNT结尾)
 		String[] messages = content.split("(?=UNH\\+)");

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini