demand: TMS系统 - 客户管理 - 月结客户界面 新增字段调整 月结客户导入验重逻辑bug修复 修改运单selectOne bug修复
committer: heyu
This commit is contained in:
parent
6b261c1c49
commit
99a036114a
@ -94,7 +94,7 @@ public interface EmisWaybillProblemInfoMapper extends BaseMapper<EmisWaybillProb
|
||||
* @param billCode
|
||||
* @return
|
||||
*/
|
||||
EmisWaybillProblemInfo selectEmisWaybillProblemInfoByBillCode(@Param("billCode") String billCode);
|
||||
List<EmisWaybillProblemInfo> selectEmisWaybillProblemInfoByBillCode(@Param("billCode") String billCode);
|
||||
|
||||
/**
|
||||
* 根据运单号查
|
||||
|
||||
@ -160,28 +160,42 @@ public class EmisWaybillProblemInfoServiceImpl extends EmisBaseService implement
|
||||
*/
|
||||
@Override
|
||||
public void deleteEmisWaybillProblemInfoByBillCode(String billCode) {
|
||||
EmisWaybillProblemInfo emisWaybillProblemInfo = emisWaybillProblemInfoMapper.selectEmisWaybillProblemInfoByBillCode(billCode);
|
||||
if (emisWaybillProblemInfo == null) {
|
||||
// 查询所有该运单下的问题件
|
||||
List<EmisWaybillProblemInfo> problemList = emisWaybillProblemInfoMapper
|
||||
.selectEmisWaybillProblemInfoByBillCode(billCode);
|
||||
if (problemList == null || problemList.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 删除该问题件的扫描轨迹
|
||||
emisTmsScanRecordMapper.deletePromScanRecord(emisWaybillProblemInfo.getId().toString(), emisWaybillProblemInfo.getMainBillCode());
|
||||
|
||||
// 删除问题件
|
||||
emisWaybillProblemInfoMapper.deleteEmisWaybillProblemInfoById(emisWaybillProblemInfo.getId());
|
||||
|
||||
// 获取运单信息
|
||||
EmisWaybill waybill = getWaybillByBillCode(emisWaybillProblemInfo.getBillCode());
|
||||
if (!"6".equals(waybill.getPaymentType())) {
|
||||
// 重新计算提成
|
||||
emisCommissionProfitService.reCalcProfitByBillCode(emisWaybillProblemInfo.getBillCode(),null);
|
||||
// 记录是否需要重算提成
|
||||
boolean needReCalcProfit = false;
|
||||
String mainBillCode = null;
|
||||
for (EmisWaybillProblemInfo emisWaybillProblemInfo : problemList) {
|
||||
// 删除该问题件的扫描轨迹
|
||||
emisTmsScanRecordMapper.deletePromScanRecord(emisWaybillProblemInfo.getId().toString(),
|
||||
emisWaybillProblemInfo.getMainBillCode());
|
||||
// 删除问题件
|
||||
emisWaybillProblemInfoMapper.deleteEmisWaybillProblemInfoById(emisWaybillProblemInfo.getId());
|
||||
// 判断是否需要重算提成
|
||||
EmisWaybill waybill = getWaybillByBillCode(emisWaybillProblemInfo.getBillCode());
|
||||
if (waybill != null && !"6".equals(waybill.getPaymentType())) {
|
||||
needReCalcProfit = true;
|
||||
}
|
||||
// 记录mainBillCode用于后续取消登记
|
||||
if (mainBillCode == null) {
|
||||
mainBillCode = emisWaybillProblemInfo.getMainBillCode();
|
||||
}
|
||||
}
|
||||
// 重新计算提成
|
||||
if (needReCalcProfit) {
|
||||
emisCommissionProfitService.reCalcProfitByBillCode(billCode, null);
|
||||
}
|
||||
|
||||
// 删除运单的问题件记录
|
||||
EmisWaybill emisWaybill = new EmisWaybill();
|
||||
emisWaybill.setBillCode(emisWaybillProblemInfo.getMainBillCode());
|
||||
emisWaybillMapper.cancelProblemRegister(emisWaybill);
|
||||
if (mainBillCode != null) {
|
||||
EmisWaybill emisWaybill = new EmisWaybill();
|
||||
emisWaybill.setBillCode(mainBillCode);
|
||||
emisWaybillMapper.cancelProblemRegister(emisWaybill);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -131,6 +131,7 @@
|
||||
select id, bill_code, main_bill_code, bl_sub_bill, problem_type, problem_title, problem_cause, send_site, send_site_code, register_man_code, register_man_dept, register_site_code, register_date, register_save_date, data_from, status, is_send_site_register, bl_reversion, reversion_str, reversion_man, reversion_man_code, reversion_site_code, reversion_date, bl_checkok, deal_result, bl_see, file_path, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site
|
||||
from emis_waybill_problem_info a
|
||||
where a.bill_code = #{billCode}
|
||||
and a.problem_type in ('173','170')
|
||||
</select>
|
||||
|
||||
<select id="selectEmisWaybillProblemInfoByBillCodes" parameterType="list" resultMap="EmisWaybillProblemInfoResult">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user