Browse Source

更新

master
张江玮 2 years ago
parent
commit
a6e780d56c
  1. 8
      lms/nladmin-system/src/main/java/org/nl/wms/pdm/rest/WorkorderController.java
  2. 2
      lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/WorkordeService.java
  3. 5
      lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/WorkorderServiceImpl.java
  4. 4
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/empty/YZCallEmptyTask.java
  5. 4
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/material/SZCallMaterialTask.java
  6. 4
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/send/material/SZSendMaterialTask.java
  7. 4
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/send/material/YZSendMaterialTask.java
  8. BIN
      lms/nladmin-system/src/main/java/org/nl/wms/wms.xls
  9. 9
      lms/nladmin-ui/src/api/wms/pdm/workorder.js
  10. 59
      lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue
  11. 7
      lms/nladmin-ui/src/views/wms/pub/MaterDialog.vue

8
lms/nladmin-system/src/main/java/org/nl/wms/pdm/rest/WorkorderController.java

@ -142,4 +142,12 @@ public class WorkorderController {
return new ResponseEntity<>(workordeService.getDtl(param),HttpStatus.OK);
}
@PostMapping("/getMaterial")
@Log("获取工单物料")
@ApiOperation("获取工单物料")
//@SaCheckPermission("produceshiftorder:list")
public ResponseEntity<Object> getMaterial(){
return new ResponseEntity<>(workordeService.getMaterial(),HttpStatus.OK);
}
}

2
lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/WorkordeService.java

@ -121,4 +121,6 @@ public interface WorkordeService {
* @return
*/
JSONArray getDtl(JSONObject param);
JSONArray getMaterial();
}

5
lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/WorkorderServiceImpl.java

@ -122,7 +122,6 @@ public class WorkorderServiceImpl implements WorkordeService {
}
work_order.put("vehicle_type", vehicle_type);
work_order.put("device_id", dto.getDevice_id());
work_order.put("device_code", device_code);
work_order.put("order_status", WorkOrderEnum.ORDER_STATUS_UNPRODUCED.value());
work_order.put("is_urgent", dto.getIs_urgent());
work_order.put("is_pri", dto.getIs_pri());
@ -460,4 +459,8 @@ public class WorkorderServiceImpl implements WorkordeService {
return resultJSONArray;
}
@Override
public JSONArray getMaterial() {
return WQLObject.getWQLObject("md_me_materialbase").query().getResultJSONArray(0);
}
}

4
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/empty/YZCallEmptyTask.java

@ -134,6 +134,7 @@ public class YZCallEmptyTask extends AbstractAcsTask {
@Transactional(rollbackFor = Exception.class)
public void cancelTask(JSONObject task, OperationType operation_type) {
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
task.put("task_status", TaskStatus.CANCELLED.value());
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(task);
@ -167,9 +168,11 @@ public class YZCallEmptyTask extends AbstractAcsTask {
}
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
}
}
@Transactional(rollbackFor = Exception.class)
public void finishTask(JSONObject task, OperationType operation_type) {
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
task.put("task_status", TaskStatus.FINISHED.value());
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(task);
@ -205,3 +208,4 @@ public class YZCallEmptyTask extends AbstractAcsTask {
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
}
}
}

4
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/material/SZCallMaterialTask.java

@ -139,6 +139,7 @@ public class SZCallMaterialTask extends AbstractAcsTask {
@Transactional(rollbackFor = Exception.class)
public void cancelTask(JSONObject task, OperationType operation_type) {
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
task.put("task_status", TaskStatus.CANCELLED.value());
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(task);
@ -172,9 +173,11 @@ public class SZCallMaterialTask extends AbstractAcsTask {
}
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
}
}
@Transactional(rollbackFor = Exception.class)
public void finishTask(JSONObject task, OperationType operation_type) {
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
task.put("task_status", TaskStatus.FINISHED.value());
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(task);
@ -207,3 +210,4 @@ public class SZCallMaterialTask extends AbstractAcsTask {
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
}
}
}

