From 304b8a05be8ec2b6d281fec83ddde9add1a53622 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期四, 23 十月 2025 17:40:13 +0800
Subject: [PATCH] 最新版本541200007
---
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/WmsServiceImpl.java | 54 ++++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 48 insertions(+), 6 deletions(-)
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/WmsServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/WmsServiceImpl.java
index 496c7f8..5d479ee 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/WmsServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/WmsServiceImpl.java
@@ -11,6 +11,7 @@
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.core.wms.model.response.WmsCarInParkDataResponse;
import com.doumee.core.wx.wxPlat.WxPlatConstants;
import com.doumee.core.wx.wxPlat.WxPlatNotice;
import com.doumee.dao.business.*;
@@ -82,7 +83,7 @@
* @return
*/
@Override
- public WmsBaseResponse<WmsBaseDataResponse> orderPlatformBind(PlatformJob job) {
+ public WmsBaseResponse<WmsBaseDataResponse> orderPlatformBind(PlatformJob job,int optType) {
if(StringUtils.isBlank(job.getBillCode()) || StringUtils.isBlank(job.getPlatformWmsCode())){
return null;
}
@@ -105,6 +106,9 @@
String url = type == 0?systemDictDataBiz.queryByCode(Constants.WMS_PARAM,Constants.WMS_INBOUND_PLATFROM_URL).getCode():
systemDictDataBiz.queryByCode(Constants.WMS_PARAM,Constants.WMS_OUTBOUND_PLATFROM_URL).getCode();;
String name = type ==0?"銆怶MS銆戝叆搴撲綔涓氬崟鍒嗛厤鏈堝彴":"銆怶MS銆戝嚭搴撲綔涓氱殑鍒嗛厤鏈堝彴";
+ if(optType == 0){
+ name = type ==0?"銆怶MS銆戝叆搴撲綔涓氬崟娓呯┖鏈堝彴":"銆怶MS銆戝嚭搴撲綔涓氱殑娓呯┖鏈堝彴";
+ }
// int sendSuccess = 0;
// int sendError = 0;
List<String> errorMassge = new ArrayList<>();
@@ -119,6 +123,7 @@
WmsOrderPlatformInfoRequest o = new WmsOrderPlatformInfoRequest();
o.setCarrierBillCode(platformWmsDetail.getIocode());
o.setRailwayNo(job.getPlatformWmsCode());
+ o.setOptionType(optType);
param.getData().add(o);
response = sendHttpRequest(url,name,JSONObject.toJSONString(param),new TypeReference< WmsBaseResponse<WmsBaseDataResponse>>(){});
if(response!=null && response.getData() !=null
@@ -320,9 +325,9 @@
entity.setJobId(job.getJobId());
entity.setContractNum(param.getContractNum());
entity.setWmsJobId(job.getId());
- entity.setIoQty(d.getIoQty());
entity.setStatus(Constants.ZERO);
- entity.setRate(d.getRate());
+ entity.setIoQty(Constants.formatBigdecimal(d.getIoQty()).multiply(Constants.formatBigdecimal( d.getRate())));
+ entity.setRate(Objects.nonNull(d.getRate())?Constants.formatBigdecimal(d.getRate()).doubleValue()+"":"1");
entity.setMaterialName(d.getMaterialName());
entity.setInRepertotyCode(d.getInRepertotyCode());
iocodeList.add(d.getIoCode());
@@ -412,6 +417,7 @@
Constants.PlatformJobStatus.IN_WAIT.getKey()+","+
Constants.PlatformJobStatus.CALLED.getKey()+","+
Constants.PlatformJobStatus.TRANSFERING.getKey()+","+
+ Constants.PlatformJobStatus.OVER_NUMBER.getKey()+","+
Constants.PlatformJobStatus.EXCEPTION.getKey()+","+
Constants.PlatformJobStatus.WORKING.getKey()+")) as jobNum")
.lambda()
@@ -443,6 +449,7 @@
}
}
PlatformGroup group = platformGroupMapper.selectOne(new QueryWrapper<PlatformGroup>().lambda()
+ .eq(PlatformGroup::getIsVirtual,Constants.ZERO)//闈炶櫄鎷熸湀鍙�
.eq(PlatformGroup::getIsdeleted,Constants.ZERO)
.eq(PlatformGroup::getType,type==0?Constants.ZERO:Constants.ONE)
.last("limit 1") );//鏌ヨ鍗歌揣鏈堝彴缁勭紪鐮�
@@ -554,11 +561,13 @@
entity.setJobId(job.getJobId());
entity.setWmsJobId(job.getId());
entity.setContractNum(param.getContractNum());
- entity.setIoQty(d.getIoQty());
- entity.setRepertotyAddress(job.getRepertotyAddress());
+ entity.setRepertotyAddress(param.getRepertotyAddress());
entity.setWmsJobId(job.getId());
entity.setStatus(Constants.ZERO);
- entity.setRate(d.getRate());
+ entity.setIoQty(Constants.formatBigdecimal(d.getIoQty()).multiply(Constants.formatBigdecimal( d.getRate())));
+ entity.setRate(Objects.nonNull(d.getRate())?Constants.formatBigdecimal(d.getRate()).doubleValue()+"":"1");
+// entity.setIoQty(d.getIoQty());
+// entity.setRate(d.getRate());
entity.setMaterialName(d.getMaterialName());
iocodeList.add(d.getIoCode());
details.add(entity);
@@ -841,4 +850,37 @@
response.getData().add(rData);
return response;
}
+
+
+ @Override
+ public WmsBaseResponse<List<WmsCarInParkDataResponse>> getCarInPark(WmsBaseRequest<String> param) {
+ try {
+ WmsBaseResponse<List<WmsCarInParkDataResponse>> wmsBaseResponse = new WmsBaseResponse();
+ List<Retention> retentionList = retentionMapper.selectList(new QueryWrapper<Retention>().lambda()
+ .eq(Retention::getIsdeleted,Constants.ZERO)
+ .in(Retention::getCarNo,param.getData()));
+ List list = new ArrayList<>();
+ if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(retentionList)){
+ for (String carNo:param.getData()) {
+ WmsCarInParkDataResponse wmsCarInParkDataResponse = new WmsCarInParkDataResponse();
+ wmsCarInParkDataResponse.setCarNo(carNo);
+ List<Retention> retentions = retentionList.stream().filter(i->i.getCarNo().equals(carNo)).collect(Collectors.toList());
+ wmsCarInParkDataResponse.setInPark(retentions.size()>Constants.ZERO?true:false);
+ if(wmsCarInParkDataResponse.getInPark()){
+ wmsCarInParkDataResponse.setEventDate(retentions.get(Constants.ZERO).getEventDate());
+ }
+ list.add(wmsCarInParkDataResponse);
+ }
+
+ }
+ wmsBaseResponse.setSuccess(true);
+ wmsBaseResponse.setMessage("鑾峰彇鎴愬姛");
+ wmsBaseResponse.setData(list);
+ return wmsBaseResponse;
+ }catch (Exception e){
+ log.error("銆怶MS銆戝嚭搴撳彇娑堥�氱煡浠诲姟涓氬姟澶勭悊===============涓氬姟澶勭悊寮傚父"+e.getMessage());
+ return returnFailReuslt("涓氬姟澶勭悊寮傚父");
+ }
+ }
+
}
--
Gitblit v1.9.3