From ad6bf67d113e1bd610f73884cb393fc492a0243d Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Thu, 20 Nov 2025 16:23:28 +0800 Subject: [PATCH] =?UTF-8?q?demand:=20=20=20TMS=E7=B3=BB=E7=BB=9F=20-=20?= =?UTF-8?q?=E6=88=90=E6=9C=AC=E5=88=97=E8=A1=A8=20-=20=E6=8C=89=E7=85=A7?= =?UTF-8?q?=E8=BF=90=E8=BE=93=E5=8F=B7=E6=9F=A5=E8=AF=A2=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=20=E6=8F=90=E7=A4=BA=E6=97=A0=E6=95=B0=E6=8D=AE=20=20tms-?= =?UTF-8?q?=E8=BF=90=E5=8D=95=E7=AE=A1=E7=90=86-=E6=8E=A5=E5=8D=95/?= =?UTF-8?q?=E8=BF=90=E5=8D=95=E5=BD=95=E5=85=A5/=E8=BF=90=E5=8D=95?= =?UTF-8?q?=E4=BF=AE=E6=94=B9/=E7=BD=91=E7=82=B9=E8=B4=B9=E7=94=A8?= =?UTF-8?q?=E7=94=B3=E8=AF=B7-=E5=A2=9E=E5=8A=A0=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E9=94=80=E5=94=AE=E8=81=94=E7=B3=BB=E4=BA=BA=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E9=94=80=E5=94=AE=E6=94=AF=E6=8C=81=E6=8E=A5=E5=8F=A3=20=20tms?= =?UTF-8?q?-=E8=BF=90=E5=8D=95=E7=AE=A1=E7=90=86-=E6=8E=A5=E5=8D=95/?= =?UTF-8?q?=E8=BF=90=E5=8D=95=E5=BD=95=E5=85=A5/=E8=BF=90=E5=8D=95?= =?UTF-8?q?=E6=89=B9=E9=87=8F=E5=BD=95=E5=85=A5/=E8=BF=90=E5=8D=95?= =?UTF-8?q?=E4=BF=AE=E6=94=B9/=E7=BD=91=E7=82=B9=E8=B4=B9=E7=94=A8?= =?UTF-8?q?=E7=94=B3=E8=AF=B7-=E5=A2=9E=E5=8A=A0=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E9=94=80=E5=94=AE=E8=81=94=E7=B3=BB=E4=BA=BA=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=20=20tms-=E5=AF=84=E4=BB=B6=E8=BF=90=E5=8D=95=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E3=80=81=E5=AF=84=E4=BB=B6=E8=BF=90=E5=8D=95=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=96=B0=E3=80=81=E6=9F=A5=E8=AF=A2=E8=BF=90=E5=8D=95?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E3=80=81=E5=BF=AB=E4=BB=B6=E8=B7=9F=E8=B8=AA?= =?UTF-8?q?-=E6=9F=A5=E8=AF=A2=E8=BF=94=E5=9B=9E=E9=94=80=E5=94=AE?= =?UTF-8?q?=E6=94=AF=E6=8C=81=20committer:=20heyu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EmisSalesCommissionRatioController.java | 21 ++++- .../erp/emis/domain/EmisWaybillOther.java | 51 +++++++++++ .../emis/mapper/EmisWaybillOtherMapper.java | 80 +++++++++++++++++ .../service/impl/EmisWaybillServiceImpl.java | 42 +++++++++ .../resources/mapper/EmisTmsCostFeeMapper.xml | 4 +- .../resources/mapper/EmisWaybillMapper.xml | 9 +- .../mapper/EmisWaybillOtherMapper.xml | 89 +++++++++++++++++++ 7 files changed, 290 insertions(+), 6 deletions(-) create mode 100644 emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisWaybillOther.java create mode 100644 emis-biz/src/main/java/com/xdadan/erp/emis/mapper/EmisWaybillOtherMapper.java create mode 100644 emis-biz/src/main/resources/mapper/EmisWaybillOtherMapper.xml diff --git a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisSalesCommissionRatioController.java b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisSalesCommissionRatioController.java index c4b78a96f..7ea5563f8 100644 --- a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisSalesCommissionRatioController.java +++ b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisSalesCommissionRatioController.java @@ -43,6 +43,25 @@ public class EmisSalesCommissionRatioController extends BaseController { return getDataTable(list); } + /** + * 查询销售计提比例配置列表 + */ + @GetMapping("/listSimple") + public TableDataInfo listSimple(EmisSalesCommissionRatio query) { + if ("2".equals(query.getStatus())) { + // status=2: 启用且已过期,修改为查询启用状态且结束日期早于当前日期 + query.setStatus("1"); + query.getParams().put("endDateBeforeNow", true); + } else if ("3".equals(query.getStatus())) { + // status=3: 启用且未过期,修改为查询启用状态且结束日期晚于等于当前日期 + query.setStatus("1"); + query.getParams().put("endDateAfterNow", true); + } + startPage(); + List list = emisSalesCommissionRatioService.selectEmisSalesCommissionRatioList(query); + return getDataTable(list); + } + /** * 根据ID获取配置 */ @@ -101,4 +120,4 @@ public class EmisSalesCommissionRatioController extends BaseController { ExcelUtil util = new ExcelUtil<>(EmisSalesCommissionRatio.class); util.exportExcel(response, list, "销售计提比例配置数据"); } -} \ No newline at end of file +} diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisWaybillOther.java b/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisWaybillOther.java new file mode 100644 index 000000000..291b72b36 --- /dev/null +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisWaybillOther.java @@ -0,0 +1,51 @@ +/** + * @Project: emis + * @Title: EmisWaybillOther.java + * @author system + * @date 2025-01-XX + * @Copyright: ShangHai Duta 2022 All rights reserved. + * @version v1.0 + * @Description:

运单其他信息副表 实体类

+ */ + +package com.xdadan.erp.emis.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.xdadan.erp.common.annotation.audit.DataAuditField; +import com.xdadan.erp.common.annotation.audit.DataAuditTable; +import com.xdadan.erp.common.core.domain.BaseEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * @ClassName EmisWaybillOther + * @Description 运单其他信息副表 + * @author system + * @date 2025-01-XX + */ +@Data +@EqualsAndHashCode(callSuper = false) +@TableName("emis_waybill_other") +@DataAuditTable(tableName = "emis_waybill_other", tableComment = "运单其他信息副表") +public class EmisWaybillOther extends BaseEntity { + private static final long serialVersionUID = 1L; + + /* id */ + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /* 运单id */ + @DataAuditField(fieldComment = "运单ID") + private Long waybillId; + + /* 运单号 */ + @DataAuditField(fieldComment = "运单号") + private String billCode; + + /* 销售支持 */ + @DataAuditField(fieldComment = "销售支持") + private String salesSupport; +} + diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/mapper/EmisWaybillOtherMapper.java b/emis-biz/src/main/java/com/xdadan/erp/emis/mapper/EmisWaybillOtherMapper.java new file mode 100644 index 000000000..d8be31ddf --- /dev/null +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/mapper/EmisWaybillOtherMapper.java @@ -0,0 +1,80 @@ +/** + * @Project: emis + * @Title: EmisWaybillOtherMapper.java + * @author system + * @date 2025-01-XX + * @Copyright: ShangHai Doitinfo 2022 All rights reserved. + * @version v1.0 + * @Description:

运单其他信息副表 Mapper 接口

+ */ +package com.xdadan.erp.emis.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.xdadan.erp.emis.domain.EmisWaybillOther; +import org.apache.ibatis.annotations.Param; + +/** + * @ClassName EmisWaybillOtherMapper + * @Description

运单其他信息副表 Mapper 接口

+ * @author system + * @date 2025-01-XX + */ +public interface EmisWaybillOtherMapper extends BaseMapper { + + /** + * 主键查询 + * @param id + * @return + */ + public EmisWaybillOther selectEmisWaybillOtherById(Long id); + + /** + * 根据运单ID查询 + * @param waybillId + * @return + */ + public EmisWaybillOther selectEmisWaybillOtherByWaybillId(@Param("waybillId") Long waybillId); + + /** + * 根据运单号查询 + * @param billCode + * @return + */ + public EmisWaybillOther selectEmisWaybillOtherByBillCode(@Param("billCode") String billCode); + + /** + * 新增 + * @param emisWaybillOther + * @return + */ + public int insertEmisWaybillOther(EmisWaybillOther emisWaybillOther); + + /** + * 修改 + * @param emisWaybillOther + * @return + */ + public int updateEmisWaybillOther(EmisWaybillOther emisWaybillOther); + + /** + * 删除 + * @param id 主键 + * @return 结果 + */ + public int deleteEmisWaybillOtherById(Long id); + + /** + * 根据运单ID删除 + * @param waybillId + * @return + */ + public int deleteEmisWaybillOtherByWaybillId(@Param("waybillId") Long waybillId); + + /** + * 根据运单号删除 + * @param billCode + * @return + */ + public int deleteEmisWaybillOtherByBillCode(@Param("billCode") String billCode); +} + diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillServiceImpl.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillServiceImpl.java index 62b933ce8..a8e69e9d1 100644 --- a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillServiceImpl.java +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillServiceImpl.java @@ -149,6 +149,42 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb @Autowired private EmisTmsCostFeeMapper emisTmsCostFeeMapper; + @Autowired + private EmisWaybillOtherMapper emisWaybillOtherMapper; + + /** + * 保存或更新运单其他信息副表 + * @param emisWaybillSave + */ + private void saveOrUpdateWaybillOther(EmisWaybill emisWaybillSave) { + if (emisWaybillSave == null || emisWaybillSave.getId() == null) { + return; + } + + String salesSupport = emisWaybillSave.getSalesSupport(); + String billCode = emisWaybillSave.getBillCode(); + Long waybillId = emisWaybillSave.getId(); + + // 查询是否已存在 + EmisWaybillOther existing = emisWaybillOtherMapper.selectEmisWaybillOtherByWaybillId(waybillId); + + if (existing != null) { + // 更新 + existing.setSalesSupport(salesSupport); + existing.setBillCode(billCode); + existing.preUpdate(); + emisWaybillOtherMapper.updateEmisWaybillOther(existing); + } else { + // 新增 + EmisWaybillOther waybillOtherEntity = new EmisWaybillOther(); + waybillOtherEntity.setWaybillId(waybillId); + waybillOtherEntity.setBillCode(billCode); + waybillOtherEntity.setSalesSupport(salesSupport); + waybillOtherEntity.preInsert(); + emisWaybillOtherMapper.insertEmisWaybillOther(waybillOtherEntity); + } + } + /** * 获取稽核数据 * @param id @@ -3278,6 +3314,9 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb //插入新单 emisWaybillMapper.insertEmisWaybill(emisWaybillSave); + // 保存或更新运单其他信息副表 + saveOrUpdateWaybillOther(emisWaybillSave); + // 运单日志记录 recordWaybillOperLog( emisWaybillSave.getBillCode(), @@ -3793,6 +3832,9 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb // 基础信息更新 emisWaybillMapper.updateEmisWaybill(emisWaybillSave); + // 保存或更新运单其他信息副表 + saveOrUpdateWaybillOther(emisWaybillSave); + // 运单日志记录 recordWaybillOperLog( emisWaybillSave.getBillCode(), diff --git a/emis-biz/src/main/resources/mapper/EmisTmsCostFeeMapper.xml b/emis-biz/src/main/resources/mapper/EmisTmsCostFeeMapper.xml index a6c57eb95..86d453ee0 100644 --- a/emis-biz/src/main/resources/mapper/EmisTmsCostFeeMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisTmsCostFeeMapper.xml @@ -205,7 +205,7 @@ and fee_type = #{feeType} and split_type = #{splitType} and trans_type=#{transType} - and FIND_IN_SET(trans_sign_no,#{transSignNo}) + and trans_sign_no like concat('%', #{transSignNo}, '%') and supplier_code=#{supplierCode} and supplier_name like concat('%', #{supplierName}, '%') and send_place=#{sendPlace} @@ -453,4 +453,4 @@ #{id} - \ No newline at end of file + diff --git a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml index a656e54f1..cfe190b5f 100644 --- a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml @@ -341,6 +341,7 @@ a3.phone as customer_phone, a3.nick_name as customer_nick_name, a3.avatar as customer_avatar, + COALESCE(wss.sales_support, a4.sales_support) as sales_support, p.emp_name as dispatch_man_name,q.site_name as print_site_name, r.emp_name as print_man_name, @@ -392,6 +393,7 @@ left join emis_site start on a.start_site_code=start.site_code and start.del_flag='0' left join emis_customer_user a3 on a.customer_code=a3.customer_code and a3.del_flag='0' left join emis_customer_user a4 on a.cust_no=a4.monthly_pay_code and a4.del_flag='0' + left join emis_waybill_other wss on a.id=wss.waybill_id and wss.del_flag='0' left join emis_site seaway1 on a.departure_port=seaway1.site_code and seaway1.del_flag='0' left join emis_site seaway2 on a.destination_port=seaway2.site_code and seaway2.del_flag='0' @@ -443,7 +445,7 @@ a3.phone as customer_phone, a3.nick_name as customer_nick_name, a3.avatar as customer_avatar, - a3.sales_support , + COALESCE(wss.sales_support, a4.sales_support) as sales_support , a3.sales_executive , a3.customer_type as customer_type, a3.main_user_id , @@ -497,6 +499,7 @@ left join emis_site a1 on a.send_center_code=a1.site_code and a1.del_flag='0' left join emis_site a2 on a.destination_center_code=a2.site_code and a2.del_flag='0' left join emis_customer_user a3 on a.customer_code=a3.customer_code and a3.del_flag='0' + left join emis_waybill_other wss on a.id=wss.waybill_id and wss.del_flag='0' left join emis_site seaway1 on a.departure_port=seaway1.site_code and seaway1.del_flag='0' left join emis_site seaway2 on a.destination_port=seaway2.site_code and seaway2.del_flag='0' left join emis_site start on a.start_site_code=start.site_code and start.del_flag='0' @@ -508,7 +511,7 @@ @@ -527,7 +530,7 @@ diff --git a/emis-biz/src/main/resources/mapper/EmisWaybillOtherMapper.xml b/emis-biz/src/main/resources/mapper/EmisWaybillOtherMapper.xml new file mode 100644 index 000000000..a93013296 --- /dev/null +++ b/emis-biz/src/main/resources/mapper/EmisWaybillOtherMapper.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + select id, waybill_id, bill_code, sales_support, del_flag, create_by, create_time, update_by, update_time, remark + from emis_waybill_other + + + + + + + + + + insert into emis_waybill_other + + waybill_id, + bill_code, + sales_support, + del_flag, + create_by, + create_time, + update_by, + update_time, + remark, + + + #{waybillId}, + #{billCode}, + #{salesSupport}, + #{delFlag}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + + update emis_waybill_other + + waybill_id = #{waybillId}, + bill_code = #{billCode}, + sales_support = #{salesSupport}, + del_flag = #{delFlag}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where id = #{id} + + + + update emis_waybill_other set del_flag = '1' where id = #{id} + + + + update emis_waybill_other set del_flag = '1' where waybill_id = #{waybillId} + + + + update emis_waybill_other set del_flag = '1' where bill_code = #{billCode} + + + +