diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/common/utils/CodeUtil.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/common/utils/CodeUtil.java index b68e810..4308e09 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/common/utils/CodeUtil.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/common/utils/CodeUtil.java @@ -1,19 +1,36 @@ package org.nl.common.utils; +import lombok.SneakyThrows; +import org.nl.common.exception.BadRequestException; import org.nl.config.SpringContextHolder; import org.nl.system.service.coderule.ISysCodeRuleService; +import org.redisson.api.RLock; +import org.redisson.api.RedissonClient; -import java.util.*; +import java.util.HashMap; +import java.util.concurrent.TimeUnit; public class CodeUtil { + @SneakyThrows public static String getNewCode(String ruleCode){ - synchronized (ruleCode){ - String flag = "1"; - HashMap map = new HashMap<>(); - map.put("flag",flag); - map.put("code",ruleCode); - return SpringContextHolder.getBean(ISysCodeRuleService.class).codeDemo(map); + RedissonClient redissonClient = SpringContextHolder.getBean(RedissonClient.class); + RLock lock = redissonClient.getLock(ruleCode); + boolean tryLock = lock.tryLock(5, TimeUnit.SECONDS); + try { + if (tryLock) { + String flag = "1"; + HashMap map = new HashMap<>(); + map.put("flag",flag); + map.put("code",ruleCode); + return SpringContextHolder.getBean(ISysCodeRuleService.class).codeDemo(map); + } else { + throw new BadRequestException("系统繁忙,稍后在试"); + } + } finally { + if (tryLock) { + lock.unlock(); + } } } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/coderule/impl/SysCodeRuleServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/coderule/impl/SysCodeRuleServiceImpl.java index e27c450..c8fa95b 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/coderule/impl/SysCodeRuleServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/coderule/impl/SysCodeRuleServiceImpl.java @@ -59,6 +59,7 @@ public class SysCodeRuleServiceImpl extends ServiceImpl().eq(SysCodeRule::getCode, code)).getId(); // 如果flag = 1就执行更新数据库的操作 String flag = (String) form.get("flag"); - List ruleDetails = codeRuleDetailMapper.selectList(new LambdaQueryWrapper().eq(SysCodeRuleDetail::getCode_rule_id, id)); + List ruleDetails = codeRuleDetailMapper.selectList(new LambdaQueryWrapper() + .eq(SysCodeRuleDetail::getCode_rule_id, id) + .orderByAsc(SysCodeRuleDetail::getSort_num)); String demo = ""; boolean isSame = true; for(SysCodeRuleDetail detail : ruleDetails) { @@ -96,7 +99,7 @@ public class SysCodeRuleServiceImpl extends ServiceImpl maxValue) { + if (!isSame || (Long.valueOf(detail.getCurrent_value()) + step) > maxValue) { numValue = detail.getInit_value(); } else { numValue = Integer.parseInt(detail.getCurrent_value()) + step + ""; diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/autotask/AutoIssueWorkOrder.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/autotask/AutoIssueWorkOrder.java index 9fce60f..969a355 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/autotask/AutoIssueWorkOrder.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/autotask/AutoIssueWorkOrder.java @@ -53,6 +53,9 @@ public class AutoIssueWorkOrder { // 判断是否有工单 List lists = workorderService.getTheDayProducedWorkOrderByDevice(s.getPoint_code()); if (lists.size() > 0) return; + // 已生产就退出 + if (s.getWorkorder_status().equals(WorkOrderStatusEnum.PRODUCING.getCode()) + || s.getWorkorder_code().equals(WorkOrderStatusEnum.ISSUED.getCode())) return; AcsWorkOrderVo acsWorkOrderVo = workorderService.toAcsWorkOrderById(s.getWorkorder_id()); // 获取一个下发 List list = new CopyOnWriteArrayList<>(); @@ -60,6 +63,7 @@ public class AutoIssueWorkOrder { AcsResponse resultForAcs; try { resultForAcs = wmsToAcsService.order(list); + log.info("自动下发工单:{}", list); } catch (Exception e) { log.error("工单下发异常:" + e.getMessage()); // 通知 diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/AcsToWmsService.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/AcsToWmsService.java index 6ebfd19..bfbaf37 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/AcsToWmsService.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/AcsToWmsService.java @@ -56,4 +56,6 @@ public interface AcsToWmsService { GetPalletizeResponse getVehicleInfo(JSONObject param); /** 实时修改点位状态 */ BaseResponse realTimeSetPoint(JSONObject param); + /** 布料记录 - 上传MES */ +// BaseResponse applyOneGrab(JSONObject param); } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/controller/PdaController.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/controller/PdaController.java index 1607ed9..cdf662a 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/controller/PdaController.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/controller/PdaController.java @@ -13,6 +13,7 @@ import org.nl.wms.das.device.operation.service.dao.DasDeviceOperationRecord; import org.nl.wms.pda.service.PdaService; import org.nl.wms.pda.service.dao.dto.*; import org.nl.wms.pda.service.dao.vo.PdaResponseVo; +import org.nl.wms.pda.service.dao.vo.RequestMaterialInfoVo; import org.nl.wms.pdm.workorder.service.IPdmBdWorkorderService; import org.nl.wms.sch.group.service.ISchBaseVehiclematerialgroupService; import org.springframework.beans.factory.annotation.Autowired; @@ -261,4 +262,17 @@ public class PdaController { return new ResponseEntity<>(pdaService.updateData(shelfSaveDto), HttpStatus.OK); } + @PostMapping("/mix/requestInfo") + @Log("要料信息-查询") + @ApiOperation("要料信息-查询") + public ResponseEntityrequestInfo(){ + return new ResponseEntity<>(pdaService.requestInfo(), HttpStatus.OK); + } + + @PostMapping("/mix/deleteInfo") + @Log("要料信息-查询") + @ApiOperation("要料信息-查询") + public ResponseEntitydeleteMaterialInfo(@RequestBody RequestMaterialInfoVo requestMaterialInfoVo){ + return new ResponseEntity<>(pdaService.deleteMaterialInfo(requestMaterialInfoVo), HttpStatus.OK); + } } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/PdaService.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/PdaService.java index 495e782..87a54b6 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/PdaService.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/PdaService.java @@ -2,6 +2,7 @@ package org.nl.wms.pda.service; import org.nl.wms.pda.service.dao.dto.*; import org.nl.wms.pda.service.dao.vo.*; +import org.nl.wms.pdm.record.service.dao.PdmBdRequestMaterialRecord; import java.util.List; @@ -65,4 +66,8 @@ public interface PdaService { PdaResponseVo updateData(ShelfSaveDto shelfSaveDto); List pressPointList(); + + List requestInfo(); + + PdaResponseVo deleteMaterialInfo(RequestMaterialInfoVo requestMaterialInfoVo); } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/mapper/PdaMapper.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/mapper/PdaMapper.java index e88bb0d..9dea357 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/mapper/PdaMapper.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/mapper/PdaMapper.java @@ -71,4 +71,10 @@ public interface PdaMapper { * @return */ List getAllPressPoint(); + + /** + * 要料信息 + * @return + */ + List requestInfo(); } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/mapper/PdaMapper.xml b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/mapper/PdaMapper.xml index 3d7823c..31944a1 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/mapper/PdaMapper.xml +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/mapper/PdaMapper.xml @@ -149,4 +149,22 @@ p.region_code = 'YZ' AND p.point_type = '2' + diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/vo/RequestMaterialInfoVo.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/vo/RequestMaterialInfoVo.java new file mode 100644 index 0000000..722960a --- /dev/null +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/dao/vo/RequestMaterialInfoVo.java @@ -0,0 +1,18 @@ +package org.nl.wms.pda.service.dao.vo; + +import lombok.Data; + +/** + * @Author: lyd + * @Description: 请求物料信息 + * @Date: 2023/11/10 + */ +@Data +public class RequestMaterialInfoVo { + private String record_id; + private String device_code; + private String material_id; + private String workorder_id; + private String create_time; + private String is_finish; +} diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java index 4b27f07..ea7dfa9 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java @@ -17,6 +17,8 @@ import org.nl.wms.pda.service.PdaService; import org.nl.wms.pda.service.dao.dto.*; import org.nl.wms.pda.service.dao.mapper.PdaMapper; import org.nl.wms.pda.service.dao.vo.*; +import org.nl.wms.pdm.record.service.IPdmBdRequestMaterialRecordService; +import org.nl.wms.pdm.record.service.dao.PdmBdRequestMaterialRecord; import org.nl.wms.pdm.vehiclebiding.service.IPdmBdVehicleBindingService; import org.nl.wms.pdm.vehiclebiding.service.dao.PdmBdVehicleBinding; import org.nl.wms.pdm.workorder.service.IPdmBdWorkorderService; @@ -64,6 +66,8 @@ public class PdaServiceImpl implements PdaService { private IPdmBdVehicleBindingService vehicleBindingService; @Autowired private WmsToAcsService wmsToAcsService; + @Autowired + private IPdmBdRequestMaterialRecordService requestMaterialRecordService; @Override public List getDeviceInfo() { // 暂定压机区域 @@ -389,6 +393,23 @@ public class PdaServiceImpl implements PdaService { return pdaMapper.getAllPressPoint(); } + @Override + public List requestInfo() { + return pdaMapper.requestInfo(); + } + + @Override + public PdaResponseVo deleteMaterialInfo(RequestMaterialInfoVo requestMaterialInfoVo) { + PdmBdRequestMaterialRecord materialRecord = requestMaterialRecordService.getById( + requestMaterialInfoVo.getRecord_id()); + if (ObjectUtil.isEmpty(materialRecord) || materialRecord.getIs_delete()) { + throw new BadRequestException(requestMaterialInfoVo.getRecord_id() + "不存在或已删除"); + } + materialRecord.setIs_delete(true); + requestMaterialRecordService.updateById(materialRecord); + return PdaResponseVo.pdaResultOk("删除成功"); + } + /** * 保存组盘信息 * @param shelfSaveDto diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/service/dao/mapper/PdmBdWorkorderMapper.xml b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/service/dao/mapper/PdmBdWorkorderMapper.xml index 614ad72..2e8104c 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/service/dao/mapper/PdmBdWorkorderMapper.xml +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/service/dao/mapper/PdmBdWorkorderMapper.xml @@ -37,7 +37,7 @@ w.plan_qty, m.half_material_code AS material_code, m.material_spec AS product_code, - m.material_spec AS brick_code, + 0 AS brick_code, m.material_model AS formula, IF(LENGTH(m.a_long_side) > 0,m.a_long_side,0) AS a, IF(LENGTH(m.b_short_side) > 0,m.b_short_side,0) AS b, @@ -94,7 +94,7 @@ w.plan_qty, m.half_material_code AS material_code, m.material_spec AS product_code, - m.material_spec AS brick_code, + 0 AS brick_code, m.material_model AS formula, IF(LENGTH(m.a_long_side) > 0,m.a_long_side,0) AS a, IF(LENGTH(m.b_short_side) > 0,m.b_short_side,0) AS b, @@ -136,6 +136,7 @@ `pdm_bd_workorder` w WHERE w.produce_date = CURDATE() AND w.region_code = 'YZ' AND w.workorder_status IN ('1','2','3') + ORDER BY w.workorder_status DESC, w.planproducestart_date ) AS ranked WHERE row_num = 1 diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/service/impl/PdmBdWorkorderServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/service/impl/PdmBdWorkorderServiceImpl.java index 85c3c85..53bbfda 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/service/impl/PdmBdWorkorderServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/service/impl/PdmBdWorkorderServiceImpl.java @@ -85,12 +85,9 @@ public class PdmBdWorkorderServiceImpl extends ServiceImpl() - .eq(PdmBdWorkorder::getProduce_date, today)); // 点位编码和点位名称为父点位 entity.setWorkorder_id(IdUtil.getSnowflake(1, 1).nextIdStr()); -// entity.setWorkorder_code(CodeUtil.getNewCode("PDM_SHIFTORDER")); - entity.setWorkorder_code(today + String.format("%03d", integer)); + entity.setWorkorder_code(CodeUtil.getNewCode("PDM_SHIFTORDER")); entity.setCreate_id(currentUserId); entity.setCreate_name(nickName); entity.setCreate_time(now); 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 9a301ca..5e52fb6 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 @@ -61,4 +61,10 @@ public interface ISchBasePointService extends IService { * @param points */ void changeLock(JSONObject points); + + /** + * 获取所有未解锁的点位 + * @return + */ + List getAllUnlockAbnormalPoints(); } 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 2e0fe47..24f867f 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 @@ -17,4 +17,6 @@ public interface SchBasePointMapper extends BaseMapper { * @param used */ void batchChangeUsed(List pointCodes, Boolean used); + + List getAllUnlockAbnormalPoints(); } 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 66342b0..dd9be54 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 @@ -12,4 +12,12 @@ + diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/impl/SchBasePointServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/impl/SchBasePointServiceImpl.java index 1d0bf96..f962a1c 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/impl/SchBasePointServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/impl/SchBasePointServiceImpl.java @@ -203,4 +203,9 @@ public class SchBasePointServiceImpl extends ServiceImpl getAllUnlockAbnormalPoints() { + return pointMapper.getAllUnlockAbnormalPoints(); + } + } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AutoRestorePoint.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AutoRestorePoint.java new file mode 100644 index 0000000..d049ac3 --- /dev/null +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AutoRestorePoint.java @@ -0,0 +1,31 @@ +package org.nl.wms.sch.task_manage; + +import lombok.SneakyThrows; +import lombok.extern.slf4j.Slf4j; +import org.nl.wms.sch.point.service.ISchBasePointService; +import org.nl.wms.sch.point.service.dao.SchBasePoint; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.annotation.Order; +import org.springframework.stereotype.Component; + +import java.util.List; + +/** + * @Author: lyd + * @Description: 自动恢复异常点位 + * @Date: 2023/11/15 + */ +@Slf4j +@Component +@Order(value = 1) +public class AutoRestorePoint { + @Autowired + private ISchBasePointService pointService; + + @SneakyThrows + public void run() { + List pointList = pointService.getAllUnlockAbnormalPoints(); + pointList.forEach(point -> point.setIng_task_code("")); + pointService.updateBatchById(pointList); + } +} diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJMKTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJMKTask.java index 0032805..396c6e2 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJMKTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJMKTask.java @@ -203,6 +203,9 @@ public class FJMKTask extends AbstractTask { JSONObject stackParameters = param.getJSONObject("palletize"); String deviceCode = param.getString("device_code"); String vehicleCode = TaskUtils.defaultVehicleCode(param.getString("vehicle_code")); + if (vehicleCode == null) { + throw new BadRequestException("载具号不能为空"); + } String isFull = param.getString("is_full"); if (isFull == null) { isFull = GeneralDefinition.YES; diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJSLTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJSLTask.java index d8a30a1..b8e5f53 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJSLTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJSLTask.java @@ -135,6 +135,7 @@ public class FJSLTask extends AbstractTask { .or() .eq(SchBasePoint::getIng_task_code, "")) .eq(SchBasePoint::getIs_used, true) + .ne(SchBasePoint::getLayer_num, "3") .orderByAsc(SchBasePoint::getIn_order_seq) .orderByAsc(SchBasePoint::getPoint_code); List schBasePoints = pointService.list(lam); diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/hn/HNMLTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/hn/HNMLTask.java index 2f3922b..da5d514 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/hn/HNMLTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/hn/HNMLTask.java @@ -244,9 +244,9 @@ public class HNMLTask extends AbstractTask { if (ObjectUtil.isNotEmpty(one)) { // 给组盘数据设置批次:压制工单+混砂机号+碾次 groupEntity.setWorkorder_code(one.getWorkorder_code()); - StringBuilder pcsn = new StringBuilder(); - pcsn.append(one.getWorkorder_code()).append(groupEntity.getPoint_code()).append(groupEntity.getMix_times()); - groupEntity.setPcsn(pcsn.toString()); +// StringBuilder pcsn = new StringBuilder(); +// pcsn.append(one.getWorkorder_code()).append(groupEntity.getPoint_code()).append(groupEntity.getMix_times()); +// groupEntity.setPcsn(pcsn.toString()); groupEntity.setPoint_code(endPointObj.getPoint_code()); // 当前位置 groupEntity.setPoint_name(endPointObj.getPoint_name()); groupEntity.setMove_way(groupEntity.getMove_way() + " -> " + endPointObj.getPoint_code()); @@ -333,6 +333,7 @@ public class HNMLTask extends AbstractTask { groupEntity.setMove_way(basePoint.getPoint_code()); // 头次 groupEntity.setMix_times(mixTimes); // 碾次 groupEntity.setInstorage_time(DateUtil.now()); + groupEntity.setPcsn(packNo); // update: 11/15批次修改成吨袋号 groupEntity.setMaterial_weight(ObjectUtil.isNotEmpty(weight)// 重量 ? weight : BigDecimal.valueOf(0)); diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/yao/CYZCTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/yao/CYZCTask.java index c46b8c7..351cca3 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/yao/CYZCTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/yao/CYZCTask.java @@ -139,6 +139,9 @@ public class CYZCTask extends AbstractTask { // 查找组盘表信息,不做修改 String vehicleCode = TaskUtils.defaultVehicleCode(param.getString("vehicle_code")); String vehicleType = param.getString("vehicle_type"); + if (ObjectUtil.isEmpty(vehicleCode)) { + throw new BadRequestException("载具号不能为空"); + } if (vehicleCode == null) { vehicleType = GeneralDefinition.STEEL_TRAY; } diff --git a/lms/nladmin-system/nlsso-server/src/main/resources/config/application.yml b/lms/nladmin-system/nlsso-server/src/main/resources/config/application.yml index b559a01..a9a7233 100644 --- a/lms/nladmin-system/nlsso-server/src/main/resources/config/application.yml +++ b/lms/nladmin-system/nlsso-server/src/main/resources/config/application.yml @@ -123,7 +123,7 @@ mybatis-plus: configuration: map-underscore-to-camel-case: false jdbc-type-for-null: null - # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl + log-impl: org.apache.ibatis.logging.stdout.StdOutImpl mapper-locations: - classpath:org.nl.**.mapper/*.xml global-config: diff --git a/lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue b/lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue index 160a403..b728a1f 100644 --- a/lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue +++ b/lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue @@ -628,7 +628,10 @@ export default { this.form.raw_material_code = row.material_code } this.form.pack_method = row.pack_method - this.form.vehicle_type = row.pack_palletspec + const result = Object.keys(this.dict.label.vehicle_type).find(key => this.dict.label.vehicle_type[key] === row.pack_palletspec) + if (result) { + this.form.vehicle_type = result + } }, clearRecordMesOrder() { this.form.order_no = null