Browse Source

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

wfg 6 months ago
parent
commit
6b7ae02f84

+ 183 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/business/sea/vo/UpdateBillsFieldVo.java

@@ -0,0 +1,183 @@
+package org.springblade.los.business.sea.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springblade.los.utils.LosSpecialHandle;
+
+import javax.validation.constraints.NotEmpty;
+import java.util.List;
+
+/**
+ * @author Rain
+ */
+@Data
+public class UpdateBillsFieldVo {
+
+
+	@NotEmpty(message = "请选择需要修改的数据")
+	private List<Long> ids;
+
+	/**
+	 * 船名 id
+	 */
+	@ApiModelProperty(value = "船名 id")
+	private Long vesselId;
+	/**
+	 * 中文船名
+	 */
+	@ApiModelProperty(value = "中文船名")
+	private String vesselCnName;
+	/**
+	 * 英文船名
+	 */
+	@ApiModelProperty(value = "英文船名")
+	private String vesselEnName;
+	/**
+	 * 航次
+	 */
+	@ApiModelProperty(value = "航次")
+	private String voyageNo;
+
+	/**
+	 * MB/L NO
+	 */
+	@ApiModelProperty(value = "MB/L NO")
+	@LosSpecialHandle(massage = "", space = true, conversion = true)
+	private String mblno;
+
+
+	/**
+	 * 场站 id
+	 */
+	@ApiModelProperty(value = "场站 id")
+	private Long cyId;
+	/**
+	 * 场站代码
+	 */
+	@ApiModelProperty(value = "场站代码")
+	private String cyCode;
+	/**
+	 * 场站中文名称
+	 */
+	@ApiModelProperty(value = "场站简称")
+	private String cyShortName;
+	/**
+	 * 场站中文名称
+	 */
+	@ApiModelProperty(value = "场站中文名称")
+	private String cyCnName;
+	/**
+	 * 场站英文名称
+	 */
+	@ApiModelProperty(value = "场站英文名称")
+	private String cyEnName;
+	/**
+	 * 场站地址
+	 */
+	@ApiModelProperty(value = "场站地址")
+	private String cyAddress;
+	/**
+	 * 场站联系人
+	 */
+	@ApiModelProperty(value = "场站联系人")
+	private String cyContacts;
+	/**
+	 * 场站联系人电话
+	 */
+	@ApiModelProperty(value = "场站联系人电话")
+	private String cyTel;
+	/**
+	 * 场站备注
+	 */
+	@ApiModelProperty(value = "场站备注")
+	private String cyRemarks;
+
+
+
+	/**
+	 * 客户 id
+	 */
+	@ApiModelProperty(value = "客户 id")
+	private Long corpId;
+
+	/**
+	 * 客户中文名称
+	 */
+	@ApiModelProperty(value = "客户中文名称")
+	private String corpCnName;
+	/**
+	 * 客户英文名称
+	 */
+	@ApiModelProperty(value = "客户英文名称")
+	private String corpEnName;
+	/**
+	 * 客户约号
+	 */
+	@ApiModelProperty(value = "客户约号")
+	private String corpArgreementNo;
+	/**
+	 * 简称
+	 */
+	@ApiModelProperty(value = "客户简称")
+	private String shortName;
+	/**
+	 * 简称
+	 */
+	@ApiModelProperty(value = "客户简称,使用 shortName")
+	private String corpShortName;
+
+	/**
+	 * 客户联系人 id
+	 */
+	@ApiModelProperty(value = "客户联系人 id")
+	private Long corpAttnId;
+	/**
+	 * 客户联系人姓名
+	 */
+	@ApiModelProperty(value = "客户联系人姓名")
+	private String corpAttnName;
+	/**
+	 * 客户联系人电话
+	 */
+	@ApiModelProperty(value = "客户联系人电话")
+	private String corpAttnTel;
+	/**
+	 * 客户联系人邮箱
+	 */
+	@ApiModelProperty(value = "客户联系人邮箱")
+	private String corpAttnEmail;
+
+
+
+	/**
+	 * 业务来源
+	 */
+	@ApiModelProperty(value = "业务来源")
+	private String srcType;
+	/**
+	 * 来源 id
+	 */
+	@ApiModelProperty(value = "来源 id")
+	private Long srcId;
+	/**
+	 * 来源中文
+	 */
+	@ApiModelProperty(value = "来源中文")
+	private String srcCnName;
+	/**
+	 * 来源英文
+	 */
+	@ApiModelProperty(value = "来源英文")
+	private String srcEnName;
+	/**
+	 * 来源部门 Id
+	 */
+	@ApiModelProperty(value = "来源部门 Id")
+	private String srcDeptId;
+	/**
+	 * 来源部门
+	 */
+	@ApiModelProperty(value = "来源部门")
+	private String srcDeptName;
+
+}

