فهرست منبع

Merge remote-tracking branch 'origin/dev' into dev

liyuan 7 ماه پیش
والد
کامیت
7d23f9993c

+ 6 - 0
blade-service-api/blade-data-api/src/main/java/org/springblade/data/extemalOrder/entity/ExternalOrder.java

@@ -252,6 +252,12 @@ public class ExternalOrder implements Serializable {
 	@ApiModelProperty(value = "同步时间")
 	@TableField(value = "createtime")
 	private String createtime;
+	/**
+	 * 优惠合计
+	 */
+	@ApiModelProperty(value = "优惠合计")
+	@TableField(value = "totalCouponAmount")
+	private String totalCouponAmount;
 	@TableField(exist = false)
 	private List<ExternalOrderItem> externalOrderItemList;
 

+ 3 - 1
blade-service-api/blade-los-api/src/main/java/org/springblade/los/statisticAnalysis/FeeSummaryQ.java

@@ -15,7 +15,7 @@ public class FeeSummaryQ {
 	 */
 	private String dc;
 	/**
-	 * 查询方式  1=结算单位 2 委托人  3 业务来源
+	 * 查询方式  1=结算单位 2 委托人  3 提单号
 	 */
 	private String type;
 	/**
@@ -71,4 +71,6 @@ public class FeeSummaryQ {
 	private String billNo;
 	private String mblNo;
 
+	private String sortType;
+
 }

+ 1 - 0
blade-service/blade-data/src/main/java/org/springblade/data/extemalOrder/mapper/ExternalOrderMapper.xml

@@ -38,6 +38,7 @@
         <result column="uom" property="uom"/>
         <result column="quantity" property="quantity"/>
         <result column="unitPrice" property="unitPrice"/>
+        <result column="totalCouponAmount" property="totalCouponAmount"/>
     </resultMap>
 
     <select id="selectExternalOrderPage" resultMap="externalOrderResultMap">

+ 4 - 0
blade-service/blade-data/src/main/java/org/springblade/data/michelinApi/dto/SalesOrderDto.java

@@ -109,6 +109,10 @@ public class SalesOrderDto {
 	 */
 	private String orderGrandTotal;
 	/**
+	 *优惠合计
+	 */
+	private String totalCouponAmount;
+	/**
 	 *发货日期(yyyy/M/d)
 	 */
 	private String shipDate;

+ 85 - 80
blade-service/blade-data/src/main/java/org/springblade/data/michelinApi/service/impl/MichelinServiceImpl.java

@@ -3,7 +3,6 @@ package org.springblade.data.michelinApi.service.impl;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import lombok.AllArgsConstructor;
-import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.BeanUtil;
 import org.springblade.data.extemalOrder.entity.ExternalOrder;
 import org.springblade.data.extemalOrder.service.IExternalOrderService;
@@ -14,7 +13,6 @@ import org.springblade.data.michelinApi.dto.LinesDto;
 import org.springblade.data.michelinApi.dto.SalesOrderDto;
 import org.springblade.data.michelinApi.dto.SalesOrderR;
 import org.springblade.data.michelinApi.service.IMichelinService;
-import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.stereotype.Service;
 
 import java.text.SimpleDateFormat;
@@ -35,98 +33,105 @@ public class MichelinServiceImpl implements IMichelinService {
 
 	@Override
 	public String getSalesOrder(String agentId) throws Exception {
-			String geturl = MichelinValues.BASE_URL_DEV + "/GetSalesOrder";
-			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-			//设置请求体
-			Map<String, String> map = new HashMap<>();
-			//key-value的形式设置请求参数
-			map.put("agentId", agentId);
-			String result = HttpsUtils.sending(geturl, map);
-			System.out.println("==============result===============" + result);
-			System.out.println("==============请求成功时间:===============" + sdf.format(new Date()));
-			//如果返回值是标准的JSON字符串进行转换
-			JSONObject jsonObject = JSONObject.parseObject(result);
-			SalesOrderR salesOrderR = JSONObject.parseObject(jsonObject.get("response").toString(), SalesOrderR.class);
-			if (salesOrderR != null) {
-				if ("001".equals(salesOrderR.getCode())) {
-					SalesOrderDto salesOrderDto = salesOrderR.getSalesOrder();
-					if (salesOrderDto != null) {
-						String dateString = "2024-05-12 00:00:00";
-						boolean res = false;
-						if (ObjectUtils.isNotNull(salesOrderDto.getCreationTime())) {
-							Date date = sdf.parse(dateString);
-							Date date1 = sdf.parse(salesOrderDto.getCreationTime());
-							if (date1.compareTo(date) > 0) {
-								if (!salesOrderDto.getLines().isEmpty()) {
-									for (LinesDto item : salesOrderDto.getLines()) {
-										ExternalOrder order = new ExternalOrder();
-										BeanUtil.copyProperties(salesOrderDto, order);
-										order.setCreatetime(sdf.format(new Date()));
-										order.setItemLineNo(item.getLineNo());
-										order.setSku(item.getSku());
-										order.setName(item.getName());
-										order.setBrand(item.getBrand());
-										order.setItemSize(item.getSize());
-										order.setPattern(item.getPattern());
-										order.setStructure(item.getStructure());
-										order.setUom(item.getUom());
-										order.setQuantity(item.getQuantity());
-										order.setUnitPrice(item.getUnitPrice());
-										if (ObjectUtils.isNotNull(order.getSalesOrderStatus()) && "confirm".equals(order.getSalesOrderStatus())) {
-											System.out.println("==============状态confirm数据::===============" + order);
-											res = externalOrderService.save(order);
-											System.out.println("==============保存数据是否成功:===============" + res);
-										} else {
-											res = false;
-											System.out.println("==============状态废弃数据:===============" + order);
-										}
+		String geturl = MichelinValues.BASE_URL_DEV + "/GetSalesOrder";
+		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+		//设置请求体
+		Map<String, String> map = new HashMap<>();
+		//key-value的形式设置请求参数
+		map.put("agentId", agentId);
+		String result = HttpsUtils.sending(geturl, map);
+		System.out.println("==============result===============" + result);
+		System.out.println("==============请求成功时间:===============" + sdf.format(new Date()));
+		//如果返回值是标准的JSON字符串进行转换
+		JSONObject jsonObject = JSONObject.parseObject(result);
+		SalesOrderR salesOrderR = JSONObject.parseObject(jsonObject.get("response").toString(), SalesOrderR.class);
+		if (salesOrderR != null) {
+			if ("001".equals(salesOrderR.getCode())) {
+				SalesOrderDto salesOrderDto = salesOrderR.getSalesOrder();
+				if (salesOrderDto != null) {
+					String dateString = "2024-05-12 00:00:00";
+					boolean res = false;
+					if (ObjectUtils.isNotNull(salesOrderDto.getCreationTime())) {
+						Date date = sdf.parse(dateString);
+						Date date1 = sdf.parse(salesOrderDto.getCreationTime());
+						if (date1.compareTo(date) > 0) {
+							if (!salesOrderDto.getLines().isEmpty()) {
+								int count = 0;
+								for (LinesDto item : salesOrderDto.getLines()) {
+									ExternalOrder order = new ExternalOrder();
+									BeanUtil.copyProperties(salesOrderDto, order);
+									if (count == 0) {
+										order.setTotalCouponAmount(salesOrderDto.getTotalCouponAmount());
+									} else {
+										order.setTotalCouponAmount("");
 									}
+									order.setCreatetime(sdf.format(new Date()));
+									order.setItemLineNo(item.getLineNo());
+									order.setSku(item.getSku());
+									order.setName(item.getName());
+									order.setBrand(item.getBrand());
+									order.setItemSize(item.getSize());
+									order.setPattern(item.getPattern());
+									order.setStructure(item.getStructure());
+									order.setUom(item.getUom());
+									order.setQuantity(item.getQuantity());
+									order.setUnitPrice(item.getUnitPrice());
+									if (ObjectUtils.isNotNull(order.getSalesOrderStatus()) && "confirm".equals(order.getSalesOrderStatus())) {
+										System.out.println("==============状态confirm数据::===============" + order);
+										res = externalOrderService.save(order);
+										System.out.println("==============保存数据是否成功:===============" + res);
+									} else {
+										res = false;
+										System.out.println("==============状态废弃数据:===============" + order);
+									}
+									count++;
 								}
-							} else {
-								System.out.println("==============超时废弃数据:===============" + salesOrderDto);
 							}
-						}
-						//设置请求体
-						Map<String, String> map1 = new HashMap<>();
-						//key-value的形式设置请求参数
-						map1.put("agentId", agentId);
-						map1.put("msgId", salesOrderR.getMsgId());
-						String geturl1 = MichelinValues.BASE_URL_DEV + "/AckSalesOrder";
-						if (res) {
-							map1.put("code", "001");
-							map1.put("result", "success");
-							map1.put("errMsg", "");
 						} else {
-							map1.put("code", "002");
-							map1.put("result", "error");
-							map1.put("errMsg", "数据处理失败");
+							System.out.println("==============超时废弃数据:===============" + salesOrderDto);
 						}
-						//获取了返回值
-						String result1 = HttpsUtils.sending(geturl1, map1);
-						System.out.println("==============回调接口返回数据===============" + result1);
-						//如果返回值是标准的JSON字符串进行转换
-						JSONObject jsonObject1 = JSONObject.parseObject(result1);
-						AckSalesOrderR ackSalesOrderR = JSONObject.parseObject(jsonObject1.get("response").toString(), AckSalesOrderR.class);
-						if (ackSalesOrderR != null) {
-							if ("001".equals(ackSalesOrderR.getCode())) {
-								if ("true".equals(ackSalesOrderR.getHasNext())) {
-									this.getSalesOrder(agentId);
-								}
-								return "同步成功";
-							} else {
-								return ackSalesOrderR.getErrMsg();
+					}
+					//设置请求体
+					Map<String, String> map1 = new HashMap<>();
+					//key-value的形式设置请求参数
+					map1.put("agentId", agentId);
+					map1.put("msgId", salesOrderR.getMsgId());
+					String geturl1 = MichelinValues.BASE_URL_DEV + "/AckSalesOrder";
+					if (res) {
+						map1.put("code", "001");
+						map1.put("result", "success");
+						map1.put("errMsg", "");
+					} else {
+						map1.put("code", "002");
+						map1.put("result", "error");
+						map1.put("errMsg", "数据处理失败");
+					}
+					//获取了返回值
+					String result1 = HttpsUtils.sending(geturl1, map1);
+					System.out.println("==============回调接口返回数据===============" + result1);
+					//如果返回值是标准的JSON字符串进行转换
+					JSONObject jsonObject1 = JSONObject.parseObject(result1);
+					AckSalesOrderR ackSalesOrderR = JSONObject.parseObject(jsonObject1.get("response").toString(), AckSalesOrderR.class);
+					if (ackSalesOrderR != null) {
+						if ("001".equals(ackSalesOrderR.getCode())) {
+							if ("true".equals(ackSalesOrderR.getHasNext())) {
+								this.getSalesOrder(agentId);
 							}
+							return "同步成功";
 						} else {
-							return "订单回执接口错误";
+							return ackSalesOrderR.getErrMsg();
 						}
 					} else {
-						return "单据信息为空";
+						return "订单回执接口错误";
 					}
 				} else {
-					return "获取数据错误";
+					return "单据信息为空";
 				}
 			} else {
 				return "获取数据错误";
 			}
+		} else {
+			return "获取数据错误";
+		}
 	}
 }

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

@@ -3675,6 +3675,8 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 					}
 				}
 				map.put(MagicValues.DATA, list);
+			}else {
+				map.put(MagicValues.DATA, null);
 			}
 		} else {
 			// 默认取单据数据,包括主表、预配箱、配箱、费用
@@ -6036,16 +6038,27 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 									amountDr = amountDr.add(feeCenterReports1.getAmountD());
 									amountDrUsd = amountDrUsd.add(feeCenterReports1.getAmountUsdD());
 								}
-								FeeCenterReports feeCenterC = feeCenterReportsC.stream().filter(e -> e.getFeeCnName().equals(fee.getFeeCnName())
-									&&  !"1".equals(e.getMark())).distinct().findFirst().orElse(null);
-								if (feeCenterC != null) {
+								List<FeeCenterReports> feeCenterC = feeCenterReportsC.stream().filter(e -> e.getFeeCnName().equals(fee.getFeeCnName())
+										&&  !"1".equals(e.getMark())).collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(
+										Comparator.comparing(f -> f.getFeeCnName() + f.getBillCorpCnName()))), ArrayList::new));
+								if (!feeCenterC.isEmpty()){
+									for (FeeCenterReports itemC : feeCenterC){
+										itemC.setMark("1");
+										countC++;
+									}
+									feeCenterReports1.setCorpCnName(feeCenterC.get(0).getCorpCnName());
+									feeCenterReports1.setAmountC(feeCenterC.stream().map(FeeCenterReports::getAmountC).filter(Objects::nonNull).reduce(BigDecimal.ZERO,BigDecimal::add));
+									feeCenterReports1.setAmountLocC(feeCenterC.stream().map(FeeCenterReports::getAmountLocC).filter(Objects::nonNull).reduce(BigDecimal.ZERO,BigDecimal::add));
+									feeCenterReports1.setAmountUsdC(feeCenterC.stream().map(FeeCenterReports::getAmountUsdC).filter(Objects::nonNull).reduce(BigDecimal.ZERO,BigDecimal::add));
+								}
+								/*if (feeCenterC != null) {
 									feeCenterC.setMark("1");
 									feeCenterReports1.setCorpCnName(StringUtils.hasText(feeCenterC.getCorpCnName())? feeCenterC.getCorpCnName() : "");
 									feeCenterReports1.setAmountC(feeCenterC.getAmountC() == null ? BigDecimal.ZERO : feeCenterC.getAmountC());
 									feeCenterReports1.setAmountLocC(feeCenterC.getAmountLocC() == null ? BigDecimal.ZERO : feeCenterC.getAmountLocC());
 									feeCenterReports1.setAmountUsdC(feeCenterC.getAmountUsdC() == null ? BigDecimal.ZERO : feeCenterC.getAmountUsdC());
 									countC++;
-								}
+								}*/
 								feeCenterReports.add(feeCenterReports1);
 							}
 							if (!feeCenterReportsNewC.isEmpty()){
@@ -6089,26 +6102,28 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 								feeCenterReports1.setReportType(fee.getReportType());
 								feeCenterReports1.setDc(fee.getDc());
 								if (feeReports != null) {
-									if ((ObjectUtils.isNotNull(feeReports.getAmountD()) && feeReports.getAmountD().compareTo(new BigDecimal("0.00")) != 0)
-										|| (ObjectUtils.isNotNull(feeReports.getAmountUsdD()) && feeReports.getAmountUsdD().compareTo(new BigDecimal("0.00")) != 0)
-									) {
-										feeCenterReports1.setBillCorpCnName(feeReports.getBillCorpCnName());
-										feeCenterReports1.setAmountD(feeReports.getAmountD());
-										feeCenterReports1.setAmountLocD(feeReports.getAmountLocD());
-										feeCenterReports1.setAmountUsdD(feeReports.getAmountUsdD());
-										amountDr = amountDr.add(ObjectUtils.isNotNull(feeReports.getAmountD()) ? feeReports.getAmountD() : new BigDecimal("0.00"));
-										amountDrUsd = amountDrUsd.add(ObjectUtils.isNotNull(feeReports.getAmountUsdD()) ? feeReports.getAmountUsdD() : new BigDecimal("0.00"));
-									}
-
-									if ((ObjectUtils.isNotNull(feeReports.getAmountC()) && feeReports.getAmountC().compareTo(new BigDecimal("0.00")) != 0)
-										|| (ObjectUtils.isNotNull(feeReports.getAmountUsdC()) && feeReports.getAmountUsdC().compareTo(new BigDecimal("0.00")) != 0)
-									) {
-										feeCenterReports1.setCorpCnName(feeReports.getCorpCnName());
-										feeCenterReports1.setAmountC(feeReports.getAmountC());
-										feeCenterReports1.setAmountLocC(feeReports.getAmountLocC());
-										feeCenterReports1.setAmountUsdC(feeReports.getAmountUsdC());
-										amountCr = amountCr.add(ObjectUtils.isNotNull(feeReports.getAmountC()) ? feeReports.getAmountC() : new BigDecimal("0.00"));
-										amountCrUsd = amountCrUsd.add(ObjectUtils.isNotNull(feeReports.getAmountUsdC()) ? feeReports.getAmountUsdC() : new BigDecimal("0.00"));
+									if("D".equals(feeReports.getDc())){
+										if ((ObjectUtils.isNotNull(feeReports.getAmountD()) && feeReports.getAmountD().compareTo(new BigDecimal("0.00")) != 0)
+											|| (ObjectUtils.isNotNull(feeReports.getAmountUsdD()) && feeReports.getAmountUsdD().compareTo(new BigDecimal("0.00")) != 0)
+										) {
+											feeCenterReports1.setBillCorpCnName(feeReports.getBillCorpCnName());
+											feeCenterReports1.setAmountD(feeReports.getAmountD());
+											feeCenterReports1.setAmountLocD(feeReports.getAmountLocD());
+											feeCenterReports1.setAmountUsdD(feeReports.getAmountUsdD());
+											amountDr = amountDr.add(ObjectUtils.isNotNull(feeReports.getAmountD()) ? feeReports.getAmountD() : new BigDecimal("0.00"));
+											amountDrUsd = amountDrUsd.add(ObjectUtils.isNotNull(feeReports.getAmountUsdD()) ? feeReports.getAmountUsdD() : new BigDecimal("0.00"));
+										}
+									}else{
+										if ((ObjectUtils.isNotNull(feeReports.getAmountC()) && feeReports.getAmountC().compareTo(new BigDecimal("0.00")) != 0)
+											|| (ObjectUtils.isNotNull(feeReports.getAmountUsdC()) && feeReports.getAmountUsdC().compareTo(new BigDecimal("0.00")) != 0)
+										) {
+											feeCenterReports1.setCorpCnName(feeReports.getCorpCnName());
+											feeCenterReports1.setAmountC(feeReports.getAmountC());
+											feeCenterReports1.setAmountLocC(feeReports.getAmountLocC());
+											feeCenterReports1.setAmountUsdC(feeReports.getAmountUsdC());
+											amountCr = amountCr.add(ObjectUtils.isNotNull(feeReports.getAmountC()) ? feeReports.getAmountC() : new BigDecimal("0.00"));
+											amountCrUsd = amountCrUsd.add(ObjectUtils.isNotNull(feeReports.getAmountUsdC()) ? feeReports.getAmountUsdC() : new BigDecimal("0.00"));
+										}
 									}
 								}
 								feeCenterReports.add(feeCenterReports1);

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

@@ -421,19 +421,15 @@
                 and acc.approved_date &lt;= #{fee.etdEnd}
             </if>
         </if>
-     <!--   <if test='fee.type != null and fee.type != "" and fee.type == "1"'>
+        <if test='fee.sortType != null and fee.sortType != "" and fee.sortType == "1"'>
             GROUP BY acc.corp_id
         </if>
-        <if test='fee.type != null and fee.type != "" and fee.type == "2"'>
-            GROUP BY acc.bill_corp_id
+        <if test='fee.sortType != null and fee.sortType != "" and fee.sortType == "3"'>
+            GROUP BY acc.mblno
         </if>
-        <if test='fee.type != null and fee.type != "" and fee.type == "3"'>
-            GROUP BY acc.src_id
+        <if test='fee.sortType == null or fee.sortType == ""'>
+            GROUP BY acc.mblno
         </if>
-        <if test='fee.type == null or fee.type == ""'>
-            GROUP BY acc.id
-        </if>-->
-        GROUP BY acc.id
         ORDER BY acc.corp_id
     </select>
     <select id="feeSummaryDetailExport" resultType="org.springblade.los.statisticAnalysis.FeeSummaryDetailRD">
@@ -523,19 +519,15 @@
                 and acc.approved_date &lt;= #{fee.etdEnd}
             </if>
         </if>
-       <!-- <if test='fee.type != null and fee.type != "" and fee.type == "1"'>
+        <if test='fee.sortType != null and fee.sortType != "" and fee.sortType == "1"'>
             GROUP BY acc.corp_id
         </if>
-        <if test='fee.type != null and fee.type != "" and fee.type == "2"'>
-            GROUP BY acc.bill_corp_id
+        <if test='fee.sortType != null and fee.sortType != "" and fee.sortType == "3"'>
+            GROUP BY acc.mblno
         </if>
-        <if test='fee.type != null and fee.type != "" and fee.type == "3"'>
-            GROUP BY acc.src_id
+        <if test='fee.sortType == null or fee.sortType == ""'>
+            GROUP BY acc.mblno
         </if>
-        <if test='fee.type == null or fee.type == ""'>
-            GROUP BY acc.id
-        </if>-->
-        GROUP BY acc.id
         ORDER BY acc.corp_id
     </select>
     <select id="feeSummaryDetailNot" resultType="org.springblade.los.statisticAnalysis.FeeSummaryDetailNotRD">
@@ -625,19 +617,15 @@
                 and acc.approved_date &lt;= #{fee.etdEnd}
             </if>
         </if>
-      <!--  <if test='fee.type != null and fee.type != "" and fee.type == "1"'>
+        <if test='fee.sortType != null and fee.sortType != "" and fee.sortType == "1"'>
             GROUP BY acc.corp_id
         </if>
-        <if test='fee.type != null and fee.type != "" and fee.type == "2"'>
-            GROUP BY acc.bill_corp_id
+        <if test='fee.sortType != null and fee.sortType != "" and fee.sortType == "3"'>
+            GROUP BY acc.mblno
         </if>
-        <if test='fee.type != null and fee.type != "" and fee.type == "3"'>
-            GROUP BY acc.src_id
+        <if test='fee.sortType == null or fee.sortType == ""'>
+            GROUP BY acc.mblno
         </if>
-        <if test='fee.type == null or fee.type == ""'>
-            GROUP BY acc.id
-        </if>-->
-        GROUP BY acc.id
         ORDER BY acc.corp_id
     </select>
     <select id="feeSummaryDetailExportNot"
@@ -728,19 +716,15 @@
                 and acc.approved_date &lt;= #{fee.etdEnd}
             </if>
         </if>
-        <!--  <if test='fee.type != null and fee.type != "" and fee.type == "1"'>
-              GROUP BY acc.corp_id
-          </if>
-          <if test='fee.type != null and fee.type != "" and fee.type == "2"'>
-              GROUP BY acc.bill_corp_id
-          </if>
-          <if test='fee.type != null and fee.type != "" and fee.type == "3"'>
-              GROUP BY acc.src_id
-          </if>
-          <if test='fee.type == null or fee.type == ""'>
-              GROUP BY acc.id
-          </if>-->
-        GROUP BY acc.id
+        <if test='fee.sortType != null and fee.sortType != "" and fee.sortType == "1"'>
+            GROUP BY acc.corp_id
+        </if>
+        <if test='fee.sortType != null and fee.sortType != "" and fee.sortType == "3"'>
+            GROUP BY acc.mblno
+        </if>
+        <if test='fee.sortType == null or fee.sortType == ""'>
+            GROUP BY acc.mblno
+        </if>
         ORDER BY acc.corp_id
     </select>
     <select id="agingAnalysis" resultType="org.springblade.los.statisticAnalysis.AgingAnalysisRD">

+ 2 - 2
blade-service/blade-los/src/main/java/org/springblade/los/finance/fee/service/impl/FinAccBillsServiceImpl.java

@@ -151,8 +151,8 @@ public class FinAccBillsServiceImpl extends ServiceImpl<FinAccBillsMapper, FinAc
 			}
 			if ("1".equals(status)) {
 				if (ObjectUtils.isNotNull(item.getPid()) && ObjectUtils.isNotNull(item.getCorpId()) &&
-					ObjectUtils.isNotNull(item.getDc()) && ObjectUtils.isNotNull(item.getFeeId()) && ObjectUtils.isNotNull(item.getCurCode())) {
-					item.setBillKey(item.getPid() + "-" + item.getCorpId() + "-" + item.getDc() + "-" + item.getFeeCode() + "-" + item.getCurCode() + "-" + amountStatus);
+					ObjectUtils.isNotNull(item.getDc()) && ObjectUtils.isNotNull(item.getElementsId()) && ObjectUtils.isNotNull(item.getCurCode())) {
+					item.setBillKey(item.getPid() + "-" + item.getCorpId() + "-" + item.getDc() + "-" + item.getElementsCode() + "-" + item.getCurCode() + "-" + amountStatus);
 				} else {
 					throw new RuntimeException("单据号、单位、费用类型、核算要素不能为空");
 				}

+ 1 - 1
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/ship/service/impl/ShipServiceImpl.java

@@ -1018,7 +1018,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
 							}
 							List<PjOrderItems> orderItemList = orderItemsList.stream().filter(e -> e.getGoodsId().equals(shipItems.getGoodsId())).collect(Collectors.toList());
 							if (orderItemList.isEmpty()) {
-								throw new RuntimeException("商品:" + shipItems.getGoodsName() + "超过90天未赎回,请确认在出库");
+								throw new RuntimeException("商品:" + shipItems.getGoodsName() + "超过"+days+"天未赎回,请确认在出库");
 							}
 							List<FinancingShipItemDto> mapList = new ArrayList<>();
 							if (number.compareTo(new BigDecimal("0.00")) > 0) {