From 36455395aa7426ca5be634a57974db686da63593 Mon Sep 17 00:00:00 2001 From: zhangzq Date: Wed, 21 Aug 2024 15:20:57 +0800 Subject: [PATCH] =?UTF-8?q?rev:=E5=A4=A7=E5=B1=8F=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/nl/common/base/TableDataInfo.java | 6 +-- .../service/quartz/config/JobRunner.java | 2 +- .../wms/ext/fab/controller/FabController.java | 8 ++-- .../wms/ext/fab/service/dto/OrderMater.java | 13 ++++++- .../ext/fab/service/impl/FabServiceImpl.java | 2 +- .../dao/SchBaseVehiclematerialgroup.java | 2 +- .../point/service/ISchBasePointService.java | 3 +- .../dao/mapper/SchBasePointMapper.java | 3 +- .../service/dao/mapper/SchBasePointMapper.xml | 16 ++++---- .../service/impl/SchBasePointServiceImpl.java | 5 ++- .../main/resources/config/application-dev.yml | 39 ++++++++++--------- .../src/main/resources/sqlDoc/sql0815.sql | 8 +++- .../src/views/wms/produceScreen/index.vue | 8 ++-- 13 files changed, 69 insertions(+), 46 deletions(-) diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/common/base/TableDataInfo.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/common/base/TableDataInfo.java index a05a05a..b0d2ff6 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/common/base/TableDataInfo.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/common/base/TableDataInfo.java @@ -53,7 +53,7 @@ public class TableDataInfo implements Serializable { public static TableDataInfo build(IPage page) { TableDataInfo rspData = new TableDataInfo<>(); rspData.setCode(HttpStatus.HTTP_OK); - rspData.setMsg("查询成功"); + rspData.setMsg("操作成功"); rspData.setContent(page.getRecords()); rspData.setTotalElements(page.getTotal()); return rspData; @@ -62,7 +62,7 @@ public class TableDataInfo implements Serializable { public static TableDataInfo build(List list) { TableDataInfo rspData = new TableDataInfo<>(); rspData.setCode(HttpStatus.HTTP_OK); - rspData.setMsg("查询成功"); + rspData.setMsg("操作成功"); rspData.setContent(list); rspData.setTotalElements(list.size()); return rspData; @@ -71,7 +71,7 @@ public class TableDataInfo implements Serializable { public static TableDataInfo build() { TableDataInfo rspData = new TableDataInfo<>(); rspData.setCode(HttpStatus.HTTP_OK); - rspData.setMsg("查询成功"); + rspData.setMsg("操作成功"); return rspData; } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/quartz/config/JobRunner.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/quartz/config/JobRunner.java index a535ee9..ab6ce0a 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/quartz/config/JobRunner.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/quartz/config/JobRunner.java @@ -13,7 +13,7 @@ import org.springframework.stereotype.Component; import java.util.List; -@Component +//@Component @RequiredArgsConstructor @Order(100) public class JobRunner implements ApplicationRunner { diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/fab/controller/FabController.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/fab/controller/FabController.java index f5820b8..e9d4b8c 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/fab/controller/FabController.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/fab/controller/FabController.java @@ -78,8 +78,8 @@ public class FabController { @Log("根据工序查询工单") @GetMapping("/regionOrder") public ResponseEntity> regionOrder(String regionCode){ - List orderMaters = fabService.getOrderBycode(regionCode); - return new ResponseEntity(TableDataInfo.build(orderMaters), HttpStatus.OK); + List structList = iSchBasePointService.getStructList(regionCode, null); + return new ResponseEntity(TableDataInfo.build(structList), HttpStatus.OK); } /** @@ -90,8 +90,8 @@ public class FabController { */ @Log("根据工单查询匹配库存") @GetMapping("/getMaterListByOrder") - public ResponseEntity>> getMaterListByOrder(String order,String regionCode){ - List structList = iSchBasePointService.getStructList(regionCode, null); + public ResponseEntity>> getMaterListByOrder(String order,String regionCode){ + List structList = iSchBasePointService.getStructList(regionCode, null); return new ResponseEntity(TableDataInfo.build(structList), HttpStatus.OK); } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/fab/service/dto/OrderMater.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/fab/service/dto/OrderMater.java index 3036d33..7c8b6af 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/fab/service/dto/OrderMater.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/fab/service/dto/OrderMater.java @@ -1,5 +1,8 @@ package org.nl.wms.ext.fab.service.dto; +import lombok.Data; + +@Data public class OrderMater { /** * 物料号 @@ -9,6 +12,10 @@ public class OrderMater { * 物料类型 */ public String material_type; + /** + * 载具编码 + */ + public String vehicle_code; /** * 订单号 */ @@ -17,6 +24,10 @@ public class OrderMater { * 工序 */ public String region_code; + /** + * 货位 + */ + public String point_code; /** * 物料数量 */ @@ -24,7 +35,7 @@ public class OrderMater { /** * 交期时间 */ - public String dua_date; + public String due_date; /** * 客户编码 */ diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/fab/service/impl/FabServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/fab/service/impl/FabServiceImpl.java index 0dbb4f3..ff039b8 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/fab/service/impl/FabServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/fab/service/impl/FabServiceImpl.java @@ -64,7 +64,7 @@ public class FabServiceImpl { switch (type){ case "cmt": CallMaterVo callMaterVo = form.toJavaObject(CallMaterVo.class); - param.put("device_code",callMaterVo.getDevice_code()); + param.put("device_code",callMaterVo.getPoint_code()); param.put("config_code","PcOperationCMTask"); param.put("vehicle_code",callMaterVo.getVehicle_code()); param.put("ext_data",callMaterVo); diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/group/service/dao/SchBaseVehiclematerialgroup.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/group/service/dao/SchBaseVehiclematerialgroup.java index 284a9b9..768d430 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/group/service/dao/SchBaseVehiclematerialgroup.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/group/service/dao/SchBaseVehiclematerialgroup.java @@ -89,7 +89,7 @@ public class SchBaseVehiclematerialgroup implements Serializable { @ApiModelProperty(value = "是否已加工") private Boolean has_work; @ApiModelProperty(value = "交期时间") - private String dua_date; + private String due_date; @ApiModelProperty(value = "车间编码") private String workshop_code; diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/ISchBasePointService.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/ISchBasePointService.java index 68d4b42..75fcf9f 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/ISchBasePointService.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/ISchBasePointService.java @@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.metadata.IPage; import org.nl.common.domain.query.PageQuery; import com.baomidou.mybatisplus.extension.service.IService; +import org.nl.wms.ext.fab.service.dto.OrderMater; import org.nl.wms.sch.point.service.dao.SchBasePoint; import org.nl.wms.sch.point.service.dto.PointMaterialInfo; import org.nl.wms.sch.task.service.dao.SchBaseTask; @@ -124,7 +125,7 @@ public interface ISchBasePointService extends IService { * @param region_code * @return */ - List getStructList(String region_code, String vehicle_type); + List getStructList(String region_code, String vehicle_type); /** diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dao/mapper/SchBasePointMapper.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dao/mapper/SchBasePointMapper.java index a2eef97..82f849e 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dao/mapper/SchBasePointMapper.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dao/mapper/SchBasePointMapper.java @@ -2,6 +2,7 @@ package org.nl.wms.sch.point.service.dao.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Param; +import org.nl.wms.ext.fab.service.dto.OrderMater; import org.nl.wms.sch.point.service.dao.SchBasePoint; import org.nl.wms.sch.point.service.dto.PointMaterialInfo; @@ -22,7 +23,7 @@ public interface SchBasePointMapper extends BaseMapper { SchBasePoint selectByIdLock(String id); - List getStructList(@Param("region_code") String region_code, @Param("vehicle_type")String vehicle_type); + List getStructList(@Param("region_code") String region_code, @Param("vehicle_type")String vehicle_type); List selectByRegionCode(@Param("region_code") String region_code); diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dao/mapper/SchBasePointMapper.xml b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dao/mapper/SchBasePointMapper.xml index e3e3837..a4984c2 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dao/mapper/SchBasePointMapper.xml +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dao/mapper/SchBasePointMapper.xml @@ -20,17 +20,16 @@ WHERE p.point_code = #{id} FOR UPDATE - SELECT sch_base_point.point_code, - sch_base_point.point_name, - sch_base_point.is_lock, sch_base_point.vehicle_code, - sch_base_vehiclematerialgroup.group_id, sch_base_vehiclematerialgroup.material_id, sch_base_vehiclematerialgroup.material_qty, sch_base_vehiclematerialgroup.region_code, - sch_base_vehiclematerialgroup.workorder_code, + sch_base_vehiclematerialgroup.order_code, + sch_base_vehiclematerialgroup.due_date, + sch_base_vehiclematerialgroup.has_work FROM sch_base_point inner JOIN sch_base_vehiclematerialgroup ON sch_base_point.vehicle_code = sch_base_vehiclematerialgroup.vehicle_code @@ -38,8 +37,11 @@ is_lock = FALSE AND sch_base_point.vehicle_code IS NOT NULL and sch_base_point.point_status = '2' - and sch_base_point.can_vehicle_type = #{vehicle_type} - AND sch_base_point.region_code = #{region_code} + + and sch_base_point.can_vehicle_type = #{vehicle_type} + + and has_work = false + AND sch_base_vehiclematerialgroup.region_code = #{region_code}