hanleyslWork.rar

  • hanley丶
    了解作者
  • Java
    开发工具
  • 2.6MB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 0
    下载次数
  • 2020-04-13 18:03
    上传日期
(企业、政治等的)代理人,经纪人;(演员、音乐家、运动员、作家等的)代理人;原动力,动因(指对事态起重要作用的人、事物)
hanleyslWork.rar
内容介绍
package com.dangerous.service.impl; import java.io.File; import java.text.ParseException; import java.text.SimpleDateFormat; import java.time.LocalDate; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.TreeMap; import java.util.TreeSet; import com.dangerous.controller.request.vo.*; import com.dangerous.entity.*; import com.dangerous.mapper.*; import com.dangerous.util.DateUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.alibaba.fastjson.JSON; import com.dangerous.controller.request.ExcelPojo.DictDispaCompVehPDFPojo; import com.dangerous.service.DicSafeAnnexService; import com.dangerous.service.DictBodyService; import com.dangerous.service.DictDispatchGoodsInforService; import com.dangerous.service.DictDispatchService; import com.dangerous.service.DictParkingService; import com.dangerous.service.DictVehGradeService; import com.dangerous.service.DictVehInsuranceService; import com.dangerous.util.PDFReport; import com.dangerous.util.StringUtils; import com.dangerous.util.Tool; import com.dangerous.util.enumUtil.EnumDispatchStatus; import com.dangerous.util.enumUtil.EnumDispatchVehStatus; import com.dangerous.util.enumUtil.EnumGoodsType; import com.dangerous.util.enumUtil.EnumVehKind; import com.dangerous.util.tools.ResponseResult; /** * @Author: ysl * @Date: 2019-11-13 */ @Service public class DictDispatchGoodsInforServiceImpl implements DictDispatchGoodsInforService { private static Logger log = LoggerFactory.getLogger(DictDispatchGoodsInforService.class); static SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); @Autowired(required = false) private DictDispatchMapper dispatchMapper; @Autowired(required = false) private DictGoodsMapper dictGoodsMapper; @Autowired(required = false) private DictAddressMapper dictAddressMapper; @Autowired(required = false) private GoodsTypeMapper goodsTypeMapper; @Autowired(required = false) private DictAddressMapper addressMapper; @Autowired(required = false) private DictConditionMapper conditionMapper; @Autowired private DictDispatchService dictDispatchService; @Autowired private DictParkingService parkingService; @Autowired private DictPersonMapper personMapper; @Autowired private DictShipperMapper shipperMapper; @Autowired private DictCompMapper dictCompMapper; @Autowired(required = false) private DictAreaProvinceMapper dictAreaProvinceMapper; @Autowired(required = false) private DictAreaCityMapper dictAreaCityMapper; @Autowired(required = false) private DictAreaCountyMapper dictAreaCountyMapper; @Autowired private DictVehMapper dictVehMapper; @Autowired private DicSafeAnnexService safeAnnexService; @Autowired private DictBodyService bodyService; @Autowired private DictVehInsuranceService insuranceService; @Autowired private DictVehGradeService gradeService; @Autowired private DictDangerGoodsMapper dictDangerGoodsMapper; @Override @Transactional public ResponseResult addDispatchAndGoodsInfor(DictDispatchGoodsVo dispatchGoodsVo ) { //停业整顿的企业不能入单 DictComp dictComp = dictCompMapper.selectByPrimaryKey(dispatchGoodsVo.getDictDispatch().getCompId()); if(dictComp != null){ //"是否整改", = "0=是,1=否") if(dictComp.getCompIsChange() == 1){ if(dictComp.getCompIsChange() == 0){ return ResponseResult.error("派车单报送取消,停业整顿的业户不能录单"); } }else if(dictComp.getCompIsChange() != 0 && dictComp.getCompIsChange() != 1){ return ResponseResult.error("派车单报送取消,业户是否整改情况未知,不能录单"); } if(dictComp.getEndDate() != null && dictComp.getEndDate().getTime() < System.currentTimeMillis()){ return ResponseResult.error("派车单报送取消,业户状态经营许可证异常,不能录单"); }else if(dictComp.getEndDate() == null) { return ResponseResult.error("派车单报送取消,业户状态经营许可证异常,不能录单"); } }else { return ResponseResult.error("业户信息不存在"); } DictDispatch dictDispatch = new DictDispatch(); try { if (dispatchGoodsVo.getDictDispatch() != null ) { dictDispatch = dispatchGoodsVo.getDictDispatch(); if(dispatchGoodsVo.getDictDispatch().getDispatchType() != null && "1".equals(dispatchGoodsVo.getDictDispatch().getDispatchType() )){ // 派单状态 0-车单录入;1-装货异常;2-装货正常;3-卸货异常;4-卸货正常;5-回场确认;6-业务终止 dictDispatch.setDispatchStatus(0); if (dispatchGoodsVo.getDictDispatch().getVehKind() == null || dispatchGoodsVo.getDictDispatch().getVehNo() == null || dispatchGoodsVo.getDictDispatch().getVehType() == null || dispatchGoodsVo.getDictDispatch().getVehTon() == null || dispatchGoodsVo.getDictDispatch().getStartDate() == null || dispatchGoodsVo.getDictDispatch().getDriverName() == null || dispatchGoodsVo.getDictDispatch().getDriverSupercargo() == null || dispatchGoodsVo.getDictDispatch().getDispatchParking() == null || dispatchGoodsVo.getDictDispatch().getTyCompName() == null || dispatchGoodsVo.getDictDispatch().getTyCompLicence() == null || dispatchGoodsVo.getDictDispatch().getTyCompTel() == null || dispatchGoodsVo.getDictDispatch().getTyCompProvince() == null || dispatchGoodsVo.getDictDispatch().getTyCompCity() == null || dispatchGoodsVo.getDictDispatch().getTyCompCounty() == null || dispatchGoodsVo.getDictDispatch().getTyAddressDetail() == null) { return ResponseResult.error("必填参数不可少!"); } if("2".equals(dispatchGoodsVo.getDictDispatch().getVehKind()) && StringUtils.isBlank(dispatchGoodsVo.getDictDispatch().getTractorVehNo())){ return ResponseResult.error("派车单报送取消,挂车牌号必选!"); } //派车单中驾驶员和押运员的不能为同一个人(身份证号来判断) driveIdCord driveSuperIdCord if(StringUtils.isBlank(dispatchGoodsVo.getDictDispatch().getDriveIdCord()) || StringUtils.isBlank(dispatchGoodsVo.getDictDispatch().getDriveSuperIdCord())){ return ResponseResult.error("派车单报送取消,驾驶员或押运员的身份证号信息不存在,请核实驾驶员或押运员的身份证号信息!"); }else{ if(dispatchGoodsVo.getDictDispatch().getDriveIdCord().equals(dispatchGoodsVo.getDictDispatch().getDriveSuperIdCord())){ return ResponseResult.error("派车单报送取消,驾驶员和押运员的不能为同一个人,请重新选择!"); } } //检测驾驶员、押运员是否异常 if(!checkPersonByIdCode(dispatchGoodsVo.getDictDispatch().getDriveIdCord())){ return ResponseResult.error("派车单报送取消,驾驶员证件状态或从业资格证或下次继续教育时间异常,请重新选择!"); } if(!checkPersonByIdCode(dispatchGoodsVo.getDictDispatch().getDriveSuperIdCord())){ return ResponseResult.error("派车单报送取消,押运员证件状态或从业资格证或下次继续教育时间异常,请重新选择!"); } //判断此车辆和挂车是否正在运输中、驾驶员和押运员是否正在运输中 DictDispatchVo dispatchVo = new DictDispatchVo(); dispatchVo.setCompId(dispatchGoodsVo.getDictDispatch().getCompId()); List<DictDispatchVo> dlist = dispatchMapper.selectDispatchList(dispatchVo); for (DictDispatchVo dispatchVo1 : dlist) {
评论
    相关推荐
    • transformer
      Android ViewPager.PageTransformer类使用范例,包含几个常见的模版
    • EN-Transformer
      EN变压器
    • bitmap-transformer
      位图转换器 转换您的位图图像
    • Transformer
      变压器 这个项目基于Tensorflow2.0版本的变压器,实现了葡萄语翻译为英文的功能。
    • bitmap-transformer
      位图转换器 这是一个可以编辑bmp图像的颜色并添加一些滤镜的应用程序。 此应用程序包含6个类: 应用程序类:这是应用程序的主类,它定义输入的参数,即文件目录,应在其中保存更改后的文件以及应在图像上应用的...
    • cloudinary-transformer
      云端变压器 简单的功能,可将动态结构化配置数据转换为云URL。 适用于: : 示例对象 { cloudName: 'fay', imageId: 'space-jelly-dev-og-v1_a90cow', options: { w: '2024', h: '1012', ...
    • Funnel-Transformer
      Funnel-Transformer是一种新的自我注意模型,可以将隐藏状态的序列逐渐压缩为较短的状态,从而降低了计算成本。更重要的是,通过将长度减少所节省的FLOP重新投入到构建更深或更宽的模型中,对于相同的FLOP,Funnel-...
    • ViewPager Transformer Demo
      ViewPager Transformer Demo
    • transformer
      transformer
    • XLSTransformer jar
      XLSTransformer 导出Excel表所需jar包