Browse Source

美化

master
张江玮 2 years ago
parent
commit
4f268e50aa
  1. 54
      wms/hd/nladmin-system/src/main/java/org/nl/wms/common/StructFindUtil.java
  2. 14
      wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java
  3. 14
      wms/hd/nladmin-system/src/main/java/org/nl/wms/sch/manage/buss/CallEmptyVehicleTask.java
  4. 9
      wms/hd/nladmin-system/src/main/java/org/nl/wms/sch/manage/buss/CallMaterialTask.java
  5. 14
      wms/hd/nladmin-system/src/main/java/org/nl/wms/sch/manage/buss/SendEmptyVehicleTask.java

54
wms/hd/nladmin-system/src/main/java/org/nl/wms/common/StructFindUtil.java

@ -59,11 +59,15 @@ public class StructFindUtil {
if (StrUtil.isEmpty(workprocedure_id)) {
throw new BadRequestException("工序不能为空!");
}
JSONObject result = WQL.getWO("QSTRUCT_RULE").addParam("flag", "3")
.addParam("material_id", material_id).addParam("area_type", area_type)
JSONObject result = WQL
.getWO("QSTRUCT_RULE")
.addParam("flag", "3")
.addParam("material_id", material_id)
.addParam("area_type", area_type)
.addParam("vehicle_type", vehicle_type)
.addParam("is_full", is_full).addParam("workprocedure_id", workprocedure_id)
.process().uniqueResult(0);
.process()
.uniqueResult(0);
return result;
}
@ -74,12 +78,20 @@ public class StructFindUtil {
if (StrUtil.isEmpty(vehicle_code)) {
throw new BadRequestException("托盘不能为空!");
}
if (StrUtil.equals(point_code, "KGTPDDW05")) {
JSONArray pointarr = WQL.getWO("ACSTOMES_001").addParam("area_type", AreaEnum.KGTCPQ.getCode()).addParam("flag", "2").process().getResultJSONArray(0);
if (StrUtil.equals(point_code, "KGTDDW05")) {
JSONArray pointarr = WQL
.getWO("ACSTOMES_001")
.addParam("area_type", AreaEnum.KGTCPQ.getCode())
.addParam("flag", "2")
.process()
.getResultJSONArray(0);
PointUpdateUtil.updatePoint(pointarr);
}
//根据托盘找托盘类型,
JSONObject vehicleObj = WQLObject.getWQLObject("md_pb_vehicle").query("vehicle_code='" + vehicle_code + "'").uniqueResult(0);
JSONObject vehicleObj = WQLObject
.getWQLObject("md_pb_vehicle")
.query("vehicle_code='" + vehicle_code + "'")
.uniqueResult(0);
if (ObjectUtil.isEmpty(vehicleObj)) {
throw new BadRequestException("未找到托盘号为'" + vehicle_code + "' 托盘信息!");
}
@ -87,11 +99,14 @@ public class StructFindUtil {
throw new BadRequestException("区域不能为空!");
}
String vehice_type = vehicleObj.getString("vehicle_type");
JSONObject result = WQL.getWO("QSTRUCT_RULE").addParam("flag", "4")
JSONObject result = WQL
.getWO("QSTRUCT_RULE")
.addParam("flag", "4")
.addParam("area_type", area_type)
.addParam("vehice_type", vehice_type)
.addParam("point_code", point_code)
.process().uniqueResult(0);
.process()
.uniqueResult(0);
return result;
}
@ -101,9 +116,12 @@ public class StructFindUtil {
String point_code = jsonObject.getString("point_code");
//如果是堆叠位5 需要更新 设备状态
if(StrUtil.equals(point_code,"KGTDDW05")){
JSONArray pointarr = WQL.getWO("ACSTOMES_001")
JSONArray pointarr = WQL
.getWO("ACSTOMES_001")
.addParam("area_type", AreaEnum.KGTCPQ.getCode())
.addParam("flag", "2").process().getResultJSONArray(0);
.addParam("flag", "2")
.process()
.getResultJSONArray(0);
PointUpdateUtil.updatePoint(pointarr);
}
@ -113,19 +131,23 @@ public class StructFindUtil {
JSONObject result = new JSONObject();
//如果是堆叠位5 需要更新 设备状态
if (StrUtil.equals(point_code, "KGTDDW05")) {
JSONArray pointarr = WQL.getWO("ACSTOMES_001").addParam("area_type", AreaEnum.KGTCPQ.getCode()).addParam("flag", "2").process().getResultJSONArray(0);
PointUpdateUtil.updatePoint(pointarr);
result = WQL.getWO("QSTRUCT_RULE").addParam("flag", "6")
result = WQL
.getWO("QSTRUCT_RULE")
.addParam("flag", "6")
.addParam("area_type", area_type)
.addParam("vehicle_type", vehicle_type)
.addParam("point_code", point_code)
.process().uniqueResult(0);
.process()
.uniqueResult(0);
} else {
result = WQL.getWO("QSTRUCT_RULE").addParam("flag", "5")
result = WQL
.getWO("QSTRUCT_RULE")
.addParam("flag", "5")
.addParam("area_type", area_type)
.addParam("vehicle_type", vehicle_type)
.addParam("point_code", point_code)
.process().uniqueResult(0);
.process()
.uniqueResult(0);
}
return result;

14
wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java

@ -122,11 +122,19 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
produceInfoByCode = this.getProduceInfoByCode(device_code);
String material_id = produceInfoByCode.getString("material_id");
String cust_id = produceInfoByCode.getString("cust_id");
String workprocedure_id = WorkProcedureEnum.YZGX.getId();
JSONObject jsonObject1 = WQL.getWO("ACSTOMES_001").addParam("flag", "1")
String workprocedure_id;
if (device_code.startsWith("Y")) {
workprocedure_id = WorkProcedureEnum.YZGX.getId();
} else {
workprocedure_id = WorkProcedureEnum.FJGX.getId();
}
JSONObject jsonObject1 = WQL
.getWO("ACSTOMES_001")
.addParam("flag", "1")
.addParam("workprocedure_id", workprocedure_id)
.addParam("material_id", material_id)
.process().uniqueResult(0);
.process()
.uniqueResult(0);
if (ObjectUtil.isNotEmpty(jsonObject1)) {
//如果有库存,则出半满托盘
//叫料出库

14
wms/hd/nladmin-system/src/main/java/org/nl/wms/sch/manage/buss/CallEmptyVehicleTask.java

@ -188,8 +188,8 @@ public class CallEmptyVehicleTask extends AbstractAcsTask {
String vehicle_type = form.getString("vehicle_type");
WQLObject taskTable = WQLObject.getWQLObject("sch_base_task");
//判断起点有没有未完成的指令
JSONObject beforTaskObj = taskTable.
query("is_delete='0' and next_point_code='" + next_point_code + "' and task_status <>'" + TaskStatusEnum.FINISHED.getCode() + "'")
JSONObject beforTaskObj = taskTable
.query("is_delete='0' and next_point_code='" + next_point_code + "' and task_status <>'" + TaskStatusEnum.FINISHED.getCode() + "'")
.uniqueResult(0);
if (ObjectUtil.isNotEmpty(beforTaskObj)) {
throw new BadRequestException("存在指令号为'" + beforTaskObj.getString("task_code") + "' 未完成!");
@ -197,8 +197,12 @@ public class CallEmptyVehicleTask extends AbstractAcsTask {
String start_area = "";
//假如起点为空,根据终点点去找对应工序需要的托盘类型
if (StrUtil.isEmpty(start_point_code)) {
JSONObject workInfo = WQL.getWO("QSTRUCT_RULE").addParam("flag", "1").addParam("code", next_point_code)
.process().uniqueResult(0);
JSONObject workInfo = WQL
.getWO("QSTRUCT_RULE")
.addParam("flag", "1")
.addParam("code", next_point_code)
.process()
.uniqueResult(0);
String workprocedure_id = workInfo.getString("workprocedure_id");
String device_id = workInfo.getString("device_id");
WorkProcedureEnum workProcedureEnum = WorkProcedureEnum.get(workprocedure_id);
@ -224,7 +228,7 @@ public class CallEmptyVehicleTask extends AbstractAcsTask {
case FJGX:
//托盘类型取当前工单生产的托盘类型
vehicle_type = WQLObject.getWQLObject("PDM_MG_produceTask").query("device_id='" + device_id + "' and producetask_status='04'").uniqueResult(0).getString("vehicle_type");
start_area = AreaEnum.CYZC.getCode();
start_area = AreaEnum.RGCPQ.getCode();
is_auto_issue = "0";
break;
//叠盘工序

9
wms/hd/nladmin-system/src/main/java/org/nl/wms/sch/manage/buss/CallMaterialTask.java

@ -199,13 +199,16 @@ public class CallMaterialTask extends AbstractAcsTask {
WQLObject iosTable = WQLObject.getWQLObject("ST_IVT_workProcedureIOS");
if (StrUtil.isNotEmpty(start_point_code)) {
if (StrUtil.isEmpty(iostorinv_id)) {
throw new BadRequestException("库单据号不能为空!");
throw new BadRequestException("库单据号不能为空!");
}
JSONObject IosObj = iosTable.query("iostorinv_id='" + iostorinv_id + "'").uniqueResult(0);
IosObj.put("bill_status", "20");
iosTable.update(IosObj);
PointDto StartPoint = pointService.findByCode(start_point_code);
JSONObject ivtObj = WQLObject.getWQLObject("ST_IVT_StructIvt").query("struct_id='" + StartPoint.getPoint_id() + "'").uniqueResult(0);
JSONObject ivtObj = WQLObject
.getWQLObject("ST_IVT_StructIvt")
.query("struct_id='" + StartPoint.getPoint_id() + "'")
.uniqueResult(0);
if (ObjectUtil.isEmpty(ivtObj)) {
throw new BadRequestException("仓位为'" + StartPoint.getPoint_code() + "'的库存信息不存在!");
}
@ -215,7 +218,7 @@ public class CallMaterialTask extends AbstractAcsTask {
}
PointDto nextPoint = pointService.findByCode(next_point_code);
//如果没给起点,根据点去找工序,找一个合适的仓位 并且生成出库单,并且锁定点位
//如果没给起点,根据点去找工序,找一个合适的仓位 并且生成出库单,并且锁定点位
if (StrUtil.isEmpty(start_point_code)) {
if (StrUtil.isEmpty(workprocedure_id)) {
JSONObject workInfo = WQL

14
wms/hd/nladmin-system/src/main/java/org/nl/wms/sch/manage/buss/SendEmptyVehicleTask.java

@ -163,8 +163,12 @@ public class SendEmptyVehicleTask extends AbstractAcsTask {
}
//根据起点去找工序,找一个合适的仓位 并且生成单据
if (StrUtil.isEmpty(next_point_code)) {
JSONObject workInfo = WQL.getWO("QSTRUCT_RULE").addParam("flag", "1").addParam("code", start_point_code)
.process().uniqueResult(0);
JSONObject workInfo = WQL
.getWO("QSTRUCT_RULE")
.addParam("flag", "1")
.addParam("code", start_point_code)
.process()
.uniqueResult(0);
String workprocedure_code = workInfo.getString("workInfo");
String workprocedure_id = workInfo.getString("workprocedure_id");
WorkProcedureEnum workProcedureEnum = WorkProcedureEnum.get(workprocedure_id);
@ -175,7 +179,7 @@ public class SendEmptyVehicleTask extends AbstractAcsTask {
break;
// 压制工序
case YZGX:
next_area = AreaEnum.CYHJ.getCode();
next_area = AreaEnum.KLHJ.getCode();
break;
//烧制工序
case SZGX:
@ -211,7 +215,9 @@ public class SendEmptyVehicleTask extends AbstractAcsTask {
//锁定终点
HashMap lock_map = new HashMap();
lock_map.put("lock_type", "01");
WQLObject.getWQLObject("sch_base_point").update(lock_map, "point_code = '" + next_point_code + "'");
WQLObject
.getWQLObject("sch_base_point")
.update(lock_map, "point_code = '" + next_point_code + "'");
}
String task_id = IdUtil.getSnowflake(1, 1).nextId() + "";

Loading…
Cancel
Save