This commit is contained in:
linfso 2025-07-10 15:48:46 +08:00
commit cf01247e99
7 changed files with 38 additions and 7 deletions

View File

@ -13,8 +13,10 @@ package com.xdadan.erp.emis.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.xdadan.erp.common.annotation.audit.DataAuditField;
import com.xdadan.erp.common.annotation.audit.DataAuditTable;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.xdadan.erp.common.annotation.Excel;
@ -35,6 +37,8 @@ import lombok.Data;
* @date 2024-06-07 04:52:26
*/
@Data
@TableName("emis_tms_site_batch")
@DataAuditTable(tableName = "emis_tms_site_batch",tableComment = "组批次表",bizKey="batchNo")
public class EmisTmsSiteBatch extends BaseEntity
{
private static final long serialVersionUID = 1L;

View File

@ -12,8 +12,12 @@ package com.xdadan.erp.emis.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xdadan.erp.common.annotation.audit.DataAuditLog;
import com.xdadan.erp.common.annotation.audit.OperateType;
import com.xdadan.erp.emis.domain.EmisTmsSiteBatch;
import com.xdadan.erp.emis.domain.EmisWaybill;
import com.xdadan.erp.emis.service.impl.EmisTmsSiteBatchServiceImpl;
import com.xdadan.erp.emis.service.impl.EmisWaybillServiceImpl;
import org.apache.ibatis.annotations.Param;
/**
@ -75,6 +79,7 @@ public interface EmisTmsSiteBatchMapper extends BaseMapper<EmisTmsSiteBatch>
* @param emisTmsSiteBatch
* @return
*/
@DataAuditLog(operateType= OperateType.UPDATE,serviceClass= EmisTmsSiteBatchServiceImpl.class)
public int updateEmisTmsSiteBatch(EmisTmsSiteBatch emisTmsSiteBatch);
/**

View File

@ -10,6 +10,8 @@
package com.xdadan.erp.emis.service;
import java.util.List;
import com.xdadan.erp.common.core.audit.IDataAuditService;
import com.xdadan.erp.emis.domain.EmisTmsSiteBatch;
import com.xdadan.erp.emis.domain.EmisTmsSiteBatchDtl;
import com.xdadan.erp.emis.domain.exception.EmisBizError;
@ -20,7 +22,7 @@ import com.xdadan.erp.emis.domain.exception.EmisBizError;
* @author linfso
* @date 2024-03-01 08:54:56
*/
public interface IEmisTmsSiteBatchService
public interface IEmisTmsSiteBatchService extends IDataAuditService
{
/**
* 主键查询

View File

@ -62,6 +62,17 @@ public class EmisTmsSiteBatchServiceImpl extends EmisBaseService implements IEmi
@Autowired
private EmisTransPlanRuleMapper emisTransPlanRuleMapper;
/**
* 获取稽核数据
* @param id
* @return
*/
@Override
public Object getAuditObjectById(Object id) {
EmisTmsSiteBatch emisTmsSiteBatch = emisTmsSiteBatchMapper.selectEmisTmsSiteBatchById((Long)id);
return emisTmsSiteBatch;
}
/**
* 查询一级网点TMS组批次
*

View File

@ -137,7 +137,7 @@ public class EmisTransPlanRuleServiceImpl extends EmisBaseService implements IEm
*/
@Override
public List<EmisTransPlanRule> selectEmisTransPlanRuleTree(EmisTransPlanRule emisTransPlanRule) {
if(StringUtil.isBlank(emisTransPlanRule.getLineCode())||StringUtil.isBlank(emisTransPlanRule.getProductType())||StringUtil.isBlank(emisTransPlanRule.getStartSiteCode())){
if(StringUtil.isBlank(emisTransPlanRule.getLineCode())||StringUtil.isBlank(emisTransPlanRule.getProductType())||StringUtil.isBlank((String) emisTransPlanRule.getParams().get("lineStartSiteCode"))){
return Lists.newArrayList();
}
// 查询所有规则

View File

@ -54,7 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select
m.id, m.bill_code, m.miss_reason, m.create_time, m.update_time, m.remark, m.del_flag,
m.line_code, m.product_type, m.start_site_code, m.next_site_code, m.supplier_code, m.start_date, m.end_date,m.miss_type,
w.send_site_code, s1.site_name as send_site_name,s2.site_name as start_site_name,s3.site_name as next_site_name, w.send_country, c1.name as send_country_name, w.destination_code, n.dest_name as dispatch_underling_site_name,w.bl_is_question,
w.send_site_code, s1.site_name as send_site_name,s2.site_name as start_site_name,s3.site_name as next_site_name, w.send_country, c1.name as send_country_name, w.destination_code, s4.site_name as dispatch_underling_site_name,w.bl_is_question,
l.line_name as line_name,
w.receive_country, c2.name as receive_country_name, w.send_date, w.bl_sign, w.sign_date,
w.product_type,w.problem_type,w.virtual_remark,w.dispatch_underling_site_code,
@ -75,7 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join emis_site s3 on m.next_site_code=s3.site_code and s3.del_flag=0
left join emis_country c1 on w.send_country=c1.code and c1.del_flag='0'
left join emis_country c2 on w.receive_country=c2.code and c2.del_flag='0'
left join emis_destination n on w.dispatch_underling_site_code=n.dest_code and n.del_flag='0'
left join emis_site s4 on w.dispatch_underling_site_code=s4.site_code and s4.del_flag=0
left join emis_trans_line k on w.trans_line_type=k.line_code and k.del_flag='0'
left join emis_trans_plan_rule r on m.trans_plan_rule_id=r.id and r.del_flag='0'
left join emis_trans_line l on m.line_code=l.line_code and l.del_flag='0'
@ -141,7 +141,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
w.trans_line_type as line_code, w.product_type, w.start_site_code, w.next_site_code,
null as supplier_code, null as start_date, null as end_date, '0' as miss_type,
w.send_site_code, s1.site_name as send_site_name,
w.send_country, c1.name as send_country_name, w.destination_code, n.dest_name as dispatch_underling_site_name, w.bl_is_question,
w.send_country, c1.name as send_country_name, w.destination_code, s2.site_name as dispatch_underling_site_name, w.bl_is_question,
l.line_name as line_name,
w.receive_country, c2.name as receive_country_name, w.send_date, w.bl_sign, w.sign_date,
w.payment_type, w.parcel_qty, w.bill_weight, w.total_volume, w.volume_weight,
@ -162,7 +162,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
inner join emis_waybill w on b.bill_code = w.bill_code and w.del_flag='0'
left join emis_site s1 on w.send_site_code=s1.site_code and s1.del_flag=0
left join emis_country c1 on w.send_country=c1.code and c1.del_flag=0
left join emis_destination n on w.dispatch_underling_site_code=n.dest_code and n.del_flag=0
left join emis_site s2 on w.dispatch_underling_site_code=s2.site_code and s2.del_flag=0
left join emis_trans_line l on w.trans_line_type=l.line_code and l.del_flag=0
left join emis_country c2 on w.receive_country=c2.code and c2.del_flag=0
<where>
@ -225,6 +225,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<when test="missCount == -3">
AND m.miss_type = 1
</when>
<when test="missCount == -5">
AND m.bill_code IN (
SELECT bill_code
FROM emis_tms_site_batch_miss
WHERE del_flag = '0'
GROUP BY bill_code
HAVING COUNT(*) > 9
)
</when>
<when test="missCount > 0">
AND m.bill_code IN (
SELECT bill_code

View File

@ -68,7 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
s1.site_name as start_site_name, r.next_site_code, s2.site_name as next_site_name,
r.manager, r.supplier_code, r.start_date, r.end_date, r.remark,
r.del_flag,
l.line_name,l.trans_manager, l.from_country, l.country
l.line_name,l.trans_manager, l.from_country, l.country,
(SELECT GROUP_CONCAT(s.name ORDER BY FIND_IN_SET(s.code, r.supplier_code))
FROM emis_supplier s
WHERE FIND_IN_SET(s.code, r.supplier_code)