Просмотр исходного кода

1.新增分单提单号不能重复
2.POL空箱出场导入OW拿数据问题修改
3.海运导入样本问题修改
4.空箱返场列表与导出数据不符
5.海运出口报表打印增加字段
6.审核数据列表提单号,分单号不显示数据修改
7.邮箱附件接口

纪新园 5 месяцев назад
Родитель
Сommit
3cae75adac

+ 18 - 0
blade-ops-api/blade-resource-api/src/main/java/org/springblade/resource/entity/PutFileMail.java

@@ -0,0 +1,18 @@
+package org.springblade.resource.entity;
+
+import lombok.Data;
+import org.springblade.core.oss.model.BladeFile;
+
+/**
+ * @author :jixinyuan
+ * @date : 2025/7/11
+ */
+@Data
+public class PutFileMail extends BladeFile {
+
+	/**
+	 * 地址
+	 */
+	private String url;
+
+}

+ 59 - 0
blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/OssEndpoint.java

@@ -29,6 +29,7 @@ import org.springblade.core.tool.utils.FileUtil;
 import org.springblade.core.tool.utils.Func;
 import org.springblade.resource.builder.oss.OssBuilder;
 import org.springblade.resource.entity.Attach;
+import org.springblade.resource.entity.PutFileMail;
 import org.springblade.resource.service.IAttachService;
 import org.springblade.system.feign.ISysClient;
 import org.springframework.mock.web.MockMultipartFile;
@@ -197,6 +198,64 @@ public class OssEndpoint {
 	}
 
 	/**
+	 * 上传文件-邮件
+	 *
+	 * @param file 文件
+	 * @return ObjectStat
+	 */
+	@SneakyThrows
+	@PostMapping("/put-file-mail")
+	public R<PutFileMail> putFileMail(@RequestParam("file") MultipartFile file) {
+		String status = sysClient.getParamService("upload.url");
+		String replaceUrl = sysClient.getParamService("replace.url");
+		String contentType = file.getContentType();
+		BladeFile bladeFile;
+		if (contentType != null && (contentType.equals("image/jpeg") || contentType.equals("image/png")
+			|| contentType.equals("image/jpg")) || contentType.equals("image/bmp")){
+			if (file.getSize() > 204800){
+				// 使用Thumbnails压缩图片
+				ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+				Thumbnails.of(file.getInputStream())
+					.size(350,350)
+					.outputQuality(1)
+					.toOutputStream(outputStream);
+				MultipartFile compressedImage = new MockMultipartFile(
+					file.getName(),
+					file.getOriginalFilename(),
+					file.getContentType(),
+					outputStream.toByteArray()
+				);
+				bladeFile = ossBuilder.template().putFile(compressedImage.getOriginalFilename(), compressedImage.getInputStream());
+			}else{
+				bladeFile = ossBuilder.template().putFile(file.getOriginalFilename(), file.getInputStream());
+			}
+		}else{
+			bladeFile = ossBuilder.template().putFile(file.getOriginalFilename(), file.getInputStream());
+		}
+		String link = bladeFile.getLink();
+		//String replace = link.replace("http://139.9.191.155:9000/", "https://trade.tubaosoft.com/file/");
+		String replace = "";
+		if (ObjectUtils.isNotNull(status) && "获取数据失败".equals(status)) {
+			if (ObjectUtils.isNotNull(replaceUrl)&& "获取数据失败".equals(replaceUrl)){
+				replace = link.replace(status, replaceUrl + "/file");
+			}else{
+				replace = link.replace(status + ":9000/", status + "/file/");
+			}
+		} else {
+			replace = link.replace("http://139.9.191.155:9000/", "http://139.9.191.155/file/");
+		}
+		System.err.println("replace:" + replace);
+		bladeFile.setLink(replace);
+		PutFileMail putFileMail = new PutFileMail();
+		putFileMail.setUrl("/home/minio/file/bladex/"+bladeFile.getName());
+		putFileMail.setLink(bladeFile.getLink());
+		putFileMail.setDomain(bladeFile.getDomain());
+		putFileMail.setName(bladeFile.getName());
+		putFileMail.setOriginalName(bladeFile.getOriginalName());
+		return R.data(putFileMail);
+	}
+
+	/**
 	 * 小程序上传文件
 	 *
 	 * @param file 文件

+ 6 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/box/entity/ExpenseApplication.java

@@ -224,5 +224,11 @@ public class ExpenseApplication implements Serializable {
 	@TableField(exist = false)
 	private String srcHblno;
 
+	/**
+	 * 收付类型
+	 */
+	@TableField(exist = false)
+	private String dc;
+
 
 }

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

