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