4
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/send/material/SZSendMaterialTask.java

@ -129,6 +129,7 @@ public class SZSendMaterialTask extends AbstractAcsTask {
@Transactional(rollbackFor = Exception.class)
public void cancelTask(JSONObject task, OperationType operation_type) {
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
task.put("task_status", TaskStatus.CANCELLED.value());
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(task);
@ -161,9 +162,11 @@ public class SZSendMaterialTask extends AbstractAcsTask {
}
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
}
}
@Transactional(rollbackFor = Exception.class)
public void finishTask(JSONObject task, OperationType operation_type) {
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
task.put("task_status", TaskStatus.FINISHED.value());
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(task);
@ -197,3 +200,4 @@ public class SZSendMaterialTask extends AbstractAcsTask {
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
}
}
}

4
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/send/material/YZSendMaterialTask.java

@ -121,6 +121,7 @@ public class YZSendMaterialTask extends AbstractAcsTask {
@Transactional(rollbackFor = Exception.class)
public void cancelTask(JSONObject task, OperationType operation_type) {
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
task.put("task_status", TaskStatus.CANCELLED.value());
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(task);
@ -153,9 +154,11 @@ public class YZSendMaterialTask extends AbstractAcsTask {
}
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
}
}
@Transactional(rollbackFor = Exception.class)
public void finishTask(JSONObject task, OperationType operation_type) {
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
task.put("task_status", TaskStatus.FINISHED.value());
if (operation_type == OperationType.AUTO) {
TaskUtils.addACSUpdateColum(task);
@ -192,3 +195,4 @@ public class YZSendMaterialTask extends AbstractAcsTask {
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
}
}
}

BIN
lms/nladmin-system/src/main/java/org/nl/wms/wms.xls

Binary file not shown.

9
lms/nladmin-ui/src/api/wms/pdm/workorder.js

@ -96,4 +96,11 @@ export function getDtl(data) {
})
}
export default { add, edit, del, submits, getDevice, getTable, openStart, saveReport, finish, getReportWork, forceFinish, getDtl }
export function getMaterial() {
return request({
url: 'api/workorder/getMaterial',
method: 'post'
})
}
export default { add, edit, del, submits, getDevice, getTable, openStart, saveReport, finish, getReportWork, forceFinish, getDtl, getMaterial }

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

