dev:兰州二期生箔修改
This commit is contained in:
@@ -222,7 +222,7 @@ public class ProcessTask extends AbstractAcsTask {
|
|||||||
json.put("create_id", currentUserId);
|
json.put("create_id", currentUserId);
|
||||||
json.put("create_name", currentUsername);
|
json.put("create_name", currentUsername);
|
||||||
json.put("create_time", DateUtil.now());
|
json.put("create_time", DateUtil.now());
|
||||||
json.put("acs_task_type", "1");
|
json.put("acs_task_type", "2");
|
||||||
tab.insert(json);
|
tab.insert(json);
|
||||||
|
|
||||||
this.immediateNotifyAcs(json.getString("task_id"));
|
this.immediateNotifyAcs(json.getString("task_id"));
|
||||||
|
|||||||
@@ -1516,8 +1516,8 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
|||||||
} else {
|
} else {
|
||||||
//取满取空放满放空
|
//取满取空放满放空
|
||||||
form.put("point_code1", jsonCoolIvt.getString("full_point_code"));
|
form.put("point_code1", jsonCoolIvt.getString("full_point_code"));
|
||||||
form.put("point_code2", device_jo.getString("up_point_code")+"_K");
|
form.put("point_code2", device_jo.getString("up_point_code")+"_M");
|
||||||
form.put("point_code3", device_jo.getString("up_point_code")+"_M");
|
form.put("point_code3", device_jo.getString("up_point_code")+"_K");
|
||||||
//判断对应空轴点位是否为空,为空用当前点位,不为空查询其他点位
|
//判断对应空轴点位是否为空,为空用当前点位,不为空查询其他点位
|
||||||
if (jsonCoolIvt.getString("empty_point_status").equals("01")) {
|
if (jsonCoolIvt.getString("empty_point_status").equals("01")) {
|
||||||
form.put("point_code4", jsonCoolIvt.getString("empty_point_code"));
|
form.put("point_code4", jsonCoolIvt.getString("empty_point_code"));
|
||||||
|
|||||||
@@ -123,24 +123,7 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
* 暂存区入烘箱
|
* 暂存区入烘箱
|
||||||
*/
|
*/
|
||||||
// 1.查询烘箱对应的空位
|
// 1.查询烘箱对应的空位
|
||||||
JSONObject jsonMap = new JSONObject();
|
JSONObject jsonHotIvt = getJsonObject(jsonPointZc.getString("product_area"), jsonPointZc, temperature);
|
||||||
jsonMap.put("flag", "1");
|
|
||||||
jsonMap.put("product_area", jsonPointZc.getString("product_area"));
|
|
||||||
//获取温度幅度
|
|
||||||
jsonMap.put("point_location", jsonPointZc.getString("point_location"));
|
|
||||||
JSONArray hot_rows = WQL.getWO("PDA_BAKING_01").addParamMap(jsonMap).process().getResultJSONArray(0);
|
|
||||||
JSONObject jsonHotIvt = new JSONObject();
|
|
||||||
for (int i = 0; i < hot_rows.size(); i++) {
|
|
||||||
JSONObject hot_row = hot_rows.getJSONObject(i);
|
|
||||||
String point_code = hot_row.getString("point_code");
|
|
||||||
String point_temperature = (String) redisUtils.hget(point_code, "temperature");
|
|
||||||
if (!ObjectUtil.isEmpty(point_temperature)) {
|
|
||||||
if (point_temperature.equals(temperature)) {
|
|
||||||
jsonHotIvt = hot_row;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ObjectUtil.isEmpty(jsonHotIvt)) {
|
if (ObjectUtil.isEmpty(jsonHotIvt)) {
|
||||||
throw new BadRequestException("烘烤区没有合适温度的空位!");
|
throw new BadRequestException("烘烤区没有合适温度的空位!");
|
||||||
@@ -213,6 +196,9 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
}
|
}
|
||||||
JSONObject map = new JSONObject();
|
JSONObject map = new JSONObject();
|
||||||
map.put("flag", "1");
|
map.put("flag", "1");
|
||||||
|
if (product_area.equals("B2")){
|
||||||
|
map.put("flag","3");
|
||||||
|
}
|
||||||
map.put("reging_id", reging_id);
|
map.put("reging_id", reging_id);
|
||||||
map.put("point_location", point_location);
|
map.put("point_location", point_location);
|
||||||
//只找入箱点位
|
//只找入箱点位
|
||||||
@@ -231,24 +217,24 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
if (ObjectUtil.isEmpty(pointArr)) throw new BadRequestException("没有空暂存位");
|
if (ObjectUtil.isEmpty(pointArr)) throw new BadRequestException("没有空暂存位");
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
JSONObject jsonMap = new JSONObject();
|
JSONObject jsonHotIvt = getJsonObject(product_area, point_code2_jo, temperature);
|
||||||
jsonMap.put("flag", "1");
|
if (ObjectUtil.isEmpty(jsonHotIvt)) {
|
||||||
jsonMap.put("product_area", product_area);
|
if (product_area.equals("B2")){
|
||||||
jsonMap.put("point_location", map.getString("point_location"));
|
String cant_location1 = point_code2_jo.getString("point_location");
|
||||||
JSONArray hot_rows = WQL.getWO("PDA_BAKING_01").addParamMap(jsonMap).process().getResultJSONArray(0);
|
String cant_location = "('"+point_code2_jo.getString("point_location")+"')";
|
||||||
JSONObject jsonHotIvt = new JSONObject();
|
map.put("cant_location",cant_location);
|
||||||
for (int i = 0; i < hot_rows.size(); i++) {
|
point_code2_jo = WQL.getWO("PDA_OVENINANDOUT_01").addParamMap(map).process().uniqueResult(0);
|
||||||
JSONObject hot_row = hot_rows.getJSONObject(i);
|
jsonHotIvt = getJsonObject(product_area, point_code2_jo, temperature);
|
||||||
String point_code = hot_row.getString("point_code");
|
if (ObjectUtil.isEmpty(jsonHotIvt)){
|
||||||
String point_temperature = (String) redisUtils.hget(point_code, "temperature");
|
cant_location = "('"+cant_location1+"','"+point_code2_jo.getString("point_location")+"')";
|
||||||
if (!ObjectUtil.isEmpty(point_temperature)) {
|
map.put("cant_location",cant_location);
|
||||||
if (point_temperature.equals(temperature)) {
|
point_code2_jo = WQL.getWO("PDA_OVENINANDOUT_01").addParamMap(map).process().uniqueResult(0);
|
||||||
jsonHotIvt = hot_row;
|
jsonHotIvt = getJsonObject(product_area, point_code2_jo, temperature);
|
||||||
break;
|
if (ObjectUtil.isEmpty(jsonHotIvt)){
|
||||||
|
throw new BadRequestException("烘烤区没有合适温度的空位!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (ObjectUtil.isEmpty(jsonHotIvt)) {
|
|
||||||
throw new BadRequestException("烘烤区没有合适温度的空位!");
|
throw new BadRequestException("烘烤区没有合适温度的空位!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -354,6 +340,9 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
case "A4":
|
case "A4":
|
||||||
reging_id = RegionTypeEnum.D_HKZC.getId();
|
reging_id = RegionTypeEnum.D_HKZC.getId();
|
||||||
break;
|
break;
|
||||||
|
case "B2":
|
||||||
|
reging_id = RegionTypeEnum.B2_HKZC.getId();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -431,6 +420,27 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private JSONObject getJsonObject(String product_area, JSONObject point_code2_jo, String temperature) {
|
||||||
|
JSONObject jsonMap = new JSONObject();
|
||||||
|
jsonMap.put("flag", "1");
|
||||||
|
jsonMap.put("product_area", product_area);
|
||||||
|
jsonMap.put("point_location", point_code2_jo.getString("point_location"));
|
||||||
|
JSONArray hot_rows = WQL.getWO("PDA_BAKING_01").addParamMap(jsonMap).process().getResultJSONArray(0);
|
||||||
|
JSONObject jsonHotIvt = new JSONObject();
|
||||||
|
for (int i = 0; i < hot_rows.size(); i++) {
|
||||||
|
JSONObject hot_row = hot_rows.getJSONObject(i);
|
||||||
|
String point_code = hot_row.getString("point_code");
|
||||||
|
String point_temperature = (String) redisUtils.hget(point_code, "temperature");
|
||||||
|
if (!ObjectUtil.isEmpty(point_temperature)) {
|
||||||
|
if (point_temperature.equals(temperature)) {
|
||||||
|
jsonHotIvt = hot_row;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return jsonHotIvt;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public JSONObject inCoolIvt(JSONObject whereJson) {
|
public JSONObject inCoolIvt(JSONObject whereJson) {
|
||||||
|
|||||||
@@ -234,9 +234,9 @@ public class RawFoilServiceImpl implements RawFoilService {
|
|||||||
json.put("create_time", DateUtil.now());
|
json.put("create_time", DateUtil.now());
|
||||||
rawTab.insert(json);
|
rawTab.insert(json);
|
||||||
|
|
||||||
JSONObject jsonSb = sbTab.query("point_code = '" + whereJson.getString("device_code") + "'").uniqueResult(0);
|
JSONObject jsonSb = sbTab.query("point_code = '" + whereJson.getString("point_code") + "'").uniqueResult(0);
|
||||||
if (ObjectUtil.isEmpty(jsonSb)) {
|
if (ObjectUtil.isEmpty(jsonSb)) {
|
||||||
throw new BadRequestException("点位:" + whereJson.getString("device_code") + "生箔设备不存在");
|
throw new BadRequestException("点位:" + whereJson.getString("point_code") + "生箔设备不存在");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StrUtil.equals("0", jsonSb.getString("is_used"))) {
|
if (StrUtil.equals("0", jsonSb.getString("is_used"))) {
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
输入.point_location TYPEAS s_string
|
输入.point_location TYPEAS s_string
|
||||||
输入.product_area TYPEAS s_string
|
输入.product_area TYPEAS s_string
|
||||||
输入.point_type TYPEAS s_string
|
输入.point_type TYPEAS s_string
|
||||||
|
输入.cant_location TYPEAS f_string
|
||||||
|
|
||||||
|
|
||||||
[临时表]
|
[临时表]
|
||||||
@@ -175,4 +176,103 @@
|
|||||||
ORDER BY sort_seq desc
|
ORDER BY sort_seq desc
|
||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDQUERY
|
ENDQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
|
IF 输入.flag = "3"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
a.*,
|
||||||
|
b.num
|
||||||
|
FROM
|
||||||
|
sch_base_point a
|
||||||
|
INNER JOIN (
|
||||||
|
SELECT
|
||||||
|
COUNT( c.task_id ) AS num,
|
||||||
|
c.point_code
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
task.task_id,
|
||||||
|
point_code
|
||||||
|
FROM
|
||||||
|
SCH_BASE_Point po
|
||||||
|
LEFT JOIN sch_base_task task ON task.point_code1 = po.point_code
|
||||||
|
AND task.task_status < '07'
|
||||||
|
AND task.is_delete = '0'
|
||||||
|
WHERE
|
||||||
|
po.is_delete = '0'
|
||||||
|
AND po.is_used = '1'
|
||||||
|
OPTION 输入.reging_id <> ""
|
||||||
|
po.region_id = 输入.reging_id
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
OPTION 输入.cant_location <> ""
|
||||||
|
po.point_location not in 输入.cant_location
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
OPTION 输入.point_type <> ""
|
||||||
|
po.point_type = 输入.point_type
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.point_type = "5"
|
||||||
|
IFNULL(po.material_code,'') = ''
|
||||||
|
ENDOPTION
|
||||||
|
UNION
|
||||||
|
SELECT
|
||||||
|
task.task_id,
|
||||||
|
point_code
|
||||||
|
FROM
|
||||||
|
SCH_BASE_Point po
|
||||||
|
LEFT JOIN sch_base_task task ON task.point_code2 = po.point_code
|
||||||
|
AND task.task_status < '07'
|
||||||
|
AND task.is_delete = '0'
|
||||||
|
WHERE
|
||||||
|
po.is_delete = '0'
|
||||||
|
AND po.is_used = '1'
|
||||||
|
OPTION 输入.reging_id <> ""
|
||||||
|
po.region_id = 输入.reging_id
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
OPTION 输入.cant_location <> ""
|
||||||
|
po.point_location not in 输入.cant_location
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
OPTION 输入.point_type <> ""
|
||||||
|
po.point_type = 输入.point_type
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.point_type = "5"
|
||||||
|
IFNULL(po.material_code,'') = ''
|
||||||
|
ENDOPTION
|
||||||
|
UNION
|
||||||
|
SELECT
|
||||||
|
task.task_id,
|
||||||
|
point_code
|
||||||
|
FROM
|
||||||
|
SCH_BASE_Point po
|
||||||
|
LEFT JOIN sch_base_task task ON task.point_code3 = po.point_code
|
||||||
|
AND task.task_status < '07'
|
||||||
|
AND task.is_delete = '0'
|
||||||
|
WHERE
|
||||||
|
po.is_delete = '0'
|
||||||
|
AND po.is_used = '1'
|
||||||
|
OPTION 输入.reging_id <> ""
|
||||||
|
po.region_id = 输入.reging_id
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
OPTION 输入.cant_location <> ""
|
||||||
|
po.point_location not in 输入.cant_location
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
OPTION 输入.point_type <> ""
|
||||||
|
po.point_type = 输入.point_type
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.point_type = "5"
|
||||||
|
IFNULL(po.material_code,'') = ''
|
||||||
|
ENDOPTION
|
||||||
|
) c
|
||||||
|
GROUP BY
|
||||||
|
c.point_code
|
||||||
|
) b ON b.point_code = a.point_code
|
||||||
|
ORDER BY num,a.point_code
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
@@ -185,11 +185,6 @@
|
|||||||
<el-table-column prop="last_time" label="倒计时" width="120"/>
|
<el-table-column prop="last_time" label="倒计时" width="120"/>
|
||||||
<el-table-column prop="group_name" label="组别"/>
|
<el-table-column prop="group_name" label="组别"/>
|
||||||
<el-table-column prop="ext_code" label="外部编码" width="130"/>
|
<el-table-column prop="ext_code" label="外部编码" width="130"/>
|
||||||
<el-table-column prop="point_location" label="位置">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ dict.label.point_location[scope.row.point_location] }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="is_used" label="是否启用">
|
<el-table-column prop="is_used" label="是否启用">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ dict.label.is_used[scope.row.is_used] }}
|
{{ dict.label.is_used[scope.row.is_used] }}
|
||||||
|
|||||||
Reference in New Issue
Block a user