diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/dao/mapper/MdBaseMaterialMapper.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/dao/mapper/MdBaseMaterialMapper.java index d5646ff..365bb67 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/dao/mapper/MdBaseMaterialMapper.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/dao/mapper/MdBaseMaterialMapper.java @@ -14,7 +14,7 @@ public interface MdBaseMaterialMapper extends BaseMapper { /** * 根据库存获取物料信息 * @param pages - * @param whereJson + * @param query * @return */ IPage queryByInventory(IPage pages, MdBaseMaterialQuery query); diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/dao/mapper/MdBaseMaterialMapper.xml b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/dao/mapper/MdBaseMaterialMapper.xml index c2feaf7..a53f2fd 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/dao/mapper/MdBaseMaterialMapper.xml +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/dao/mapper/MdBaseMaterialMapper.xml @@ -33,6 +33,8 @@ CTE.material_code, CTE.material_name, CTE.material_spec, + CTE.material_model, + CTE.pack_method, CTE.total_material_qty, CTE.half_material_code, CTE.raw_material_code, diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java index 81e73f8..013d888 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java @@ -438,7 +438,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { */ @Override public ApplyTaskResponse applyLabelling(JSONObject param) { - // 木托盘号##物料编码##数量##吨量(单重X数量)##生产日期##客户名称##订单号 + // 木托盘号(4)##物料编码(12)##数量(2-3)##吨量(单重X数量)##生产日期(11)##客户名称##订单号(12) String requestNo = param.getString("requestNo"); ApplyTaskRequest baseRequest = param.toJavaObject(ApplyTaskRequest.class); if (baseRequest.getVehicle_code() == null) { diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/controller/PdmBdWorkorderController.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/controller/PdmBdWorkorderController.java index f759e4d..27e4f33 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/controller/PdmBdWorkorderController.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/controller/PdmBdWorkorderController.java @@ -1,5 +1,6 @@ package org.nl.wms.pdm.workorder.controller; +import cn.dev33.satoken.annotation.SaIgnore; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; @@ -69,6 +70,7 @@ public class PdmBdWorkorderController { @PostMapping @Log("新增工单管理") @ApiOperation("新增工单管理") + @SaIgnore //@SaCheckPermission("@el.check('pdmBdWorkorder:add')") public ResponseEntity create(@Validated @RequestBody PdmBdWorkorder entity){ pdmBdWorkorderService.create(entity); diff --git a/lms/nladmin-system/nlsso-server/src/test/java/org/nl/point/test.java b/lms/nladmin-system/nlsso-server/src/test/java/org/nl/point/test.java index 4cce342..6289d16 100644 --- a/lms/nladmin-system/nlsso-server/src/test/java/org/nl/point/test.java +++ b/lms/nladmin-system/nlsso-server/src/test/java/org/nl/point/test.java @@ -12,6 +12,7 @@ import org.junit.jupiter.api.Test; import org.nl.common.exception.BadRequestException; import org.nl.wms.ext.acs.service.dto.to.wms.ApplyDeviceDto; import org.nl.wms.ext.acs.service.dto.to.wms.ApplyTaskRequest; +import org.nl.wms.sch.group.service.ISchBaseVehiclematerialgroupService; import org.nl.wms.sch.region.service.ISchBaseRegionService; import org.nl.wms.sch.region.service.dao.SchBaseRegion; import org.nl.wms.sch.task.service.dao.SchBaseTask; @@ -34,6 +35,8 @@ import java.util.List; public class test { @Autowired private ISchBaseRegionService regionService; + @Autowired + private ISchBaseVehiclematerialgroupService vehiclematerialgroupService; @Test @Transactional(rollbackFor = Exception.class) @@ -132,4 +135,21 @@ public class test { // 断言格式化后的日期是否符合预期 Assert.assertEquals("20231030", formattedDate); } + + @Test + public void testGetInventoryQtyByMaterialId() { + // 执行被测方法 + int actualQty = vehiclematerialgroupService.getInventoryQtyByMaterialId("030504010003"); + System.out.println(actualQty); + } + + @Test + public void testSplit() { + // 执行被测方法 + String str = "木托盘号(4)##物料编码(12)##数量(2-3)##吨量(单重X数量)##生产日期(11)##客户名称##订单号(12)"; + String[] split = str.split("##"); + for (int i = 0; i < split.length; i++) { + System.out.println(split[i]); + } + } } 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 3e1f816..10873af 100644 --- a/lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue +++ b/lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue @@ -486,6 +486,7 @@ const defaultForm = { pack_method: null, order_subnum: 0, guadansum: 0, + ext_data: 0, show: false } export default { @@ -557,6 +558,14 @@ export default { [CRUD.HOOK.beforeRefresh]() { return true }, + [CRUD.HOOK.beforeToCU]() { + const extData = this.form.ext_data + if (extData !== undefined || extData !== null || extData !== '') { + const ext = JSON.parse(extData) + this.form.order_no = ext.order_no + this.form.order_subnum = ext.custer_no + } + }, getWorkShopList() { // 获取车间列表 crudMdBaseWorkShop.getWorkShopList().then(res => { this.workShopList = res @@ -602,12 +611,12 @@ export default { this.form.material_code = row.material_code this.form.half_material_code = row.half_material_code this.form.raw_material_code = row.raw_material_code - this.form.pack_method = row.pack_method } else { this.form.raw_material_name = row.material_name this.form.raw_material_id = row.material_id this.form.raw_material_code = row.material_code } + this.form.pack_method = row.pack_method }, clearRecordMesOrder() { this.form.order_no = null diff --git a/lms/nladmin-ui/src/views/wms/sch/group/MaterialDialog.vue b/lms/nladmin-ui/src/views/wms/sch/group/MaterialDialog.vue index 912dad2..58ae604 100644 --- a/lms/nladmin-ui/src/views/wms/sch/group/MaterialDialog.vue +++ b/lms/nladmin-ui/src/views/wms/sch/group/MaterialDialog.vue @@ -73,6 +73,7 @@ +