opt: LMS解包区
This commit is contained in:
@@ -332,6 +332,7 @@ public class PdaJBServiceImpl implements PdaJBService {
|
||||
if (ObjectUtil.isEmpty(materialbase)) {
|
||||
throw new BadRequestException("物料【" + workorder.getMaterial_id() + "】不存在!");
|
||||
}
|
||||
JSONObject extData = JSONObject.parseObject(workorder.getExt_data());
|
||||
// 0、创建组盘
|
||||
GroupPlate groupPlate = new GroupPlate();
|
||||
groupPlate.setGroup_id(IdUtil.getStringId());
|
||||
@@ -339,7 +340,6 @@ public class PdaJBServiceImpl implements PdaJBService {
|
||||
// 料桶类型根据工单,工单是根据点位
|
||||
groupPlate.setStoragevehicle_type(workorder.getVehicle_type());
|
||||
groupPlate.setMaterial_id(materialbase.getMaterial_id());
|
||||
groupPlate.setPcsn(DateUtil.format(new Date(), "yyyy-MM-dd"));
|
||||
groupPlate.setQty(weight);
|
||||
groupPlate.setQty_unit_id("11");
|
||||
groupPlate.setQty_unit_name("kg");
|
||||
@@ -348,6 +348,9 @@ public class PdaJBServiceImpl implements PdaJBService {
|
||||
groupPlate.setCreate_id(currentUserId);
|
||||
groupPlate.setCreate_name(nickName);
|
||||
groupPlate.setCreate_time(now);
|
||||
groupPlate.setPcsn(extData.getString("pcsn"));
|
||||
groupPlate.setSupp_code(extData.getString("supp_code"));
|
||||
groupPlate.setSupp_name(extData.getString("supp_name"));
|
||||
groupplateService.save(groupPlate);
|
||||
|
||||
Dict dict = dictService.getDictByCodeAndValue("storagevehicle_type", workorder.getVehicle_type());
|
||||
@@ -517,6 +520,7 @@ public class PdaJBServiceImpl implements PdaJBService {
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public PdaResponse jbReturnMaterial(JSONObject param) {
|
||||
MDC.put(TagNameEnum.TAG_NAME.getTag(), TagNameEnum.PDA_JB_BACK_MATERIAL.getTag());
|
||||
// param: area, point_code, workorder_id
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
@@ -539,6 +543,7 @@ public class PdaJBServiceImpl implements PdaJBService {
|
||||
throw new BadRequestException("物料【" + workOrder.getMaterial_id() + "】不存在!");
|
||||
}
|
||||
Structattr structattr = structattrService.findByCode(workOrder.getStruct_code());
|
||||
JSONObject extData = JSONObject.parseObject(workOrder.getExt_data());
|
||||
// 0 组盘(涉及什么库区,通过工单对应的仓位的属性。)
|
||||
GroupPlate groupPlate = new GroupPlate();
|
||||
groupPlate.setGroup_id(IdUtil.getStringId());
|
||||
@@ -546,7 +551,6 @@ public class PdaJBServiceImpl implements PdaJBService {
|
||||
// 料桶类型根据工单,工单是根据点位
|
||||
groupPlate.setStoragevehicle_type(vehicleInfo.getStoragevehicle_type());
|
||||
groupPlate.setMaterial_id(workOrder.getMaterial_id());
|
||||
groupPlate.setPcsn(DateUtil.format(new Date(), "yyyy-MM-dd"));
|
||||
groupPlate.setQty(workOrder.getPlan_weight());
|
||||
groupPlate.setQty_unit_id("11");
|
||||
groupPlate.setQty_unit_name("kg");
|
||||
@@ -555,6 +559,9 @@ public class PdaJBServiceImpl implements PdaJBService {
|
||||
groupPlate.setCreate_id(currentUserId);
|
||||
groupPlate.setCreate_name(nickName);
|
||||
groupPlate.setCreate_time(now);
|
||||
groupPlate.setPcsn(extData.getString("pcsn"));
|
||||
groupPlate.setSupp_code(extData.getString("supp_code"));
|
||||
groupPlate.setSupp_name(extData.getString("supp_name"));
|
||||
groupplateService.save(groupPlate);
|
||||
// 1 创建退料入库单、明细单、分配单
|
||||
Map<String, Object> insertInvObj = new HashMap();
|
||||
|
||||
@@ -115,5 +115,4 @@ public class PdmBdWorkorder implements Serializable {
|
||||
|
||||
@TableField(exist = false)
|
||||
private String material_spec;
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package org.nl.wms.pm_manage.service.impl;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
|
||||
@@ -27,6 +27,10 @@ public enum TagNameEnum {
|
||||
* 解包手持下料
|
||||
*/
|
||||
PDA_JB_DOWN_MATERIAL("解包手持下料"),
|
||||
/**
|
||||
* 解包手持退料
|
||||
*/
|
||||
PDA_JB_BACK_MATERIAL("解包手持退料"),
|
||||
/**
|
||||
* 标记符号
|
||||
*/
|
||||
|
||||
@@ -85,9 +85,11 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="material_code" label="物料编码" width="160" />
|
||||
<el-table-column prop="material_name" label="物料名称" width="180" show-overflow-tooltip />
|
||||
<el-table-column prop="pcsn" label="物料批次" width="180" show-overflow-tooltip />
|
||||
<el-table-column prop="struct_code" label="仓位编码" width="160" />
|
||||
<el-table-column prop="storagevehicle_code" label="载具编码" width="160" />
|
||||
<el-table-column prop="qty_unit_name" label="单位" width="160" />
|
||||
<el-table-column prop="supp_name" label="供应商" width="160" />
|
||||
<!-- <el-table-column prop="raw_material_code" label="泥料编码" width="160" />-->
|
||||
<!-- <el-table-column prop="material_spec" label="物料规格" width="140" />-->
|
||||
<!-- <el-table-column prop="material_model" label="物料型号" width="140" />-->
|
||||
|
||||
@@ -391,25 +391,26 @@
|
||||
label="实际结束时间"
|
||||
:min-width="flexWidth('realproduceend_date',crud.data,'实际结束时间')"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="standing_time"
|
||||
label="静置时间(分钟)"
|
||||
:min-width="flexWidth('standing_time',crud.data,'静置时间(分钟)')"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="is_needmove"
|
||||
label="是否自动搬运"
|
||||
:min-width="flexWidth('is_needmove',crud.data,'是否自动搬运')"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.is_needmove ? '是' : '否' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="is_urgent" label="是否加急" :min-width="flexWidth('is_urgent',crud.data,'是否加急')">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.is_urgent ? '是' : '否' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column-->
|
||||
<!-- prop="standing_time"-->
|
||||
<!-- label="静置时间(分钟)"-->
|
||||
<!-- :min-width="flexWidth('standing_time',crud.data,'静置时间(分钟)')"-->
|
||||
<!-- />-->
|
||||
<!-- <el-table-column-->
|
||||
<!-- prop="is_needmove"-->
|
||||
<!-- label="是否自动搬运"-->
|
||||
<!-- :min-width="flexWidth('is_needmove',crud.data,'是否自动搬运')"-->
|
||||
<!-- >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ scope.row.is_needmove ? '是' : '否' }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="is_urgent" label="是否加急" :min-width="flexWidth('is_urgent',crud.data,'是否加急')">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ scope.row.is_urgent ? '是' : '否' }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column prop="operator" label="开工人" :min-width="flexWidth('operator',crud.data,'创建人')" />
|
||||
<el-table-column prop="create_name" label="创建人" :min-width="flexWidth('create_name',crud.data,'创建人')" />
|
||||
<el-table-column
|
||||
prop="create_time"
|
||||
@@ -491,7 +492,7 @@ const defaultForm = {
|
||||
real_weight: 0,
|
||||
plan_weight: 0,
|
||||
guadansum: 0,
|
||||
ext_data: 0,
|
||||
ext_data: null,
|
||||
priority: 1,
|
||||
show: false
|
||||
}
|
||||
@@ -571,15 +572,6 @@ 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
|
||||
this.form.custer_no = ext.custer_no
|
||||
}
|
||||
},
|
||||
getWorkShopList() { // 获取车间列表
|
||||
|
||||
},
|
||||
@@ -625,19 +617,25 @@ export default {
|
||||
this.form.struct_code = row.struct_code
|
||||
this.form.raw_material_code = row.storagevehicle_code
|
||||
this.form.plan_weight = row.qty
|
||||
const ext = {
|
||||
pcsn: row.pcsn,
|
||||
supp_code: row.supp_code,
|
||||
supp_name: row.supp_name
|
||||
}
|
||||
this.form.ext_data = JSON.stringify(ext)
|
||||
}
|
||||
},
|
||||
clearRecordMesOrder() {
|
||||
this.form.order_no = null
|
||||
this.form.order_subnum = 0
|
||||
this.form.guadansum = 0
|
||||
},
|
||||
recordMesOrder(row) { // 操作mes工单
|
||||
this.clearRecordMesOrder()
|
||||
this.form.order_no = row.forder_NO
|
||||
this.form.order_subnum = row.forder_SUBNUM
|
||||
this.form.guadansum = row.guadansum
|
||||
},
|
||||
// clearRecordMesOrder() {
|
||||
// this.form.order_no = null
|
||||
// this.form.order_subnum = 0
|
||||
// this.form.guadansum = 0
|
||||
// },
|
||||
// recordMesOrder(row) { // 操作mes工单
|
||||
// this.clearRecordMesOrder()
|
||||
// this.form.order_no = row.forder_NO
|
||||
// this.form.order_subnum = row.forder_SUBNUM
|
||||
// this.form.guadansum = row.guadansum
|
||||
// },
|
||||
setRegionName(data) {
|
||||
// 清空
|
||||
this.form.point_code = null
|
||||
@@ -660,28 +658,28 @@ export default {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
// 下发
|
||||
submits(row) {
|
||||
this.fullscreenLoading = true
|
||||
crudPdmBdWorkorder.submits(row).then(res => {
|
||||
this.crud.notify('下发成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
}).finally(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
synchronize() {
|
||||
this.fullscreenLoading = true
|
||||
crudPdmBdWorkorder.orderSynchronize(this.crud.query).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
this.crud.notify('同步成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
}).finally(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
// submits(row) {
|
||||
// this.fullscreenLoading = true
|
||||
// crudPdmBdWorkorder.submits(row).then(res => {
|
||||
// this.crud.notify('下发成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
// this.crud.toQuery()
|
||||
// }).catch(() => {
|
||||
// this.fullscreenLoading = false
|
||||
// }).finally(() => {
|
||||
// this.fullscreenLoading = false
|
||||
// })
|
||||
// },
|
||||
// synchronize() {
|
||||
// this.fullscreenLoading = true
|
||||
// crudPdmBdWorkorder.orderSynchronize(this.crud.query).then(res => {
|
||||
// this.fullscreenLoading = false
|
||||
// this.crud.notify('同步成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
// }).catch(() => {
|
||||
// this.fullscreenLoading = false
|
||||
// }).finally(() => {
|
||||
// this.fullscreenLoading = false
|
||||
// })
|
||||
// },
|
||||
forceFinish(row) {
|
||||
this.fullscreenLoading = true
|
||||
crudPdmBdWorkorder.forceFinish(row).then(res => {
|
||||
|
||||
Reference in New Issue
Block a user