|
@@ -59,22 +59,21 @@ public class RmsOilPriceServiceImpl implements IRmsOilPriceService {
|
|
* 启用油价
|
|
* 启用油价
|
|
* @Author TXF
|
|
* @Author TXF
|
|
* @Date 2022/1/21 9:08
|
|
* @Date 2022/1/21 9:08
|
|
- * @param id
|
|
|
|
* @return
|
|
* @return
|
|
**/
|
|
**/
|
|
@Transactional
|
|
@Transactional
|
|
@Override
|
|
@Override
|
|
- public int updateOilPrice(Integer id) {
|
|
|
|
|
|
+ public int updateOilPrice(Map<String, Object> mapValue) {
|
|
RmsOilPrice rmsOilPrice = new RmsOilPrice();
|
|
RmsOilPrice rmsOilPrice = new RmsOilPrice();
|
|
//查询该启用油价的信息
|
|
//查询该启用油价的信息
|
|
- Map<String, Object> mesMap = rmsOilPriceMapper.getOilPriceById(new BigDecimal(id));
|
|
|
|
|
|
+ Map<String, Object> mesMap = rmsOilPriceMapper.getOilPriceById(new BigDecimal(mapValue.get("priceId").toString()));
|
|
if(DataChange.dataToBigDecimal(mesMap.get("priceStatus")).intValue() == 0){
|
|
if(DataChange.dataToBigDecimal(mesMap.get("priceStatus")).intValue() == 0){
|
|
return 0;
|
|
return 0;
|
|
}else{
|
|
}else{
|
|
//通过油品信息关闭该油品所有正在启用的油价
|
|
//通过油品信息关闭该油品所有正在启用的油价
|
|
rmsOilPriceMapper.closeLastOilPrice(mesMap);
|
|
rmsOilPriceMapper.closeLastOilPrice(mesMap);
|
|
}
|
|
}
|
|
- rmsOilPrice.setId(new BigDecimal(id));
|
|
|
|
|
|
+ rmsOilPrice.setId(new BigDecimal(mapValue.get("priceId").toString()));
|
|
rmsOilPrice.setUpdateTime(new Date());
|
|
rmsOilPrice.setUpdateTime(new Date());
|
|
rmsOilPrice.setPriceStatus(new BigDecimal(0));
|
|
rmsOilPrice.setPriceStatus(new BigDecimal(0));
|
|
//加入正数条件
|
|
//加入正数条件
|