md
This commit is contained in:
parent
877a754f48
commit
13e3f2ecb6
@ -31,6 +31,8 @@ public interface EmisTmsCostFeeMapper extends BaseMapper<EmisTmsCostFee>
|
||||
|
||||
public EmisTmsCostFee selectEmisTmsCostFeeByCostNo(String costNo);
|
||||
|
||||
public EmisTmsCostFee selectEmisTmsCostFeeByBatchNo(String batchNo);
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*
|
||||
|
||||
@ -52,6 +52,9 @@ import org.springframework.util.CollectionUtils;
|
||||
public class EmisCommissionProfitServiceImpl extends EmisBaseService implements IEmisCommissionProfitService
|
||||
{
|
||||
|
||||
@Autowired
|
||||
private EmisTmsCostFeeMapper emisTmsCostFeeMapper;
|
||||
|
||||
@Autowired
|
||||
private EmisTmsSiteBatchMapper emisTmsSiteBatchMapper;
|
||||
|
||||
@ -265,7 +268,13 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
|
||||
redissonService.lock(lockKey, 300);
|
||||
try {
|
||||
|
||||
// 获取批次信息
|
||||
// 判断是否录入成本,录入成本才可以计算
|
||||
EmisTmsCostFee oldCostFee =emisTmsCostFeeMapper.selectEmisTmsCostFeeByBatchNo(batchNo);
|
||||
// 如果没有获取到成本则放弃计算
|
||||
if(oldCostFee==null){
|
||||
return;
|
||||
}
|
||||
// 获取批次信息
|
||||
EmisTmsSiteBatch tmsBatch = getTmsSiteBatchByBatchNo(batchNo);
|
||||
// 先删除该运单已经计算的提成
|
||||
emisCommissionDtlMapper.deleteEmisCommissionDtlByBatchNo(batchNo);
|
||||
|
||||
@ -176,6 +176,13 @@
|
||||
where a.cost_no = #{costNo}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectEmisTmsCostFeeByBatchNo" parameterType="String" resultMap="EmisTmsCostFeeResult">
|
||||
select id, cost_no, cost_name, batch_no, fee_type, split_type, trans_type, trans_sign_no, supplier_code, supplier_name, send_place, dest_place, cost_fee, usd_cost_fee, bill_month, trade_date, send_piece_sum, piece_number, total_weight, total_volume, bl_confirm_center, real_piece_number, real_total_weight, real_total_volume, confirm_center_date, confirm_center_note, confirm_center_man_code, confirm_center_code, bl_confirm_site, confirm_site_date, confirm_site_man_code, confirm_site_note, confirm_site_code, bl_has_calc, calc_date, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
|
||||
from emis_tms_cost_fee a
|
||||
where a.batch_no = #{batchNo}
|
||||
</select>
|
||||
|
||||
<insert id="insertEmisTmsCostFee" parameterType="EmisTmsCostFee" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into emis_tms_cost_fee
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
||||
@ -95,7 +95,7 @@
|
||||
<if test="updateSite != null and updateSite != ''"> and update_site=#{updateSite}</if>
|
||||
|
||||
<if test="searchValue != null and searchValue != '' ">
|
||||
and ( batch_name like concat('%', #{searchValue},'%') or car_no like concat('%', #{searchValue},'%') )
|
||||
and ( batch_no like concat('%', #{searchValue},'%') or batch_name like concat('%', #{searchValue},'%') or car_no like concat('%', #{searchValue},'%') )
|
||||
</if>
|
||||
|
||||
<if test="params.billCode != null and params.billCode != ''">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user