Merge pull request 'demand: 运单录入、运单修改、运单批量录入、网点费用申请增加校验线路与产品类型是否匹配' (#157) from develop into master
Reviewed-on: http://git.xdadan.loc/tanex/emis-service/pulls/157
This commit is contained in:
commit
34bb02e08c
@ -1,10 +1,10 @@
|
|||||||
/**
|
/**
|
||||||
* @Project: emis
|
* @Project: emis
|
||||||
* @Title: EmisTransProductMapper.java
|
* @Title: EmisTransProductMapper.java
|
||||||
* @author linfso
|
* @author linfso
|
||||||
* @date 2024-01-09 11:50:34
|
* @date 2024-01-09 11:50:34
|
||||||
* @Copyright: ShangHai Doitinfo 2022 All rights reserved.
|
* @Copyright: ShangHai Doitinfo 2022 All rights reserved.
|
||||||
* @version v1.0
|
* @version v1.0
|
||||||
* @Description: <p> 运输产品类型 Mapper 接口 </p>
|
* @Description: <p> 运输产品类型 Mapper 接口 </p>
|
||||||
* <span style='color:red'> Warning : This file is generate by ai tools,don't edit!!! </span>
|
* <span style='color:red'> Warning : This file is generate by ai tools,don't edit!!! </span>
|
||||||
*/
|
*/
|
||||||
@ -26,7 +26,7 @@ public interface EmisTransProductMapper extends BaseMapper<EmisTransProduct>
|
|||||||
/**
|
/**
|
||||||
* 主键查询
|
* 主键查询
|
||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public EmisTransProduct selectEmisTransProductById(Long id);
|
public EmisTransProduct selectEmisTransProductById(Long id);
|
||||||
|
|
||||||
@ -41,31 +41,31 @@ public interface EmisTransProductMapper extends BaseMapper<EmisTransProduct>
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询列表
|
* 查询列表
|
||||||
*
|
*
|
||||||
* @param emisTransProduct
|
* @param emisTransProduct
|
||||||
* @return 集合
|
* @return 集合
|
||||||
*/
|
*/
|
||||||
public List<EmisTransProduct> selectEmisTransProductList(EmisTransProduct emisTransProduct);
|
public List<EmisTransProduct> selectEmisTransProductList(EmisTransProduct emisTransProduct);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增
|
* 新增
|
||||||
*
|
*
|
||||||
* @param emisTransProduct
|
* @param emisTransProduct
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public int insertEmisTransProduct(EmisTransProduct emisTransProduct);
|
public int insertEmisTransProduct(EmisTransProduct emisTransProduct);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改
|
* 修改
|
||||||
*
|
*
|
||||||
* @param emisTransProduct
|
* @param emisTransProduct
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public int updateEmisTransProduct(EmisTransProduct emisTransProduct);
|
public int updateEmisTransProduct(EmisTransProduct emisTransProduct);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除
|
* 删除
|
||||||
*
|
*
|
||||||
* @param id 主键
|
* @param id 主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@ -73,11 +73,13 @@ public interface EmisTransProductMapper extends BaseMapper<EmisTransProduct>
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除
|
* 批量删除
|
||||||
*
|
*
|
||||||
* @param ids 需要删除的数据主键集合
|
* @param ids 需要删除的数据主键集合
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteEmisTransProductByIds(Long[] ids);
|
public int deleteEmisTransProductByIds(Long[] ids);
|
||||||
|
|
||||||
public EmisTransProduct getEmisTransProductByProdCode(String prodCode);
|
public EmisTransProduct getEmisTransProductByProdCode(String prodCode);
|
||||||
|
|
||||||
|
EmisTransProduct selectTransProductByCode(@Param("lineCode") String lineCode,@Param("prodCode") String prodCode);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
/**
|
/**
|
||||||
* @Project: emis
|
* @Project: emis
|
||||||
* @Title: EmisWaybillServiceImpl.java
|
* @Title: EmisWaybillServiceImpl.java
|
||||||
* @author linfso
|
* @author linfso
|
||||||
* @date 2024-02-29 08:15:14
|
* @date 2024-02-29 08:15:14
|
||||||
* @Copyright: ShangHai Duta 2022 All rights reserved.
|
* @Copyright: ShangHai Duta 2022 All rights reserved.
|
||||||
* @version v1.0
|
* @version v1.0
|
||||||
* @Description: <p> 运单列表 实体类 </p>
|
* @Description: <p> 运单列表 实体类 </p>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ package com.xdadan.erp.emis.service;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 运单列表Service业务层处理
|
* 运单列表Service业务层处理
|
||||||
*
|
*
|
||||||
* @author linfso
|
* @author linfso
|
||||||
* @date 2024-02-29 08:15:14
|
* @date 2024-02-29 08:15:14
|
||||||
*/
|
*/
|
||||||
@ -5480,6 +5480,19 @@ public class EmisBaseService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void checkLineWithProd(EmisWaybill emisWaybillSave) throws EmisBizError {
|
||||||
|
if (StringUtil.isBlank(emisWaybillSave.getProductType()) || StringUtil.isBlank(emisWaybillSave.getTransLineType()
|
||||||
|
)) {
|
||||||
|
throw new EmisBizError(EmisBizErrorType.NOT_EXISTS, "线路/产品类型不能为空");
|
||||||
|
}
|
||||||
|
EmisTransProduct transProduct = emisTransProductMapper.selectTransProductByCode(
|
||||||
|
emisWaybillSave.getTransLineType(),
|
||||||
|
emisWaybillSave.getProductType());
|
||||||
|
if (transProduct == null) {
|
||||||
|
throw new EmisBizError(EmisBizErrorType.NOT_EXISTS, "产品类型与线路不匹配");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void main(String[] args) throws ParseException {
|
public static void main(String[] args) throws ParseException {
|
||||||
// Date startDate = new Date("202");
|
// Date startDate = new Date("202");
|
||||||
Date startDate= new SimpleDateFormat("yyyy-MM-dd").parse("2025-05-11");
|
Date startDate= new SimpleDateFormat("yyyy-MM-dd").parse("2025-05-11");
|
||||||
@ -5549,4 +5562,4 @@ public class EmisBaseService {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
/**
|
/**
|
||||||
* @Project: emis
|
* @Project: emis
|
||||||
* @Title: EmisWaybillServiceImpl.java
|
* @Title: EmisWaybillServiceImpl.java
|
||||||
* @author linfso
|
* @author linfso
|
||||||
* @date 2024-02-29 08:15:14
|
* @date 2024-02-29 08:15:14
|
||||||
* @Copyright: ShangHai Duta 2022 All rights reserved.
|
* @Copyright: ShangHai Duta 2022 All rights reserved.
|
||||||
* @version v1.0
|
* @version v1.0
|
||||||
* @Description: <p> 运单列表 实体类 </p>
|
* @Description: <p> 运单列表 实体类 </p>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ package com.xdadan.erp.emis.service.impl;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 运单列表Service业务层处理
|
* 运单列表Service业务层处理
|
||||||
*
|
*
|
||||||
* @author linfso
|
* @author linfso
|
||||||
* @date 2024-02-29 08:15:14
|
* @date 2024-02-29 08:15:14
|
||||||
*/
|
*/
|
||||||
@ -192,7 +192,7 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询运单列表列表
|
* 查询运单列表列表
|
||||||
*
|
*
|
||||||
* @param emisWaybill 运单列表
|
* @param emisWaybill 运单列表
|
||||||
* @return 运单列表
|
* @return 运单列表
|
||||||
*/
|
*/
|
||||||
@ -3130,6 +3130,9 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
|||||||
// 校验寄件国家是否匹配线路
|
// 校验寄件国家是否匹配线路
|
||||||
checkCountry(emisWaybillSave);
|
checkCountry(emisWaybillSave);
|
||||||
|
|
||||||
|
// 校验产品类型与线路是否匹配
|
||||||
|
checkLineWithProd(emisWaybillSave);
|
||||||
|
|
||||||
// 子单号做扣减
|
// 子单号做扣减
|
||||||
if ("1".equals(emisWaybillSave.getBlGenSubbill())) {
|
if ("1".equals(emisWaybillSave.getBlGenSubbill())) {
|
||||||
Integer subBillCount = emisElectronicSitePagService.getTotalAvailablePagCount(emisWaybillSave.getSendSiteCode(), "T7080", "1002");
|
Integer subBillCount = emisElectronicSitePagService.getTotalAvailablePagCount(emisWaybillSave.getSendSiteCode(), "T7080", "1002");
|
||||||
@ -3649,6 +3652,9 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
|||||||
// 公共计算部分
|
// 公共计算部分
|
||||||
emisWaybillSave.setId(oldEmisWaybill.getId());
|
emisWaybillSave.setId(oldEmisWaybill.getId());
|
||||||
|
|
||||||
|
// 校验产品类型与线路是否匹配
|
||||||
|
checkLineWithProd(emisWaybillSave);
|
||||||
|
|
||||||
calcWayBillCommonInfo(emisWaybillSave,oldEmisWaybill,false);
|
calcWayBillCommonInfo(emisWaybillSave,oldEmisWaybill,false);
|
||||||
|
|
||||||
emisWaybillSave.preUpdate();
|
emisWaybillSave.preUpdate();
|
||||||
|
|||||||
@ -73,6 +73,12 @@
|
|||||||
where a.trans_line_code=#{lineCode} and a.prod_name=#{prodName} limit 1
|
where a.trans_line_code=#{lineCode} and a.prod_name=#{prodName} limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectTransProductByCode" parameterType="String" resultMap="EmisTransProductResult">
|
||||||
|
select id, prod_code, prod_name, prod_name_en, status, country, trans_line_code, trans_line, carry_type, trans_type, aging_desc, aging_flag, min_aging, max_aging, order_num, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
|
||||||
|
from emis_trans_product a
|
||||||
|
where a.trans_line_code=#{lineCode} and a.prod_code=#{prodCode} limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="checkUnique" parameterType="EmisTransProduct" resultType="int">
|
<select id="checkUnique" parameterType="EmisTransProduct" resultType="int">
|
||||||
select count(1) from emis_trans_product
|
select count(1) from emis_trans_product
|
||||||
where del_flag='0'
|
where del_flag='0'
|
||||||
@ -211,4 +217,4 @@
|
|||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user