opt: LMS解包区

This commit is contained in:
2025-08-13 20:31:19 +08:00
parent 0f2cb09f22
commit 29b7fcd03e
7 changed files with 76 additions and 166 deletions

View File

@@ -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();

View File

@@ -115,5 +115,4 @@ public class PdmBdWorkorder implements Serializable {
@TableField(exist = false)
private String material_spec;
}

View File

@@ -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;

View File

@@ -27,6 +27,10 @@ public enum TagNameEnum {
* 解包手持下料
*/
PDA_JB_DOWN_MATERIAL("解包手持下料"),
/**
* 解包手持退料
*/
PDA_JB_BACK_MATERIAL("解包手持退料"),
/**
* 标记符号
*/