123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- 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<Map<String, Object>> getLoadUnloadPriceList(Map<String, Object> 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<Map<String, Object>> selectLoadUnloadPriceToUpdate(BigDecimal priceId) {
- return amsContractOtherPriceMapper.selectLoadUnloadPriceToUpdate(priceId);
- }
- /**
- * 查询最大id
- * @return
- */
- @Override
- public BigDecimal selectMaxId() {
- return amsContractOtherPriceMapper.selectOtherId();
- }
- }
|