123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149 |
- package com.steerinfo.dil.service.impl;
- import com.steerinfo.dil.mapper.AmsshipCargoTransferResultMapper;
- import com.steerinfo.dil.mapper.AmsshipDeliveryAttorneyMapper;
- import com.steerinfo.dil.model.AmsshipDeliveryAttorney;
- import com.steerinfo.dil.model.AmsshipDeliveryNotice;
- import com.steerinfo.dil.util.DataChange;
- import com.steerinfo.framework.mapper.IBaseMapper;
- import com.steerinfo.framework.service.impl.BaseServiceImpl;
- import com.steerinfo.dil.service.IAmsshipDeliveryAttorneyService;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.stereotype.Service;
- import java.math.BigDecimal;
- import java.util.Date;
- import java.util.HashMap;
- import java.util.List;
- import java.util.Map;
- /**
- * AmsshipDeliveryAttorney服务实现:
- * @author generator
- * @version 1.0-SNAPSHORT 2021-08-18 03:44
- * 类描述
- * 修订历史:
- * 日期:2021-08-18
- * 作者:generator
- * 参考:
- * 描述:AmsshipDeliveryAttorney服务实现
- * @see null
- * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
- */
- @Service(value = "amsshipDeliveryAttorneyService")
- public class AmsshipDeliveryAttorneyServiceImpl implements IAmsshipDeliveryAttorneyService {
- @Autowired
- private AmsshipDeliveryAttorneyMapper amsshipDeliveryAttorneyMapper;
- @Autowired
- private AmsshipCargoTransferResultMapper amsshipCargoTransferResultMapper;
- @Override
- public List<Map<String, Object>> selectdeliveryAttorney(Map<String, Object> mapVal) {
- return amsshipDeliveryAttorneyMapper.selectdeliveryAttorney(mapVal);
- }
- @Override
- public int insert(Map<String,Object> map) {
- String userName=null;
- AmsshipDeliveryAttorney amsshipDeliveryAttorney=new AmsshipDeliveryAttorney();
- BigDecimal attorneyId = amsshipDeliveryAttorneyMapper.selectAttorneyId();
- amsshipDeliveryAttorney.setAttorneyId(attorneyId);
- String userId =(String) map.get("userId");
- if (userId!=null){
- userName = amsshipCargoTransferResultMapper.getUserNameByUserId(userId);
- }
- amsshipDeliveryAttorney.setAttorenyPickupIdcard((String) map.get("attorenyPickupIdcard"));
- amsshipDeliveryAttorney.setAttorneyContactTelephone((String) map.get("attorneyContactTelephone"));
- amsshipDeliveryAttorney.setBatchId(DataChange.dataToBigDecimal(map.get("batchId")));
- long attorneyTime =(long) map.get("attorneyTime");
- amsshipDeliveryAttorney.setAttorneyTime(new Date(attorneyTime));
- amsshipDeliveryAttorney.setAttorneyPdffile((String) map.get("attorneyPdffile"));
- amsshipDeliveryAttorney.setPortId(DataChange.dataToBigDecimal(map.get("portId")));
- amsshipDeliveryAttorney.setAttorneyPickupContactPerson((String) map.get("attorneyPickupContactPerson"));
- amsshipDeliveryAttorney.setAttorneyDistributionStatus((short) 0);
- amsshipDeliveryAttorney.setDownSwimPortId(DataChange.dataToBigDecimal(map.get("downSwimPortId")));
- amsshipDeliveryAttorney.setInsertTime(new Date());
- amsshipDeliveryAttorney.setInsertUsername(userName);
- amsshipDeliveryAttorney.setUpdateTime(new Date());
- amsshipDeliveryAttorney.setDeleted((short) 0);
- return amsshipDeliveryAttorneyMapper.insertSelective(amsshipDeliveryAttorney);
- }
- @Override
- public int deleteByPrimaryKey(BigDecimal attorneyId) {
- return amsshipDeliveryAttorneyMapper.deleteByPrimaryKey(attorneyId);
- }
- @Override
- public int updateByPrimaryKey(BigDecimal attorneyId) {
- return amsshipDeliveryAttorneyMapper.updateByPrimaryKey(attorneyId);
- }
- // @Override
- // public BigDecimal selectMaxId() {
- // return amsshipDeliveryAttorneyMapper.selectMaxId();
- // }
- @Override
- public AmsshipDeliveryAttorney selectByPrimaryKey(BigDecimal attorneyId) {
- return amsshipDeliveryAttorneyMapper.selectByPrimaryKey(attorneyId);
- }
- @Override
- public List<Map<String, Object>> getPortName() {
- return amsshipDeliveryAttorneyMapper.getPortName();
- }
- @Override
- public List<Map<String, Object>> getNoticeId() {
- return amsshipDeliveryAttorneyMapper.getNoticeId();
- }
- @Override
- public int updateByPrimaryKeySelective(AmsshipDeliveryAttorney amsshipDeliveryAttorney) {
- return amsshipDeliveryAttorneyMapper.updateByPrimaryKeySelective(amsshipDeliveryAttorney);
- }
- @Override
- public List<Map<String, Object>> getDeliveryAttorneyId(Integer attorneyId) {
- return amsshipDeliveryAttorneyMapper.getDeliveryAttorneyId(attorneyId);
- }
- /**
- * 得到提货通知单id
- * @return
- */
- @Override
- public List<Map<String, Object>> getAttorneyId() {
- return amsshipDeliveryAttorneyMapper.getAttorneyId();
- }
- /**
- * 得到发件人(港口)id
- * @return
- */
- @Override
- public List<Map<String, Object>> getPortId() {
- return amsshipDeliveryAttorneyMapper.getPortId();
- }
- /**
- * 得到收件人(下游港口)id
- * @return
- */
- @Override
- public List<Map<String, Object>> getPierId() {
- return amsshipDeliveryAttorneyMapper.getPierId();
- }
- @Override
- public List<Map<String, Object>> getRmRawId() {
- return amsshipDeliveryAttorneyMapper.getRmRawId();
- }
- }
|