|
@@ -672,7 +672,7 @@ public class AmsContractTruckPriceServiceImpl implements IAmsContractTruckPriceS
|
|
|
int i = 0;
|
|
|
BigDecimal capacityTypeId = DataChange.dataToBigDecimal(mapValue.get("capacityTypeId"));
|
|
|
BigDecimal lineId = DataChange.dataToBigDecimal(mapValue.get("rangeId"));
|
|
|
-// BigDecimal formulaId = DataChange.dataToBigDecimal(mapValue.get("cargonameId"));
|
|
|
+ BigDecimal formulaId = DataChange.dataToBigDecimal(mapValue.get("cargonameId"));
|
|
|
BigDecimal priceValue = DataChange.dataToBigDecimal(mapValue.get("priceValue"));
|
|
|
Date priceDate = new Date((Long)mapValue.get("priceDate"));
|
|
|
BigDecimal type = DataChange.dataToBigDecimal(mapValue.get("type"));
|
|
@@ -687,10 +687,16 @@ public class AmsContractTruckPriceServiceImpl implements IAmsContractTruckPriceS
|
|
|
// amsContractTransportPrice.setOilTypeId(oilTypeId); 油品名称
|
|
|
amsContractTransportPrice.setPriceValue(priceValue);
|
|
|
amsContractTransportPrice.setPriceDate(priceDate);
|
|
|
-// amsContractTransportPrice.setCargonameId(formulaId);
|
|
|
+ amsContractTransportPrice.setCargonameId(formulaId);
|
|
|
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());
|
|
@@ -709,9 +715,16 @@ public class AmsContractTruckPriceServiceImpl implements IAmsContractTruckPriceS
|
|
|
return i;
|
|
|
}
|
|
|
|
|
|
-/* @Override
|
|
|
+ @Override
|
|
|
public List<Map<String, Object>> getwz(Map<String, Object> map){
|
|
|
List<Map<String, Object>> selectwz = amsContractTruckPriceMapper.selectwz(map);
|
|
|
return selectwz;
|
|
|
- }*/
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Map<String, Object> getcargonameId(Map<String, Object> map) {
|
|
|
+ Map<String, Object> value = amsContractTruckPriceMapper.getcargonameId(map);
|
|
|
+ return value;
|
|
|
+ }
|
|
|
+
|
|
|
}
|