feat: 分切上轴新页面开发

This commit is contained in:
2025-01-03 11:26:15 +08:00
parent a36833c81b
commit 3865da1cb7
4 changed files with 138 additions and 1 deletions

View File

@@ -169,6 +169,18 @@ public class SlitterPdaController {
public ResponseEntity<Object> doUpShaftToSlitter(@RequestBody JSONObject param) {
return new ResponseEntity<>(slitterDevices.doUpShaftToSlitter(param), HttpStatus.OK);
}
@PostMapping("/doUpShaftToSlitterByDevice")
@Log("手持分切机上气胀轴2")
@SaIgnore
public ResponseEntity<Object> doUpShaftToSlitterByDevice(@RequestBody JSONObject param) {
return new ResponseEntity<>(slitterDevices.doUpShaftToSlitterByDevice(param), HttpStatus.OK);
}
@PostMapping("/doUpShaftToSlitterByDeviceTip")
@Log("手持分切机上气胀轴提示")
@SaIgnore
public ResponseEntity<Object> doUpShaftToSlitterByDeviceTip(@RequestBody JSONObject param) {
return new ResponseEntity<>(slitterDevices.doUpShaftToSlitterByDeviceTip(param), HttpStatus.OK);
}
@PostMapping("/getUpShaftTip")
@Log("手持分切机上气胀轴-查询信息")
@SaIgnore

View File

@@ -250,6 +250,11 @@ public interface SlitterService {
*/
JSONObject markingFoilSlittingToCache(JSONObject param);
/**
* 手持维护重量
* @param param
* @return
*/
JSONObject doSubRollWeightBinding(JSONObject param);
/**
@@ -265,4 +270,25 @@ public interface SlitterService {
* @return /
*/
JSONObject getUpShaftTip(JSONObject param);
/**
* 分切暂存管理的提示
* @param param /
* @return /
*/
JSONObject getCutStorageTip(JSONObject param);
/**
* 分切上轴,(使用设备号来上轴)
* @param param
* @return
*/
JSONObject doUpShaftToSlitterByDevice(JSONObject param);
/**
* 分切上轴2提示
* @param param
* @return
*/
JSONObject doUpShaftToSlitterByDeviceTip(JSONObject param);
}

View File

@@ -779,6 +779,7 @@ public class SlitterServiceImpl implements SlitterService {
JSONObject taskParam = new JSONObject();
taskParam.put("point_code2", one.getPoint_code());
taskParam.put("material_code", plan.getContainer_name());
// todo: ????
taskParam.put("to_is_labeling", "0");
res.put("status", HttpStatus.HTTP_OK);
res.put("message", "请求成功!");
@@ -1770,4 +1771,102 @@ public class SlitterServiceImpl implements SlitterService {
// 判断
return res;
}
@Override
public JSONObject getCutStorageTip(JSONObject param) {
// param: point_code
JSONObject res = new JSONObject();
JSONObject data = new JSONObject();
res.put("status", HttpStatus.HTTP_OK);
res.put("data", data);
List<String> tips = new ArrayList<>();
String pointCode = param.getString("point_code");
String containerName = param.getString("container_name");
BstIvtCutpointivt zcPoint = bcutpointivtService.getPintByTrussCode(pointCode, false);
if ("1".equals(zcPoint.getPoint_status())) {
// 空位
data.put("i_status", "空位");
} else if ("2".equals(zcPoint.getPoint_status())) {
// 气胀轴
data.put("i_status", "有气胀轴");
} else {
// 子卷
data.put("i_status", "有子卷");
}
return null;
}
@Override
public JSONObject doUpShaftToSlitterByDevice(JSONObject param) {
log.info("手持申请分切上料参数:{}", param);
JSONObject res = new JSONObject();
res.put("status", HttpStatus.HTTP_OK);
res.put("message", "创建桁架任务成功!");
// param: area, device_code
String area = param.getString("area");
String deviceCode = param.getString("device_code");
// 获取当前分切机的下一组分切计划(最多四条分切计划)
// hint: 获取到的分切可能是不同组的但具有一定时间顺序, 可能是以前的脏数据
List<PdmBiSlittingproductionplan> timePlans = slittingproductionplanService.list(
new LambdaQueryWrapper<PdmBiSlittingproductionplan>()
.eq(PdmBiSlittingproductionplan::getResource_name, deviceCode)
.eq(PdmBiSlittingproductionplan::getStatus, "03")
.eq(PdmBiSlittingproductionplan::getIs_delete, "0")
.orderByAsc(PdmBiSlittingproductionplan::getUpdate_time));
log.info("获取下一组分切计划:{}", timePlans);
if (timePlans.size() > 0) {
// 寻找备好轴的对接点位
List<BstIvtCutpointivt> cutPointList = slitterMapper.getReadyShaftPoint(deviceCode);
if (cutPointList.size() == 0) {
throw new BadRequestException("没有为设备[" + deviceCode + "]套好轴的位置!");
} else {
// 找到该分切计划的点位
BstIvtCutpointivt newCutPoint = cutPointList.get(0);
// 创建任务
JSONObject taskParam = new JSONObject();
taskParam.put("point_code", newCutPoint.getPoint_code());
doUpShaftToSlitter(taskParam);
}
} else {
throw new BadRequestException("没有为设备[" + deviceCode + "]套好轴的位置!");
}
return res;
}
@Override
public JSONObject doUpShaftToSlitterByDeviceTip(JSONObject param) {
JSONObject res = new JSONObject();
res.put("status", HttpStatus.HTTP_OK);
// param: area, device_code
String area = param.getString("area");
String deviceCode = param.getString("device_code");
List<String> tips = new ArrayList<>();
// 获取当前分切机的下一组分切计划(最多四条分切计划)
// hint: 获取到的分切可能是不同组的但具有一定时间顺序, 可能是以前的脏数据
List<PdmBiSlittingproductionplan> timePlans = slittingproductionplanService.list(
new LambdaQueryWrapper<PdmBiSlittingproductionplan>()
.eq(PdmBiSlittingproductionplan::getResource_name, deviceCode)
.eq(PdmBiSlittingproductionplan::getStatus, "03")
.eq(PdmBiSlittingproductionplan::getIs_delete, "0")
.orderByAsc(PdmBiSlittingproductionplan::getUpdate_time));
log.info("获取下一组分切计划:{}", timePlans);
if (timePlans.size() > 0) {
// 寻找备好轴的对接点位
List<BstIvtCutpointivt> cutPointList = slitterMapper.getReadyShaftPoint(deviceCode);
if (cutPointList.size() == 0) {
tips.add("没有为设备[" + deviceCode + "]套好轴的位置!或者已经创建任务!");
} else {
String collect = timePlans.stream().map(PdmBiSlittingproductionplan::getContainer_name).collect(Collectors.joining("','"));
// 找到该分切计划的点位
BstIvtCutpointivt newCutPoint = cutPointList.get(0);
tips.add("为设备[" + deviceCode + "]套好轴的位置在[" + newCutPoint.getPoint_code() + "], " +
"对应的计划: " + collect);
}
} else {
tips.add("没有为设备[" + deviceCode + "]套好轴的位置!");
}
res.put("tip", tips.stream().collect(Collectors.joining(",")));
return res;
}
}

View File

@@ -2378,7 +2378,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
}
res.put("RTOAL", 0);
res.put("RTMSG", "称重失败!");
res.put("RTYPE", "F");
res.put("RTYPE", "E");
log.error("废箔称重反馈MES, 反馈信息:{}", res);
return res;
}