From 9c86cce3943842ed28f3acd48c33c76cb93b57e5 Mon Sep 17 00:00:00 2001 From: lsh <1> Date: 星期三, 06 三月 2024 18:04:19 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java | 45 +++++++++++++++++++++++++++++---------------- 1 files changed, 29 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java index 4347bc1..56b2679 100644 --- a/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java @@ -7,17 +7,17 @@ import com.core.common.R; import com.core.exception.CoolException; import com.zy.asrs.domain.enums.TaskStatusType; +import com.zy.asrs.domain.enums.WorkNoType; +import com.zy.asrs.entity.LocMast; import com.zy.asrs.entity.StaDesc; import com.zy.asrs.entity.TaskWrk; import com.zy.asrs.entity.ToWmsDTO; import com.zy.asrs.entity.param.TaskOverParam; import com.zy.asrs.entity.param.WMSAndAGVInterfaceParam; -import com.zy.asrs.entity.param.taskCreateParam; -import com.zy.asrs.service.ApiLogService; -import com.zy.asrs.service.OpenService; -import com.zy.asrs.service.StaDescService; -import com.zy.asrs.service.TaskWrkService; +import com.zy.asrs.entity.param.TaskCreateParam; +import com.zy.asrs.service.*; import com.zy.asrs.utils.Utils; +import com.zy.common.service.CommonService; import com.zy.common.utils.HttpHandler; import com.zy.core.DevpThread; import com.zy.core.cache.MessageQueue; @@ -31,7 +31,6 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; -import javax.servlet.http.HttpServletRequest; import java.io.IOException; import java.util.*; @@ -47,6 +46,10 @@ @Autowired private StaDescService staDescService; + @Autowired + private CommonService commonService; + @Autowired + private LocMastService locMastService; @@ -60,7 +63,7 @@ @Override - public R taskCreate(taskCreateParam param) { + public R taskCreate(TaskCreateParam param) { TaskWrk taskWrk = taskWrkService.selectByTaskNo(param.getTaskNo()); if (taskWrk != null) { throw new CoolException(param.getTaskNo() + "浠诲姟宸插瓨鍦紝璇峰嬁閲嶅鎻愪氦"); @@ -71,13 +74,16 @@ Date now = new Date(); taskWrk = new TaskWrk(); + LocMast locMast=locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no",param.getStartPoint())); + int workNo1 = commonService.getWorkNo(WorkNoType.PAKOUT.type);//鑾峰彇鍏ュ簱宸ヤ綔鍙� taskWrk.setTaskNo(param.getTaskNo());//浠诲姟鍙� + taskWrk.setWrkNo(workNo1); taskWrk.setStatus(TaskStatusType.RECEIVE.id);//浠诲姟鐘舵�侊細鎺ユ敹 taskWrk.setCreateTime(now); taskWrk.setIoType(param.getIoType());//浠诲姟绫诲瀷 taskWrk.setIoPri(param.getTaskPriority());//浼樺厛绾� taskWrk.setBarcode(param.getBarcode());//鏉$爜 - taskWrk.setCrnNo(param.getCrn()); + taskWrk.setCrnNo(locMast.getCrnNo()); if(param.getIoType() == 1){ taskWrk.setWrkSts(1); if (!Cools.isEmpty(param.getTargetPoint())) { @@ -88,15 +94,15 @@ } else if (param.getIoType() == 2) { taskWrk.setWrkSts(11); if (!Cools.isEmpty(param.getStartPoint())) { - taskWrk.setStartPoint(Utils.getWcsLocNo(param.getStartPoint()));//璧风偣 - taskWrk.setOriginStartPoint(param.getStartPoint()); + taskWrk.setStartPoint(param.getStartPoint());//璧风偣 + taskWrk.setTargetPoint(param.getTargetPoint()); } taskWrk.setTargetPoint(param.getTargetPoint()); }else if (param.getIoType() == 3){ taskWrk.setWrkSts(11); if (!Cools.isEmpty(param.getStartPoint())) { - taskWrk.setStartPoint(Utils.getWcsLocNo(param.getStartPoint()));//璧风偣 - taskWrk.setOriginStartPoint(param.getStartPoint()); + taskWrk.setStartPoint(param.getStartPoint());//璧风偣 + taskWrk.setTargetPoint(param.getTargetPoint()); } } @@ -150,7 +156,7 @@ ,wmsUrl+"wcsManager/wcsInterface/inboundTaskApply" ,null ,"127.0.0.1" - ,JSON.toJSONString(param) + ,JSON.toJSONString(toWmsDTO) ,response ,true ); @@ -162,7 +168,7 @@ WMSAndAGVInterfaceParam data = JSONObject.parseObject(jsonObject.get("data").toString(), WMSAndAGVInterfaceParam.class); String msg = null; try { - taskCreate(new taskCreateParam(data)); + taskCreate(new TaskCreateParam(data)); }catch (Exception e){ msg = e.getMessage(); } @@ -175,12 +181,19 @@ staDesc = staDescService.selectOne(new EntityWrapper<StaDesc>() .eq("crn_no",data.getTaskTunnel()) .eq("type_no",1) - .lt("crn_stn",200)); + .lt("stn_no",200)); + }else if (param.getWharfSource().contains("H")){ + staDesc = staDescService.selectOne(new EntityWrapper<StaDesc>() + .eq("crn_no",data.getTaskTunnel()) + .eq("type_no",1) + .lt("stn_no",400) + .gt("stn_no",200)); }else { staDesc = staDescService.selectOne(new EntityWrapper<StaDesc>() .eq("crn_no",data.getTaskTunnel()) .eq("type_no",1) - .ge("crn_stn",200)); + .lt("stn_no",500) + .ge("stn_no",400)); } map1.put("taskTunnel", staDesc.getStnDesc()); //map1.put("taskTunnel", "J-1104"); -- Gitblit v1.9.1