Merge remote-tracking branch 'origin/master_merge' into master_merge
This commit is contained in:
@@ -163,6 +163,12 @@ public class SlitterPdaController {
|
|||||||
public ResponseEntity<Object> doSubRollWeightBinding(@RequestBody JSONObject param) {
|
public ResponseEntity<Object> doSubRollWeightBinding(@RequestBody JSONObject param) {
|
||||||
return new ResponseEntity<>(slitterDevices.doSubRollWeightBinding(param), HttpStatus.OK);
|
return new ResponseEntity<>(slitterDevices.doSubRollWeightBinding(param), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
@PostMapping("/doSubRollWeightBindingTip")
|
||||||
|
@Log("手持子卷重量绑定提示")
|
||||||
|
@SaIgnore
|
||||||
|
public ResponseEntity<Object> doSubRollWeightBindingTip(@RequestBody JSONObject param) {
|
||||||
|
return new ResponseEntity<>(slitterDevices.doSubRollWeightBindingTip(param), HttpStatus.OK);
|
||||||
|
}
|
||||||
@PostMapping("/doUpShaftToSlitter")
|
@PostMapping("/doUpShaftToSlitter")
|
||||||
@Log("手持分切机上气胀轴")
|
@Log("手持分切机上气胀轴")
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
|
|||||||
@@ -27,4 +27,11 @@ public interface SchBaseTaskMapper extends BaseMapper<SchBaseTask> {
|
|||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
List<SchBaseTask> getTaskByPlanQzzNoAndDevice(String resourceName);
|
List<SchBaseTask> getTaskByPlanQzzNoAndDevice(String resourceName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检测点位起点的任务是否存在
|
||||||
|
* @param code
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<SchBaseTask> checkHaveStartTask(String code);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
SELECT *
|
SELECT *
|
||||||
FROM sch_base_task
|
FROM sch_base_task
|
||||||
WHERE task_status <![CDATA[ <= ]]> '071' AND task_status <![CDATA[ <> ]]> '07'
|
WHERE task_status <![CDATA[ <= ]]> '071' AND task_status <![CDATA[ <> ]]> '07'
|
||||||
|
AND is_delete = '0'
|
||||||
AND ( point_code1 = #{code}
|
AND ( point_code1 = #{code}
|
||||||
OR point_code2 = #{code}
|
OR point_code2 = #{code}
|
||||||
OR point_code3 = #{code}
|
OR point_code3 = #{code}
|
||||||
@@ -20,4 +21,11 @@
|
|||||||
AND p.resource_name = #{resourceName}
|
AND p.resource_name = #{resourceName}
|
||||||
AND IFNULL(p.qzzno, '') <![CDATA[ <> ]]> ''
|
AND IFNULL(p.qzzno, '') <![CDATA[ <> ]]> ''
|
||||||
</select>
|
</select>
|
||||||
|
<select id="checkHaveStartTask" resultType="org.nl.b_lms.sch.task.dao.SchBaseTask">
|
||||||
|
SELECT *
|
||||||
|
FROM sch_base_task
|
||||||
|
WHERE task_status <![CDATA[ <= ]]> '071' AND task_status <![CDATA[ <> ]]> '07'
|
||||||
|
AND is_delete = '0'
|
||||||
|
AND point_code1 = #{code}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -87,6 +87,13 @@ public interface IschBaseTaskService extends IService<SchBaseTask> {
|
|||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
Boolean checkHaveTaskByZcPoint(BstIvtCutpointivt point);
|
Boolean checkHaveTaskByZcPoint(BstIvtCutpointivt point);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断是否有起点未完成的任务
|
||||||
|
* @param pointCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<SchBaseTask> checkHaveStartTask(String pointCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -161,6 +161,11 @@ public class SchBaseTaskServiceImpl extends ServiceImpl<SchBaseTaskMapper, SchBa
|
|||||||
return list(lam).size() > 0;
|
return list(lam).size() > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SchBaseTask> checkHaveStartTask(String pointCode) {
|
||||||
|
return schBaseTaskMapper.checkHaveStartTask(pointCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
AND bcp.point_location = #{location}
|
AND bcp.point_location = #{location}
|
||||||
AND 0 = (
|
AND 0 = (
|
||||||
SELECT COUNT(*) FROM sch_base_task t
|
SELECT COUNT(*) FROM sch_base_task t
|
||||||
WHERE t.task_status <![CDATA[ <= ]]> '071' AND t.task_status <![CDATA[ <> ]]> '07' AND (t.point_code2 = bcp.point_code OR t.point_code2 = bcp.truss_point_code1
|
WHERE t.task_status <![CDATA[ <= ]]> '071' AND t.task_status <![CDATA[ <> ]]> '07' AND t.is_delete = '0' AND (t.point_code2 = bcp.point_code OR t.point_code2 = bcp.truss_point_code1
|
||||||
OR t.point_code4 = bcp.truss_point_code1 OR t.point_code2 = bcp.truss_point_code2 OR t.point_code4 = bcp.truss_point_code2)
|
OR t.point_code4 = bcp.truss_point_code1 OR t.point_code2 = bcp.truss_point_code2 OR t.point_code4 = bcp.truss_point_code2)
|
||||||
)
|
)
|
||||||
AND 0 = ABS(bcp.sort_seq - #{sortSeq})
|
AND 0 = ABS(bcp.sort_seq - #{sortSeq})
|
||||||
|
|||||||
@@ -291,4 +291,11 @@ public interface SlitterService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
JSONObject doUpShaftToSlitterByDeviceTip(JSONObject param);
|
JSONObject doUpShaftToSlitterByDeviceTip(JSONObject param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子卷维护重量提示
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
JSONObject doSubRollWeightBindingTip(JSONObject param);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -530,8 +530,8 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
device.getSort_seq(),
|
device.getSort_seq(),
|
||||||
getPointLocationInCutDevice(getNumberByResourceCode(demoPlan.getResource_name()), area));
|
getPointLocationInCutDevice(getNumberByResourceCode(demoPlan.getResource_name()), area));
|
||||||
if (emptyPoints.size() == 0) {
|
if (emptyPoints.size() == 0) {
|
||||||
log.error("分切机【" + device.getExt_code() + "】找不到对应的对接位!");
|
log.error("分切机【" + device.getExt_code() + "】找不到对应的对接位, 或已存在任务!");
|
||||||
throw new BadRequestException("分切机【" + device.getExt_code() + "】找不到对应的对接位!");
|
throw new BadRequestException("分切机【" + device.getExt_code() + "】找不到对应的对接位,或已存在任务!");
|
||||||
}
|
}
|
||||||
// 枷锁
|
// 枷锁
|
||||||
BstIvtCutpointivt emptyPoint = emptyPoints.get(0);
|
BstIvtCutpointivt emptyPoint = emptyPoints.get(0);
|
||||||
@@ -1549,7 +1549,7 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
// param: point_code
|
// param: point_code
|
||||||
String pointCode = param.getString("point_code");
|
String pointCode = param.getString("point_code");
|
||||||
// 校验是否存在任务
|
// 校验是否存在任务
|
||||||
List<SchBaseTask> taskList = taskService.checkHaveTask(pointCode);
|
List<SchBaseTask> taskList = taskService.checkHaveStartTask(pointCode);
|
||||||
if (taskList.size() > 0) {
|
if (taskList.size() > 0) {
|
||||||
throw new BadRequestException("操作失败,点位[" + pointCode + "]存在未完成的任务!");
|
throw new BadRequestException("操作失败,点位[" + pointCode + "]存在未完成的任务!");
|
||||||
}
|
}
|
||||||
@@ -1869,4 +1869,22 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
res.put("tip", tips.stream().collect(Collectors.joining(",")));
|
res.put("tip", tips.stream().collect(Collectors.joining(",")));
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject doSubRollWeightBindingTip(JSONObject param) {
|
||||||
|
JSONObject res = new JSONObject();
|
||||||
|
res.put("status", HttpStatus.HTTP_OK);
|
||||||
|
//container_name: 子卷号
|
||||||
|
String containerName = param.getString("container_name");
|
||||||
|
Assert.notBlank(containerName, "子卷号不能为空!");
|
||||||
|
PdmBiSlittingproductionplan plan = slittingproductionplanService.getByContainerName(containerName);
|
||||||
|
if (ObjectUtil.isEmpty(plan)) {
|
||||||
|
res.put("tip", "子卷信息在系统中不存在,请核对子卷号!");
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
String rollWeight = "子卷毛重:【" + plan.getWeight() + "】";
|
||||||
|
String paperWeight = "纸管重量:【" + plan.getPaper_weight() + "】";
|
||||||
|
res.put("tip", "系统记录的重量数值:" + rollWeight + ", " + paperWeight);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import com.alibaba.fastjson.JSONArray;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.b_lms.sch.point.service.IschBasePointService;
|
||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.modules.common.utils.RedisUtils;
|
import org.nl.modules.common.utils.RedisUtils;
|
||||||
@@ -619,13 +620,21 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
}
|
}
|
||||||
map.put("point_type", "1");
|
map.put("point_type", "1");
|
||||||
// B2出来要根据锂电或者标箔去不同地方(状态5)
|
// B2出来要根据锂电或者标箔去不同地方(状态5)
|
||||||
if (jsonPoint.getString("product_area").equals("B2")) {
|
|
||||||
String orderType = raw_jo.getString("order_type");
|
String orderType = raw_jo.getString("order_type");
|
||||||
|
JSONObject lithiumPoint = null;
|
||||||
|
String endPointCode = null;
|
||||||
|
if (jsonPoint.getString("product_area").equals("B2")) {
|
||||||
// order_type 1-标箔;2-锂电
|
// order_type 1-标箔;2-锂电
|
||||||
if ("2".equals(orderType)) {
|
if ("2".equals(orderType)) {
|
||||||
map.put("point_type", "5");
|
map.put("point_type", "5");
|
||||||
|
// 如果是B2锂电就优先去表处中转区
|
||||||
|
lithiumPoint = WQL.getWO("PDA_OVENINANDOUT_01").addParam("flag", "5").process().uniqueResult(0);
|
||||||
|
if (ObjectUtil.isNotEmpty(lithiumPoint)) {
|
||||||
|
endPointCode = lithiumPoint.getString("point_code");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isEmpty(lithiumPoint)) {
|
||||||
JSONObject jsonCooIvt = WQL.getWO("PDA_OVENINANDOUT_01").addParamMap(map).process().uniqueResult(0);
|
JSONObject jsonCooIvt = WQL.getWO("PDA_OVENINANDOUT_01").addParamMap(map).process().uniqueResult(0);
|
||||||
// 如果为空
|
// 如果为空
|
||||||
if (ObjectUtil.isEmpty(jsonCooIvt) && !jsonPoint.getString("product_area").equals("B2")) {
|
if (ObjectUtil.isEmpty(jsonCooIvt) && !jsonPoint.getString("product_area").equals("B2")) {
|
||||||
@@ -640,11 +649,13 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
if (ObjectUtil.isEmpty(jsonCooIvt)) {
|
if (ObjectUtil.isEmpty(jsonCooIvt)) {
|
||||||
throw new BadRequestException("冷却区空位不足");
|
throw new BadRequestException("冷却区空位不足");
|
||||||
}
|
}
|
||||||
|
endPointCode = jsonCooIvt.getString("full_point_code");
|
||||||
|
}
|
||||||
|
|
||||||
// 3.创建任务
|
// 3.创建任务
|
||||||
JSONObject param = new JSONObject();
|
JSONObject param = new JSONObject();
|
||||||
param.put("point_code1", point_code1);
|
param.put("point_code1", point_code1);
|
||||||
param.put("point_code2", jsonCooIvt.getString("full_point_code"));
|
param.put("point_code2", endPointCode);
|
||||||
param.put("container_name", container_name);
|
param.put("container_name", container_name);
|
||||||
param.put("product_area", jsonPoint.getString("product_area"));
|
param.put("product_area", jsonPoint.getString("product_area"));
|
||||||
|
|
||||||
@@ -673,7 +684,7 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
jsonCool.put("qty_unit_id", jsonMater.get("base_unit_id"));
|
jsonCool.put("qty_unit_id", jsonMater.get("base_unit_id"));
|
||||||
jsonCool.put("task_id", task_id);
|
jsonCool.put("task_id", task_id);
|
||||||
jsonCool.put("start_point_code", point_code1);
|
jsonCool.put("start_point_code", point_code1);
|
||||||
jsonCool.put("end_point_code", jsonCooIvt.getString("full_point_code"));
|
jsonCool.put("end_point_code", endPointCode);
|
||||||
jsonCool.put("create_mode", "03");
|
jsonCool.put("create_mode", "03");
|
||||||
jsonCool.put("create_id", currentUserId);
|
jsonCool.put("create_id", currentUserId);
|
||||||
jsonCool.put("create_name", currentUsername);
|
jsonCool.put("create_name", currentUsername);
|
||||||
|
|||||||
@@ -341,3 +341,25 @@
|
|||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDQUERY
|
ENDQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
IF 输入.flag = "5"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
*
|
||||||
|
FROM
|
||||||
|
`sch_base_point` p
|
||||||
|
WHERE
|
||||||
|
p.region_code = 'B2-BCZZ'
|
||||||
|
AND p.point_type = '8'
|
||||||
|
AND p.point_status = '1'
|
||||||
|
AND 0 = (
|
||||||
|
SELECT
|
||||||
|
COUNT(*)
|
||||||
|
FROM
|
||||||
|
sch_base_task t
|
||||||
|
WHERE
|
||||||
|
t.task_status < '07'
|
||||||
|
AND t.is_delete = '0'
|
||||||
|
AND (t.point_code1 = p.point_code OR t.point_code2 = p.point_code OR t.point_code3 = p.point_code OR t.point_code4 = p.point_code))
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
|
|||||||
@@ -114,15 +114,19 @@ public class InCoolIvtTask extends AbstractAcsTask {
|
|||||||
// 校验终点是否存在
|
// 校验终点是否存在
|
||||||
JSONObject jsonIvt = ivtTab.query("full_point_code ='" + point_code2 + "'").uniqueResult(0);
|
JSONObject jsonIvt = ivtTab.query("full_point_code ='" + point_code2 + "'").uniqueResult(0);
|
||||||
if (ObjectUtil.isEmpty(jsonIvt)) {
|
if (ObjectUtil.isEmpty(jsonIvt)) {
|
||||||
|
// 判断是不是暂存位
|
||||||
|
JSONObject zzPoint = pointTab.query("point_code ='" + point_code2 + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isEmpty(zzPoint)) {
|
||||||
throw new BadRequestException("终点未找到可用点位:" + point_code2);
|
throw new BadRequestException("终点未找到可用点位:" + point_code2);
|
||||||
}
|
}
|
||||||
|
zzPoint.put("material_code", jsonTask.getString("material_code"));
|
||||||
// 更新暂存位状态为空位
|
// 有料
|
||||||
JSONObject jsonPoint = pointTab.query("point_code = '" + point_code1 + "'").uniqueResult(0);
|
zzPoint.put("point_status", "2");
|
||||||
jsonPoint.put("point_status", "1");
|
zzPoint.put("update_optid", SecurityUtils.getCurrentUserId());
|
||||||
jsonPoint.put("material_code", "");
|
zzPoint.put("update_optname", SecurityUtils.getCurrentNickName());
|
||||||
pointTab.update(jsonPoint);
|
zzPoint.put("update_time", DateUtil.now());
|
||||||
|
pointTab.update(zzPoint);
|
||||||
|
} else {
|
||||||
// 更新冷却库存状态
|
// 更新冷却库存状态
|
||||||
JSONObject raw_jo = WQLObject.getWQLObject("pdm_bi_rawfoilworkorder").query("container_name = '" + jsonTask.getString("material_code") + "'").uniqueResult(0);
|
JSONObject raw_jo = WQLObject.getWQLObject("pdm_bi_rawfoilworkorder").query("container_name = '" + jsonTask.getString("material_code") + "'").uniqueResult(0);
|
||||||
|
|
||||||
@@ -133,7 +137,13 @@ public class InCoolIvtTask extends AbstractAcsTask {
|
|||||||
jsonIvt.put("workorder_id", raw_jo.getString("workorder_id"));
|
jsonIvt.put("workorder_id", raw_jo.getString("workorder_id"));
|
||||||
jsonIvt.put("ivt_qty", raw_jo.getString("qty"));
|
jsonIvt.put("ivt_qty", raw_jo.getString("qty"));
|
||||||
ivtTab.update(jsonIvt);
|
ivtTab.update(jsonIvt);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新暂存位状态为空位
|
||||||
|
JSONObject jsonPoint = pointTab.query("point_code = '" + point_code1 + "'").uniqueResult(0);
|
||||||
|
jsonPoint.put("point_status", "1");
|
||||||
|
jsonPoint.put("material_code", "");
|
||||||
|
pointTab.update(jsonPoint);
|
||||||
|
|
||||||
// 将入冷却信息发送给mes
|
// 将入冷却信息发送给mes
|
||||||
JSONObject param = new JSONObject();
|
JSONObject param = new JSONObject();
|
||||||
|
|||||||
Reference in New Issue
Block a user