Compare commits
10 Commits
57629f089c
...
4524e9ef86
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4524e9ef86 | ||
|
|
c2e9e15c36 | ||
|
|
1b96f2127b | ||
|
|
9f2bcb6b97 | ||
|
|
f466fbece6 | ||
| bea8987ed5 | |||
|
|
79889a017d | ||
| e6886f78bf | |||
| 909125c1b0 | |||
| 2099b83c3f |
76
.gitignore
vendored
76
.gitignore
vendored
@@ -1,49 +1,47 @@
|
||||
# Compiled class file
|
||||
*.class
|
||||
######################################################################
|
||||
# Build Tools
|
||||
|
||||
# Log file
|
||||
*.log
|
||||
.gradle
|
||||
/build/
|
||||
!gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
# BlueJ files
|
||||
*.ctxt
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
*.nar
|
||||
*.ear
|
||||
*.zip
|
||||
*.tar.gz
|
||||
*.rar
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
# 编译生成的文件
|
||||
target/
|
||||
*.class
|
||||
*.jar
|
||||
*.war
|
||||
*.ear
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
|
||||
# IDE 相关文件
|
||||
.idea/
|
||||
######################################################################
|
||||
# IDE
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
|
||||
# 构建工具相关
|
||||
### JRebel ###
|
||||
rebel.xml
|
||||
|
||||
### NetBeans ###
|
||||
nbproject/private/
|
||||
build/*
|
||||
nbbuild/
|
||||
dist/
|
||||
nbdist/
|
||||
.nb-gradle/
|
||||
|
||||
######################################################################
|
||||
# Others
|
||||
*.log
|
||||
*.tmp
|
||||
*.bak
|
||||
*.xml.versionsBackup
|
||||
*.swp
|
||||
|
||||
# 具体的 target/classes 下的文件
|
||||
ruoyi-admin/target/classes/
|
||||
ruoyi-generator/target/classes/
|
||||
business/target/classes/
|
||||
|
||||
# Velocity 模板文件
|
||||
*.vm
|
||||
!*/build/*.java
|
||||
!*/build/*.html
|
||||
!*/build/*.xml
|
||||
|
||||
@@ -10,7 +10,9 @@ import com.kangaroohy.milo.service.MiloService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@@ -22,8 +24,9 @@ import java.util.Map;
|
||||
import static com.fizz.business.service.manager.OpcMessageIdsManager.*;
|
||||
|
||||
@Slf4j
|
||||
//@Component
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
@ConditionalOnProperty(prefix = "kangaroohy.milo", name = "enabled", havingValue = "true")
|
||||
public class MessageReceiveSchedule extends BaseSchedule {
|
||||
|
||||
@Resource
|
||||
@@ -31,7 +34,7 @@ public class MessageReceiveSchedule extends BaseSchedule {
|
||||
|
||||
@Resource
|
||||
private OpcReceiverHandler opcReceiverHandler;
|
||||
// @Scheduled(fixedDelay = 1000)
|
||||
@Scheduled(fixedDelay = 1000)
|
||||
public void L1L2LineMeasure() {
|
||||
try {
|
||||
|
||||
@@ -45,7 +48,7 @@ public class MessageReceiveSchedule extends BaseSchedule {
|
||||
writeMessage(fur,furLineMeasureIds);
|
||||
|
||||
AppMeasureExitMessage exit = new AppMeasureExitMessage();
|
||||
writeMessage(exit,exitMeasureIds);
|
||||
writeMessage(exit,exitLineMeasureIds);
|
||||
|
||||
AppMeasureMessage msg = new AppMeasureMessage();
|
||||
msg.setAppMeasureEntryMessage(entry);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.fizz.business.comm.OPC;
|
||||
|
||||
import com.fizz.business.anno.MyLog;
|
||||
import com.fizz.business.constants.enums.ExitCutTypeEnum;
|
||||
import com.fizz.business.constants.enums.OpcMessageType;
|
||||
import com.fizz.business.domain.msg.*;
|
||||
@@ -10,9 +9,9 @@ import com.kangaroohy.milo.model.ReadWriteEntity;
|
||||
import com.kangaroohy.milo.service.MiloService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.commons.compress.utils.Lists;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -26,8 +25,9 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import static com.fizz.business.service.manager.OpcMessageIdsManager.*;
|
||||
|
||||
//@Component
|
||||
@Component
|
||||
@Slf4j
|
||||
@ConditionalOnProperty(prefix = "kangaroohy.milo", name = "enabled", havingValue = "true")
|
||||
public class MessageSubscriptionRunner implements ApplicationRunner {
|
||||
|
||||
@Resource
|
||||
@@ -87,7 +87,7 @@ public class MessageSubscriptionRunner implements ApplicationRunner {
|
||||
writeMessage( msg,entryMoveIds);
|
||||
log.info("接收入口移动信号:从 {} 移动到 {} ", msg.getMaterialPlaceSource(), msg.getMaterialPlaceDestination());
|
||||
logDataService.logInfo("TRACK","接收入口移动信号:从 {} 移动到 {} ", msg.getMaterialPlaceSource(), msg.getMaterialPlaceDestination());
|
||||
//opcReceiverHandler.onMessageReceived(OpcMessageType.ENTRY_MOVEMENT,msg);
|
||||
opcReceiverHandler.onMessageReceived(OpcMessageType.ENTRY_MOVEMENT,msg);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
@@ -99,7 +99,7 @@ public class MessageSubscriptionRunner implements ApplicationRunner {
|
||||
writeMessage( msg,exitCutIds);
|
||||
log.info("接收到出口剪切信号:剪切类型 {},剪切长度{} ", msg.getCutType().toString(), msg.getCutLength());
|
||||
logDataService.logInfo("TRACK","接收到出口剪切信号:剪切类型 {},剪切长度{} ", msg.getCutType().toString(), msg.getCutLength());
|
||||
// opcReceiverHandler.onMessageReceived(OpcMessageType.EXIT_CUT,msg);
|
||||
opcReceiverHandler.onMessageReceived(OpcMessageType.EXIT_CUT,msg);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
@@ -111,7 +111,7 @@ public class MessageSubscriptionRunner implements ApplicationRunner {
|
||||
writeMessage( msg,exitMoveIds);
|
||||
log.info("接收出口移动信号:从 {} 移动到 {} ", msg.getExSrc(), msg.getExDesc());
|
||||
logDataService.logInfo("TRACK","接收出口移动信号:从 {} 移动到 {} ", msg.getExSrc(), msg.getExDesc());
|
||||
// opcReceiverHandler.onMessageReceived(OpcMessageType.EXIT_MOVEMENT,msg);
|
||||
opcReceiverHandler.onMessageReceived(OpcMessageType.EXIT_MOVEMENT,msg);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
@@ -120,10 +120,10 @@ public class MessageSubscriptionRunner implements ApplicationRunner {
|
||||
{
|
||||
try {
|
||||
ExitMeasureMessage msg = new ExitMeasureMessage();
|
||||
writeMessage(msg,exitMoveIds);
|
||||
writeMessage(msg,exitMeasureIds);
|
||||
log.info("接收出口称重信号:重量 {} ", msg.getWeight());
|
||||
logDataService.logInfo("TRACK","接收出口称重信号:重量 {} ", msg.getWeight());
|
||||
// opcReceiverHandler.onMessageReceived(OpcMessageType.EXIT_MEASURE,msg);
|
||||
opcReceiverHandler.onMessageReceived(OpcMessageType.EXIT_MEASURE,msg);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.kangaroohy.milo.service.MiloService;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.commons.compress.utils.Lists;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -18,8 +19,9 @@ import java.util.Map;
|
||||
|
||||
import static com.fizz.business.service.manager.OpcMessageIdsManager.pdiSetupIds;
|
||||
|
||||
//@Service
|
||||
@Service
|
||||
@Log4j2
|
||||
@ConditionalOnProperty(prefix = "kangaroohy.milo", name = "enabled", havingValue = "true")
|
||||
public class OpcMessageSend {
|
||||
|
||||
@Resource
|
||||
|
||||
@@ -12,7 +12,6 @@ import com.fizz.business.service.impl.BeanFactory;
|
||||
import com.fizz.business.utils.MatmapUtil;
|
||||
import com.fizz.business.utils.WebSocketUtil;
|
||||
import com.fizz.business.vo.CrmPdiPlanVO;
|
||||
import com.fizz.business.vo.PdiPlanVO;
|
||||
import com.google.common.collect.Lists;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
@@ -33,7 +32,7 @@ public enum L1OperateMatEnum implements IEnum<String>, IOperateMat<L1OperateMatF
|
||||
ONLINE("上线") {
|
||||
@Override
|
||||
public void operate(L1OperateMatForm form) {
|
||||
ONLINE.syncPlanStatus(form.getPlanId());
|
||||
ONLINE.syncPlanStatus(form.getPlanId(),form.getEntryMatId());
|
||||
MatmapUtil.setMatmap(form.getPorIdx(), form.getEntryMatId(), form.getPlanId(), form.getPlanNo());
|
||||
// 钢卷上线时, 缓存工艺规程
|
||||
// BeanFactory.getBean(RedisCacheManager.class).setCoilSetup(form.getPlanId());
|
||||
@@ -56,7 +55,7 @@ public enum L1OperateMatEnum implements IEnum<String>, IOperateMat<L1OperateMatF
|
||||
PRODUCING("生产中") {
|
||||
@Override
|
||||
public void operate(L1OperateMatForm form) {
|
||||
PRODUCING.syncPlanStatus(form.getPlanId());
|
||||
PRODUCING.syncPlanStatus(form.getPlanId(),form.getEntryMatId());
|
||||
|
||||
WebSocketUtil.sendSignalMsg(form);
|
||||
}
|
||||
@@ -64,7 +63,7 @@ public enum L1OperateMatEnum implements IEnum<String>, IOperateMat<L1OperateMatF
|
||||
PRODUCT("生产完成") {
|
||||
@Override
|
||||
public void operate(L1OperateMatForm form) {
|
||||
PRODUCT.syncPlanStatus(form.getPlanId());
|
||||
PRODUCT.syncPlanStatus(form.getPlanId(),form.getEntryMatId());
|
||||
WebSocketUtil.sendSignalMsg(form);
|
||||
}
|
||||
},
|
||||
@@ -110,12 +109,13 @@ public enum L1OperateMatEnum implements IEnum<String>, IOperateMat<L1OperateMatF
|
||||
*
|
||||
* @param planId 计划id
|
||||
*/
|
||||
private void syncPlanStatus(String planId) {
|
||||
private void syncPlanStatus(String planId, String matId) {
|
||||
CrmPdiPlanService planClient = BeanFactory.getBean(CrmPdiPlanService.class);
|
||||
|
||||
planClient.changeStatus(ChangePlanStatusForm.builder()
|
||||
.operation(this.name())
|
||||
.id(planId)
|
||||
.matId(matId)
|
||||
.build());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ public enum WebOperateMatEnum implements IEnum<String>, IOperateMat<WebOperateMa
|
||||
MatmapDTO porCoil = MatmapUtil.getMatmap(form.getPorIdx());
|
||||
if (MatmapUtil.already(porCoil)) {
|
||||
|
||||
ONLINE.syncPlanStatus(form.getPlanId());
|
||||
ONLINE.syncPlanStatus(form.getPlanId(), form.getEntryMatId());
|
||||
WebSocketUtil.sendSignalMsg(form, true);
|
||||
// 如果开卷机和焊机的钢卷相同,则将计划状态变更为生产中
|
||||
MatmapDTO welderCoil = MatmapUtil.getMatmap(DeviceEnum.WELDER.getIdx());
|
||||
@@ -58,7 +58,8 @@ public enum WebOperateMatEnum implements IEnum<String>, IOperateMat<WebOperateMa
|
||||
BeanFactory.getBean(TrackService.class).webOperateMat(form);
|
||||
}
|
||||
} else {
|
||||
ONLINE.syncPlanStatus(form.getPlanId());
|
||||
ONLINE.syncPlanStatus(form.getPlanId(), form.getEntryMatId());
|
||||
;
|
||||
MatmapUtil.setMatmap(form.getPorIdx(), form.getEntryMatId(), form.getPlanId(), form.getPlanNo());
|
||||
WebSocketUtil.sendSignalMsg(form);
|
||||
}
|
||||
@@ -72,7 +73,8 @@ public enum WebOperateMatEnum implements IEnum<String>, IOperateMat<WebOperateMa
|
||||
public void operate(WebOperateMatForm form) {
|
||||
// 开卷机卸卷,变更计划状态为READY,清除matmap
|
||||
if (Objects.nonNull(form.getPorIdx())) {
|
||||
UNLOAD.syncPlanStatus(form.getPlanId());
|
||||
UNLOAD.syncPlanStatus(form.getPlanId(), form.getEntryMatId());
|
||||
;
|
||||
MatmapUtil.clearMatmap(form.getPorIdx());
|
||||
// 删除工艺规程
|
||||
BeanFactory.getBean(RedisCacheManager.class).delCoilSetup(form.getEntryMatId());
|
||||
@@ -107,14 +109,16 @@ public enum WebOperateMatEnum implements IEnum<String>, IOperateMat<WebOperateMa
|
||||
PRODUCING("生产中") {
|
||||
@Override
|
||||
public void operate(WebOperateMatForm form) {
|
||||
PRODUCING.syncPlanStatus(form.getPlanId());
|
||||
PRODUCING.syncPlanStatus(form.getPlanId(), form.getEntryMatId());
|
||||
;
|
||||
WebSocketUtil.sendSignalMsg(form);
|
||||
}
|
||||
},
|
||||
PRODUCT("生产完成") {
|
||||
@Override
|
||||
public void operate(WebOperateMatForm form) {
|
||||
PRODUCT.syncPlanStatus(form.getPlanId());
|
||||
PRODUCT.syncPlanStatus(form.getPlanId(), form.getEntryMatId());
|
||||
;
|
||||
if (Objects.isNull(form.getCoilLength()) || form.getCoilLength() <= 0) {
|
||||
form.setCoilLength(9999d);
|
||||
}
|
||||
@@ -135,7 +139,8 @@ public enum WebOperateMatEnum implements IEnum<String>, IOperateMat<WebOperateMa
|
||||
BLOCK("卸卷并封闭") {
|
||||
@Override
|
||||
public void operate(WebOperateMatForm form) {
|
||||
BLOCK.syncPlanStatus(form.getPlanId());
|
||||
BLOCK.syncPlanStatus(form.getPlanId(), form.getEntryMatId());
|
||||
;
|
||||
MatmapUtil.clearMatmap(form.getPorIdx());
|
||||
// 删除工艺规程
|
||||
BeanFactory.getBean(RedisCacheManager.class).delCoilSetup(form.getEntryMatId());
|
||||
@@ -149,7 +154,7 @@ public enum WebOperateMatEnum implements IEnum<String>, IOperateMat<WebOperateMa
|
||||
ArrayList<String> status = Lists.newArrayList(PlanStatusEnum.ONLINE.name());
|
||||
CrmPdiPlanService planClient = BeanFactory.getBean(CrmPdiPlanService.class);
|
||||
CrmPdiPlanVO plan = planClient.getByCoilIdAndOperId(form.getEntryMatId());
|
||||
if (Objects.nonNull(plan) ) {
|
||||
if (Objects.nonNull(plan)) {
|
||||
Assert.isTrue(!status.contains(plan.getStatus()), "当前状态[{}]不支持甩尾", plan.getStatus());
|
||||
}
|
||||
MatmapUtil.clearMatmap(form.getPorIdx());
|
||||
@@ -185,12 +190,13 @@ public enum WebOperateMatEnum implements IEnum<String>, IOperateMat<WebOperateMa
|
||||
*
|
||||
* @param planId 计划id
|
||||
*/
|
||||
private void syncPlanStatus(String planId) {
|
||||
private void syncPlanStatus(String planId, String matId) {
|
||||
CrmPdiPlanService planClient = BeanFactory.getBean(CrmPdiPlanService.class);
|
||||
|
||||
planClient.changeStatus(ChangePlanStatusForm.builder()
|
||||
.operation(this.name())
|
||||
.id(planId)
|
||||
.matId(matId)
|
||||
.build());
|
||||
}
|
||||
|
||||
@@ -231,7 +237,7 @@ public enum WebOperateMatEnum implements IEnum<String>, IOperateMat<WebOperateMa
|
||||
returnMapper.insert(tailCoil);
|
||||
} else {
|
||||
// 整卷回退删除已有产出
|
||||
BeanFactory.getBean(PdoExCoilService.class).deleteExistPdo(form.getEntryMatId(),form.getPlanId());
|
||||
BeanFactory.getBean(PdoExCoilService.class).deleteExistPdo(form.getEntryMatId(), form.getPlanId());
|
||||
}
|
||||
|
||||
planClient.changeStatus(ChangePlanStatusForm.builder()
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.fizz.business.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.fizz.business.domain.SetupFurTemp;
|
||||
import com.fizz.business.service.ISetupFurTempService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 炉火段工艺参数Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-09-29
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/business/fur")
|
||||
public class SetupFurTempController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISetupFurTempService setupFurTempService;
|
||||
|
||||
/**
|
||||
* 查询炉火段工艺参数列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('business:fur:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SetupFurTemp setupFurTemp)
|
||||
{
|
||||
startPage();
|
||||
List<SetupFurTemp> list = setupFurTempService.selectSetupFurTempList(setupFurTemp);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出炉火段工艺参数列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('business:fur:export')")
|
||||
@Log(title = "炉火段工艺参数", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SetupFurTemp setupFurTemp)
|
||||
{
|
||||
List<SetupFurTemp> list = setupFurTempService.selectSetupFurTempList(setupFurTemp);
|
||||
ExcelUtil<SetupFurTemp> util = new ExcelUtil<SetupFurTemp>(SetupFurTemp.class);
|
||||
util.exportExcel(response, list, "炉火段工艺参数数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取炉火段工艺参数详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('business:fur:query')")
|
||||
@GetMapping(value = "/{steelGrade}")
|
||||
public AjaxResult getInfo(@PathVariable("steelGrade") String steelGrade)
|
||||
{
|
||||
return success(setupFurTempService.selectSetupFurTempBySteelGrade(steelGrade));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增炉火段工艺参数
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('business:fur:add')")
|
||||
@Log(title = "炉火段工艺参数", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SetupFurTemp setupFurTemp)
|
||||
{
|
||||
return toAjax(setupFurTempService.insertSetupFurTemp(setupFurTemp));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改炉火段工艺参数
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('business:fur:edit')")
|
||||
@Log(title = "炉火段工艺参数", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SetupFurTemp setupFurTemp)
|
||||
{
|
||||
return toAjax(setupFurTempService.updateSetupFurTemp(setupFurTemp));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除炉火段工艺参数
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('business:fur:remove')")
|
||||
@Log(title = "炉火段工艺参数", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{steelGrades}")
|
||||
public AjaxResult remove(@PathVariable String[] steelGrades)
|
||||
{
|
||||
return toAjax(setupFurTempService.deleteSetupFurTempBySteelGrades(steelGrades));
|
||||
}
|
||||
}
|
||||
@@ -148,4 +148,19 @@ public class PdiSetups implements Serializable
|
||||
@TableField("TYPE")
|
||||
private Long type;
|
||||
|
||||
/** 预热段出口板温 */
|
||||
@Excel(name = "预热段出口板温")
|
||||
@TableField("PREHEATING_SECTION")
|
||||
private Float preheatingSection;
|
||||
|
||||
/** 加热段出口板温 */
|
||||
@Excel(name = "加热段出口板温")
|
||||
@TableField("HEATING_SECTION")
|
||||
private Float heatingSection;
|
||||
|
||||
/** 冷却段出口板温 */
|
||||
@Excel(name = "冷却段出口板温")
|
||||
@TableField("COOLING_SECTION")
|
||||
private Float coolingSection;
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.fizz.business.domain;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@@ -27,7 +26,7 @@ public class ProMatmap implements Serializable {
|
||||
private String positionNameCn;
|
||||
|
||||
@Schema(description = "计划id")
|
||||
private Long planId;
|
||||
private String planId;
|
||||
|
||||
@Schema(description = "计划号")
|
||||
private String planNo;
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
package com.fizz.business.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 炉火段工艺参数对象 setup_fur_temp
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-09-29
|
||||
*/
|
||||
public class SetupFurTemp extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private String steelGrade;
|
||||
|
||||
/** 预热段出口板温 */
|
||||
@Excel(name = "预热段出口板温")
|
||||
private Long value1;
|
||||
|
||||
/** 加热段出口板温 */
|
||||
@Excel(name = "加热段出口板温")
|
||||
private Long value2;
|
||||
|
||||
/** 冷却段出口板温 */
|
||||
@Excel(name = "冷却段出口板温")
|
||||
private Long value3;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long value4;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long value5;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long value6;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long value7;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long value8;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long value9;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long value10;
|
||||
|
||||
public void setSteelGrade(String steelGrade)
|
||||
{
|
||||
this.steelGrade = steelGrade;
|
||||
}
|
||||
|
||||
public String getSteelGrade()
|
||||
{
|
||||
return steelGrade;
|
||||
}
|
||||
public void setValue1(Long value1)
|
||||
{
|
||||
this.value1 = value1;
|
||||
}
|
||||
|
||||
public Long getValue1()
|
||||
{
|
||||
return value1;
|
||||
}
|
||||
public void setValue2(Long value2)
|
||||
{
|
||||
this.value2 = value2;
|
||||
}
|
||||
|
||||
public Long getValue2()
|
||||
{
|
||||
return value2;
|
||||
}
|
||||
public void setValue3(Long value3)
|
||||
{
|
||||
this.value3 = value3;
|
||||
}
|
||||
|
||||
public Long getValue3()
|
||||
{
|
||||
return value3;
|
||||
}
|
||||
public void setValue4(Long value4)
|
||||
{
|
||||
this.value4 = value4;
|
||||
}
|
||||
|
||||
public Long getValue4()
|
||||
{
|
||||
return value4;
|
||||
}
|
||||
public void setValue5(Long value5)
|
||||
{
|
||||
this.value5 = value5;
|
||||
}
|
||||
|
||||
public Long getValue5()
|
||||
{
|
||||
return value5;
|
||||
}
|
||||
public void setValue6(Long value6)
|
||||
{
|
||||
this.value6 = value6;
|
||||
}
|
||||
|
||||
public Long getValue6()
|
||||
{
|
||||
return value6;
|
||||
}
|
||||
public void setValue7(Long value7)
|
||||
{
|
||||
this.value7 = value7;
|
||||
}
|
||||
|
||||
public Long getValue7()
|
||||
{
|
||||
return value7;
|
||||
}
|
||||
public void setValue8(Long value8)
|
||||
{
|
||||
this.value8 = value8;
|
||||
}
|
||||
|
||||
public Long getValue8()
|
||||
{
|
||||
return value8;
|
||||
}
|
||||
public void setValue9(Long value9)
|
||||
{
|
||||
this.value9 = value9;
|
||||
}
|
||||
|
||||
public Long getValue9()
|
||||
{
|
||||
return value9;
|
||||
}
|
||||
public void setValue10(Long value10)
|
||||
{
|
||||
this.value10 = value10;
|
||||
}
|
||||
|
||||
public Long getValue10()
|
||||
{
|
||||
return value10;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("steelGrade", getSteelGrade())
|
||||
.append("value1", getValue1())
|
||||
.append("value2", getValue2())
|
||||
.append("value3", getValue3())
|
||||
.append("value4", getValue4())
|
||||
.append("value5", getValue5())
|
||||
.append("value6", getValue6())
|
||||
.append("value7", getValue7())
|
||||
.append("value8", getValue8())
|
||||
.append("value9", getValue9())
|
||||
.append("value10", getValue10())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -26,6 +26,9 @@ public class ChangePlanStatusForm implements Serializable {
|
||||
@NotNull(message = "计划id不能为空")
|
||||
@Schema(description = "计划id集合")
|
||||
private String id;
|
||||
@Schema(description = "计划id集合")
|
||||
private String matId;
|
||||
|
||||
@Schema(description = "半卷回退新卷号")
|
||||
private String returnMatId;
|
||||
@Schema(description = "回退重量")
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.fizz.business.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.fizz.business.domain.SetupFurTemp;
|
||||
|
||||
/**
|
||||
* 炉火段工艺参数Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-09-29
|
||||
*/
|
||||
public interface SetupFurTempMapper
|
||||
{
|
||||
/**
|
||||
* 查询炉火段工艺参数
|
||||
*
|
||||
* @param steelGrade 炉火段工艺参数主键
|
||||
* @return 炉火段工艺参数
|
||||
*/
|
||||
public SetupFurTemp selectSetupFurTempBySteelGrade(String steelGrade);
|
||||
|
||||
/**
|
||||
* 查询炉火段工艺参数列表
|
||||
*
|
||||
* @param setupFurTemp 炉火段工艺参数
|
||||
* @return 炉火段工艺参数集合
|
||||
*/
|
||||
public List<SetupFurTemp> selectSetupFurTempList(SetupFurTemp setupFurTemp);
|
||||
|
||||
/**
|
||||
* 新增炉火段工艺参数
|
||||
*
|
||||
* @param setupFurTemp 炉火段工艺参数
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSetupFurTemp(SetupFurTemp setupFurTemp);
|
||||
|
||||
/**
|
||||
* 修改炉火段工艺参数
|
||||
*
|
||||
* @param setupFurTemp 炉火段工艺参数
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSetupFurTemp(SetupFurTemp setupFurTemp);
|
||||
|
||||
/**
|
||||
* 删除炉火段工艺参数
|
||||
*
|
||||
* @param steelGrade 炉火段工艺参数主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSetupFurTempBySteelGrade(String steelGrade);
|
||||
|
||||
/**
|
||||
* 批量删除炉火段工艺参数
|
||||
*
|
||||
* @param steelGrades 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSetupFurTempBySteelGrades(String[] steelGrades);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.fizz.business.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.fizz.business.domain.SetupFurTemp;
|
||||
|
||||
/**
|
||||
* 炉火段工艺参数Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-09-29
|
||||
*/
|
||||
public interface ISetupFurTempService
|
||||
{
|
||||
/**
|
||||
* 查询炉火段工艺参数
|
||||
*
|
||||
* @param steelGrade 炉火段工艺参数主键
|
||||
* @return 炉火段工艺参数
|
||||
*/
|
||||
public SetupFurTemp selectSetupFurTempBySteelGrade(String steelGrade);
|
||||
|
||||
/**
|
||||
* 查询炉火段工艺参数列表
|
||||
*
|
||||
* @param setupFurTemp 炉火段工艺参数
|
||||
* @return 炉火段工艺参数集合
|
||||
*/
|
||||
public List<SetupFurTemp> selectSetupFurTempList(SetupFurTemp setupFurTemp);
|
||||
|
||||
/**
|
||||
* 新增炉火段工艺参数
|
||||
*
|
||||
* @param setupFurTemp 炉火段工艺参数
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSetupFurTemp(SetupFurTemp setupFurTemp);
|
||||
|
||||
/**
|
||||
* 修改炉火段工艺参数
|
||||
*
|
||||
* @param setupFurTemp 炉火段工艺参数
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSetupFurTemp(SetupFurTemp setupFurTemp);
|
||||
|
||||
/**
|
||||
* 批量删除炉火段工艺参数
|
||||
*
|
||||
* @param steelGrades 需要删除的炉火段工艺参数主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSetupFurTempBySteelGrades(String[] steelGrades);
|
||||
|
||||
/**
|
||||
* 删除炉火段工艺参数信息
|
||||
*
|
||||
* @param steelGrade 炉火段工艺参数主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSetupFurTempBySteelGrade(String steelGrade);
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.fizz.business.service.hanle;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.fizz.business.anno.OpcMessageHandlerType;
|
||||
import com.fizz.business.constants.enums.L1OperateMatEnum;
|
||||
import com.fizz.business.constants.enums.OpcMessageType;
|
||||
@@ -33,10 +34,11 @@ public class ExitCutHandler implements OpcMessageHandler<ExitCutMessage> {
|
||||
MatmapDTO trMatmap = MatmapUtil.getMatmap(TR.getIdx());
|
||||
|
||||
if (trMatmap == null) {
|
||||
log.error("卷取机s.");
|
||||
log.error("卷取机不存在");
|
||||
return;
|
||||
}
|
||||
|
||||
log.info("接受到出口剪切信号:{}", JSONUtil.toJsonStr(message));
|
||||
// 2. 根据剪切类型,生成产出卷信息
|
||||
ExitCoilInfoDTO exitCoilInfo = pdoExCoilService.genExitCoilInfo(trMatmap, message.getCutType());
|
||||
|
||||
|
||||
@@ -7,26 +7,28 @@ import com.fizz.business.service.CrmPdoExcoilService;
|
||||
import com.fizz.business.service.OpcMessageHandler;
|
||||
import com.fizz.business.utils.MatmapUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import static com.fizz.business.constants.enums.DeviceEnum.TR;
|
||||
import static com.fizz.business.constants.enums.DeviceEnum.WEIGHT;
|
||||
|
||||
@Component
|
||||
@OpcMessageHandlerType(OpcMessageType.EXIT_MEASURE)
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class ExitMeasureHandler implements OpcMessageHandler<ExitMeasureMessage> {
|
||||
|
||||
private final CrmPdoExcoilService crmPdoExcoilService;
|
||||
|
||||
@Override
|
||||
public void handle(ExitMeasureMessage message) {
|
||||
System.out.println("处理 EXIT_MEASURE 消息: " + message);
|
||||
|
||||
// 1. 获取卷取机 (TR) 上的成品卷号
|
||||
String exitMatId = MatmapUtil.getMatId(TR.getIdx());
|
||||
log.info("获取到钢卷称重信息:{}.",message);
|
||||
String exitMatId = MatmapUtil.getMatId(WEIGHT.getIdx());
|
||||
|
||||
if (exitMatId == null) {
|
||||
System.err.println("TR device has no coil. Cannot process ExitMeasureMessage.");
|
||||
log.error("TR device has no coil. Cannot process ExitMeasureMessage.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,23 +6,28 @@ import com.fizz.business.constants.enums.OpcMessageType;
|
||||
import com.fizz.business.domain.msg.ExitMovementMessage;
|
||||
import com.fizz.business.dto.MatmapDTO;
|
||||
import com.fizz.business.service.OpcMessageHandler;
|
||||
import com.fizz.business.service.ProMatmapService;
|
||||
import com.fizz.business.utils.MatmapUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
@OpcMessageHandlerType(OpcMessageType.EXIT_MOVEMENT)
|
||||
@RequiredArgsConstructor
|
||||
public class ExitMovementHandler implements OpcMessageHandler<ExitMovementMessage> {
|
||||
|
||||
@Resource
|
||||
ProMatmapService proMatmapService;
|
||||
|
||||
@Override
|
||||
public void handle(ExitMovementMessage message) {
|
||||
System.out.printf("处理 EXIT_MOVEMENT 消息: %d -> %d%n", message.getExSrc(), message.getExDesc());
|
||||
|
||||
// 1. 获取源位置的物料信息
|
||||
int srcIndex = message.getExSrc() -1 ;
|
||||
int srcIndex = message.getExSrc() ;
|
||||
MatmapDTO srcMatmap = MatmapUtil.getMatmap(srcIndex);
|
||||
|
||||
if (ObjectUtil.isNull(srcMatmap) || ObjectUtil.isNull(srcMatmap.getMatId())) {
|
||||
@@ -36,9 +41,11 @@ public class ExitMovementHandler implements OpcMessageHandler<ExitMovementMessag
|
||||
log.info("成功清空源位置 {} 的物料信息。{}", srcIndex,srcMatmap.getMatId());
|
||||
|
||||
// 3. 将物料信息设置到目标位置
|
||||
int destIndex = message.getExDesc() - 1;
|
||||
int destIndex = message.getExDesc();
|
||||
MatmapUtil.setMatmap(destIndex, srcMatmap.getMatId(), srcMatmap.getPlanId(), srcMatmap.getPlanNo());
|
||||
log.info("成功设置目标位置 {} 的物料信息为钢卷 {}", destIndex, srcMatmap.getMatId());
|
||||
|
||||
proMatmapService.flushMatmap();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -6,23 +6,14 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fizz.business.domain.CrmPdiPlan;
|
||||
import com.fizz.business.domain.ModCoilMap;
|
||||
import com.fizz.business.domain.ProMatmap;
|
||||
import com.fizz.business.form.*;
|
||||
import com.fizz.business.form.ChangePlanStatusForm;
|
||||
import com.fizz.business.form.PlanQueryForm;
|
||||
import com.fizz.business.mapper.CrmPdiPlanMapper;
|
||||
import com.fizz.business.service.CrmPdiPlanService;
|
||||
import com.fizz.business.service.ModCoilMapService;
|
||||
import com.fizz.business.service.ModSetupResultService;
|
||||
import com.fizz.business.service.ProMatmapService;
|
||||
import com.fizz.business.vo.CrmPdiPlanVO;
|
||||
import com.fizz.business.vo.ModSetupResultVO;
|
||||
import com.fizz.business.vo.PdiPlanSetupInfoVO;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -143,7 +134,7 @@ public class CrmPdiPlanServiceImpl extends ServiceImpl<CrmPdiPlanMapper, CrmPdiP
|
||||
@Override
|
||||
public CrmPdiPlan getFirstUnProducedCoil() {
|
||||
return this.lambdaQuery()
|
||||
.eq(CrmPdiPlan::getStatus, 0) // 0 表示未生产
|
||||
.in(CrmPdiPlan::getStatus, "NEW","READY") // 0 表示未生产
|
||||
.orderByAsc(CrmPdiPlan::getSeqid) // 按顺序号排序,取第一个
|
||||
.last("limit 1")
|
||||
.one();
|
||||
@@ -152,7 +143,11 @@ public class CrmPdiPlanServiceImpl extends ServiceImpl<CrmPdiPlanMapper, CrmPdiP
|
||||
@Override
|
||||
public void changeStatus(ChangePlanStatusForm build) {
|
||||
|
||||
CrmPdiPlan pdiPlan = baseMapper.selectById(build.getId());
|
||||
QueryWrapper<CrmPdiPlan> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("coilid", build.getMatId());
|
||||
wrapper.eq("planid", build.getId());
|
||||
|
||||
CrmPdiPlan pdiPlan = baseMapper.selectOne(wrapper);
|
||||
|
||||
if (pdiPlan == null) {
|
||||
log.error("未找到ID为{}的计划记录", build.getId());
|
||||
@@ -161,6 +156,7 @@ public class CrmPdiPlanServiceImpl extends ServiceImpl<CrmPdiPlanMapper, CrmPdiP
|
||||
|
||||
pdiPlan.setStatus(build.getOperation());
|
||||
|
||||
baseMapper.updateById(pdiPlan);
|
||||
log.info("计划状态更新成功,ID: {}, 新状态: {}", build.getId(), build.getOperation());
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fizz.business.domain.CrmPdoExcoil;
|
||||
import com.fizz.business.domain.PdoExcoil;
|
||||
import com.fizz.business.form.CrmPdoExcoilForm;
|
||||
import com.fizz.business.mapper.CrmPdoExcoilMapper;
|
||||
import com.fizz.business.service.CrmPdoExcoilService;
|
||||
@@ -32,7 +31,7 @@ public class CrmPdoExcoilServiceImpl extends ServiceImpl<CrmPdoExcoilMapper, Crm
|
||||
*/
|
||||
public CrmPdoExcoil getByExcoilId(String excoilid) {
|
||||
QueryWrapper<CrmPdoExcoil> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("exit_coilid", excoilid);
|
||||
queryWrapper.eq("exit_mat_id", excoilid);
|
||||
return this.getOne(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,9 +2,7 @@ package com.fizz.business.service.impl;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.fizz.business.constants.enums.ExitCutTypeEnum;
|
||||
import com.fizz.business.domain.PdoExcoil;
|
||||
import com.fizz.business.dto.ExitCoilInfoDTO;
|
||||
import com.fizz.business.dto.MatmapDTO;
|
||||
import com.fizz.business.dto.PdoExCoilDTO;
|
||||
@@ -109,12 +107,14 @@ public class PdoExCoilServiceImpl implements PdoExCoilService {
|
||||
* 半卷回退上报产出
|
||||
* 1. 头部卷产出时,原料卷号:A01, 产出卷号: A01-1, 分卷标识: true, 尾卷标识: false
|
||||
* 2. 尾部卷产出时:原料卷号:A01,产出卷号: A01-2
|
||||
*
|
||||
* @param trMatmap
|
||||
* @param cutType
|
||||
* @return ExitCoilInfoDTO
|
||||
*/
|
||||
@Override
|
||||
public ExitCoilInfoDTO genExitCoilInfo(MatmapDTO trMatmap, ExitCutTypeEnum cutType) {
|
||||
log.info("触发出口分卷信号:{},剪切类型为:{}",trMatmap,cutType);
|
||||
String trCoilId = trMatmap.getMatId();
|
||||
//准备的成品子卷号
|
||||
//考虑依据数据库记录分卷,避免因为平台重启导致分卷丢失或错误
|
||||
@@ -149,6 +149,6 @@ public class PdoExCoilServiceImpl implements PdoExCoilService {
|
||||
|
||||
@Override
|
||||
public void deleteExistPdo(String coilId, String planId) {
|
||||
crmPdoExcoilService.deleteCrmPdoExcoil(coilId,planId);
|
||||
crmPdoExcoilService.deleteCrmPdoExcoil(coilId, planId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ public class ProStoppageServiceImpl extends ServiceImpl<ProStoppageMapper, ProSt
|
||||
|
||||
queryWrapper.ge("end_date", form.getStartDate() + " 00:00:00")
|
||||
.le("end_date", form.getEndDate() + " 23:59:59")
|
||||
// .ge("duration", 300)
|
||||
.ge("duration", 300)
|
||||
.orderByDesc("end_date");
|
||||
|
||||
List<ProStoppage> list = baseMapper.selectList(queryWrapper);
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.fizz.business.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.fizz.business.mapper.SetupFurTempMapper;
|
||||
import com.fizz.business.domain.SetupFurTemp;
|
||||
import com.fizz.business.service.ISetupFurTempService;
|
||||
|
||||
/**
|
||||
* 炉火段工艺参数Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-09-29
|
||||
*/
|
||||
@Service
|
||||
public class SetupFurTempServiceImpl implements ISetupFurTempService
|
||||
{
|
||||
@Autowired
|
||||
private SetupFurTempMapper setupFurTempMapper;
|
||||
|
||||
/**
|
||||
* 查询炉火段工艺参数
|
||||
*
|
||||
* @param steelGrade 炉火段工艺参数主键
|
||||
* @return 炉火段工艺参数
|
||||
*/
|
||||
@Override
|
||||
public SetupFurTemp selectSetupFurTempBySteelGrade(String steelGrade)
|
||||
{
|
||||
return setupFurTempMapper.selectSetupFurTempBySteelGrade(steelGrade);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询炉火段工艺参数列表
|
||||
*
|
||||
* @param setupFurTemp 炉火段工艺参数
|
||||
* @return 炉火段工艺参数
|
||||
*/
|
||||
@Override
|
||||
public List<SetupFurTemp> selectSetupFurTempList(SetupFurTemp setupFurTemp)
|
||||
{
|
||||
return setupFurTempMapper.selectSetupFurTempList(setupFurTemp);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增炉火段工艺参数
|
||||
*
|
||||
* @param setupFurTemp 炉火段工艺参数
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSetupFurTemp(SetupFurTemp setupFurTemp)
|
||||
{
|
||||
setupFurTemp.setCreateTime(DateUtils.getNowDate());
|
||||
return setupFurTempMapper.insertSetupFurTemp(setupFurTemp);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改炉火段工艺参数
|
||||
*
|
||||
* @param setupFurTemp 炉火段工艺参数
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSetupFurTemp(SetupFurTemp setupFurTemp)
|
||||
{
|
||||
setupFurTemp.setUpdateTime(DateUtils.getNowDate());
|
||||
return setupFurTempMapper.updateSetupFurTemp(setupFurTemp);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除炉火段工艺参数
|
||||
*
|
||||
* @param steelGrades 需要删除的炉火段工艺参数主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSetupFurTempBySteelGrades(String[] steelGrades)
|
||||
{
|
||||
return setupFurTempMapper.deleteSetupFurTempBySteelGrades(steelGrades);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除炉火段工艺参数信息
|
||||
*
|
||||
* @param steelGrade 炉火段工艺参数主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSetupFurTempBySteelGrade(String steelGrade)
|
||||
{
|
||||
return setupFurTempMapper.deleteSetupFurTempBySteelGrade(steelGrade);
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ import com.fizz.business.form.AdjustPosForm;
|
||||
import com.fizz.business.form.L1OperateMatForm;
|
||||
import com.fizz.business.form.WebOperateMatForm;
|
||||
import com.fizz.business.service.CrmPdiPlanService;
|
||||
import com.fizz.business.service.ProMatmapService;
|
||||
import com.fizz.business.service.TrackService;
|
||||
import com.fizz.business.service.client.RedisCacheManager;
|
||||
import com.fizz.business.utils.CalcUtil;
|
||||
@@ -45,6 +46,9 @@ public class TrackServiceImpl implements TrackService {
|
||||
@Autowired
|
||||
RedisCacheManager redisCacheManager;
|
||||
|
||||
@Autowired
|
||||
ProMatmapService proMatmapService;
|
||||
|
||||
@Autowired
|
||||
CrmPdiPlanService crmPdiPlanService;
|
||||
|
||||
@@ -53,6 +57,7 @@ public class TrackServiceImpl implements TrackService {
|
||||
|
||||
log.info("web operate mat: {}", JSON.toJSONString(form));
|
||||
form.getOperation().operate(form);
|
||||
proMatmapService.flushMatmap();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -60,6 +65,7 @@ public class TrackServiceImpl implements TrackService {
|
||||
|
||||
log.info("l1 operate mat: {}", JSON.toJSONString(form));
|
||||
form.getOperation().operate(form);
|
||||
proMatmapService.flushMatmap();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -144,12 +144,12 @@ public class OpcMessageIdsManager {
|
||||
}
|
||||
|
||||
public static void loadFurLineMeasureIds() {
|
||||
furLineMeasureIds.put("ns=2;s=通道 1.PLCLine.FurLineMeasure.entryCoilId", "entryCoilId");
|
||||
furLineMeasureIds.put("ns=2;s=通道 1.PLCLine.FurLineMeasure.stripLocation", "stripLocation");
|
||||
furLineMeasureIds.put("ns=2;s=通道 1.PLCLine.FurLineMeasure.phFurnaceTemperatureActual", "phFurnaceTemperatureActual");
|
||||
furLineMeasureIds.put("ns=2;s=通道 1.PLCLine.FurLineMeasure.nof1FurnaceTemperatureActual", "nof1FurnaceTemperatureActual");
|
||||
furLineMeasureIds.put("ns=2;s=通道 1.PLCLine.FurLineMeasure.nof1FurnaceTemperatureSet", "nof1FurnaceTemperatureSet");
|
||||
furLineMeasureIds.put("ns=2;s=通道 1.PLCLine.FurLineMeasure.nof1FurnaceTemperatureControlOutput", "nof1FurnaceTemperatureControlOutput");
|
||||
furLineMeasureIds.put("ns=2;s=通道 1.PLCFur.FurLineMeasure.entryCoilId", "entryCoilId");
|
||||
// furLineMeasureIds.put("ns=2;s=通道 1.PLCFur.FurLineMeasure.stripLocation", "stripLocation");
|
||||
furLineMeasureIds.put("ns=2;s=通道 1.PLCFur.FurLineMeasure.phFurnaceTemperatureActual", "phFurnaceTemperatureActual");
|
||||
furLineMeasureIds.put("ns=2;s=通道 1.PLCFur.FurLineMeasure.nof1FurnaceTemperatureActual", "nof1FurnaceTemperatureActual");
|
||||
furLineMeasureIds.put("ns=2;s=通道 1.PLCFur.FurLineMeasure.nof1FurnaceTemperatureSet", "nof1FurnaceTemperatureSet");
|
||||
furLineMeasureIds.put("ns=2;s=通道 1.PLCFur.FurLineMeasure.nof1FurnaceTemperatureControlOutput", "nof1FurnaceTemperatureControlOutput");
|
||||
// furLineMeasureIds.put("ns=2;s=通道 1.PLCLine.FurLineMeasure.nof1GasFlowActual", "nof1GasFlowActual");
|
||||
// furLineMeasureIds.put("ns=2;s=通道 1.PLCLine.FurLineMeasure.nof1GasFlowSet", "nof1GasFlowSet");
|
||||
// furLineMeasureIds.put("ns=2;s=通道 1.PLCLine.FurLineMeasure.nof1GasFlowControlOutput", "nof1GasFlowControlOutput");
|
||||
@@ -322,8 +322,8 @@ public class OpcMessageIdsManager {
|
||||
exitLineMeasureIds.put("ns=2;s=通道 1.PLCLine.ExitLineMeasure.stripLocation", "stripLocation");
|
||||
exitLineMeasureIds.put("ns=2;s=通道 1.PLCLine.ExitLineMeasure.tensionBr8Br9", "tensionBr8Br9");
|
||||
exitLineMeasureIds.put("ns=2;s=通道 1.PLCLine.ExitLineMeasure.cxlLength", "cxlLength");
|
||||
exitLineMeasureIds.put("ns=2;s=通道 1.PLCLine.ExitLineMeasure.cxlCapacity", "cxlCapacity");
|
||||
exitLineMeasureIds.put("ns=2;s=通道 1.PLCLine.ExitLineMeasure.tensionCxl", "tensionCxl");
|
||||
exitLineMeasureIds.put("ns=2;s=通道 1.PLCLine.ExitLineMeasure.cxlPercent", "cxlCapacity");
|
||||
// exitLineMeasureIds.put("ns=2;s=通道 1.PLCLine.ExitLineMeasure.tensionCxl", "tensionCxl");
|
||||
exitLineMeasureIds.put("ns=2;s=通道 1.PLCLine.ExitLineMeasure.oilingFlag", "oilingFlag");
|
||||
exitLineMeasureIds.put("ns=2;s=通道 1.PLCLine.ExitLineMeasure.oilingAmountTop", "oilingAmountTop");
|
||||
exitLineMeasureIds.put("ns=2;s=通道 1.PLCLine.ExitLineMeasure.oilingAmountBottom", "oilingAmountBottom");
|
||||
|
||||
@@ -59,7 +59,7 @@ public class MatmapUtil {
|
||||
}
|
||||
|
||||
public static boolean already(MatmapDTO matmap) {
|
||||
return Objects.nonNull(matmap) && StrUtil.isNotBlank(matmap.getMatId());
|
||||
return Objects.nonNull(matmap) && Objects.nonNull(matmap.getMatId());
|
||||
}
|
||||
|
||||
public static void setMatId(int index, String matId) {
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
<mapper namespace="com.fizz.business.mapper.ProMatmapMapper">
|
||||
|
||||
|
||||
<update id="flushMatmap">
|
||||
insert into track_ca1_romtb_matmap (
|
||||
<insert id="flushMatmap">
|
||||
insert into pro_matmap (
|
||||
pos_idx, mat_id, plan_no, plan_id
|
||||
)
|
||||
values
|
||||
@@ -14,7 +14,9 @@
|
||||
(#{item.posIdx}, #{item.matId}, #{item.planNo}, #{item.planId})
|
||||
</foreach>
|
||||
on duplicate key update
|
||||
mat_id = VALUES(mat_id),plan_no = VALUES(plan_no),plan_id = VALUES(plan_id)
|
||||
</update>
|
||||
mat_id = VALUES(mat_id),
|
||||
plan_no = VALUES(plan_no),
|
||||
plan_id = VALUES(plan_id)
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
104
business/src/main/resources/mapper/SetupFurTempMapper.xml
Normal file
104
business/src/main/resources/mapper/SetupFurTempMapper.xml
Normal file
@@ -0,0 +1,104 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.fizz.business.mapper.SetupFurTempMapper">
|
||||
|
||||
<resultMap type="SetupFurTemp" id="SetupFurTempResult">
|
||||
<result property="steelGrade" column="steel_grade" />
|
||||
<result property="value1" column="value1" />
|
||||
<result property="value2" column="value2" />
|
||||
<result property="value3" column="value3" />
|
||||
<result property="value4" column="value4" />
|
||||
<result property="value5" column="value5" />
|
||||
<result property="value6" column="value6" />
|
||||
<result property="value7" column="value7" />
|
||||
<result property="value8" column="value8" />
|
||||
<result property="value9" column="value9" />
|
||||
<result property="value10" column="value10" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSetupFurTempVo">
|
||||
select steel_grade, value1, value2, value3, value4, value5, value6, value7, value8, value9, value10, update_time, create_time from setup_fur_temp
|
||||
</sql>
|
||||
|
||||
<select id="selectSetupFurTempList" parameterType="SetupFurTemp" resultMap="SetupFurTempResult">
|
||||
<include refid="selectSetupFurTempVo"/>
|
||||
<where>
|
||||
<if test="value1 != null "> and value1 = #{value1}</if>
|
||||
<if test="value2 != null "> and value2 = #{value2}</if>
|
||||
<if test="value3 != null "> and value3 = #{value3}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSetupFurTempBySteelGrade" parameterType="String" resultMap="SetupFurTempResult">
|
||||
<include refid="selectSetupFurTempVo"/>
|
||||
where steel_grade = #{steelGrade}
|
||||
</select>
|
||||
|
||||
<insert id="insertSetupFurTemp" parameterType="SetupFurTemp">
|
||||
insert into setup_fur_temp
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="steelGrade != null">steel_grade,</if>
|
||||
<if test="value1 != null">value1,</if>
|
||||
<if test="value2 != null">value2,</if>
|
||||
<if test="value3 != null">value3,</if>
|
||||
<if test="value4 != null">value4,</if>
|
||||
<if test="value5 != null">value5,</if>
|
||||
<if test="value6 != null">value6,</if>
|
||||
<if test="value7 != null">value7,</if>
|
||||
<if test="value8 != null">value8,</if>
|
||||
<if test="value9 != null">value9,</if>
|
||||
<if test="value10 != null">value10,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="steelGrade != null">#{steelGrade},</if>
|
||||
<if test="value1 != null">#{value1},</if>
|
||||
<if test="value2 != null">#{value2},</if>
|
||||
<if test="value3 != null">#{value3},</if>
|
||||
<if test="value4 != null">#{value4},</if>
|
||||
<if test="value5 != null">#{value5},</if>
|
||||
<if test="value6 != null">#{value6},</if>
|
||||
<if test="value7 != null">#{value7},</if>
|
||||
<if test="value8 != null">#{value8},</if>
|
||||
<if test="value9 != null">#{value9},</if>
|
||||
<if test="value10 != null">#{value10},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSetupFurTemp" parameterType="SetupFurTemp">
|
||||
update setup_fur_temp
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="value1 != null">value1 = #{value1},</if>
|
||||
<if test="value2 != null">value2 = #{value2},</if>
|
||||
<if test="value3 != null">value3 = #{value3},</if>
|
||||
<if test="value4 != null">value4 = #{value4},</if>
|
||||
<if test="value5 != null">value5 = #{value5},</if>
|
||||
<if test="value6 != null">value6 = #{value6},</if>
|
||||
<if test="value7 != null">value7 = #{value7},</if>
|
||||
<if test="value8 != null">value8 = #{value8},</if>
|
||||
<if test="value9 != null">value9 = #{value9},</if>
|
||||
<if test="value10 != null">value10 = #{value10},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where steel_grade = #{steelGrade}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSetupFurTempBySteelGrade" parameterType="String">
|
||||
delete from setup_fur_temp where steel_grade = #{steelGrade}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSetupFurTempBySteelGrades" parameterType="String">
|
||||
delete from setup_fur_temp where steel_grade in
|
||||
<foreach item="steelGrade" collection="array" open="(" separator="," close=")">
|
||||
#{steelGrade}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -5,8 +5,8 @@
|
||||
<mapper namespace="com.fizz.business.mapper.ProMatmapMapper">
|
||||
|
||||
|
||||
<update id="flushMatmap">
|
||||
insert into track_ca1_romtb_matmap (
|
||||
<insert id="flushMatmap">
|
||||
insert into pro_matmap (
|
||||
pos_idx, mat_id, plan_no, plan_id
|
||||
)
|
||||
values
|
||||
@@ -14,7 +14,9 @@
|
||||
(#{item.posIdx}, #{item.matId}, #{item.planNo}, #{item.planId})
|
||||
</foreach>
|
||||
on duplicate key update
|
||||
mat_id = VALUES(mat_id),plan_no = VALUES(plan_no),plan_id = VALUES(plan_id)
|
||||
</update>
|
||||
mat_id = VALUES(mat_id),
|
||||
plan_no = VALUES(plan_no),
|
||||
plan_id = VALUES(plan_id)
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
@@ -61,4 +61,13 @@
|
||||
<select id="getLatestRecord" resultType="com.fizz.business.domain.Segment">
|
||||
SELECT * FROM cpg_segment where id=(SELECT max(id) FROM cpg_segment)
|
||||
</select>
|
||||
|
||||
<select id="queryParamByEnCoilId" resultType="com.fizz.business.vo.SegmentParamVO">
|
||||
SELECT seg_no AS segNo,
|
||||
JSON_UNQUOTE(JSON_EXTRACT(total_values_json, CONCAT('$.', #{paramField}, '_avg'))) AS value
|
||||
FROM cpl_segment_total
|
||||
WHERE en_coil_id = #{enCoilID}
|
||||
ORDER BY seg_no
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -74,19 +74,19 @@ spring:
|
||||
port: 6379
|
||||
# 数据库索引
|
||||
database: 0
|
||||
# 密码 abcd1234 fe2b3cef78b74d3692909bdcbdf46331 KeLunPu123!
|
||||
# password: KeLunPu123!
|
||||
# 密码 abcd1234 fe2b3cef78b74d3692909bdcbdf46331 KeLunPu123!
|
||||
password:
|
||||
#password:
|
||||
# 连接超时时间
|
||||
timeout: 20s
|
||||
timeout: 10s
|
||||
lettuce:
|
||||
pool:
|
||||
# 连接池中的最小空闲连接
|
||||
min-idle: 2
|
||||
min-idle: 0
|
||||
# 连接池中的最大空闲连接
|
||||
max-idle: 10
|
||||
max-idle: 8
|
||||
# 连接池的最大数据库连接数
|
||||
max-active: 20
|
||||
max-active: 8
|
||||
# #连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
max-wait: -1ms
|
||||
|
||||
@@ -140,7 +140,7 @@ xss:
|
||||
# 匹配链接
|
||||
urlPatterns: /system/*,/monitor/*,/tool/*
|
||||
|
||||
#rocketmq:
|
||||
#rocketmq:
|
||||
#name-server: 127.0.0.1:9876
|
||||
#producer:
|
||||
#group: test
|
||||
@@ -173,7 +173,7 @@ kangaroohy:
|
||||
primary: default
|
||||
config:
|
||||
default:
|
||||
endpoint: opc.tcp://127.0.0.1:49320
|
||||
endpoint: opc.tcp://192.168.0.196:49320
|
||||
security-policy: none
|
||||
pool:
|
||||
max-idle: 5
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<!-- 日志存放路径 -->
|
||||
<property name="log.path" value="/usr/bin/l2dev/logs" />
|
||||
<property name="log.path" value="/home/userroot/Application/dev/logs" />
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/sys-info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>7</maxHistory>
|
||||
<maxHistory>3</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
|
||||
@@ -111,7 +111,7 @@ public class SecurityConfig
|
||||
.authorizeHttpRequests((requests) -> {
|
||||
permitAllUrl.getUrls().forEach(url -> requests.antMatchers(url).permitAll());
|
||||
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
|
||||
requests.antMatchers("/login", "/register", "/captchaImage", "/roller/**","/pdi/**","/pdo/**").permitAll()
|
||||
requests.antMatchers("/login", "/register", "/captchaImage", "/roller/**","/pdi/**","/pdo/**","/track/**","/business/**").permitAll()
|
||||
// 静态资源,可匿名访问
|
||||
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
|
||||
.antMatchers("/doc.html","/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/v3/api-docs/**", "/druid/**").permitAll()
|
||||
|
||||
Reference in New Issue
Block a user