AmsContractOtherPriceServiceImpl.java 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. package com.steerinfo.dil.service.impl;
  2. import com.steerinfo.dil.mapper.AmsContractOtherPriceMapper;
  3. import com.steerinfo.dil.model.AmsContractOtherPrice;
  4. import com.steerinfo.dil.service.IAmsContractOtherPriceService;
  5. import org.springframework.beans.factory.annotation.Autowired;
  6. import org.springframework.stereotype.Service;
  7. import java.math.BigDecimal;
  8. import java.util.Date;
  9. import java.util.List;
  10. import java.util.Map;
  11. /**
  12. * @Description:
  13. * @Author:HuJianGuo
  14. * @GreateTime:2021/9/27 9:09
  15. * @Version:V2.0
  16. */
  17. @Service
  18. public class AmsContractOtherPriceServiceImpl implements IAmsContractOtherPriceService {
  19. @Autowired
  20. AmsContractOtherPriceMapper amsContractOtherPriceMapper;
  21. /**
  22. * 展示装卸费
  23. * @param mapValue
  24. * @return
  25. */
  26. @Override
  27. public List<Map<String, Object>> getLoadUnloadPriceList(Map<String, Object> mapValue) {
  28. return amsContractOtherPriceMapper.getLoadUnloadPriceList(mapValue);
  29. }
  30. /**
  31. * 新增
  32. * @param amsContractOtherPrice
  33. * @return
  34. */
  35. @Override
  36. public int insert(AmsContractOtherPrice amsContractOtherPrice) {
  37. BigDecimal priceId = selectMaxId();
  38. amsContractOtherPrice.setPriceId(priceId);
  39. amsContractOtherPrice.setInsertTime(new Date());
  40. amsContractOtherPrice.setUpdateTime(new Date());
  41. amsContractOtherPrice.setInsertUsername("admin");
  42. amsContractOtherPrice.setUpdateUsername("admin");
  43. amsContractOtherPrice.setDeleted(new BigDecimal(0));
  44. amsContractOtherPrice.setInsertUpdateRemark("无");
  45. return amsContractOtherPriceMapper.insertSelective(amsContractOtherPrice);
  46. }
  47. /**
  48. * 逻辑删除
  49. * @param priceId
  50. * @return
  51. */
  52. @Override
  53. public int delete(BigDecimal priceId) {
  54. AmsContractOtherPrice amsContractOtherPrice = amsContractOtherPriceMapper.selectByPrimaryKey(priceId);
  55. amsContractOtherPrice.setDeleted(new BigDecimal(1));
  56. return amsContractOtherPriceMapper.updateByPrimaryKeySelective(amsContractOtherPrice);
  57. }
  58. /**
  59. * 修改
  60. * @param amsContractOtherPrice
  61. * @return
  62. */
  63. @Override
  64. public int updateByPrimaryKeySelective(AmsContractOtherPrice amsContractOtherPrice) {
  65. amsContractOtherPrice.setUpdateTime(new Date());
  66. return amsContractOtherPriceMapper.updateByPrimaryKeySelective(amsContractOtherPrice);
  67. }
  68. /**
  69. * 查询修改渲染
  70. * @param priceId
  71. * @return
  72. */
  73. @Override
  74. public List<Map<String, Object>> selectLoadUnloadPriceToUpdate(BigDecimal priceId) {
  75. return amsContractOtherPriceMapper.selectLoadUnloadPriceToUpdate(priceId);
  76. }
  77. /**
  78. * 查询最大id
  79. * @return
  80. */
  81. @Override
  82. public BigDecimal selectMaxId() {
  83. return amsContractOtherPriceMapper.selectOtherId();
  84. }
  85. }