@ -110,7 +110,7 @@
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="物料" prop="material_code">
<el-form-item label="物料编码" prop="material_code">
<el-input
v-model="form.material_code"
style="width: 300px"
@ -130,13 +130,13 @@
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="生产设备" prop="device_code">
<el-form-item label="生产设备" prop="device_name">
<el-input
v-model="form.device_code"
v-model="form.device_name"
style="width: 300px"
clearable
@focus="deviceShow=true"
@clear="form.device_code=''; form.device_id=''"
@clear="form.device_code=''; form.device_id=''; form.device_name=''"
/>
</el-form-item>
</el-col>
@ -198,10 +198,14 @@
{{ dict.label.pdm_workorder_status[scope.row.order_status] }}
</template>
</el-table-column>
<el-table-column prop="planproducestart_date" label="计划开始时间" min-width="150" show-overflow-tooltip />
<el-table-column prop="planproduceend_date" label="计划结束时间" min-width="150" show-overflow-tooltip />
<el-table-column prop="device_name" label="设备" width="100" show-overflow-tooltip />
<el-table-column prop="material_name" label="物料" width="100" show-overflow-tooltip />
<el-table-column prop="material_code" label="物料编码" width="260" show-overflow-tooltip />
<el-table-column prop="vehicle_type" label="载具类型" min-width="120" show-overflow-tooltip>
<template slot-scope="scope">
{{ dict.label.vehicle_type[scope.row.vehicle_type] }}
</template>
</el-table-column>
<el-table-column prop="create_name" label="创建人" />
<el-table-column prop="plan_qty" label="计划数量" />
<el-table-column prop="is_urgent" label="是否加急">
<template slot-scope="scope">
@ -218,12 +222,6 @@
<el-table-column prop="real_qty" label="实际数量" />
<el-table-column prop="qualified_qty" label="合格数量" />
<el-table-column prop="unqualified_qty" label="不合格数量" width="100" />
<!-- <el-table-column prop="vehicle_type" label="载具类型" min-width="120" show-overflow-tooltip>-->
<!-- <template slot-scope="scope">-->
<!-- {{ dict.label.vehicle_type[scope.row.vehicle_type] }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column prop="create_name" label="创建人" />
<el-table-column prop="create_time" label="创建时间" width="150" />
<el-table-column prop="update_optname" label="修改人" />
<el-table-column prop="update_time" label="修改时间" width="150" />
@ -268,7 +266,7 @@ const defaultForm = {
material_id: null,
material_code: null,
material_weight: null,
vehicle_type: null,
vehicle_type: '3',
planproducestart_date: null,
planproduceend_date: null,
realproducestart_date: null,
@ -288,6 +286,7 @@ const defaultForm = {
material_name: null,
device_id: null,
device_code: null,
device_name: null,
is_canupdate_update: '1',
material_spec: null,
sale_id: null,
@ -332,44 +331,17 @@ export default {
order_status: ['-1'],
permission: {},
rules: {
produceorder_code: [
{ required: true, message: '生产班次工单编号不能为空', trigger: 'blur' }
],
producedeviceorder_code: [
{ required: true, message: '机台工单号不能为空', trigger: 'blur' }
],
produce_date: [
{ required: true, message: '生产日期不能为空', trigger: 'blur' }
],
plan_qty: [
{ required: true, message: '计划数量不能为空', trigger: 'blur' }
],
material_code: [
{ required: true, message: '物料编码不能为空', trigger: 'change' }
],
planproducestart_date: [
{ required: true, message: '计划生产开始时间不能为空', trigger: 'blur' }
],
planproduceend_date: [
{ required: true, message: '计划生产结束时间不能为空', trigger: 'blur' }
],
order_status: [
{ required: true, message: '工单状态不能为空', trigger: 'blur' }
],
is_needmove: [
{ required: true, message: '是否搬运不能为空', trigger: 'blur' }
],
order_type_scode: [
{ required: true, message: '工单类型不能为空', trigger: 'blur' }
],
is_canupdate_update: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
vehicle_type: [
{ required: true, message: '木托盘类型不能为空', trigger: 'blur' }
],
device_code: [
{ required: true, message: '生产设备不能为空', trigger: 'blur' }
device_name: [
{ required: true, message: '生产设备不能为空', trigger: 'change' }
],
is_urgent: [
{ required: true, message: '是否加急不能为空', trigger: 'blur' }
@ -426,6 +398,7 @@ export default {
tableChanged(row) {
this.form.device_code = row.device_code
this.form.device_id = row.device_id
this.form.device_name = row.device_name
},
//
submits(row) {

7
lms/nladmin-ui/src/views/wms/pub/MaterDialog.vue

@ -15,12 +15,12 @@
label-width="80px"
label-suffix=":"
>
<el-form-item label="编码名称">
<el-form-item label="物料编码">
<el-input
v-model="query.name"
clearable
size="mini"
placeholder="编码名称"
placeholder="物料编码"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
@ -46,8 +46,7 @@
<el-radio v-model="tableRadio" :label="scope.row"><i /></el-radio>
</template>
</el-table-column>
<el-table-column prop="material_code" label="物料编码" width="189" show-overflow-tooltip />
<el-table-column prop="material_name" label="物料名称" width="190" show-overflow-tooltip />
<el-table-column prop="material_code" label="物料编码" width="260" show-overflow-tooltip />
<el-table-column prop="standing_time" label="静置时间" width="75" />
<el-table-column prop="threshold_time" label="阈值时间" width="75" />
<el-table-column prop="product_code" label="产品编号" width="75" />

Loading…
Cancel
Save