server/meeting/meeting_service/src/main/java/com/doumee/dao/business/model/Rooms.java
@@ -37,7 +37,7 @@ @ApiModelProperty(value = "创建时间") @ExcelColumn(name="创建时间") // @JsonFormat(pattern = "yyyy-MM-dd") // private Date createDate; @ApiModelProperty(value = "更新人编码", example = "1") server/system_service/src/main/java/com/doumee/core/utils/Constants.java
@@ -160,6 +160,17 @@ public static final int custom = 4; public static final int self = -1; } /** * 作业类型 0自有车卸货 1自有车装货 2外协车卸货 3外协车装货 4市公司外协车卸货 */ public interface platformJobType{ int zycxh = 0; int zyczh = 1; int wxcxh = 2; int wxczh = 3; int sgscxh = 4; } public static Date getBirthdyByCardNo(String idCard){ if(idCard ==null || idCard.length()<14){ return null; @@ -597,7 +608,6 @@ } public enum NoticeType { ZERO(0, "待审核","","","待审核","待处理","处理中"), @@ -697,28 +707,25 @@ } /** * 员工信息维护操作历史类型 0解冻 1冻结 2拉黑 3恢复 4设为拜访人 5取消拜访人 6设为高级审批人 7取消高级审批人 8手动离场 9删除 10更新 11授权门禁权限 12离职 13恢复在职 * 月台作业 状态 * 0待确认 1待签到 2等待叫号 3入园等待 4已叫号 5作业中 6作业完成 7转移中 8异常挂起 9已授权离园 10已离园 11 已过号 */ public enum UserActionType { CANCEL_FREEZE(0, "解冻","由【${param1}】于【${param2}】,进行【解冻】" ), FREEZE(1, "冻结","由【${param1}】于【${param2}】,进行【冻结】" ), BLACKLIST(2, "拉黑","由【${param1}】于【${param2}】,进行【拉黑】"), CANCEL_BLACKLIST(3, "恢复","由【${param1}】于【${param2}】,进行【移出黑名单】" ), CANVISIT(4, "设为拜访人","由【${param1}】于【${param2}】,进行【设为拜访人】" ), CANCEL_VISIT(5, "取消拜访人","由【${param1}】于【${param2}】,进行【取消拜访人】" ), public enum PlatformJobStatus { WAIT_CONFIRM(0, "待确认","" ), WART_SIGNIN(1, "待签到","待签到" ), WAIT_CALL(2, "等待叫号","等待叫号"), IN_WAIT(3, "入园等待","入园等待" ), CALLED(4, "已叫号","已叫号" ), WORKING(5, "作业中","作业中" ), //续保通知 HIGHCHECKOR(6, "设为高级审批人","由【${param1}】于【${param2}】,进行【设为高级审批人】" ), CANCEL_HIGHCHECKOR(7, "取消高级审批人","由【${param1}】于【${param2}】,进行【取消高级审批人】" ), LEVEL(8, "手动离场","由【${param1}】于【${param2}】,进行【手动离场】" ), DELETE(9, "删除","由【${param1}】于【${param2}】,进行【删除】" ), EDIT(10, "更新","由【${param1}】于【${param2}】,进行【更新】" ), AUTH_ROLE(11, "授权门禁权限","由【${param1}】于【${param2}】,进行【授权门禁权限】" ), WORK_OFF(12, "离职","由【${param1}】于【${param2}】,进行【离职】操作" ), WORK_ON(13, "在职","由【${param1}】于【${param2}】,进行【在职】操作" ), IMPORT_TRAIMETIME(14, "导入培训有效","由【${param1}】于【${param2}】,进行【导入培训有效】操作" ), BE_HEAD(15, "设为主管","由【${param1}】于【${param2}】,进行【设为主管】操作" ), NOT_HEAD(16, "取消主管","由【${param1}】于【${param2}】,进行【取消主管】操作" ), DONE(6, "作业完成 ","作业完成 " ), TRANSFERING(7, "转移中","7转移中" ), EXCEPTION(8, "异常挂起","异常挂起" ), AUTHED_LEAVE(9, "已授权离园","已授权离园" ), LEAVED(10, "已离园 ","已离园 " ), OVER_NUMBER(11, "已过号","已过号" ), ; // 成员变量 @@ -727,13 +734,13 @@ private String info; // 构造方法 UserActionType(int key, String name,String info ) { PlatformJobStatus(int key, String name,String info ) { this.key = key; this.info = info; this.name = name; } public static String getName(int index) { for (UserActionType c : UserActionType.values()) { for (PlatformJobStatus c : PlatformJobStatus.values()) { if (c.getKey() == index) { return c.name; } @@ -764,71 +771,6 @@ public void setInfo(String info) { this.info = info; } } /** * 关联对象类型 关联对象类型 0企业营业执照 1理赔报案事故视频或图片 2理赔员工关系证明材料 3理赔门诊资料 4理赔住院资料 5理赔伤残资料 6理赔赔付结案材料 7企业身份证号 8保单申请表PDF 9签署后保单申请表PDF 10企业签章 11最终报单 */ public enum MultiFile{ HIDDEN_DANGER_SUBMIT(0, "隐患随手拍提报", "隐患随手拍提报"), HIDDEN_DANGER_DEAL_BEFORE(1, "隐患随手拍处理前", "隐患随手拍处理前"), HIDDEN_DANGER_DEAL_AFTER(2, "隐患随手拍处理后 ", "隐患随手拍处理后 "), ; // 成员变量 private String name; private int key; private String noteinfo;// 描述 // 构造方法 MultiFile(int key, String name, String noteinfo) { this.name = name; this.key = key; this.noteinfo = noteinfo; } // 普通方法 public static String getName(int index) { for (MultiFile c : MultiFile.values()) { if (c.getKey() == index) { return c.name; } } return null; } // 普通方法 public static String getInfo(int index) { for (MultiFile c : MultiFile.values()) { if (c.getKey() == index) { return c.noteinfo; } } return null; } // get set 方法 public String getName() { return name; } public void setName(String name) { this.name = name; } public int getKey() { return key; } public void setKey(int key) { this.key = key; } public String getNoteinfo() { return noteinfo; } } /** * 审批模拟类型 0非施工人员访客申请 1非施工人员访客申请 2访客报备 3公车市内用车 4公车室外用车 5市公司物流车预约 server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/CarUseBook.java
@@ -62,12 +62,12 @@ @ApiModelProperty(value = "开始时间") @ExcelColumn(name="开始时间") // @JsonFormat(pattern = "yyyy-MM-dd") // private Date startTime; @ApiModelProperty(value = "结束时间") @ExcelColumn(name="结束时间") // @JsonFormat(pattern = "yyyy-MM-dd") // private Date endTime; @ApiModelProperty(value = "预计出发时间") server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/Cars.java
@@ -104,6 +104,10 @@ @ApiModelProperty(value = "状态 0禁用 1启用", example = "1") @ExcelColumn(name="状态 0禁用 1启用") private Integer status; @ApiModelProperty(value = "状态 0不在园 1在园", example = "1") @ExcelColumn(name="状态 0不在园 1在园") private Integer inStatus; @ApiModelProperty(value = "授权状态 0否 1是", example = "1") @ExcelColumn(name="授权状态 0否 1是") private Integer authStatus; @@ -113,8 +117,8 @@ @ExcelColumn(name="所属分组编码(关联car_group)") private Integer groupId; @ApiModelProperty(value = "类型 0员工车辆 1安泰公务车 2自有物流车3外协物流车 4市公司物流车 5市公司注册车辆", example = "1") @ExcelColumn(name="类型 0员工车辆 1安泰公务车 2自有物流车3外协物流车 4市公司物流车 5市公司注册车辆") @ApiModelProperty(value = "类型 0安泰公务车 1安泰自有物流车 2其它", example = "1") @ExcelColumn(name="类型 0安泰公务车 1安泰自有物流车 2其它") private Integer type; @@ -162,6 +166,9 @@ @ApiModelProperty(value = "车主授权状态", example = "1") @TableField(exist = false) private Integer memberAuthStatus; @ApiModelProperty(value = "当前作业数量", example = "1") @TableField(exist = false) private int jobNum; @ApiModelProperty(value = "授权停车场编码集合", example = "1") @TableField(exist = false) server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/Platform.java
@@ -32,7 +32,7 @@ @ApiModelProperty(value = "创建时间") @ExcelColumn(name="创建时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date createDate; @ApiModelProperty(value = "更新人编码", example = "1") @@ -41,7 +41,7 @@ @ApiModelProperty(value = "更新时间") @ExcelColumn(name="更新时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date editDate; @ApiModelProperty(value = "是否删除0否 1是", example = "1") @@ -90,7 +90,7 @@ @ApiModelProperty(value = "最后事件推送时间") @ExcelColumn(name="最后事件推送时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date lastEventTime; @ApiModelProperty(value = "监控点名称,多个用英文逗号隔开") server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformBooks.java
@@ -32,7 +32,7 @@ @ApiModelProperty(value = "创建时间") @ExcelColumn(name="创建时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date createDate; @ApiModelProperty(value = "更新人编码", example = "1") @@ -41,7 +41,7 @@ @ApiModelProperty(value = "更新时间") @ExcelColumn(name="更新时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date editDate; @ApiModelProperty(value = "是否删除0否 1是", example = "1") @@ -66,7 +66,7 @@ @ApiModelProperty(value = "预计到场时间") @ExcelColumn(name="预计到场时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date arriveDate; @ApiModelProperty(value = "入库类型 0整托盘 1件烟", example = "1") server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformBroadcastLog.java
@@ -31,7 +31,7 @@ @ApiModelProperty(value = "创建时间") @ExcelColumn(name="创建时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date createDate; @ApiModelProperty(value = "更新人编码", example = "1") @@ -40,7 +40,7 @@ @ApiModelProperty(value = "更新时间") @ExcelColumn(name="更新时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date editDate; @ApiModelProperty(value = "是否删除0否 1是", example = "1") @@ -85,7 +85,7 @@ @ApiModelProperty(value = "提醒下发时间") @ExcelColumn(name="提醒下发时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date hkDate; @ApiModelProperty(value = "提醒下发备注") server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformDevice.java
@@ -31,7 +31,7 @@ @ApiModelProperty(value = "创建时间") @ExcelColumn(name="创建时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date createDate; @ApiModelProperty(value = "更新人编码", example = "1") @@ -40,7 +40,7 @@ @ApiModelProperty(value = "更新时间") @ExcelColumn(name="更新时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date editDate; @ApiModelProperty(value = "是否删除0否 1是", example = "1") server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformGroup.java
@@ -31,7 +31,7 @@ @ApiModelProperty(value = "创建时间") @ExcelColumn(name="创建时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date createDate; @ApiModelProperty(value = "更新人编码", example = "1") @@ -40,7 +40,7 @@ @ApiModelProperty(value = "更新时间") @ExcelColumn(name="更新时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date editDate; @ApiModelProperty(value = "是否删除0否 1是", example = "1") server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformInterfaceLog.java
@@ -31,7 +31,7 @@ @ApiModelProperty(value = "创建时间") @ExcelColumn(name="创建时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date createDate; @ApiModelProperty(value = "更新人编码", example = "1") @@ -40,7 +40,7 @@ @ApiModelProperty(value = "更新时间") @ExcelColumn(name="更新时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date editDate; @ApiModelProperty(value = "是否删除0否 1是", example = "1") @@ -61,7 +61,7 @@ @ApiModelProperty(value = "地址信息") @ExcelColumn(name="地址信息") @JsonFormat(pattern = "yyyy-MM-dd") private Date url; @ApiModelProperty(value = "请求参数") server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformJob.java
@@ -32,7 +32,7 @@ @ApiModelProperty(value = "创建时间") @ExcelColumn(name="创建时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date createDate; @ApiModelProperty(value = "更新人编码", example = "1") @@ -41,7 +41,7 @@ @ApiModelProperty(value = "更新时间") @ExcelColumn(name="更新时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date editDate; @ApiModelProperty(value = "是否删除0否 1是", example = "1") @@ -90,7 +90,7 @@ @ApiModelProperty(value = "签到时间") @ExcelColumn(name="签到时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date signDate; @ApiModelProperty(value = "签到方式 0app签到 1扫码签到", example = "1") @@ -115,7 +115,7 @@ @ApiModelProperty(value = "通知入园等待时间") @ExcelColumn(name="通知入园等待时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date inwaitDate; @ApiModelProperty(value = "通知入园等待操作人编码", example = "1") @@ -124,7 +124,7 @@ @ApiModelProperty(value = "叫号时间") @ExcelColumn(name="叫号时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date callDate; @ApiModelProperty(value = "叫号人编码", example = "1") @@ -137,17 +137,17 @@ @ApiModelProperty(value = "开始作业时间") @ExcelColumn(name="开始作业时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date startDate; @ApiModelProperty(value = "作业完成时间(最终时间)") @ExcelColumn(name="作业完成时间(最终时间)") @JsonFormat(pattern = "yyyy-MM-dd") private Date doneDate; @ApiModelProperty(value = "异常挂起时间") @ExcelColumn(name="异常挂起时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date errorDate; @ApiModelProperty(value = "异常挂起人编码", example = "1") @@ -160,7 +160,7 @@ @ApiModelProperty(value = "月台转交时间") @ExcelColumn(name="月台转交时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date transPlatformDate; @ApiModelProperty(value = "月台转交处理人", example = "1") @@ -173,12 +173,11 @@ @ApiModelProperty(value = "车辆进厂时间") @ExcelColumn(name="车辆进厂时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date inDate; @ApiModelProperty(value = "车辆离厂时间") @ExcelColumn(name="车辆离厂时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date outDate; @ApiModelProperty(value = "离厂方式 0自动离厂 1手动离场", example = "1") @@ -191,7 +190,7 @@ @ApiModelProperty(value = "车辆离厂下发时间") @ExcelColumn(name="车辆离厂下发时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date outHkdate; @ApiModelProperty(value = "车辆离厂下发备注") @@ -208,7 +207,7 @@ @ApiModelProperty(value = "车辆进厂下发时间") @ExcelColumn(name="车辆进厂下发时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date inHkdate; @ApiModelProperty(value = "作业类型 0自有车卸货 1自有车装货 2外协车卸货 3外协车装货 4市公司外协车卸货", example = "1") @@ -233,7 +232,7 @@ @ApiModelProperty(value = "作废时间") @ExcelColumn(name="作废时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date cancelDate; @ApiModelProperty(value = "作废处理人编码", example = "1") @@ -254,7 +253,6 @@ @ApiModelProperty(value = "预计到场时间") @ExcelColumn(name="预计到场时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date arriveDate; @ApiModelProperty(value = "入库类型 0整托盘 1件烟", example = "1") server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformLog.java
@@ -31,7 +31,7 @@ @ApiModelProperty(value = "创建时间") @ExcelColumn(name="创建时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date createDate; @ApiModelProperty(value = "更新人编码", example = "1") @@ -40,7 +40,7 @@ @ApiModelProperty(value = "更新时间") @ExcelColumn(name="更新时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date editDate; @ApiModelProperty(value = "是否删除0否 1是", example = "1") server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformQueue.java
@@ -31,7 +31,7 @@ @ApiModelProperty(value = "创建时间") @ExcelColumn(name="创建时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date createDate; @ApiModelProperty(value = "更新人编码", example = "1") @@ -40,7 +40,7 @@ @ApiModelProperty(value = "更新时间") @ExcelColumn(name="更新时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date editDate; @ApiModelProperty(value = "是否删除0否 1是", example = "1") server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformReason.java
@@ -32,7 +32,7 @@ @ApiModelProperty(value = "创建时间") @ExcelColumn(name="创建时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date createDate; @ApiModelProperty(value = "更新人编码", example = "1") @@ -41,7 +41,7 @@ @ApiModelProperty(value = "更新时间") @ExcelColumn(name="更新时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date editDate; @ApiModelProperty(value = "是否删除0否 1是", example = "1") server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformShowParam.java
@@ -31,7 +31,7 @@ @ApiModelProperty(value = "创建时间") @ExcelColumn(name="创建时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date createDate; @ApiModelProperty(value = "更新人编码", example = "1") @@ -40,7 +40,7 @@ @ApiModelProperty(value = "更新时间") @ExcelColumn(name="更新时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date editDate; @ApiModelProperty(value = "是否删除0否 1是", example = "1") server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformWmsDetail.java
@@ -32,7 +32,7 @@ @ApiModelProperty(value = "创建时间") @ExcelColumn(name="创建时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date createDate; @ApiModelProperty(value = "更新人编码", example = "1") @@ -41,7 +41,7 @@ @ApiModelProperty(value = "更新时间") @ExcelColumn(name="更新时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date editDate; @ApiModelProperty(value = "是否删除0否 1是", example = "1") server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformWmsJob.java
@@ -1,5 +1,6 @@ package com.doumee.dao.business.model; import com.baomidou.mybatisplus.annotation.TableField; import com.doumee.core.annotation.excel.ExcelColumn; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -31,7 +32,7 @@ @ApiModelProperty(value = "创建时间") @ExcelColumn(name="创建时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date createDate; @ApiModelProperty(value = "更新人编码", example = "1") @@ -40,7 +41,7 @@ @ApiModelProperty(value = "更新时间") @ExcelColumn(name="更新时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date editDate; @ApiModelProperty(value = "是否删除0否 1是", example = "1") @@ -81,8 +82,7 @@ @ApiModelProperty(value = "通知创建日期") @ExcelColumn(name="通知创建日期") @JsonFormat(pattern = "yyyy-MM-dd") private Date ioCreatedate; private String ioCreatedate; @ApiModelProperty(value = "状态 0未处理 1已处理 2已取消", example = "1") @ExcelColumn(name="状态 0未处理 1已处理 2已取消") @@ -90,7 +90,7 @@ @ApiModelProperty(value = "取消时间") @ExcelColumn(name="取消时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date cancelDate; @ApiModelProperty(value = "取消备注") @@ -108,5 +108,8 @@ @ApiModelProperty(value = "合同号`") @ExcelColumn(name="合同号`") private String contractNum; @ApiModelProperty(value = "是否新数据`") @TableField(exist = false) private int isNew; } server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/wms/WmsServiceImpl.java
@@ -1,19 +1,27 @@ package com.doumee.service.business.impl.wms; import com.doumee.core.wms.model.request.WmsActionNoticeRequest; import com.doumee.core.wms.model.request.WmsInboundNoticeRequest; import com.doumee.core.wms.model.request.WmsOutboundNoticeRequest; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.doumee.core.utils.Constants; import com.doumee.core.wms.model.request.*; import com.doumee.core.wms.model.response.WmsBaseDataResponse; import com.doumee.core.wms.model.response.WmsBaseResponse; import com.doumee.dao.business.CarsMapper; import com.doumee.dao.business.PlatformJobMapper; import com.doumee.dao.business.PlatformWmsDetailMapper; import com.doumee.dao.business.PlatformWmsJobMapper; import com.doumee.dao.business.model.Cars; import com.doumee.dao.business.model.PlatformJob; import com.doumee.dao.business.model.PlatformWmsDetail; import com.doumee.dao.business.model.PlatformWmsJob; import com.doumee.service.business.WmsService; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.ArrayList; import java.util.Date; import java.util.List; /** @@ -26,6 +34,10 @@ @Autowired private PlatformWmsJobMapper platformWmsJobMapper; @Autowired private CarsMapper carsMapper; @Autowired private PlatformJobMapper platformJobMapper; @Autowired private PlatformWmsDetailMapper platformWmsDetailMapper; /** @@ -34,17 +46,130 @@ * @return */ @Override @Transactional public WmsBaseResponse inboundNotice(List<WmsInboundNoticeRequest> list) { //TODO-------------------处理入库通知业务-------------------- if(list ==null || list.size() ==0){ return returnFailReuslt("请求参数不正确,参数不能为空"); } WmsBaseResponse response = new WmsBaseResponse(); response.setData(new ArrayList<>()); List<PlatformJob> jobList = new ArrayList<>(); List<PlatformWmsDetail> details = new ArrayList<>(); List<String> iocodeList = new ArrayList<>(); for(WmsInboundNoticeRequest param : list){ if(StringUtils.isBlank(param.getIoCode()) || StringUtils.isBlank(param.getCarrierBillCode())|| StringUtils.isBlank(param.getPlateNumber())|| StringUtils.isBlank(param.getDriverPhone())){ return returnFailReuslt("请求参数不正确,参数不合法!"); } //根据承运单号查询任务信息 PlatformWmsJob job = platformWmsJobMapper.selectOne(new QueryWrapper<PlatformWmsJob>().lambda() .eq(PlatformWmsJob::getCarryBillCode,param.getCarrierBillCode()) .eq(PlatformWmsJob::getIsdeleted, Constants.ZERO) .last("limit 1" )); return response; if(job == null){ PlatformJob model =dealJobBizInbound(param); job = new PlatformWmsJob(); job.setCreateDate(new Date()); job.setIsdeleted(Constants.ZERO); job.setIsNew(Constants.ONE); job.setCarryBillCode(param.getCarrierBillCode()); job.setIocode(param.getIoCode()); job.setCarrierName(param.getCarrierName()); job.setPlateNumber(param.getPlateNumber()); job.setType(Constants.ONE); job.setIoCreatedate(param.getCreateDate()); job.setJobId(model.getId()); job.setDriverPhone(param.getDriverPhone()); platformWmsJobMapper.insert(job); jobList.add(model); } if(param.getDetails()!=null && param.getDetails().size()>0){ for(WmsInboundDetailRequest d :param.getDetails()){ PlatformWmsDetail entity = new PlatformWmsDetail(); entity.setCreateDate(new Date()); entity.setIsdeleted(Constants.ZERO); entity.setIocode(d.getIoCode()); entity.setJobId(job.getId()); entity.setIoQty(d.getIoQty()); entity.setRate(d.getRate()); entity.setMaterialName(d.getMaterialName()); entity.setInRepertotyCode(d.getInRepertotyCode()); iocodeList.add(d.getIoCode()); details.add(entity); } if(job.getIsNew() == 1&& iocodeList.size()>0){ //先清理同一个承运单号下重复推送的iocode数据,以最后一次推送为主 platformWmsDetailMapper.update(null,new UpdateWrapper<PlatformWmsDetail>().lambda() .set(PlatformWmsDetail::getIsdeleted,Constants.ONE) .eq(PlatformWmsDetail::getIsdeleted,Constants.ZERO) .eq(PlatformWmsDetail::getJobId,job.getJobId()) .in(PlatformWmsDetail::getIocode,iocodeList) ); } } } if(details.size()>0){ platformWmsDetailMapper.insert(details); } if(jobList.size()>0){ startEndNoticeToDriver(jobList); } return returnSuccessReuslt(null); } private void startEndNoticeToDriver(List<PlatformJob> jobList) { for(PlatformJob job : jobList){ //-----TODO-----------任康,发送司机公众号和短信通知 } } private PlatformJob dealJobBizInbound(WmsInboundNoticeRequest param) { PlatformJob job = new PlatformJob(); job.setCreateDate(new Date()); job.setIsdeleted(Constants.ZERO); job.setType(Constants.platformJobType.wxcxh);//默认是外协车卸货 job.setStatus(Constants.PlatformJobStatus.WAIT_CONFIRM.getKey());//默认待确认状态 Cars car = carsMapper.selectOne(new QueryWrapper<Cars>() .select("*,(select count(1) from platform_job b where b.plate_num='"+param.getPlateNumber()+"' and b.status in()) as jobNum") .lambda() .eq(Cars::getIsdeleted,Constants.ZERO) .eq(Cars::getType,Constants.ONE) .eq(Cars::getCode,param.getPlateNumber())); if(car !=null){ //如果是自有物流车 job.setType(Constants.platformJobType.zycxh);//自有车卸货 if(Constants.equalsInteger(car.getInStatus(),Constants.ONE) && car.getJobNum() == 0) { //如果车辆在园 job.setStatus(Constants.PlatformJobStatus.WAIT_CALL.getKey());//在园无作业状态,则自动【已签到】处理 } } platformJobMapper.insert(job); return job; } private PlatformJob dealJobBizOutbound(WmsOutboundNoticeRequest param) { PlatformJob job = new PlatformJob(); job.setCreateDate(new Date()); job.setIsdeleted(Constants.ZERO); job.setType(Constants.platformJobType.wxczh);//默认是外协车装好 job.setStatus(Constants.PlatformJobStatus.WAIT_CONFIRM.getKey());//默认待确认状态 Cars car = carsMapper.selectOne(new QueryWrapper<Cars>() .select("*,(select count(1) from platform_job b where b.plate_num='"+param.getPlateNumber()+"' and b.status in()) as jobNum") .lambda() .eq(Cars::getIsdeleted,Constants.ZERO) .eq(Cars::getType,Constants.ONE) .eq(Cars::getCode,param.getPlateNumber())); if(car !=null){ //如果是自有物流车 job.setType(Constants.platformJobType.zyczh);//自有车装货 if(Constants.equalsInteger(car.getInStatus(),Constants.ONE) && car.getJobNum() == 0) { //如果车辆在园 job.setStatus(Constants.PlatformJobStatus.WAIT_CALL.getKey());//在园无作业状态,则自动【已签到】处理 } } platformJobMapper.insert(job); return job; } /** @@ -54,11 +179,73 @@ */ @Override public WmsBaseResponse outboundNotice(List<WmsOutboundNoticeRequest> list) { //TODO-------------------处理出库通知业务-------------------- if(list ==null || list.size() ==0){ return returnFailReuslt("请求参数不正确,参数不能为空"); } return null; List<PlatformJob> jobList = new ArrayList<>(); List<PlatformWmsDetail> details = new ArrayList<>(); List<String> iocodeList = new ArrayList<>(); for(WmsOutboundNoticeRequest param : list){ if(StringUtils.isBlank(param.getIoCode()) || StringUtils.isBlank(param.getCarrierBillCode())|| StringUtils.isBlank(param.getPlateNumber())|| StringUtils.isBlank(param.getDriverPhone())){ return returnFailReuslt("请求参数不正确,参数不合法!"); } //根据承运单号查询任务信息 PlatformWmsJob job = platformWmsJobMapper.selectOne(new QueryWrapper<PlatformWmsJob>().lambda() .eq(PlatformWmsJob::getCarryBillCode,param.getCarrierBillCode()) .eq(PlatformWmsJob::getIsdeleted, Constants.ZERO) .last("limit 1" )); if(job == null){ PlatformJob model =dealJobBizOutbound(param); job = new PlatformWmsJob(); job.setCreateDate(new Date()); job.setIsdeleted(Constants.ZERO); job.setIsNew(Constants.ONE); job.setCarryBillCode(param.getCarrierBillCode()); job.setIocode(param.getIoCode()); job.setCarrierName(param.getCarrierName()); job.setPlateNumber(param.getPlateNumber()); job.setType(Constants.ONE); job.setIoCreatedate(param.getCreateDate()); job.setJobId(model.getId()); job.setDriverPhone(param.getDriverPhone()); platformWmsJobMapper.insert(job); jobList.add(model); } if(param.getDetails()!=null && param.getDetails().size()>0){ for(WmsOutboundDetailRequest d :param.getDetails()){ PlatformWmsDetail entity = new PlatformWmsDetail(); entity.setCreateDate(new Date()); entity.setIsdeleted(Constants.ZERO); entity.setIocode(d.getIoCode()); entity.setJobId(job.getId()); entity.setIoQty(d.getIoQty()); entity.setRate(d.getRate()); entity.setMaterialName(d.getMaterialName()); iocodeList.add(d.getIoCode()); details.add(entity); } if(job.getIsNew() == 1&& iocodeList.size()>0){ //先清理同一个承运单号下重复推送的iocode数据,以最后一次推送为主 platformWmsDetailMapper.update(null,new UpdateWrapper<PlatformWmsDetail>().lambda() .set(PlatformWmsDetail::getIsdeleted,Constants.ONE) .eq(PlatformWmsDetail::getIsdeleted,Constants.ZERO) .eq(PlatformWmsDetail::getJobId,job.getJobId()) .in(PlatformWmsDetail::getIocode,iocodeList) ); } } } if(details.size()>0){ platformWmsDetailMapper.insert(details); } if(jobList.size()>0){ startEndNoticeToDriver(jobList); } return returnSuccessReuslt(null); } /** * 入库取消通知任务业务处理