opt:加急送轴功能开发

This commit is contained in:
DESKTOP-5DIJMF9\admin
2025-04-10 14:29:40 +08:00
parent bdbe383851
commit fcd1e5a035
5 changed files with 47 additions and 1 deletions

View File

@@ -219,6 +219,12 @@ public class SlitterPdaController {
public ResponseEntity<Object> showManualView(@RequestBody JSONObject param) {
return new ResponseEntity<>(slitterDevices.showManualView(param), HttpStatus.OK);
}
@PostMapping("/urgentPlan")
@Log("加急送轴")
@SaIgnore
public ResponseEntity<Object> urgentPlan(@RequestBody JSONObject param) {
return new ResponseEntity<>(slitterDevices.urgentPlan(param), HttpStatus.OK);
}
@PostMapping("/rollCacheManage")
@Log("母卷暂存架子管理")
@SaIgnore

View File

@@ -138,6 +138,7 @@
</select>
<select id="showManualView" resultType="org.nl.b_lms.sch.tasks.slitter.mapper.dto.CallPlanViewVO">
SELECT
p.workorder_id,
p.resource_name,
CASE
WHEN LENGTH(p.parent_container_name) > 0 THEN
@@ -161,6 +162,7 @@
AND '1' = (SELECT c.is_used FROM st_ivt_cutpointivt c WHERE c.ext_code = p.resource_name)
AND p.parent_container_name LIKE '%虚拟-B%'
GROUP BY
p.workorder_id,
p.resource_name,
p.parent_container_name,
p.restruct_container_name,

View File

@@ -10,6 +10,10 @@ import java.io.Serializable;
*/
@Data
public class CallPlanViewVO implements Serializable {
/**
* uuid
*/
private String workorder_id;
/**
* 分切设备
*/

View File

@@ -314,6 +314,13 @@ public interface SlitterService {
*/
List<CallPlanViewVO> showManualView(JSONObject param);
/**
* 加急送轴
* @param param
* @return
*/
JSONObject urgentPlan(JSONObject param);
/**
* 子卷下料2
* @param param

View File

@@ -2181,7 +2181,34 @@ public class SlitterServiceImpl implements SlitterService {
public List<CallPlanViewVO> showManualView(JSONObject param) {
return slitterMapper.showManualView();
}
@Override
public JSONObject urgentPlan(JSONObject param) {
JSONObject res = new JSONObject();
log.info("加急送轴的输入参数为:{}", param);
String workorder_id = param.getString("workorder_id");
PdmBiSlittingproductionplan plan = slittingproductionplanService.getById(workorder_id);
log.info("当前加急送轴的计划为:{}", plan);
if(!"01".equals(plan.getStatus())){
res.put("status", HttpStatus.HTTP_OK);
res.put("message", "加急失败,当前计划正在套轴!");
return res;
}
//更新套轴计划开始时间为当前时间
LambdaUpdateWrapper<PdmBiSlittingproductionplan> updateWrapper = new LambdaUpdateWrapper<PdmBiSlittingproductionplan>();
updateWrapper.set(PdmBiSlittingproductionplan::getStart_time, DateUtil.now())
.eq(PdmBiSlittingproductionplan::getWorkorder_id, workorder_id)
.eq(PdmBiSlittingproductionplan::getIs_delete, SlitterConstant.SLITTER_NO);
//判断更新是否成功
boolean flag = slittingproductionplanService.update(updateWrapper);
if(flag){
res.put("status", HttpStatus.HTTP_OK);
res.put("message", "加急成功!");
}else{
res.put("status", HttpStatus.HTTP_OK);
res.put("message", "加急失败,请刷新再试!");
}
return res;
}
@Override
public JSONObject downRolls2(JSONObject param) {
log.info("下卷2的输入参数为{}", param);