+ 11 - 6
blade-service/blade-los/src/main/java/org/springblade/los/Util/BigDecimalUtils.java

@@ -17,13 +17,18 @@ public class BigDecimalUtils {
 	public static String convertToEnglish(BigDecimal number) {
 		BigDecimal integerPart = number.setScale(0, BigDecimal.ROUND_DOWN);
 		String decimal = number.toString();
-		BigDecimal decimalAmount = new BigDecimal(decimal.substring(decimal.indexOf(".") + 1));
-		long integralPart = integerPart.longValue();
-		String uppercaseInteger = convert(integralPart).trim();
-		if (new BigDecimal("0.00").compareTo(decimalAmount) != 0) {
-			uppercaseInteger = uppercaseInteger + " POINT " + convert(decimalAmount.longValue()).trim();
+		if (decimal.indexOf(".") > 0) {
+			BigDecimal decimalAmount = new BigDecimal(decimal.substring(decimal.indexOf(".") + 1));
+			long integralPart = integerPart.longValue();
+			String uppercaseInteger = convert(integralPart).trim();
+			if (new BigDecimal("0.00").compareTo(decimalAmount) != 0) {
+				uppercaseInteger = uppercaseInteger + " POINT " + convert(decimalAmount.longValue()).trim();
+			}
+			return uppercaseInteger;
+		} else {
+			long integralPart = integerPart.longValue();
+            return convert(integralPart).trim();
 		}
-		return uppercaseInteger;
 	}
 
 	private static String convert(long number) {

+ 63 - 0
blade-service/blade-los/src/main/java/org/springblade/los/Util/BoxNumUtils.java

@@ -0,0 +1,63 @@
+package org.springblade.los.Util;
+
+import net.logstash.logback.encoder.org.apache.commons.lang3.StringUtils;
+
+/**
+ * @author :jixinyuan
+ * @date : 2025/6/12
+ */
+public class BoxNumUtils {
+
+
+	/**
+	 * 集装箱箱号验证
+	 *
+	 * @param cntrNo 箱号
+	 * @return 结果
+	 */
+	public static String containerNumberVerification(String cntrNo){
+
+//		result.setAck(EnumAck.Failure);
+		if (StringUtils.isEmpty(cntrNo)) {
+			return null;
+		}
+		int length = cntrNo.length();
+		if (length != 11) {
+			throw new RuntimeException("总长度非11位长!");
+		}
+		String sub1 = StringUtils.substring(cntrNo, 0, 4);
+		if (!sub1.matches("[A-Z]+")) {
+			throw new RuntimeException("第一部分非大写字母!");
+		}
+		String sub2 = StringUtils.substring(cntrNo, 4, length - 1);
+		if (!sub2.matches("[0-9]*")) {
+			throw new RuntimeException("第二部分非数字!");
+
+		}
+		String sub3 = StringUtils.substring(cntrNo, length - 1, length);
+		if (!sub3.matches("[0-9]*")) {
+			throw new RuntimeException("第二部分非数字!");
+
+		}
+		//定义一个字符串,集装箱编号的每个字符必定出自这串字符,其中11,22,33用?代替,获取对应值,满足0-38
+		String charCode = "0123456789A?BCDEFGHIJK?LMNOPQRSTU?VWXYZ";
+		char[] codeChars = cntrNo.toCharArray();//将接收到的字符串转换为字符数组,方便后续遍历
+		int num = 0;//初始化用于规则计算后累计的变量,用于计算结束后%第11位
+
+		for (int i = 0; i < 10; i++) {
+			int idx = charCode.indexOf(codeChars[i]);//遍历取出第i个字符,并从charCode字符串中查找这个字符所在位置,这个位置的值就是对应值
+			if (idx == -1 || charCode.charAt(idx) == '?') {//如果查找不到或者找到替代符号(?)一样,那么这个字符不是规则中所要求的字符,需要校验的字符串不符合集装箱号的规则,退出循环
+				throw new RuntimeException("不符合集装箱号的规则");
+			}
+			idx = (int) (idx * Math.pow(2, i));//这里的意思应该是说对应值*2的(n-1)次方;原文表达(2、第N位的箱号对应值再分别乘以2N-1 (N=1,2,3………..10))是误导的关键
+			num += idx;//累加
+		}
+		num = (num % 11) % 10;//取模11
+
+		if (!(Integer.parseInt(String.valueOf(codeChars[10])) == num)) {
+			throw new RuntimeException("第11位校验码未通过验证");
+		}
+		return null;
+	}
+
+}

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

@@ -40,10 +40,12 @@ import org.springblade.los.business.sea.entity.SeaBillsDetail;
 import org.springblade.los.business.sea.service.IBillsService;
 import org.springblade.los.business.sea.service.ISeaBillsDetailService;
 import org.springblade.los.business.sea.vo.BillsVO;
+import org.springblade.los.business.sea.vo.UpdateBillsFieldVo;
 import org.springblade.los.excel.BillsExcel;
 import org.springblade.system.entity.DictBiz;
 import org.springblade.system.feign.IDictBizClient;
 import org.springblade.system.feign.ISysClient;
+import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletResponse;
@@ -923,5 +925,25 @@ public class BillsController extends BladeController {
 	public R<String> getReceiptUrl(@RequestParam("billId") Long billId) {
 		return billsService.getReceiptUrl(billId);
 	}
+
+
+	@PostMapping("/updateBatchField")
+	public R<String> updateBatchField(@RequestBody @Validated UpdateBillsFieldVo updateBillsFieldVo) {
+		return billsService.updateBatchField(updateBillsFieldVo);
+	}
+
+	/**
+	 * 批量修改提单类型
+	 *
+	 * @param ids      单据ids
+	 * @param billType 提单类型
+	 */
+	@GetMapping("/updateBillType")
+	@RepeatSubmit
+	public R updateBillType(@RequestParam("ids") String ids,
+							@RequestParam(value = "billType") String billType) {
+		return billsService.updateBillType(ids, billType);
+	}
+
 }
 

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

@@ -22,6 +22,7 @@ import org.springblade.los.business.sea.entity.Bills;
 import org.springblade.los.business.sea.vo.BillsVO;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.los.business.sea.vo.UpdateBillsFieldVo;
 
 import java.util.List;
 
@@ -174,4 +175,14 @@ public interface IBillsService extends IService<Bills> {
 	R<String> getReceiptUrl(Long billId);
 
 	R batchCopyBills(String ids, String billType, String copyCntr, String copyFee);
+
+	/**
+	 * 批量更新单据信息
+	 *
+	 * @param updateBillsFieldVo 参数
+	 * @return 结果
+	 */
+	R<String> updateBatchField(UpdateBillsFieldVo updateBillsFieldVo);
+
+	R updateBillType(String ids, String billType);
 }

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

@@ -29,10 +29,7 @@ import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.BeanUtil;
 import org.springblade.core.tool.utils.Func;
 import org.springblade.core.tool.utils.StringUtil;
-import org.springblade.los.Util.BigDecimalUtils;
-import org.springblade.los.Util.IDeptUtils;
-import org.springblade.los.Util.StringTools;
-import org.springblade.los.Util.ZrUtil;
+import org.springblade.los.Util.*;
 import org.springblade.los.basic.business.entity.BusinessType;
 import org.springblade.los.basic.business.service.IBusinessTypeService;
 import org.springblade.los.basic.corps.entity.BCorps;
@@ -55,6 +52,7 @@ import org.springblade.los.business.sea.entity.*;
 import org.springblade.los.business.sea.mapper.BillsMapper;
 import org.springblade.los.business.sea.service.*;
 import org.springblade.los.business.sea.vo.BillsVO;
+import org.springblade.los.business.sea.vo.UpdateBillsFieldVo;
 import org.springblade.los.check.dto.LosAuditProecessDTO;
 import org.springblade.los.check.entity.LosAuditPathsActs;
 import org.springblade.los.check.entity.LosAuditPathsLevels;
@@ -161,10 +159,6 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 	private final ZrUtil zrUtil;
 
 
-
-
-
-
 	@Override
 	public IPage<BillsVO> selectBillsPage(IPage<BillsVO> page, BillsVO bills) {
 		return page.setRecords(baseMapper.selectBillsPage(page, bills));
@@ -303,15 +297,14 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 			// 初始创建为1
 			bills.setVersion("1");
 			this.save(bills);
-		}
-		else {
+		} else {
 			Bills dataSourceBill = baseMapper.selectOne(new LambdaQueryWrapper<Bills>().select(Bills::getId, Bills::getVersion).eq(Bills::getId, bills.getId()));
 			if (!Objects.equals(dataSourceBill.getVersion(), bills.getVersion())) {
 				return R.fail(601, "数据已被其他用户更新,请等待刷新后重试");
 			}
 			// 每更新一次往上累加一次版本
 			// 旧数据处理
-			int version = StringUtil.isBlank(dataSourceBill.getVersion()) ? 1 :Integer.parseInt(dataSourceBill.getVersion());
+			int version = StringUtil.isBlank(dataSourceBill.getVersion()) ? 1 : Integer.parseInt(dataSourceBill.getVersion());
 			bills.setVersion(String.valueOf(version + 1));
 			List<Long> ids = count.stream().map(Bills::getId).distinct().collect(Collectors.toList());
 			if (!"MH".equals(bills.getBillType())) {
@@ -567,6 +560,7 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 					.eq(Containers::getIsDeleted, 0));
 				if (!containersList.isEmpty()) {
 					for (Containers item : containersList) {
+						BoxNumUtils.containerNumberVerification(item.getCntrNo());
 						item.setUpdateUser(AuthUtil.getUserId());
 						item.setUpdateUserName(AuthUtil.getUserName());
 						item.setUpdateTime(new Date());
@@ -586,7 +580,7 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 						.distinct().filter(Objects::nonNull).collect(Collectors.joining(",")));
 				}
 			}
-		}else{
+		} else {
 			bills.setQuantityCntrDescr(null);
 		}
 		bills.setQuantityV20(V20);
@@ -753,7 +747,8 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 				measurement = measurement.add(details.stream().map(Bills::getMeasurement).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
 
 			}
-		} else if ("MH".equals(bills.getBillType()) && ObjectUtils.isNotNull(bills.getId())) {
+		}
+		else if ("MH".equals(bills.getBillType()) && ObjectUtils.isNotNull(bills.getId())) {
 			Bills details = baseMapper.selectOne(new LambdaQueryWrapper<Bills>()
 				.select(Bills::getAmountDr, Bills::getAmountCr, Bills::getAmountProfit, Bills::getAmountDrUsd, Bills::getAmountCrUsd
 					, Bills::getAmountProfitUsd, Bills::getAmountDrLoc, Bills::getAmountCrLoc, Bills::getAmountProfitLoc
@@ -898,7 +893,6 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 			}
 			hmmEdiService.saveOrUpdate(bills.getHmmEdi());
 		}
-
 		if (ObjectUtils.isNotNull(bills.getFilesList())) {
 			for (FilesCenter item : bills.getFilesList()) {
 				item.setPid(bills.getId());
@@ -3860,4 +3854,79 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 		return R.data("操作成功");
 	}
 
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public R<String> updateBatchField(UpdateBillsFieldVo updateBillsFieldVo) {
+		List<Bills> billsList = baseMapper.selectList(new LambdaQueryWrapper<Bills>().in(Bills::getId, updateBillsFieldVo.getIds()));
+		List<Integer> statusList = Arrays.asList(1, 2, 3);
+		// 筛选不可更改状态的数据
+		Bills notUpdateBills = billsList.stream().filter(e -> !statusList.contains(e.getStatus()) || e.getIsDeleted() == 1).findFirst().orElse(null);
+		if (notUpdateBills != null) {
+			return R.fail("单据编号为" + notUpdateBills.getBillNo() + "的记录不能修改");
+		}
+		for (Bills bills : billsList) {
+			Bills updateBills = new Bills();
+			BeanUtil.copyProperties(updateBillsFieldVo, updateBills);
+			updateBills.setId(bills.getId());
+			updateBills.setBillDate(bills.getBillDate());
+			updateBills.setAccountDate(bills.getAccountDate());
+			updateBills.setBookingDate(bills.getBookingDate());
+			updateBills.setBookingWithdrawTime(bills.getBookingWithdrawTime());
+			updateBills.setEtd(bills.getEtd());
+			updateBills.setEta(bills.getEta());
+			updateBills.setIssueDate(bills.getIssueDate());
+			updateBills.setQuantityCntrDescr(bills.getQuantityCntrDescr());
+			updateBills.setCyTrailerTime(bills.getCyTrailerTime());
+			updateBills.setCyReturnTime(bills.getCyReturnTime());
+			updateBills.setActualEtd(bills.getActualEtd());
+			updateBills.setActualEta(bills.getActualEta());
+			updateBills.setReturnEmptyDate(bills.getReturnEmptyDate());
+			updateBills.setClearanceDate(bills.getClearanceDate());
+			updateBills.setChangeOrderDate(bills.getChangeOrderDate());
+			updateBills.setApprovedDate(bills.getApprovedDate());
+			updateBills.setQuotationMethod(bills.getQuotationMethod());
+			updateBills.setAccountPeriodType(bills.getAccountPeriodType());
+			updateBills.setChargeableWeight(bills.getChargeableWeight());
+			updateBills.setCntrGoodType(bills.getCntrGoodType());
+			baseMapper.updateById(updateBills);
+			log.error("updateBills:{}" + JSONObject.toJSONString(updateBills));
+		}
+		return null;
+	}
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public R updateBillType(String ids, String billType) {
+		if (ObjectUtils.isNull(ids)) {
+			throw new RuntimeException("缺少必要参数");
+		}
+		List<Bills> billsList = baseMapper.selectList(new LambdaQueryWrapper<Bills>()
+			.eq(Bills::getTenantId, AuthUtil.getTenantId())
+			.eq(Bills::getIsDeleted, 0)
+			.in(Bills::getId, Func.toLongList(ids)));
+		if (billsList.isEmpty()) {
+			throw new SecurityException("未查到单据信息");
+		}
+		List<Long> idList = billsList.stream().map(Bills::getId).collect(Collectors.toList());
+		List<Bills> billsLists = baseMapper.selectList(new LambdaQueryWrapper<Bills>()
+			.eq(Bills::getTenantId, AuthUtil.getTenantId())
+			.eq(Bills::getIsDeleted, 0)
+			.in(Bills::getMasterId, idList));
+		for (Bills item : billsList) {
+			if ("MH".equals(item.getBillType()) && "DD,MM".contains(billType)) {
+				if (ObjectUtils.isNotNull(item.getMasterBillNo())) {
+					throw new RuntimeException("提单号:" + item.getMblno() + "已填加到主单");
+				}
+			} else if ("MM".equals(item.getBillType()) && "DD,MH".contains(billType)) {
+				List<Bills> bills = billsLists.stream().filter(e -> e.getMasterId().equals(item.getId())).collect(Collectors.toList());
+				if (!bills.isEmpty()) {
+					throw new RuntimeException("提单号:" + item.getMblno() + "中存在分单");
+				}
+			}
+			item.setBillType(billType);
+		}
+		this.updateBatchById(billsList);
+		return R.data("操作成功");
+	}
+
 }

+ 3 - 2
blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/impl/ContainersServiceImpl.java

@@ -24,6 +24,7 @@ import lombok.AllArgsConstructor;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.los.Util.BoxNumUtils;
 import org.springblade.los.Util.IDeptUtils;
 import org.springblade.los.business.sea.dto.WaitingBox;
 import org.springblade.los.business.sea.entity.Bills;
@@ -89,9 +90,8 @@ public class ContainersServiceImpl extends ServiceImpl<ContainersMapper, Contain
 			if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
 				deptName = String.join(",", res.getData());
 			}
-
 		}