@@ -2457,4 +2457,16 @@ public class Bills implements Serializable {
 	 */
 	@TableField(exist = false)
 	private Date returnEmptyTime;
+
+	/**
+	 * 唛头
+	 */
+	@TableField(exist = false)
+	private String attachedMark;
+
+	/**
+	 * 货描
+	 */
+	@TableField(exist = false)
+	private String attachedGoodsdesc;
 }

+ 15 - 6
blade-service/blade-los/src/main/java/org/springblade/los/basic/reports/service/impl/ReportsServiceImpl.java

@@ -1285,8 +1285,8 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 						}
 					}
 					containersReportsList.add(containersReports);
-					text.append(item.getCntrNo()).append("/").append(item.getSealNo()).append("/").append(item.getCntrTypeCode()).append("<br/>")
-						.append(item.getQuantity()).append(item.getPackingUnit()).append("/")
+					text.append(item.getCntrNo()).append("/").append(item.getSealNo()).append("<br/>")
+						.append(item.getCntrTypeCode()).append(item.getQuantity()).append(item.getPackingUnit()).append("<br/>")
 						.append(item.getGrossWeight()).append("KGS").append("/")
 						.append(item.getMeasurement()).append("CBM").append("<br/>");
 					if (ObjectUtils.isNotNull(item.getCntrNo()) || ObjectUtils.isNotNull(item.getSealNo())) {
@@ -1294,6 +1294,9 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 					}
 				}
 				bills.setCntryString(text.toString());
+				bills.setCommodityDescr(bills.getCommodityDescr()+"SHIPPER'S LOAD,COUNT & SEAL"+bills.getQuantityCntrDescr()+"CONTAINER S.T.C"
+					+bills.getHpaymode()+bills.getServiceTerms()+bills.getCapitalLetters());
+				bills.setMarks(bills.getMarks()+bills.getCntryString());
 				bills.setCntrSealNo(cntrSealNo.toString());
 				bills.setContainersReportsList(containersReportsList);
 				bills.setDept(dept);
@@ -1334,8 +1337,8 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 				StringBuilder text = new StringBuilder();
 				StringBuilder cntrSealNo = new StringBuilder();
 				for (Containers item : containersList) {
-					text.append(item.getCntrNo()).append("/").append(item.getSealNo()).append("/").append(item.getCntrTypeCode()).append("<br/>")
-						.append(item.getQuantity()).append(item.getPackingUnit()).append("/")
+					text.append(item.getCntrNo()).append("/").append(item.getSealNo()).append("<br/>")
+						.append(item.getCntrTypeCode()).append(item.getQuantity()).append(item.getPackingUnit()).append("<br/>")
 						.append(item.getGrossWeight()).append("KGS").append("/")
 						.append(item.getMeasurement()).append("CBM").append("<br/>");
 					if (ObjectUtils.isNotNull(item.getCntrNo()) || ObjectUtils.isNotNull(item.getSealNo())) {
@@ -1343,6 +1346,9 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 					}
 				}
 				bills.setCntryString(text.toString());
+				bills.setCommodityDescr(bills.getCommodityDescr()+"SHIPPER'S LOAD,COUNT & SEAL"+bills.getQuantityCntrDescr()+"CONTAINER S.T.C"
+					+bills.getHpaymode()+bills.getServiceTerms()+bills.getCapitalLetters());
+				bills.setMarks(bills.getMarks()+bills.getCntryString());
 				bills.setCntrSealNo(cntrSealNo.toString());
 				bills.setDept(dept);
 				map.put(MagicValues.DATA, bills);
@@ -2103,12 +2109,15 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 				bills.setContainersList(containersList);
 				StringBuilder text = new StringBuilder();
 				for (Containers item : containersList) {
-					text.append(item.getCntrNo()).append("/").append(item.getSealNo()).append("/").append(item.getCntrTypeCode()).append("<br/>")
-						.append(item.getQuantity()).append(item.getPackingUnit()).append("/")
+					text.append(item.getCntrNo()).append("/").append(item.getSealNo()).append("<br/>")
+						.append(item.getCntrTypeCode()).append(item.getQuantity()).append(item.getPackingUnit()).append("<br/>")
 						.append(item.getGrossWeight()).append("KGS").append("/")
 						.append(item.getMeasurement()).append("CBM").append("<br/>");
 				}
 				bills.setCntryString(text.toString());
