AmsshipDeliveryAttorneyServiceImpl.java 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. package com.steerinfo.dil.service.impl;
  2. import com.steerinfo.dil.mapper.AmsshipCargoTransferResultMapper;
  3. import com.steerinfo.dil.mapper.AmsshipDeliveryAttorneyMapper;
  4. import com.steerinfo.dil.model.AmsshipDeliveryAttorney;
  5. import com.steerinfo.dil.model.AmsshipDeliveryNotice;
  6. import com.steerinfo.dil.util.DataChange;
  7. import com.steerinfo.framework.mapper.IBaseMapper;
  8. import com.steerinfo.framework.service.impl.BaseServiceImpl;
  9. import com.steerinfo.dil.service.IAmsshipDeliveryAttorneyService;
  10. import org.springframework.beans.factory.annotation.Autowired;
  11. import org.springframework.stereotype.Service;
  12. import java.math.BigDecimal;
  13. import java.util.Date;
  14. import java.util.HashMap;
  15. import java.util.List;
  16. import java.util.Map;
  17. /**
  18. * AmsshipDeliveryAttorney服务实现:
  19. * @author generator
  20. * @version 1.0-SNAPSHORT 2021-08-18 03:44
  21. * 类描述
  22. * 修订历史:
  23. * 日期:2021-08-18
  24. * 作者:generator
  25. * 参考:
  26. * 描述:AmsshipDeliveryAttorney服务实现
  27. * @see null
  28. * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
  29. */
  30. @Service(value = "amsshipDeliveryAttorneyService")
  31. public class AmsshipDeliveryAttorneyServiceImpl implements IAmsshipDeliveryAttorneyService {
  32. @Autowired
  33. private AmsshipDeliveryAttorneyMapper amsshipDeliveryAttorneyMapper;
  34. @Autowired
  35. private AmsshipCargoTransferResultMapper amsshipCargoTransferResultMapper;
  36. @Override
  37. public List<Map<String, Object>> selectdeliveryAttorney(Map<String, Object> mapVal) {
  38. return amsshipDeliveryAttorneyMapper.selectdeliveryAttorney(mapVal);
  39. }
  40. @Override
  41. public int insert(Map<String,Object> map) {
  42. String userName=null;
  43. AmsshipDeliveryAttorney amsshipDeliveryAttorney=new AmsshipDeliveryAttorney();
  44. BigDecimal attorneyId = amsshipDeliveryAttorneyMapper.selectAttorneyId();
  45. amsshipDeliveryAttorney.setAttorneyId(attorneyId);
  46. String userId =(String) map.get("userId");
  47. if (userId!=null){
  48. userName = amsshipCargoTransferResultMapper.getUserNameByUserId(userId);
  49. }
  50. amsshipDeliveryAttorney.setAttorenyPickupIdcard((String) map.get("attorenyPickupIdcard"));
  51. amsshipDeliveryAttorney.setAttorneyContactTelephone((String) map.get("attorneyContactTelephone"));
  52. amsshipDeliveryAttorney.setBatchId(DataChange.dataToBigDecimal(map.get("batchId")));
  53. long attorneyTime =(long) map.get("attorneyTime");
  54. amsshipDeliveryAttorney.setAttorneyTime(new Date(attorneyTime));
  55. amsshipDeliveryAttorney.setAttorneyPdffile((String) map.get("attorneyPdffile"));
  56. amsshipDeliveryAttorney.setPortId(DataChange.dataToBigDecimal(map.get("portId")));
  57. amsshipDeliveryAttorney.setAttorneyPickupContactPerson((String) map.get("attorneyPickupContactPerson"));
  58. amsshipDeliveryAttorney.setAttorneyDistributionStatus((short) 0);
  59. amsshipDeliveryAttorney.setDownSwimPortId(DataChange.dataToBigDecimal(map.get("downSwimPortId")));
  60. amsshipDeliveryAttorney.setInsertTime(new Date());
  61. amsshipDeliveryAttorney.setInsertUsername(userName);
  62. amsshipDeliveryAttorney.setUpdateTime(new Date());
  63. amsshipDeliveryAttorney.setDeleted((short) 0);
  64. return amsshipDeliveryAttorneyMapper.insertSelective(amsshipDeliveryAttorney);
  65. }
  66. @Override
  67. public int deleteByPrimaryKey(BigDecimal attorneyId) {
  68. return amsshipDeliveryAttorneyMapper.deleteByPrimaryKey(attorneyId);
  69. }
  70. @Override
  71. public int updateByPrimaryKey(BigDecimal attorneyId) {
  72. return amsshipDeliveryAttorneyMapper.updateByPrimaryKey(attorneyId);
  73. }
  74. // @Override
  75. // public BigDecimal selectMaxId() {
  76. // return amsshipDeliveryAttorneyMapper.selectMaxId();
  77. // }
  78. @Override
  79. public AmsshipDeliveryAttorney selectByPrimaryKey(BigDecimal attorneyId) {
  80. return amsshipDeliveryAttorneyMapper.selectByPrimaryKey(attorneyId);
  81. }
  82. @Override
  83. public List<Map<String, Object>> getPortName() {
  84. return amsshipDeliveryAttorneyMapper.getPortName();
  85. }
  86. @Override
  87. public List<Map<String, Object>> getNoticeId() {
  88. return amsshipDeliveryAttorneyMapper.getNoticeId();
  89. }
  90. @Override
  91. public int updateByPrimaryKeySelective(AmsshipDeliveryAttorney amsshipDeliveryAttorney) {
  92. return amsshipDeliveryAttorneyMapper.updateByPrimaryKeySelective(amsshipDeliveryAttorney);
  93. }
  94. @Override
  95. public List<Map<String, Object>> getDeliveryAttorneyId(Integer attorneyId) {
  96. return amsshipDeliveryAttorneyMapper.getDeliveryAttorneyId(attorneyId);
  97. }
  98. /**
  99. * 得到提货通知单id
  100. * @return
  101. */
  102. @Override
  103. public List<Map<String, Object>> getAttorneyId() {
  104. return amsshipDeliveryAttorneyMapper.getAttorneyId();
  105. }
  106. /**
  107. * 得到发件人(港口)id
  108. * @return
  109. */
  110. @Override
  111. public List<Map<String, Object>> getPortId() {
  112. return amsshipDeliveryAttorneyMapper.getPortId();
  113. }
  114. /**
  115. * 得到收件人(下游港口)id
  116. * @return
  117. */
  118. @Override
  119. public List<Map<String, Object>> getPierId() {
  120. return amsshipDeliveryAttorneyMapper.getPierId();
  121. }
  122. @Override
  123. public List<Map<String, Object>> getRmRawId() {
  124. return amsshipDeliveryAttorneyMapper.getRmRawId();
  125. }
  126. }