|
@@ -691,6 +691,12 @@ public class AmsContractTruckPriceServiceImpl implements IAmsContractTruckPriceS
|
|
|
amsContractTransportPrice.setPriceId(priceId);
|
|
|
amsContractTransportPrice.setUpdateTime(new Date());
|
|
|
i = amsContractTruckPriceMapper.updateByPrimaryKeySelective(amsContractTransportPrice);
|
|
|
+ // 根据priceId先查询之前是否有物资
|
|
|
+// 如果有,但是接受的没有就删除
|
|
|
+ List<Map<String, Object>> selectwz = amsContractTruckPriceMapper.selectwz(mapValue);
|
|
|
+ if (!selectwz.isEmpty() && mapList.isEmpty()){
|
|
|
+ i = amsContaactPriceMaterialMapper.deletePriceByPriceId(mapValue.get("priceId").toString());
|
|
|
+ }
|
|
|
//把之前的全删了,然后新增
|
|
|
if (mapList!=null && mapList.size()>0) {
|
|
|
i = amsContaactPriceMaterialMapper.deletePriceByPriceId(mapValue.get("priceId").toString());
|