+				bills.setCommodityDescr(bills.getCommodityDescr()+"SHIPPER'S LOAD,COUNT & SEAL"+bills.getQuantityCntrDescr()+"CONTAINER S.T.C"
+					+bills.getHpaymode()+bills.getServiceTerms()+bills.getCapitalLetters());
+				bills.setMarks(bills.getMarks()+bills.getCntryString());
 				bills.setDept(dept);
 				map.put(MagicValues.DATA, bills);
 			} else {

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

@@ -173,7 +173,7 @@ public class ExpenseApplicationServiceImpl extends ServiceImpl<ExpenseApplicatio
 			expenseApplication.setCorpEnName(tradingBox.getPurchaseCompanyName());
 			expenseApplication.setBranchId(AuthUtil.getDeptId());
 			R<String> res = sysClient.getDeptName(Long.parseLong(AuthUtil.getDeptId()));
-			if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())){
+			if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
 				expenseApplication.setBranchName(res.getData());
 			}
 		} else if ("HYJK,HYCK".contains(expenseApplication.getSrcType())) {
@@ -218,9 +218,18 @@ public class ExpenseApplicationServiceImpl extends ServiceImpl<ExpenseApplicatio
 			}
 			feeCenterService.updateBatchById(expenseApplication.getFeeCenterList());
 		}
-		Integer actId = 1130;
-		String processType = "请核费用";
-		String checkType = "FYSQ";
+		int actId;
+		String processType;
+		String checkType;
+		if ("C".equals(expenseApplication.getDc())) {
+			actId = 1132;
+			processType = "请核费用-付费";
+			checkType = "FYSQ-C";
+		} else {
+			actId = 1130;
+			processType = "请核费用";
+			checkType = "FYSQ";
+		}
 		//审批数据
 		LosAuditProecessDTO auditProecessDTO = new LosAuditProecessDTO();
 		//获取审批级次
@@ -416,8 +425,8 @@ public class ExpenseApplicationServiceImpl extends ServiceImpl<ExpenseApplicatio
 			throw new RuntimeException("类型错误,未查到单据");
 		}
 		this.saveBatch(expenseApplicationList);
-		for (ExpenseApplication item : expenseApplicationList){
-			if (ObjectUtils.isNotNull(item.getFeeCenterList()) && !item.getFeeCenterList().isEmpty()){
+		for (ExpenseApplication item : expenseApplicationList) {
+			if (ObjectUtils.isNotNull(item.getFeeCenterList()) && !item.getFeeCenterList().isEmpty()) {
 				for (FeeCenter feeCenter : item.getFeeCenterList()) {
 					feeCenter.setUpdateTime(new Date());
 					feeCenter.setUpdateUser(AuthUtil.getUserId());
@@ -431,9 +440,18 @@ public class ExpenseApplicationServiceImpl extends ServiceImpl<ExpenseApplicatio
 				feeCenterService.updateBatchById(item.getFeeCenterList());
 			}
 		}
-		Integer actId = 1130;
-		String processType = "请核费用";
-		String checkType = "FYSQ";
+		int actId;
+		String processType;
+		String checkType;
+		if ("C".equals(dc)) {
+			actId = 1132;
+			processType = "请核费用-付费";
+			checkType = "FYSQ-C";
+		} else {
+			actId = 1130;
+			processType = "请核费用";
+			checkType = "FYSQ";
+		}
 		//审批数据
 		LosAuditProecessDTO auditProecessDTO = new LosAuditProecessDTO();
 		//获取审批级次
@@ -507,5 +525,4 @@ public class ExpenseApplicationServiceImpl extends ServiceImpl<ExpenseApplicatio
 		}
 		return R.data("操作成功");
 	}
-
 }

+ 1 - 1
blade-service/blade-los/src/main/java/org/springblade/los/box/service/impl/PutBoxServiceImpl.java

@@ -1077,7 +1077,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
 					&& ObjectUtils.isNotNull(e.getPolId()) && e.getPolId().equals(ports.getId())
 					&& ObjectUtils.isNotNull(e.getPolStationId()) && e.getPolStationId().equals(corps.getId()) &&
 					putBoxData.getBusType().equals(e.getBusType())).findFirst().orElse(null);
