diff --git a/lms/nladmin-system/src/main/java/org/nl/b_lms/pda/controller/VehicleTwoController.java b/lms/nladmin-system/src/main/java/org/nl/b_lms/pda/controller/VehicleTwoController.java index 8ea7c4852..a22ba2469 100644 --- a/lms/nladmin-system/src/main/java/org/nl/b_lms/pda/controller/VehicleTwoController.java +++ b/lms/nladmin-system/src/main/java/org/nl/b_lms/pda/controller/VehicleTwoController.java @@ -5,6 +5,7 @@ import cn.dev33.satoken.annotation.SaIgnore; import com.alibaba.fastjson.JSONObject; import lombok.extern.slf4j.Slf4j; import org.nl.b_lms.pda.service.VehicleTwoService; +import org.nl.b_lms.sch.point.service.IbstIvtPackageinfoivtService; import org.nl.modules.logging.annotation.Log; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; @@ -14,6 +15,8 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import javax.annotation.Resource; + /** * @author liuxy * @date 2022-05-25 @@ -26,6 +29,10 @@ public class VehicleTwoController { @Autowired private VehicleTwoService vehicleTwoService; + @Resource + private IbstIvtPackageinfoivtService bstIvtPackageInfoIvtService; + + @PostMapping("/vehicleIn") @Log("入空载具") @SaIgnore @@ -53,4 +60,13 @@ public class VehicleTwoController { public ResponseEntity reback(@RequestBody JSONObject whereJson) { return new ResponseEntity<>(vehicleTwoService.reback(whereJson), HttpStatus.OK); } + + + @PostMapping("/updatePackageInfo") + @Log("一楼待检区-管制区子卷质检") + @SaIgnore + public ResponseEntity updatePackageInfo(@RequestBody JSONObject whereJson) { + return new ResponseEntity<>(bstIvtPackageInfoIvtService.update(whereJson), HttpStatus.OK); + } + } diff --git a/lms/nladmin-system/src/main/java/org/nl/b_lms/pdm/subpackagerelation/service/impl/PdmBiSubpackagerelationServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/b_lms/pdm/subpackagerelation/service/impl/PdmBiSubpackagerelationServiceImpl.java index f4c885abc..131c91337 100644 --- a/lms/nladmin-system/src/main/java/org/nl/b_lms/pdm/subpackagerelation/service/impl/PdmBiSubpackagerelationServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/b_lms/pdm/subpackagerelation/service/impl/PdmBiSubpackagerelationServiceImpl.java @@ -153,6 +153,9 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl queryContainerNameBySaleOrder(Map whereJson) { + if (!whereJson.containsKey("sale_order_name")) { + return null; + } List pdmBiSubpackagerelationList = pdmBiSubpackagerelationMapper.queryContainerNameBySaleOrder(whereJson.get("sale_order_name").toString()); Map countByGroup = pdmBiSubpackagerelationList.stream() .filter(item -> item.getBox_group() != null) @@ -386,9 +389,9 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl packagerelationList = JSONObject.parseArray(whereJson.getJSONArray("tableMater").toJSONString(), PdmBiSubpackagerelation.class); List isOutBox = packagerelationList.stream().filter(r -> r.getStatus().equals("0")).collect(Collectors.toList()); - if (isOutBox.size() > 0) { - throw new BadRequestException("标记为黄色的子卷号已分配木箱,请重新选择未分配木箱的子卷"); - } + if (isOutBox.size() > 0) { + throw new BadRequestException("标记为黄色的子卷号已分配木箱,请重新选择未分配木箱的子卷"); + } JSONArray jsonArray = whereJson.getJSONArray("tableMater"); if (jsonArray == null || jsonArray.size() == 0) { throw new BadRequestException("无选中子卷信息"); @@ -441,7 +444,7 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl 装箱对接位,木箱码不能为空!"); } //更新子卷包装关系更新木箱号 - CompletableFuture.runAsync(() -> { + CompletableFuture.runAsync(() -> { try { updateBoxInfo(entityList, boxSn); } catch (Exception e) { diff --git a/lms/nladmin-system/src/main/java/org/nl/b_lms/sch/point/controller/BstIvtPackageinfoivtController.java b/lms/nladmin-system/src/main/java/org/nl/b_lms/sch/point/controller/BstIvtPackageinfoivtController.java new file mode 100644 index 000000000..07e2471a9 --- /dev/null +++ b/lms/nladmin-system/src/main/java/org/nl/b_lms/sch/point/controller/BstIvtPackageinfoivtController.java @@ -0,0 +1,59 @@ +package org.nl.b_lms.sch.point.controller; +import java.util.Set; +import org.nl.b_lms.sch.point.dao.BstIvtPackageinfoivt; +import org.springframework.web.bind.annotation.*; +import lombok.RequiredArgsConstructor; +import javax.annotation.Resource; +import lombok.extern.slf4j.Slf4j; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.nl.b_lms.sch.point.service.IbstIvtPackageinfoivtService; + + +/** + * {@code @Description:} 装箱区点位库存表(BstIvtPackageinfoivt)控制层 + * {@code @Author:} gbx + * + * @since 2024-06-18 + */ +@RestController +@RequiredArgsConstructor +@RequestMapping("/api/bstIvtPackageinfoivt") +@Slf4j +public class BstIvtPackageinfoivtController { + + + @Resource + private IbstIvtPackageinfoivtService bstIvtPackageinfoivtService; + + + /** + * 新增数据 + * + * @param params 实体对象 + * @return 新增结果 + */ + @PostMapping + public ResponseEntity create(@RequestBody BstIvtPackageinfoivt params) { + bstIvtPackageinfoivtService.create(params); + return new ResponseEntity<>(HttpStatus.OK); + } + + + + + /** + * 删除数据 + * + * @param ids 多个主键Id + * @return 删除结果 + */ + @DeleteMapping + public ResponseEntity delete(@RequestBody Set ids) { + bstIvtPackageinfoivtService.deleteAll(ids); + return new ResponseEntity<>(HttpStatus.OK); + } + + +} + diff --git a/lms/nladmin-system/src/main/java/org/nl/b_lms/sch/point/service/IbstIvtPackageinfoivtService.java b/lms/nladmin-system/src/main/java/org/nl/b_lms/sch/point/service/IbstIvtPackageinfoivtService.java index 7dcabe2df..6e962a804 100644 --- a/lms/nladmin-system/src/main/java/org/nl/b_lms/sch/point/service/IbstIvtPackageinfoivtService.java +++ b/lms/nladmin-system/src/main/java/org/nl/b_lms/sch/point/service/IbstIvtPackageinfoivtService.java @@ -1,5 +1,6 @@ package org.nl.b_lms.sch.point.service; +import com.alibaba.fastjson.JSONObject; import org.nl.b_lms.sch.point.dao.BstIvtPackageinfoivt; import com.baomidou.mybatisplus.extension.service.IService; @@ -54,9 +55,9 @@ public interface IbstIvtPackageinfoivtService extends IService().eq(BstIvtPackageinfoivt::getContainer_name, whereJson.getString("container_name"))); + if (dto == null) { + result.put("status", org.springframework.http.HttpStatus.BAD_REQUEST.value()); + result.put("message", "不存在该数据!"); + return result; + } + dto.setIvt_status(whereJson.getString("ivt_status")); + bstIvtPackageinfoivtMapper.updateById(getBasicInfo(dto, false)); + result.put("status", org.springframework.http.HttpStatus.OK.value()); + result.put("message", "检验成功!"); + return result; } @@ -170,14 +185,14 @@ public class BstIvtPackageinfoivtServiceImpl extends ServiceImpl输送线)")); toSsxTask.put("vehicle_code", schBaseTask.getVehicle_code()); - //toSsxTask.put("vehicle_code", containerInfo.getContainer_name()); //判断空载具缓存位是否有空载具库存,有就叫桁架去任一位置搬空载具 if (CollectionUtils.isNotEmpty(kzjPointList)) { //直接创建搬运空载具任务 diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java index af64a785e..ba04ddea7 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java @@ -64,10 +64,7 @@ import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; @@ -1753,7 +1750,10 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { log.info("二楼到一楼,成品子卷到达一楼输送线,sendProductToFirstFloor--------------------------:" + whereJson.toString()); JSONObject result = new JSONObject(); if (StringUtils.isBlank(whereJson.getString("device_code")) || StringUtils.isBlank(whereJson.getString("material_barcode"))) { - throw new BadRequestException("接口sendProductToFirstFloor,任务号或子卷号参数为空!"); + throw new BadRequestException("接口sendProductToFirstFloor,目标站点或子卷号参数为空!"); + } + if (whereJson.getString("device_code").equals("null") || whereJson.getString("material_barcode").equals("null")) { + throw new BadRequestException("接口sendProductToFirstFloor,目标站点或子卷号参数为null!"); } RLock lock = redissonClient.getLock(whereJson.getString("material_barcode")); boolean tryLock = lock.tryLock(0, TimeUnit.SECONDS); @@ -1777,7 +1777,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { jo.put("point_code2", mzPointList.get(0).getPoint_code()); List kzjPointList = bstIvtPackageinfoivtList.stream() .filter(r -> PackageInfoIvtEnum.POINT_STATUS.code("空载具缓存位").equals(r.getPoint_status()) - && PackageInfoIvtEnum.IVT_STATUS.code("空载具").equals(r.getIvt_status())).collect(Collectors.toList()); + && PackageInfoIvtEnum.IVT_STATUS.code("空载具").equals(r.getIvt_status())) + .sorted(Comparator.comparing(BstIvtPackageinfoivt::getSort_seq).reversed()).collect(Collectors.toList()); //空载具缓存位有空载具 if (CollectionUtils.isNotEmpty(kzjPointList)) { jo.put("point_code3", kzjPointList.get(0).getPoint_code()); @@ -1794,6 +1795,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { .eq(SchBaseTask::getIs_delete, IOSEnum.IS_NOTANDYES.code("否"))); if (CollectionUtils.isEmpty(existTaskList)) { JSONObject jo1 = new JSONObject(); + //创建确定终点任务 jo1.put("acs_task_type", PackageInfoIvtEnum.ACS_TASK_TYPE.code("桁架任务")); jo1.put("task_type", PackageInfoIvtEnum.TASK_TYPE.code("放空(空载具缓存位->输送线)")); jo1.put("point_code2", "NBJ1002"); @@ -1926,8 +1928,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { log.info("applyTwo返回参数:---------------------------------------------" + result.toString()); return result; } - } - finally { + } finally { if (tryLock) { lock.unlock(); } diff --git a/lms/nladmin-ui/src/views/wms/pdm/sub/DivDialog.vue b/lms/nladmin-ui/src/views/wms/pdm/sub/DivDialog.vue index 8c03808d8..06c1e9791 100644 --- a/lms/nladmin-ui/src/views/wms/pdm/sub/DivDialog.vue +++ b/lms/nladmin-ui/src/views/wms/pdm/sub/DivDialog.vue @@ -46,7 +46,6 @@ -
diff --git a/lms/nladmin-ui/src/views/wms/pdm/sub/MaterDialog.vue b/lms/nladmin-ui/src/views/wms/pdm/sub/MaterDialog.vue index 8cae9799c..a39f5ea29 100644 --- a/lms/nladmin-ui/src/views/wms/pdm/sub/MaterDialog.vue +++ b/lms/nladmin-ui/src/views/wms/pdm/sub/MaterDialog.vue @@ -66,7 +66,7 @@ export default { url: 'api/Materialbase', idField: 'material_id', sort: 'material_id,desc', - query: { box: '木箱', search: '木箱', material_id: '' }, + query: { box: '木箱', search: 'MX', material_id: '' }, crudMethod: { ...crudMaterattr } }) },