Browse Source

opt: 工单

master
李永德 1 year ago
parent
commit
760edf13f3
  1. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/dao/mapper/MdBaseMaterialMapper.java
  2. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/dao/mapper/MdBaseMaterialMapper.xml
  3. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java
  4. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/controller/PdmBdWorkorderController.java
  5. 20
      lms/nladmin-system/nlsso-server/src/test/java/org/nl/point/test.java
  6. 11
      lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue
  7. 1
      lms/nladmin-ui/src/views/wms/sch/group/MaterialDialog.vue

2
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<MdBaseMaterial> {
/** /**
* 根据库存获取物料信息 * 根据库存获取物料信息
* @param pages * @param pages
* @param whereJson * @param query
* @return * @return
*/ */
IPage<MdBaseMaterial> queryByInventory(IPage<MdBaseMaterial> pages, MdBaseMaterialQuery query); IPage<MdBaseMaterial> queryByInventory(IPage<MdBaseMaterial> pages, MdBaseMaterialQuery query);

2
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_code,
CTE.material_name, CTE.material_name,
CTE.material_spec, CTE.material_spec,
CTE.material_model,
CTE.pack_method,
CTE.total_material_qty, CTE.total_material_qty,
CTE.half_material_code, CTE.half_material_code,
CTE.raw_material_code, CTE.raw_material_code,

2
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 @Override
public ApplyTaskResponse applyLabelling(JSONObject param) { public ApplyTaskResponse applyLabelling(JSONObject param) {
// 木托盘号##物料编码##数量##吨量(单重X数量)##生产日期##客户名称##订单号 // 木托盘号(4)##物料编码(12)##数量(2-3)##吨量(单重X数量)##生产日期(11)##客户名称##订单号(12)
String requestNo = param.getString("requestNo"); String requestNo = param.getString("requestNo");
ApplyTaskRequest baseRequest = param.toJavaObject(ApplyTaskRequest.class); ApplyTaskRequest baseRequest = param.toJavaObject(ApplyTaskRequest.class);
if (baseRequest.getVehicle_code() == null) { if (baseRequest.getVehicle_code() == null) {

2
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; package org.nl.wms.pdm.workorder.controller;
import cn.dev33.satoken.annotation.SaIgnore;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -69,6 +70,7 @@ public class PdmBdWorkorderController {
@PostMapping @PostMapping
@Log("新增工单管理") @Log("新增工单管理")
@ApiOperation("新增工单管理") @ApiOperation("新增工单管理")
@SaIgnore
//@SaCheckPermission("@el.check('pdmBdWorkorder:add')") //@SaCheckPermission("@el.check('pdmBdWorkorder:add')")
public ResponseEntity<Object> create(@Validated @RequestBody PdmBdWorkorder entity){ public ResponseEntity<Object> create(@Validated @RequestBody PdmBdWorkorder entity){
pdmBdWorkorderService.create(entity); pdmBdWorkorderService.create(entity);

20
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.common.exception.BadRequestException;
import org.nl.wms.ext.acs.service.dto.to.wms.ApplyDeviceDto; 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.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.ISchBaseRegionService;
import org.nl.wms.sch.region.service.dao.SchBaseRegion; import org.nl.wms.sch.region.service.dao.SchBaseRegion;
import org.nl.wms.sch.task.service.dao.SchBaseTask; import org.nl.wms.sch.task.service.dao.SchBaseTask;
@ -34,6 +35,8 @@ import java.util.List;
public class test { public class test {
@Autowired @Autowired
private ISchBaseRegionService regionService; private ISchBaseRegionService regionService;
@Autowired
private ISchBaseVehiclematerialgroupService vehiclematerialgroupService;
@Test @Test
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@ -132,4 +135,21 @@ public class test {
// 断言格式化后的日期是否符合预期 // 断言格式化后的日期是否符合预期
Assert.assertEquals("20231030", formattedDate); 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]);
}
}
} }

11
lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue

@ -486,6 +486,7 @@ const defaultForm = {
pack_method: null, pack_method: null,
order_subnum: 0, order_subnum: 0,
guadansum: 0, guadansum: 0,
ext_data: 0,
show: false show: false
} }
export default { export default {
@ -557,6 +558,14 @@ export default {
[CRUD.HOOK.beforeRefresh]() { [CRUD.HOOK.beforeRefresh]() {
return true 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() { // getWorkShopList() { //
crudMdBaseWorkShop.getWorkShopList().then(res => { crudMdBaseWorkShop.getWorkShopList().then(res => {
this.workShopList = res this.workShopList = res
@ -602,12 +611,12 @@ export default {
this.form.material_code = row.material_code this.form.material_code = row.material_code
this.form.half_material_code = row.half_material_code this.form.half_material_code = row.half_material_code
this.form.raw_material_code = row.raw_material_code this.form.raw_material_code = row.raw_material_code
this.form.pack_method = row.pack_method
} else { } else {
this.form.raw_material_name = row.material_name this.form.raw_material_name = row.material_name
this.form.raw_material_id = row.material_id this.form.raw_material_id = row.material_id
this.form.raw_material_code = row.material_code this.form.raw_material_code = row.material_code
} }
this.form.pack_method = row.pack_method
}, },
clearRecordMesOrder() { clearRecordMesOrder() {
this.form.order_no = null this.form.order_no = null

1
lms/nladmin-ui/src/views/wms/sch/group/MaterialDialog.vue

@ -73,6 +73,7 @@
<el-table-column prop="material_name" label="物料名称" width="180" show-overflow-tooltip /> <el-table-column prop="material_name" label="物料名称" width="180" show-overflow-tooltip />
<el-table-column prop="material_spec" label="物料规格" width="140" /> <el-table-column prop="material_spec" label="物料规格" width="140" />
<el-table-column prop="material_model" label="物料型号" width="140" /> <el-table-column prop="material_model" label="物料型号" width="140" />
<el-table-column prop="pack_method" label="包装方式" width="140" />
<el-table-column v-if="queryInfo === '库存顺序'" prop="total_material_qty" label="物料总数/块" width="140" /> <el-table-column v-if="queryInfo === '库存顺序'" prop="total_material_qty" label="物料总数/块" width="140" />
<el-table-column prop="standing_time" label="静置时间(分钟)" width="130px" /> <el-table-column prop="standing_time" label="静置时间(分钟)" width="130px" />
<el-table-column prop="update_name" label="修改人" /> <el-table-column prop="update_name" label="修改人" />

Loading…
Cancel
Save