描述修改

This commit is contained in:
2023-02-05 13:28:53 +08:00
parent 0a9161f770
commit 619b93963c
7 changed files with 35 additions and 26 deletions

View File

@@ -71,7 +71,7 @@ public class CasingServiceImpl implements CasingService {
JSONArray rows = whereJson.getJSONArray("cut_rows"); JSONArray rows = whereJson.getJSONArray("cut_rows");
if (rows.size() > 2) { if (rows.size() > 2) {
throw new BadRequestException("最多选择两个子卷进行操作!"); throw new BadRequestException("最多选择两个分切计划进行操作!");
} }
String split_group = ""; String split_group = "";
@@ -96,18 +96,18 @@ public class CasingServiceImpl implements CasingService {
} }
} else { } else {
if (!split_group.equals(row.getString("split_group"))) { if (!split_group.equals(row.getString("split_group"))) {
throw new BadRequestException("两个子卷的分切组必须相同!"); throw new BadRequestException("两个分切计划的分切组必须相同!");
} }
if (!resource_name.equals(row.getString("resource_name"))) { if (!resource_name.equals(row.getString("resource_name"))) {
throw new BadRequestException("两个子卷的机台编号必须相同!"); throw new BadRequestException("两个分切计划的机台编号必须相同!");
} }
if (order_type.equals("1")) { if (order_type.equals("1")) {
if (!parent_container_name.equals(row.getString("parent_container_name"))) { if (!parent_container_name.equals(row.getString("parent_container_name"))) {
throw new BadRequestException("两个子卷的母卷号必须相同!"); throw new BadRequestException("两个分切计划的母卷号必须相同!");
} }
} else { } else {
if (!restruct_container_name.equals(row.getString("restruct_container_name")) || !package_box_sn.equals(row.getString("package_box_sn"))) { if (!restruct_container_name.equals(row.getString("restruct_container_name")) || !package_box_sn.equals(row.getString("package_box_sn"))) {
throw new BadRequestException("两个子卷的改制子卷必须相同!"); throw new BadRequestException("两个分切计划的改制来源子卷必须相同!");
} }
} }
} }

View File

