demand: TMS系统 - 成本列表 - 按照运输号查询数据 提示无数据 tms-运单管理-接单/运单录入/运单修改/网点费用申请-增加根据销售联系人查询销售支持接口 tms-运单管理-接单/运单录入/运单批量录入/运单修改/网点费用申请-增加保存销售联系人功能 tms-寄件运单查询、寄件运单查询新、查询运单详情、快件跟踪-查询返回销售支持

committer: heyu
This commit is contained in:
aike 2025-11-20 16:23:28 +08:00
parent f9aa123aaa
commit ad6bf67d11
7 changed files with 290 additions and 6 deletions

View File

@ -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<EmisSalesCommissionRatio> list = emisSalesCommissionRatioService.selectEmisSalesCommissionRatioList(query);
return getDataTable(list);
}
/**
* 根据ID获取配置
*/
@ -101,4 +120,4 @@ public class EmisSalesCommissionRatioController extends BaseController {
ExcelUtil<EmisSalesCommissionRatio> util = new ExcelUtil<>(EmisSalesCommissionRatio.class);
util.exportExcel(response, list, "销售计提比例配置数据");
}
}
}

View File

@ -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: <p> 运单其他信息副表 实体类 </p>
*/
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;
}

View File

@ -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: <p> 运单其他信息副表 Mapper 接口 </p>
*/
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 <p> 运单其他信息副表 Mapper 接口 </p>
* @author system
* @date 2025-01-XX
*/
public interface EmisWaybillOtherMapper extends BaseMapper<EmisWaybillOther> {
/**
* 主键查询
* @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);
}

View File

@ -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(),

View File

@ -205,7 +205,7 @@
<if test="feeType != null and feeType != ''"> and fee_type = #{feeType}</if>
<if test="splitType != null and splitType != ''"> and split_type = #{splitType}</if>
<if test="transType != null and transType != ''"> and trans_type=#{transType}</if>
<if test="transSignNo != null and transSignNo != ''"> and FIND_IN_SET(trans_sign_no,#{transSignNo})</if>
<if test="transSignNo != null and transSignNo != ''"> and trans_sign_no like concat('%', #{transSignNo}, '%')</if>
<if test="supplierCode != null and supplierCode != ''"> and supplier_code=#{supplierCode} </if>
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
<if test="sendPlace != null and sendPlace != ''"> and send_place=#{sendPlace}</if>
@ -453,4 +453,4 @@
#{id}
</foreach>
</delete>
</mapper>
</mapper>

View File

@ -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 @@
<select id="selectEmisWaybillByBillCode" parameterType="String" resultMap="EmisWaybillResult">
<include refid="selectEmisWaybillDetailVo"/>
<where>
bill_code = #{billCode}
a.bill_code = #{billCode}
</where>
limit 1
</select>
@ -527,7 +530,7 @@
<select id="selectWaybillBaseInfoByBillCode" parameterType="String" resultMap="BaseEmisWaybillResult">
<include refid="selectEmisWaybillVo"/>
<where>
bill_code = #{billCode}
a.bill_code = #{billCode}
</where>
limit 1
</select>

View File

@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.xdadan.erp.emis.mapper.EmisWaybillOtherMapper">
<resultMap type="EmisWaybillOther" id="EmisWaybillOtherResult" extends="com.xdadan.erp.emis.mapper.EmisBaseMapper.EmisBaseResult">
<result property="id" column="id" />
<result property="waybillId" column="waybill_id" />
<result property="billCode" column="bill_code" />
<result property="salesSupport" column="sales_support" />
</resultMap>
<sql id="selectEmisWaybillOtherVo">
select id, waybill_id, bill_code, sales_support, del_flag, create_by, create_time, update_by, update_time, remark
from emis_waybill_other
</sql>
<select id="selectEmisWaybillOtherById" parameterType="Long" resultMap="EmisWaybillOtherResult">
<include refid="selectEmisWaybillOtherVo"/>
where id = #{id} and del_flag = '0'
</select>
<select id="selectEmisWaybillOtherByWaybillId" parameterType="Long" resultMap="EmisWaybillOtherResult">
<include refid="selectEmisWaybillOtherVo"/>
where waybill_id = #{waybillId} and del_flag = '0'
limit 1
</select>
<select id="selectEmisWaybillOtherByBillCode" parameterType="String" resultMap="EmisWaybillOtherResult">
<include refid="selectEmisWaybillOtherVo"/>
where bill_code = #{billCode} and del_flag = '0'
limit 1
</select>
<insert id="insertEmisWaybillOther" parameterType="EmisWaybillOther" useGeneratedKeys="true" keyProperty="id">
insert into emis_waybill_other
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="waybillId != null">waybill_id,</if>
<if test="billCode != null and billCode != ''">bill_code,</if>
<if test="salesSupport != null and salesSupport != ''">sales_support,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null and updateBy != ''">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null and remark != ''">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="waybillId != null">#{waybillId},</if>
<if test="billCode != null and billCode != ''">#{billCode},</if>
<if test="salesSupport != null and salesSupport != ''">#{salesSupport},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null and remark != ''">#{remark},</if>
</trim>
</insert>
<update id="updateEmisWaybillOther" parameterType="EmisWaybillOther">
update emis_waybill_other
<trim prefix="SET" suffixOverrides=",">
<if test="waybillId != null">waybill_id = #{waybillId},</if>
<if test="billCode != null and billCode != ''">bill_code = #{billCode},</if>
<if test="salesSupport != null">sales_support = #{salesSupport},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteEmisWaybillOtherById" parameterType="Long">
update emis_waybill_other set del_flag = '1' where id = #{id}
</delete>
<delete id="deleteEmisWaybillOtherByWaybillId" parameterType="Long">
update emis_waybill_other set del_flag = '1' where waybill_id = #{waybillId}
</delete>
<delete id="deleteEmisWaybillOtherByBillCode" parameterType="String">
update emis_waybill_other set del_flag = '1' where bill_code = #{billCode}
</delete>
</mapper>