代码更新

This commit is contained in:
ludj
2022-11-15 10:18:38 +08:00
parent ca73881518
commit 1091e3cdc5
4 changed files with 43 additions and 32 deletions

View File

@@ -185,6 +185,7 @@ public class BigScreenServiceImpl implements BigScreenService {
//配方-批次-重量(YC-B8-1000)
String material_ivt_info = labelObj.getString("formula") + "-" + labelObj.getString("pcsn") + "-" + labelObj.getString("weight");
json.put("material_ivt_info", material_ivt_info);
json.put("color", labelObj.getString("color"));
}
}

View File

@@ -405,6 +405,7 @@ IF 输入.flag = "8"
FROM
md_base_materialLabelDtl dtl
LEFT JOIN md_base_materialLabelMst mst ON dtl.label_uuid = mst.label_uuid
where 1=1
OPTION 输入.labeldtl_uuid <> ""
dtl.labeldtl_uuid = 输入.labeldtl_uuid
ENDOPTION

View File

@@ -57,44 +57,53 @@ public class DumpInvTask extends AbstractAcsTask {
//更新转储单状态相关信息
JSONObject dumpObj = dumpInvTab.query("task_uuid = '" + taskObj.optString("task_uuid") + "'").uniqueResult(0);
dumpObj.put("update_time", DateUtil.now());
dumpObj.put("bill_status", DumpInvBillStatusEnum.FINISHED.getCode());
dumpObj.put("update_by", SecurityUtils.getCurrentUsername());
dumpInvTab.update(dumpObj);
if (ObjectUtil.isNotEmpty(dumpObj)){
dumpObj.put("update_time", DateUtil.now());
dumpObj.put("bill_status", DumpInvBillStatusEnum.FINISHED.getCode());
dumpObj.put("update_by", SecurityUtils.getCurrentUsername());
dumpInvTab.update(dumpObj);
}
//解锁相关货位
// 点位基础表【sch_base_point】
WQLObject pointTab = WQLObject.getWQLObject("sch_base_point");
JSONObject startPoint = pointTab.query("point_uuid = '" + dumpObj.optString("turnout_struct_uuid") + "'").uniqueResult(0);
JSONObject startPoint = pointTab.query("point_code='" + taskObj.optString("start_point_code") + "'").uniqueResult(0);
startPoint.put("lock_type", "00");
startPoint.put("point_status", "00");
startPoint.put("vehicle_code", "");
pointTab.update(startPoint);
JSONObject nextPoint = pointTab.query("point_uuid = '" + dumpObj.optString("turnin_struct_uuid") + "'").uniqueResult(0);
JSONObject nextPoint = pointTab.query("point_code='" + taskObj.optString("next_point_code") + "'").uniqueResult(0);
nextPoint.put("lock_type", "00");
nextPoint.put("point_status", "02");
nextPoint.put("vehicle_code", dumpObj.optString("vehicle_code"));
nextPoint.put("vehicle_code", taskObj.optString("vehicle_code"));
pointTab.update(nextPoint);
//更新库存,因为是转储,直接更新货位即可
//仓位库存表【st_ivt_structIvt】
WQLObject ivtTab = WQLObject.getWQLObject("st_ivt_structIvt");
JSONObject turnOutIvtObj = ivtTab.query("struct_uuid = '" + dumpObj.optString("turnout_struct_uuid") + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(turnOutIvtObj)) throw new BadRequestException("库存已不存在,操作失败!");
if (ObjectUtil.isNotEmpty(dumpObj)){
JSONObject turnOutIvtObj = ivtTab.query("struct_uuid = '" + dumpObj.optString("turnout_struct_uuid") + "'").uniqueResult(0);
StoreIvtServiceImpl ivtService = new StoreIvtServiceImpl();
JSONObject ivtObj = new JSONObject();
ivtObj.put("struct_uuid", dumpObj.optString("turnout_struct_uuid"));
ivtObj.put("label_uuid", turnOutIvtObj.optString("label_uuid"));
ivtObj.put("label_code", turnOutIvtObj.optString("label_code"));
ivtObj.put("labeldtl_uuid", turnOutIvtObj.optString("labeldtl_uuid"));
ivtObj.put("change_weight", turnOutIvtObj.optString("canuse_weight"));
ivtObj.put("change_qty", turnOutIvtObj.optString("canuse_qty"));
ivtObj.put("material_uuid", turnOutIvtObj.optString("material_uuid"));
ivtObj.put("vehicle_code", turnOutIvtObj.optString("vehicle_code"));
ivtObj.put("qty_unit_uuid", turnOutIvtObj.optString("qty_unit_uuid"));
ivtObj.put("weight_unit_uuid", turnOutIvtObj.optString("weight_unit_uuid"));
if (!ObjectUtil.isEmpty(turnOutIvtObj)){
StoreIvtServiceImpl ivtService = new StoreIvtServiceImpl();
JSONObject ivtObj = new JSONObject();
ivtObj.put("struct_uuid", dumpObj.optString("turnout_struct_uuid"));
ivtObj.put("label_uuid", turnOutIvtObj.optString("label_uuid"));
ivtObj.put("label_code", turnOutIvtObj.optString("label_code"));
ivtObj.put("labeldtl_uuid", turnOutIvtObj.optString("labeldtl_uuid"));
ivtObj.put("change_weight", turnOutIvtObj.optString("canuse_weight"));
ivtObj.put("change_qty", turnOutIvtObj.optString("canuse_qty"));
ivtObj.put("material_uuid", turnOutIvtObj.optString("material_uuid"));
ivtObj.put("vehicle_code", turnOutIvtObj.optString("vehicle_code"));
ivtObj.put("qty_unit_uuid", turnOutIvtObj.optString("qty_unit_uuid"));
ivtObj.put("weight_unit_uuid", turnOutIvtObj.optString("weight_unit_uuid"));
//转入仓位加库存
ivtService.addIvtFlow(ivtObj, IvtChangeTypeEnum.ADD_IVT_AND_CAN_USE);
}
}
//转出仓位扣减库存
/*ivtService.addIvtFlow(ivtObj, IvtChangeTypeEnum.SUB_IVT_AND_CAN_USE);
@@ -102,8 +111,7 @@ public class DumpInvTask extends AbstractAcsTask {
WQLObject.getWQLObject("st_ivt_structIvt").delete("struct_uuid = '"+startPoint.getString("point_uuid")+"'");
//转入仓位加库存
ivtService.addIvtFlow(ivtObj, IvtChangeTypeEnum.ADD_IVT_AND_CAN_USE);
}
}
@@ -135,7 +143,6 @@ public class DumpInvTask extends AbstractAcsTask {
taskObj.put("next_point_code", param.optString("next_point_code"));
taskObj.put("vehicle_code", param.optString("vehicle_code"));
taskObj.put("handle_class", THIS_CLASS);
taskObj.put("task_uuid", IdUtil.simpleUUID());
taskObj.put("create_time", DateUtil.now());
taskObj.put("update_by", SecurityUtils.getCurrentUsername());
taskObj.put("create_by", SecurityUtils.getCurrentUsername());
@@ -191,7 +198,6 @@ public class DumpInvTask extends AbstractAcsTask {
taskObj.put("next_point_code", nextPoint.optString("point_code"));
taskObj.put("vehicle_code", startPoint.optString("vehicle_code"));
taskObj.put("handle_class", THIS_CLASS);
taskObj.put("task_uuid", IdUtil.simpleUUID());
taskObj.put("create_time", DateUtil.now());
taskObj.put("update_by", SecurityUtils.getCurrentUsername());
taskObj.put("create_by", SecurityUtils.getCurrentUsername());

View File

@@ -51,25 +51,28 @@ public class InEmptyVehicleTask extends AbstractAcsTask {
//更新空载具表状态
JSONObject jsonEtv = etvTab.query("task_uuid='" + taskObj.optString("task_uuid") + "'").uniqueResult(0);
jsonEtv.put("update_by", SecurityUtils.getCurrentUsername());
jsonEtv.put("update_time", DateUtil.now());
jsonEtv.put("bill_status", EmptyVehicleBillStatusEnum.FINISHED.getCode());
etvTab.update(jsonEtv);
if (ObjectUtil.isNotEmpty(jsonEtv)){
jsonEtv.put("update_by", SecurityUtils.getCurrentUsername());
jsonEtv.put("update_time", DateUtil.now());
jsonEtv.put("bill_status", EmptyVehicleBillStatusEnum.FINISHED.getCode());
etvTab.update(jsonEtv);
}
//解锁货位
WQLObject pointTab = WQLObject.getWQLObject("sch_base_point");
//解锁起始点位
JSONObject startPoint = pointTab.query("point_code='" + jsonEtv.optString("start_point_code") + "'").uniqueResult(0);
JSONObject startPoint = pointTab.query("point_code='" + taskObj.optString("start_point_code") + "'").uniqueResult(0);
startPoint.put("lock_type", "00");
startPoint.put("point_status", "00");
startPoint.put("vehicle_code", "");
pointTab.update(startPoint);
//解锁下一点位
JSONObject nextPoint = pointTab.query("point_code='" + jsonEtv.optString("next_point_code") + "'").uniqueResult(0);
JSONObject nextPoint = pointTab.query("point_code='" + taskObj.optString("next_point_code") + "'").uniqueResult(0);
nextPoint.put("lock_type", "00");
nextPoint.put("point_status", "01");
nextPoint.put("vehicle_code", jsonEtv.optString("vehicle_code"));
nextPoint.put("vehicle_code", taskObj.optString("vehicle_code"));
pointTab.update(nextPoint);
}