-
+		BoxNumUtils.containerNumberVerification(containers.getCntrNo());
 		String sealNo = ObjectUtils.isNotNull(containers.getSealNo()) ? containers.getSealNo().toUpperCase() : "";
 		// 普柜可以设定为,铅封不能重复,但框架 FR  FH这一类的,HMM要求录入NIL,MSK要求录入000000
 		Boolean isNilSealNo = "".equals(sealNo) || "NIL".equals(sealNo) || "000000".equals(sealNo);
@@ -508,6 +508,7 @@ public class ContainersServiceImpl extends ServiceImpl<ContainersMapper, Contain
 		List<ContainersBills> subtractContainersBillsList = new ArrayList<>();
 		List<ContainersCommodity> containersCommodityList = new ArrayList<>();
 		for (Containers containers : list) {
+			BoxNumUtils.containerNumberVerification(containers.getCntrNo());
 			String sealNo = ObjectUtils.isNotNull(containers.getSealNo()) ? containers.getSealNo().toUpperCase() : "";
 			// 普柜可以设定为,铅封不能重复,但框架 FR  FH这一类的,HMM要求录入NIL,MSK要求录入000000
 			Boolean isNilSealNo = "".equals(sealNo) || "NIL".equals(sealNo) || "000000".equals(sealNo);

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

@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import lombok.AllArgsConstructor;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
+import org.springblade.los.Util.BoxNumUtils;
 import org.springblade.los.Util.IDeptUtils;
 import org.springblade.los.Util.RegularUtils;
 import org.springblade.los.basic.cntr.entity.BCntrTypes;
@@ -329,6 +330,7 @@ public class PreContainersServiceImpl extends ServiceImpl<PreContainersMapper, P
 			.eq(Containers::getIsDeleted, 0));
 		if (!containersList.isEmpty()) {
 			for (Containers item : containersList) {
+				BoxNumUtils.containerNumberVerification(item.getCntrNo());
 				item.setUpdateUser(AuthUtil.getUserId());
 				item.setUpdateUserName(AuthUtil.getUserName());
 				item.setUpdateTime(new Date());

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

@@ -449,12 +449,15 @@
         acc.bill_no billNo,
         acc.mblno mblNo,
         acc.business_type businessType,
-        CASE
-        acc.business_type
         WHEN 'SI' THEN
         acc.eta
+        WHEN 'SIA' THEN
+        acc.eta
         WHEN 'SE' THEN
-        acc.etd ELSE ''
+        acc.etd
+        WHEN 'SEA' THEN
+        acc.etd
+        ELSE ''
         END AS etdDate,
         SUM(( CASE acc.account_dc WHEN 'D' THEN acc.amount_dr WHEN 'C' THEN acc.amount_cr ELSE 0 END ) ) AS amount,
         SUM(( CASE acc.account_dc WHEN 'D' THEN acc.amount_dr_usd WHEN 'C' THEN acc.amount_cr_usd ELSE 0 END ) ) AS amountUsd,
@@ -528,7 +531,7 @@
         <if test='fee.sortType == null or fee.sortType == ""'>
             GROUP BY acc.mblno
         </if>
-        ORDER BY acc.corp_id
+        ORDER BY acc.mblno,acc.corp_id
     </select>
     <select id="feeSummaryDetailNot" resultType="org.springblade.los.statisticAnalysis.FeeSummaryDetailNotRD">
         SELECT
@@ -553,8 +556,13 @@
             acc.business_type
             WHEN 'SI' THEN
             acc.eta
+            WHEN 'SIA' THEN
+            acc.eta
             WHEN 'SE' THEN
-            acc.etd ELSE ''
+            acc.etd
+            WHEN 'SEA' THEN
+            acc.etd
+            ELSE ''
             END AS etd,
             acc.pod_en_name pod,
             acc.pol_en_name pol,
@@ -624,15 +632,15 @@
             </if>
         </if>
         <if test='fee.sortType != null and fee.sortType != "" and fee.sortType == "1"'>
-            GROUP BY acc.corp_id
+            GROUP BY acc.corp_id,acc.mblno
         </if>
         <if test='fee.sortType != null and fee.sortType != "" and fee.sortType == "3"'>
-            GROUP BY acc.mblno
+            GROUP BY acc.corp_id,acc.mblno
         </if>
         <if test='fee.sortType == null or fee.sortType == ""'>
-            GROUP BY acc.mblno
+            GROUP BY  acc.corp_id,acc.mblno
         </if>
-        ORDER BY acc.corp_id
+        ORDER BY acc.mblno,acc.corp_id
     </select>
     <select id="feeSummaryDetailExportNot"
             resultType="org.springblade.los.statisticAnalysis.FeeSummaryDetailNotRD">
@@ -658,8 +666,13 @@
         acc.business_type
         WHEN 'SI' THEN
         acc.eta
+        WHEN 'SIA' THEN
+        acc.eta
         WHEN 'SE' THEN
-        acc.etd ELSE ''
+        acc.etd
+        WHEN 'SEA' THEN
+        acc.etd
+        ELSE ''
         END AS etd,
         acc.pod_en_name pod,
         acc.pol_en_name pol,
@@ -729,13 +742,13 @@
             </if>
         </if>
         <if test='fee.sortType != null and fee.sortType != "" and fee.sortType == "1"'>
-            GROUP BY acc.corp_id
+            GROUP BY acc.corp_id,acc.mblno
         </if>
         <if test='fee.sortType != null and fee.sortType != "" and fee.sortType == "3"'>
-            GROUP BY acc.mblno
+            GROUP BY acc.corp_id,acc.mblno
         </if>
         <if test='fee.sortType == null or fee.sortType == ""'>
-            GROUP BY acc.mblno
+            GROUP BY acc.corp_id,acc.mblno
         </if>
         ORDER BY acc.corp_id
     </select>

+ 3 - 3
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/stock/controller/StockDescController.java

@@ -281,7 +281,7 @@ public class StockDescController extends BladeController {
 			.like(ObjectUtil.isNotEmpty(stockDesc.getDot()), PjStockDesc::getDot, stockDesc.getDot())
 			.orderByDesc(PjStockDesc::getBalanceQuantity);
 		if ("0".equals(stockDesc.getWhether())) {
-			lambdaQueryWrapper.ne(PjStockDesc::getStoreInventory, 0);
+			lambdaQueryWrapper.ne(PjStockDesc::getBalanceQuantity, 0);
 		}
 		if (ObjectUtil.isNotEmpty(stockDesc.getCname())) {
 			List<PjGoodsDesc> pjGoodsDescs = goodsDescService.list(new LambdaQueryWrapper<PjGoodsDesc>()
@@ -427,7 +427,7 @@ public class StockDescController extends BladeController {
 			.like(ObjectUtil.isNotEmpty(stockDesc.getDot()), PjStockDesc::getDot, stockDesc.getDot())
 			.orderByAsc(PjStockDesc::getCreateTime);
 		if ("0".equals(stockDesc.getWhether())) {
-			lambdaQueryWrapper.ne(PjStockDesc::getStoreInventory, 0);
+			lambdaQueryWrapper.ne(PjStockDesc::getBalanceQuantity, 0);
 		}
 		if (ObjectUtil.isNotEmpty(stockDesc.getCname())) {
 			List<PjGoodsDesc> pjGoodsDescs = goodsDescService.list(new LambdaQueryWrapper<PjGoodsDesc>()
@@ -498,7 +498,7 @@ public class StockDescController extends BladeController {
 			.like(ObjectUtil.isNotEmpty(stockDesc.getDot()), PjStockDesc::getDot, stockDesc.getDot())
 			.orderByAsc(PjStockDesc::getCreateTime);
 		if ("0".equals(stockDesc.getWhether())) {
-			lambdaQueryWrapper.ne(PjStockDesc::getStoreInventory, 0);
+			lambdaQueryWrapper.ne(PjStockDesc::getBalanceQuantity, 0);
 		}
 		if (ObjectUtil.isNotEmpty(stockDesc.getCname())) {
 			List<PjGoodsDesc> pjGoodsDescs = goodsDescService.list(new LambdaQueryWrapper<PjGoodsDesc>()