修改
This commit is contained in:
@@ -700,6 +700,15 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
|||||||
if (ObjectUtil.isEmpty(plan_jo)) {
|
if (ObjectUtil.isEmpty(plan_jo)) {
|
||||||
throw new BadRequestException("未查询到分切计划:" + row.getString("ContainerGroup"));
|
throw new BadRequestException("未查询到分切计划:" + row.getString("ContainerGroup"));
|
||||||
}
|
}
|
||||||
|
//如果入站的分切计划气涨轴为空,则虚拟一个气涨轴编号
|
||||||
|
if (StrUtil.isEmpty(plan_jo.getString("qzzno"))) {
|
||||||
|
if (i == 0 || i == 2) {
|
||||||
|
plan_jo.put("qzzno", "XN-" + plan_jo.getString("resource_name") + "A");
|
||||||
|
}
|
||||||
|
if (i == 1 || i == 3) {
|
||||||
|
plan_jo.put("qzzno", "XN-" + plan_jo.getString("resource_name") + "B");
|
||||||
|
}
|
||||||
|
}
|
||||||
plan_jo.put("status", "05");
|
plan_jo.put("status", "05");
|
||||||
WQLObject.getWQLObject("pdm_bi_slittingproductionplan").update(plan_jo);
|
WQLObject.getWQLObject("pdm_bi_slittingproductionplan").update(plan_jo);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public class CasingServiceImpl implements CasingService {
|
|||||||
if (StrUtil.isNotEmpty(container_name)) {
|
if (StrUtil.isNotEmpty(container_name)) {
|
||||||
map.put("container_name", container_name);
|
map.put("container_name", container_name);
|
||||||
}
|
}
|
||||||
JSONObject rows = WQL.getWO("PDA_02").addParamMap(map).pageQuery(ctx,"container_name");
|
JSONObject rows = WQL.getWO("PDA_02").addParamMap(map).pageQuery(ctx, "container_name");
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
jo.put("data", rows.getJSONArray("content"));
|
jo.put("data", rows.getJSONArray("content"));
|
||||||
jo.put("size", rows.getString("totalElements"));
|
jo.put("size", rows.getString("totalElements"));
|
||||||
@@ -113,8 +113,16 @@ public class CasingServiceImpl implements CasingService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//如果一个分切组只有两个子卷,则一定得分两根轴进行绑定
|
||||||
|
if (rows.size() == 2 && order_type.equals("1")) {
|
||||||
|
JSONArray group_rows = WQLObject.getWQLObject("pdm_bi_slittingproductionplan").query("parent_container_name = '" + parent_container_name + "' AND split_group = '" + split_group + "' AND is_delete = '0'").getResultJSONArray(0);
|
||||||
|
if (group_rows.size() == 2) {
|
||||||
|
throw new BadRequestException("该分切组只有两个分切计划,请选择两个不同的轴进行绑定!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//查询该气涨轴是否存在已经套轴的分切计划
|
//查询该气涨轴是否存在已经套轴的分切计划
|
||||||
JSONArray case_rows = WQLObject.getWQLObject("pdm_bi_slittingproductionplan").query("qzzno = '"+qzzno+"' AND is_delete = '0' AND is_child_tz_ok = '1' AND status < '09'").getResultJSONArray(0);
|
JSONArray case_rows = WQLObject.getWQLObject("pdm_bi_slittingproductionplan").query("qzzno = '" + qzzno + "' AND is_delete = '0' AND is_child_tz_ok = '1' AND status < '09'").getResultJSONArray(0);
|
||||||
for (int i = 0; i < case_rows.size(); i++) {
|
for (int i = 0; i < case_rows.size(); i++) {
|
||||||
JSONObject row = case_rows.getJSONObject(i);
|
JSONObject row = case_rows.getJSONObject(i);
|
||||||
if (!split_group.equals(row.getString("split_group"))) {
|
if (!split_group.equals(row.getString("split_group"))) {
|
||||||
@@ -133,7 +141,7 @@ public class CasingServiceImpl implements CasingService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (case_rows.size()>=2){
|
if (case_rows.size() >= 2) {
|
||||||
throw new BadRequestException("该气涨轴上已经绑定了两个分切计划,无法继续绑定!");
|
throw new BadRequestException("该气涨轴上已经绑定了两个分切计划,无法继续绑定!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -177,29 +185,29 @@ public class CasingServiceImpl implements CasingService {
|
|||||||
throw new BadRequestException("点位编码不能为空!");
|
throw new BadRequestException("点位编码不能为空!");
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONObject qzz_jo = WQLObject.getWQLObject("md_pb_storagevehicleinfo").query("storagevehicle_code = '"+qzzno+"' AND is_delete = '0'").uniqueResult(0);
|
JSONObject qzz_jo = WQLObject.getWQLObject("md_pb_storagevehicleinfo").query("storagevehicle_code = '" + qzzno + "' AND is_delete = '0'").uniqueResult(0);
|
||||||
if (ObjectUtil.isEmpty(qzz_jo)){
|
if (ObjectUtil.isEmpty(qzz_jo)) {
|
||||||
throw new BadRequestException("该气涨轴不存在或被删除!");
|
throw new BadRequestException("该气涨轴不存在或被删除!");
|
||||||
}
|
}
|
||||||
if (qzz_jo.getString("is_used").equals("0")){
|
if (qzz_jo.getString("is_used").equals("0")) {
|
||||||
throw new BadRequestException("气涨轴未启用!");
|
throw new BadRequestException("气涨轴未启用!");
|
||||||
}
|
}
|
||||||
String storagevehicle_type = qzz_jo.getString("storagevehicle_type");
|
String storagevehicle_type = qzz_jo.getString("storagevehicle_type");
|
||||||
String to_size = "";
|
String to_size = "";
|
||||||
if (storagevehicle_type.equals("000101")){
|
if (storagevehicle_type.equals("000101")) {
|
||||||
to_size = "3";
|
to_size = "3";
|
||||||
}
|
}
|
||||||
if (storagevehicle_type.equals("000102")){
|
if (storagevehicle_type.equals("000102")) {
|
||||||
to_size = "6";
|
to_size = "6";
|
||||||
}
|
}
|
||||||
if (StrUtil.isEmpty(to_size)){
|
if (StrUtil.isEmpty(to_size)) {
|
||||||
throw new BadRequestException("未查询到该气涨轴对应的类型!");
|
throw new BadRequestException("未查询到该气涨轴对应的类型!");
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONObject device_jo = new JSONObject();
|
JSONObject device_jo = new JSONObject();
|
||||||
device_jo.put("device_code",whereJson.getString("point_code"));
|
device_jo.put("device_code", whereJson.getString("point_code"));
|
||||||
device_jo.put("type","1");
|
device_jo.put("type", "1");
|
||||||
device_jo.put("size",to_size);
|
device_jo.put("size", to_size);
|
||||||
new WmsToAcsServiceImpl().putPlusPullAction(device_jo);
|
new WmsToAcsServiceImpl().putPlusPullAction(device_jo);
|
||||||
|
|
||||||
//下发ACS拔轴机构
|
//下发ACS拔轴机构
|
||||||
@@ -219,29 +227,29 @@ public class CasingServiceImpl implements CasingService {
|
|||||||
throw new BadRequestException("点位编码不能为空!");
|
throw new BadRequestException("点位编码不能为空!");
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONObject qzz_jo = WQLObject.getWQLObject("md_pb_storagevehicleinfo").query("storagevehicle_code = '"+qzzno+"' AND is_delete = '0'").uniqueResult(0);
|
JSONObject qzz_jo = WQLObject.getWQLObject("md_pb_storagevehicleinfo").query("storagevehicle_code = '" + qzzno + "' AND is_delete = '0'").uniqueResult(0);
|
||||||
if (ObjectUtil.isEmpty(qzz_jo)){
|
if (ObjectUtil.isEmpty(qzz_jo)) {
|
||||||
throw new BadRequestException("该气涨轴不存在或被删除!");
|
throw new BadRequestException("该气涨轴不存在或被删除!");
|
||||||
}
|
}
|
||||||
if (qzz_jo.getString("is_used").equals("0")){
|
if (qzz_jo.getString("is_used").equals("0")) {
|
||||||
throw new BadRequestException("气涨轴未启用!");
|
throw new BadRequestException("气涨轴未启用!");
|
||||||
}
|
}
|
||||||
String storagevehicle_type = qzz_jo.getString("storagevehicle_type");
|
String storagevehicle_type = qzz_jo.getString("storagevehicle_type");
|
||||||
String to_size = "";
|
String to_size = "";
|
||||||
if (storagevehicle_type.equals("000101")){
|
if (storagevehicle_type.equals("000101")) {
|
||||||
to_size = "3";
|
to_size = "3";
|
||||||
}
|
}
|
||||||
if (storagevehicle_type.equals("000102")){
|
if (storagevehicle_type.equals("000102")) {
|
||||||
to_size = "6";
|
to_size = "6";
|
||||||
}
|
}
|
||||||
if (StrUtil.isEmpty(to_size)){
|
if (StrUtil.isEmpty(to_size)) {
|
||||||
throw new BadRequestException("未查询到该气涨轴对应的类型!");
|
throw new BadRequestException("未查询到该气涨轴对应的类型!");
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONObject device_jo = new JSONObject();
|
JSONObject device_jo = new JSONObject();
|
||||||
device_jo.put("device_code",whereJson.getString("point_code"));
|
device_jo.put("device_code", whereJson.getString("point_code"));
|
||||||
device_jo.put("type","0");
|
device_jo.put("type", "0");
|
||||||
device_jo.put("size",to_size);
|
device_jo.put("size", to_size);
|
||||||
new WmsToAcsServiceImpl().putPlusPullAction(device_jo);
|
new WmsToAcsServiceImpl().putPlusPullAction(device_jo);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user