package com.steerinfo.dil.service.impl; import com.steerinfo.dil.mapper.AmsContractOtherPriceMapper; import com.steerinfo.dil.model.AmsContractOtherPrice; import com.steerinfo.dil.service.IAmsContractOtherPriceService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.math.BigDecimal; import java.util.Date; import java.util.List; import java.util.Map; /** * @Description: * @Author:HuJianGuo * @GreateTime:2021/9/27 9:09 * @Version:V2.0 */ @Service public class AmsContractOtherPriceServiceImpl implements IAmsContractOtherPriceService { @Autowired AmsContractOtherPriceMapper amsContractOtherPriceMapper; /** * 展示装卸费 * @param mapValue * @return */ @Override public List> getLoadUnloadPriceList(Map mapValue) { return amsContractOtherPriceMapper.getLoadUnloadPriceList(mapValue); } /** * 新增 * @param amsContractOtherPrice * @return */ @Override public int insert(AmsContractOtherPrice amsContractOtherPrice) { BigDecimal priceId = selectMaxId(); amsContractOtherPrice.setPriceId(priceId); amsContractOtherPrice.setInsertTime(new Date()); amsContractOtherPrice.setUpdateTime(new Date()); amsContractOtherPrice.setInsertUsername("admin"); amsContractOtherPrice.setUpdateUsername("admin"); amsContractOtherPrice.setDeleted(new BigDecimal(0)); amsContractOtherPrice.setInsertUpdateRemark("无"); return amsContractOtherPriceMapper.insertSelective(amsContractOtherPrice); } /** * 逻辑删除 * @param priceId * @return */ @Override public int delete(BigDecimal priceId) { AmsContractOtherPrice amsContractOtherPrice = amsContractOtherPriceMapper.selectByPrimaryKey(priceId); amsContractOtherPrice.setDeleted(new BigDecimal(1)); return amsContractOtherPriceMapper.updateByPrimaryKeySelective(amsContractOtherPrice); } /** * 修改 * @param amsContractOtherPrice * @return */ @Override public int updateByPrimaryKeySelective(AmsContractOtherPrice amsContractOtherPrice) { amsContractOtherPrice.setUpdateTime(new Date()); return amsContractOtherPriceMapper.updateByPrimaryKeySelective(amsContractOtherPrice); } /** * 查询修改渲染 * @param priceId * @return */ @Override public List> selectLoadUnloadPriceToUpdate(BigDecimal priceId) { return amsContractOtherPriceMapper.selectLoadUnloadPriceToUpdate(priceId); } /** * 查询最大id * @return */ @Override public BigDecimal selectMaxId() { return amsContractOtherPriceMapper.selectOtherId(); } }