@@ -99,7 +99,7 @@ public class FeedingServiceImpl implements FeedingService {
JSONObject mater_jo = WQLObject.getWQLObject("md_me_materialbase").query("material_code = '" + raw_jo.getString("product_name") + "'").uniqueResult(0); JSONObject mater_jo = WQLObject.getWQLObject("md_me_materialbase").query("material_code = '" + raw_jo.getString("product_name") + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(mater_jo)) { if (ObjectUtil.isEmpty(mater_jo)) {
throw new BadRequestException("未查询到物料:" + raw_jo.getString("product_name") + "信息!"); throw new BadRequestException("未查询到物料:" + raw_jo.getString("product_name") + "基础信息!");
} }
//创建任务,判断目的点是否存在空轴存在创建4个点的任务不存在则创建两个点任务 //创建任务,判断目的点是否存在空轴存在创建4个点的任务不存在则创建两个点任务
@@ -186,14 +186,14 @@ public class FeedingServiceImpl implements FeedingService {
//查询该物料 //查询该物料
JSONObject mater_jo = WQLObject.getWQLObject("md_me_materialbase").query("material_code = '" + sub_jo.getString("product_name") + "'").uniqueResult(0); JSONObject mater_jo = WQLObject.getWQLObject("md_me_materialbase").query("material_code = '" + sub_jo.getString("product_name") + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(mater_jo)) { if (ObjectUtil.isEmpty(mater_jo)) {
throw new BadRequestException("未查询到物料:" + sub_jo.getString("product_name") + "信息!"); throw new BadRequestException("未查询到物料:" + sub_jo.getString("product_name") + "基础信息!");
} }
dtl.put("material_id", mater_jo.getString("material_id")); dtl.put("material_id", mater_jo.getString("material_id"));
dtl.put("pcsn", plan_jo.getString("restruct_container_name")); dtl.put("pcsn", plan_jo.getString("restruct_container_name"));
dtl.put("box_no", package_box_sn); dtl.put("box_no", package_box_sn);
JSONObject unit = WQLObject.getWQLObject("md_pb_measureunit").query("measure_unit_id = '" + mater_jo.getString("base_unit_id") + "'").uniqueResult(0); JSONObject unit = WQLObject.getWQLObject("md_pb_measureunit").query("measure_unit_id = '" + mater_jo.getString("base_unit_id") + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(unit)) { if (ObjectUtil.isEmpty(unit)) {
throw new BadRequestException("未查询到物料计量单位:" + mater_jo.getString("base_unit_id") + "信息!"); throw new BadRequestException("未查询到物料计量单位:" + mater_jo.getString("base_unit_id") + "基础信息!");
} }
dtl.put("qty_unit_id", unit.getString("measure_unit_id")); dtl.put("qty_unit_id", unit.getString("measure_unit_id"));
dtl.put("qty_unit_name", unit.getString("unit_name")); dtl.put("qty_unit_name", unit.getString("unit_name"));

View File

@@ -30,12 +30,16 @@ public class OutServiceImpl implements OutService {
@Override @Override
public JSONObject queryMaterialInfo(JSONObject whereJson) { public JSONObject queryMaterialInfo(JSONObject whereJson) {
String product_area = whereJson.getString("product_area"); String product_area = whereJson.getString("product_area");
String device_code = whereJson.getString("device_code");
HashMap map = new HashMap(); HashMap map = new HashMap();
map.put("flag", "5"); map.put("flag", "5");
if (StrUtil.isNotEmpty(product_area)) { if (StrUtil.isNotEmpty(product_area)) {
map.put("product_area", product_area); map.put("product_area", product_area);
} }
if (StrUtil.isNotEmpty(device_code)) {
map.put("device_code", device_code);
}
JSONArray rows = WQL.getWO("PDA_02").addParamMap(map).process().getResultJSONArray(0); JSONArray rows = WQL.getWO("PDA_02").addParamMap(map).process().getResultJSONArray(0);
JSONObject jo = new JSONObject(); JSONObject jo = new JSONObject();
jo.put("data", rows); jo.put("data", rows);
@@ -186,7 +190,7 @@ public class OutServiceImpl implements OutService {
//如果查询到给ACS下发一个输送线任务 //如果查询到给ACS下发一个输送线任务
JSONObject form = new JSONObject(); JSONObject form = new JSONObject();
form.put("point_code1", point_code); form.put("point_code1", point_code);
JSONObject convey_jo = WQLObject.getWQLObject("").query("point_code = '" + point_code + "'").uniqueResult(0); JSONObject convey_jo = WQLObject.getWQLObject("st_ivt_deliverypointivt").query("point_code = '" + point_code + "'").uniqueResult(0);
JSONObject ss_jo = WQLObject.getWQLObject("sch_base_point").query("product_area = '" + convey_jo.getString("product_area") + "' AND point_type = '7'").uniqueResult(0); JSONObject ss_jo = WQLObject.getWQLObject("sch_base_point").query("product_area = '" + convey_jo.getString("product_area") + "' AND point_type = '7'").uniqueResult(0);
form.put("point_code2", ss_jo.getString("point_code")); form.put("point_code2", ss_jo.getString("point_code"));
form.put("task_type", "010401"); form.put("task_type", "010401");

View File

@@ -81,11 +81,11 @@ public class ShippingServiceImpl implements ShippingService {
JSONArray rows = whereJson.getJSONArray("cut_rows"); JSONArray rows = whereJson.getJSONArray("cut_rows");
String vehicle_code = whereJson.getString("vehicle_code"); String vehicle_code = whereJson.getString("vehicle_code");
if (StrUtil.isEmpty(vehicle_code)){ if (StrUtil.isEmpty(vehicle_code)){
throw new BadRequestException("载具号不能为空!"); throw new BadRequestException("输入的载具号不能为空!");
} }
if (rows.size() > 2) { if (rows.size() > 2) {
throw new BadRequestException("最多选择两个子卷进行操作!"); throw new BadRequestException("最多选择两个分切计划进行操作!");
} }
String split_group = ""; String split_group = "";
@@ -110,18 +110,18 @@ public class ShippingServiceImpl implements ShippingService {
} }
} else { } else {
if (!split_group.equals(row.getString("split_group"))) { if (!split_group.equals(row.getString("split_group"))) {
throw new BadRequestException("两个子卷的分切组必须相同!"); throw new BadRequestException("两个分切计划的分切组必须相同!");
} }
if (!resource_name.equals(row.getString("resource_name"))) { if (!resource_name.equals(row.getString("resource_name"))) {
throw new BadRequestException("两个子卷的机台编号必须相同!"); throw new BadRequestException("两个分切计划的机台编号必须相同!");
} }
if (order_type.equals("1")) { if (order_type.equals("1")) {
if (!parent_container_name.equals(row.getString("parent_container_name"))) { if (!parent_container_name.equals(row.getString("parent_container_name"))) {
throw new BadRequestException("两个子卷的母卷号必须相同!"); throw new BadRequestException("两个分切计划的母卷号必须相同!");
} }
} else { } else {
if (!restruct_container_name.equals(row.getString("restruct_container_name")) || !package_box_sn.equals(row.getString("package_box_sn"))) { if (!restruct_container_name.equals(row.getString("restruct_container_name")) || !package_box_sn.equals(row.getString("package_box_sn"))) {
throw new BadRequestException("两个子卷的改制子卷必须相同!"); throw new BadRequestException("两个分切计划的改制子卷必须相同!");
} }
} }
} }
@@ -266,7 +266,7 @@ public class ShippingServiceImpl implements ShippingService {
.addParam("sql_str", " ORDER BY point_code") .addParam("sql_str", " ORDER BY point_code")
.process().uniqueResult(0); .process().uniqueResult(0);
if (ObjectUtil.isEmpty(point_jo)) { if (ObjectUtil.isEmpty(point_jo)) {
throw new BadRequestException("对应输送线不存在可用空位!"); throw new BadRequestException("对应输送线不存在可用空位!");
} }
//如果为左边点位判断右边是否存在未完成的任务,如果有则提示不能下发 //如果为左边点位判断右边是否存在未完成的任务,如果有则提示不能下发
@@ -339,6 +339,8 @@ public class ShippingServiceImpl implements ShippingService {
tran_jo.put("vehicle_code2", del_jo.getString("vehicle_code")); tran_jo.put("vehicle_code2", del_jo.getString("vehicle_code"));
tran_jo.put("task_type", "010406"); tran_jo.put("task_type", "010406");
cutConveyorTask.createTask(tran_jo); cutConveyorTask.createTask(tran_jo);
}else {
throw new BadRequestException("该点位所在输送线对应的上料位存在载具,不能横移!");
} }
} }
JSONObject jo = new JSONObject(); JSONObject jo = new JSONObject();
@@ -366,7 +368,7 @@ public class ShippingServiceImpl implements ShippingService {
JSONObject vehicle_area = WQLObject.getWQLObject("md_pb_vehiclearea").query("product_area = '" + product_area + "' AND point_location = '" + point_location + "' AND vehicle_code = '" + vehicle_code + "'").uniqueResult(0); JSONObject vehicle_area = WQLObject.getWQLObject("md_pb_vehiclearea").query("product_area = '" + product_area + "' AND point_location = '" + point_location + "' AND vehicle_code = '" + vehicle_code + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(vehicle_area)) { if (ObjectUtil.isEmpty(vehicle_area)) {
throw new BadRequestException("载具号【" + vehicle_code + "无法放到区域【" + product_area + "的位置【" + point_location + "上!"); throw new BadRequestException("载具号【" + vehicle_code + "不存在区域【" + product_area + "所在的半段输送线位置上!");
} }
//判断当前输送线上是否超过最大负荷任务数量组3组 //判断当前输送线上是否超过最大负荷任务数量组3组

View File

@@ -188,6 +188,9 @@
OPTION 输入.product_area <> "" OPTION 输入.product_area <> ""
ivt.product_area = 输入.product_area ivt.product_area = 输入.product_area
ENDOPTION ENDOPTION
OPTION 输入.device_code <> ""
ivt.point_code = 输入.device_code
ENDOPTION
ENDSELECT ENDSELECT
ENDQUERY ENDQUERY
ENDIF ENDIF
@@ -505,7 +508,7 @@
OPTION 输入.ext_code <> "" OPTION 输入.ext_code <> ""
plan.resource_name = 输入.ext_code plan.resource_name = 输入.ext_code
ENDOPTION ENDOPTION
order by plan.split_group,del.point_code order by plan.manufacture_sort,plan.split_group,del.point_code
ENDSELECT ENDSELECT
ENDQUERY ENDQUERY
ENDIF ENDIF

View File

@@ -149,10 +149,10 @@ public class ProductInstorServiceImpl implements ProductInstorService {
if (!is_virtual.equals("1")) { if (!is_virtual.equals("1")) {
//判断是该包装计划是否存在长宽高 //判断是该包装计划是否存在长宽高
JSONObject sub_jo = WQLObject.getWQLObject("pdm_bi_subpackagerelation").query("package_box_SN = '" + box_no + "'").uniqueResult(0); JSONObject sub_jo = WQLObject.getWQLObject("pdm_bi_subpackagerelation").query("package_box_SN = '" + box_no + "'").uniqueResult(0);
String box_length = sub_jo.getString("box_length"); Double box_length = sub_jo.getDoubleValue("box_length");
String box_width = sub_jo.getString("box_width"); Double box_width = sub_jo.getDoubleValue("box_width");
String box_high = sub_jo.getString("box_high"); Double box_high = sub_jo.getDoubleValue("box_high");
if (StrUtil.isEmpty(box_length) || StrUtil.isEmpty(box_width) || StrUtil.isEmpty(box_high)) { if (box_length <= 0 || box_width <= 0 || box_high <= 0) {
throw new BadRequestException("该木箱没有长宽高信息,无法入库,请到子卷包装关系中维护!"); throw new BadRequestException("该木箱没有长宽高信息,无法入库,请到子卷包装关系中维护!");
} }
JSONObject point_jo = WQLObject.getWQLObject("sch_base_point").query("point_code = '" + point_code + "'").uniqueResult(0); JSONObject point_jo = WQLObject.getWQLObject("sch_base_point").query("point_code = '" + point_code + "'").uniqueResult(0);
@@ -259,8 +259,8 @@ public class ProductInstorServiceImpl implements ProductInstorService {
if (ObjectUtil.isEmpty(vehicle_code)) throw new BadRequestException("木箱号不能为空"); if (ObjectUtil.isEmpty(vehicle_code)) throw new BadRequestException("木箱号不能为空");
JSONObject param = new JSONObject(); JSONObject param = new JSONObject();
param.put("vehicle_code",vehicle_code); param.put("vehicle_code", vehicle_code);
param.put("type","1"); param.put("type", "1");
AcsToWmsServiceImpl bean = SpringContextHolder.getBean(AcsToWmsServiceImpl.class); AcsToWmsServiceImpl bean = SpringContextHolder.getBean(AcsToWmsServiceImpl.class);
bean.deviceApply(param); bean.deviceApply(param);

View File

@@ -105,7 +105,7 @@ public class CutConveyorTask extends AbstractAcsTask {
jsonIvt.put("qzzno", ""); jsonIvt.put("qzzno", "");
ivtTab.update(jsonIvt);*/ ivtTab.update(jsonIvt);*/
/*//判断输送出来的任务起点是否靠近分切机,如果靠近分切机且远离分切机的点位上存在载具且不存在任务进行载具横移 //判断输送出来的任务起点是否属于上料位,如果属于上料位且对应的缓存位存在载具且不存在任务进行载具横移
char dtl_type = point_code1.charAt(point_code1.length() - 1); char dtl_type = point_code1.charAt(point_code1.length() - 1);
if (Integer.valueOf(String.valueOf(dtl_type)) % 2 != 0) { if (Integer.valueOf(String.valueOf(dtl_type)) % 2 != 0) {
String point_location = jsonIvt.getString("point_location"); String point_location = jsonIvt.getString("point_location");
@@ -129,7 +129,7 @@ public class CutConveyorTask extends AbstractAcsTask {
this.createTask(tran_jo); this.createTask(tran_jo);
} }
}*/ }
} }
//分切输送入任务 //分切输送入任务