md
This commit is contained in:
parent
a64572f478
commit
a0cb45271a
@ -85,6 +85,11 @@ public interface EmisTmsCostFeeRelMapper extends BaseMapper<EmisTmsCostFeeRel>
|
|||||||
*/
|
*/
|
||||||
public int deleteEmisTmsCostFeeRelById(Long id);
|
public int deleteEmisTmsCostFeeRelById(Long id);
|
||||||
|
|
||||||
|
|
||||||
|
public int deleteEmisTmsCostFeeRelByCostNo(String costNo);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除
|
* 批量删除
|
||||||
*
|
*
|
||||||
|
|||||||
@ -59,7 +59,7 @@ public interface IEmisTmsCostFeeService
|
|||||||
* @param emisTmsCostFee TMS运输成本账单
|
* @param emisTmsCostFee TMS运输成本账单
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int updateEmisTmsCostFee(EmisTmsCostFee emisTmsCostFee);
|
public int updateEmisTmsCostFee(EmisTmsCostFee emisTmsCostFee) throws EmisBizError;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除TMS运输成本账单
|
* 批量删除TMS运输成本账单
|
||||||
|
|||||||
@ -257,9 +257,31 @@ public class EmisTmsCostFeeServiceImpl implements IEmisTmsCostFeeService
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int updateEmisTmsCostFee(EmisTmsCostFee emisTmsCostFee)
|
@Transactional
|
||||||
|
public int updateEmisTmsCostFee(EmisTmsCostFee emisTmsCostFee) throws EmisBizError
|
||||||
{
|
{
|
||||||
return emisTmsCostFeeMapper.updateEmisTmsCostFee(emisTmsCostFee);
|
// 删除旧的数据
|
||||||
|
emisTmsCostFeeRelMapper.deleteEmisTmsCostFeeRelByCostNo(emisTmsCostFee.getCostNo());
|
||||||
|
// billRelList
|
||||||
|
if(CollectionUtils.isEmpty(emisTmsCostFee.getBillRelList())){
|
||||||
|
throw new EmisBizError(EmisBizErrorType.FAIL,"关联单号不能为空");
|
||||||
|
}
|
||||||
|
|
||||||
|
String costNo=emisTmsCostFee.getCostNo();
|
||||||
|
|
||||||
|
// 插入关联单号
|
||||||
|
for (EmisTmsCostFeeRel costFeeRel:emisTmsCostFee.getBillRelList()
|
||||||
|
) {
|
||||||
|
EmisTmsCostFeeRel newCostFeeRel = new EmisTmsCostFeeRel();
|
||||||
|
newCostFeeRel.setCostNo(costNo);
|
||||||
|
newCostFeeRel.setBillCode(costFeeRel.getBillCode());
|
||||||
|
emisTmsCostFeeRelMapper.insertEmisTmsCostFeeRel(newCostFeeRel);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 计算分摊费用
|
||||||
|
reCalcSplitCostFee(costNo);
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -164,6 +164,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteEmisTmsCostFeeRelByCostNo" parameterType="String">
|
||||||
|
update emis_tms_cost_fee_rel set del_flag='1' where cost_no = #{costNo}
|
||||||
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteEmisTmsCostFeeRelById" parameterType="Long">
|
<delete id="deleteEmisTmsCostFeeRelById" parameterType="Long">
|
||||||
update emis_tms_cost_fee_rel set del_flag='1' where id = #{id}
|
update emis_tms_cost_fee_rel set del_flag='1' where id = #{id}
|
||||||
</delete>
|
</delete>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user