-				if (putBox1 == null) {
+				if (putBox1 != null) {
 					if (!containersList.isEmpty()) {
 						List<Containers> containerItemList = containersList.stream().filter(e -> item.getMblno().equals(e.getMblno())
 							&& item.getBoxCode().equals(e.getCntrNo())).collect(Collectors.toList());

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

@@ -195,24 +195,28 @@
         AND se.tenant_id = #{data.tenantId}
         AND sc.is_deleted = '0'
         AND se.is_deleted = '0'
+        and se.bill_type = 'MH'
+        <if test="data.businessType != null and data.businessType != ''">
+            and se.business_type = #{data.businessType}
+        </if>
         <if test="data.branchId != null and data.branchId != ''">
             and se.branch_id = #{data.branchId}
         </if>
-        <if test="data.mblno != null and data.mblno != ''">
-            and se.mblno like concat('%', #{data.mblno}, '%')
-        </if>
         <if test="data.cntrNo != null and data.cntrNo != ''">
             and sc.cntr_no = #{data.cntrNo}
         </if>
+        <if test="data.podStationCname != null and data.podStationCname != ''">
+            and se.pod_station_cname like concat('%', #{data.podStationCname}, '%')
+        </if>
+        <if test="data.mblno != null and data.mblno != ''">
+            and se.mblno like concat('%', #{data.mblno}, '%')
+        </if>
         <if test="data.hblno != null and data.hblno != ''">
             and se.hblno like concat('%', #{data.hblno}, '%')
         </if>
         <if test="data.corpName != null and data.corpName != ''">
             and se.corp_cn_name like concat('%', #{data.corpName}, '%')
         </if>
-        <if test="data.podStationCname != null and data.podStationCname != ''">
-            and se.pod_station_cname like concat('%', #{data.podStationCname}, '%')
-        </if>
         <if test="data.vesselCnName != null and data.vesselCnName != ''">
             and se.vessel_cn_name like concat('%', #{data.vesselCnName}, '%')
         </if>
@@ -225,9 +229,6 @@
         <if test="data.podName != null and data.podName != ''">
             and se.pod_cn_name like concat('%', #{data.podName}, '%')
         </if>
-        <if test="data.businessType != null and data.businessType != ''">
-            and se.business_type = #{data.businessType}
-        </if>
         <if test="data.whetherFee != null and data.whetherFee != ''">
             and sc.whether_fee = #{data.whetherFee}
         </if>

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

@@ -186,6 +186,14 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 			.eq(Bills::getMblno, bills.getMblno())
 			.eq(Bills::getBusinessType, bills.getBusinessType())
 		);
+		List<Bills> count1 = baseMapper.selectList(new LambdaQueryWrapper<Bills>()
+			.select(Bills::getId)
+			.eq(Bills::getBranchId, branchId)
+			.eq(Bills::getTenantId, AuthUtil.getTenantId())
+			.eq(Bills::getIsDeleted, 0)
+			.eq(Bills::getHblno, bills.getHblno())
+			.eq(Bills::getBusinessType, bills.getBusinessType())
+		);
 		if (ObjectUtils.isNotNull(bills.getBillDate())) {
 			LocalDate date = bills.getBillDate().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
 			int year = date.getYear();
@@ -211,6 +219,12 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 						throw new RuntimeException("提单号不允许重复:" + bills.getMblno());
 					}
 				}
+			}else{
+				if (ObjectUtils.isNotNull(bills.getHblno())) {
+					if (!count1.isEmpty()) {
+						throw new RuntimeException("分单号不允许重复:" + bills.getHblno());
+					}
+				}
 			}
 			BusinessType businessType = bBusinessTypeService.getOne(new LambdaQueryWrapper<BusinessType>()
 				.select(BusinessType::getId)
@@ -260,6 +274,12 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 						throw new RuntimeException("提单号不允许重复:" + bills.getMblno());
 					}
 				}
+			}else{
+				if (ObjectUtils.isNotNull(bills.getHblno())) {
+					if (!count.isEmpty() && !ids.contains(bills.getId())) {
+						throw new RuntimeException("分单号不允许重复:" + bills.getHblno());
+					}
+				}
 			}
 			bills.setUpdateUser(AuthUtil.getUserId());
 			bills.setUpdateTime(new Date());

+ 6 - 1
blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/impl/TemplateImportServiceImpl.java

@@ -1470,7 +1470,12 @@ public class TemplateImportServiceImpl implements ITemplateImportService {
 		if (ObjectUtils.isNotNull(siRemarks)) {
 			bills.setSiRemarks(siRemarks);
 		}
-		if ("KHTS".equals(bills.getBusinessType())){
+		//唛头
+		String marks = getSheetCellValueAsString(sheet, 21, 0);
+		if (ObjectUtils.isNotNull(marks)) {
+			bills.setMarks(marks);
+		}
+		if (!"KHTS".equals(bills.getBusinessType())){
 			List<Containers> containersList = new ArrayList<>();
 			BigDecimal sumQty = new BigDecimal(0L);
 			BigDecimal sumGw = new BigDecimal(0L);

+ 2 - 2
blade-service/blade-los/src/main/java/org/springblade/los/check/service/impl/AuditProecessServiceImpl.java

@@ -176,8 +176,8 @@ public class AuditProecessServiceImpl extends ServiceImpl<AuditProecessMapper, L
 			auditProecess.setReferenceNumber(auditProecessDTO.getReferenceNumber());
 			auditProecess.setSrcBusType(auditProecessDTO.getSrcBusType());
 			auditProecess.setEtd(auditProecessDTO.getEtd());
-			auditProecess.setMblno(auditProecess.getMblno());
-			auditProecess.setHblno(auditProecess.getHblno());
+			auditProecess.setMblno(auditProecessDTO.getMblno());
+			auditProecess.setHblno(auditProecessDTO.getHblno());
 			//除了第一级是待审,其他都N
 			if (e.getLevelId() == 1) {
 				SimpleDateFormat simpleDateFormat = new SimpleDateFormat();