jx mes 生产线运行看板 工序平衡可视化

tags/yfai-mes-ext-v1.0
王杰 1 year ago
parent 2a51392cd9
commit 6ba8a84a42

@ -57,9 +57,8 @@ public class JxCenterWorkingBoardController extends MesBaseController {
@PostMapping(value = "/ext/jx/center-working-board/delete-cached-data")
@ApiOperation(value = "嘉兴产线运行看板缓存数据清除")
public ResultBean deleteCachedCenterWorkingBoardData(@RequestBody Map<String, Object> dataMap) {
public ResultBean deleteCachedCenterWorkingBoardData(String organizeCode) {
try {
String organizeCode = (null != dataMap && dataMap.containsKey(MesExtConstWords.ORGANIZE_CODE)) ? (String) dataMap.get(MesExtConstWords.ORGANIZE_CODE) : AuthUtil.getOrganize().getOrganizeCode();
centerWorkingBoardService.execCachedCenterWorkingBoardData(organizeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValueStr(), null, null);
return ResultBean.success("操作成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
} catch (ImppBusiException busExcep) {

@ -29,20 +29,29 @@ public class JxCenterWorkingBoardDispatchService implements IJxCenterWorkingBoar
switch ((String) dataMap.get(MesExtConstWords.FLAG)) {
case "center01":
return new JxCenterWorkingBoardCenterOneService(new JxCenterWorkingBoardProxyCenterService(), new JxCenterWorkingBoardProxyWorkingStatusService(new JxCenterWorkingBoardProxySpcrService())).queryCenterWorkingBoardData(dataMap);
return new JxCenterWorkingBoardWatchService(
new JxCenterWorkingBoardCenterOneService(new JxCenterWorkingBoardProxyCenterService(),
new JxCenterWorkingBoardProxyWorkingStatusService(new JxCenterWorkingBoardProxySpcrService())
)).queryCenterWorkingBoardData(dataMap);
case "center02":
return new JxCenterWorkingBoardCenterTwoService(new JxCenterWorkingBoardProxyCenterService(), new JxCenterWorkingBoardProxyStandardWorkService(),
new JxCenterWorkingBoardProxyEnergyRateService(new JxCenterWorkingBoardProxyOrderService(new JxCenterWorkingBoardProxyOutPutService(new JxCenterWorkingBoardProxyRepairService(new JxCenterWorkingBoardProxySpcrService()))))).queryCenterWorkingBoardData(dataMap);
return new JxCenterWorkingBoardWatchService(
new JxCenterWorkingBoardCenterTwoService(new JxCenterWorkingBoardProxyCenterService(), new JxCenterWorkingBoardProxyStandardWorkService(),
new JxCenterWorkingBoardProxyEnergyRateService(new JxCenterWorkingBoardProxyOrderService(new JxCenterWorkingBoardProxyOutPutService(new JxCenterWorkingBoardProxyRepairService(new JxCenterWorkingBoardProxySpcrService()))))
)).queryCenterWorkingBoardData(dataMap);
case "center03":
return new JxCenterWorkingBoardCenterThreeService(new JxCenterWorkingBoardProxyCenterService(), new JxCenterWorkingBoardProxyStandardWorkService(),
new JxCenterWorkingBoardProxyOrderService(new JxCenterWorkingBoardProxyOutPutService(new JxCenterWorkingBoardProxyTimeSegmentService()))).queryCenterWorkingBoardData(dataMap);
return new JxCenterWorkingBoardWatchService(
new JxCenterWorkingBoardCenterThreeService(new JxCenterWorkingBoardProxyCenterService(), new JxCenterWorkingBoardProxyStandardWorkService(),
new JxCenterWorkingBoardProxyOrderService(new JxCenterWorkingBoardProxyOutPutService(new JxCenterWorkingBoardProxyTimeSegmentService()))
)).queryCenterWorkingBoardData(dataMap);
case "monitor01":
return new JxCenterWorkingBoardMonitorOneService(
new JxCenterWorkingBoardProxyAllCenterService(), new JxCenterWorkingBoardProxyStandardWorkService(), new JxCenterWorkingBoardProxyWorkingStatusService(), new JxCenterWorkingBoardProxyEnergyRateService(),
new JxCenterWorkingBoardProxyOrderService(new JxCenterWorkingBoardProxyOutPutService(new JxCenterWorkingBoardProxyRepairService(new JxCenterWorkingBoardProxySpcrService())))).queryCenterWorkingBoardData(dataMap);
return new JxCenterWorkingBoardWatchService(
new JxCenterWorkingBoardMonitorOneService(
new JxCenterWorkingBoardProxyAllCenterService(), new JxCenterWorkingBoardProxyStandardWorkService(), new JxCenterWorkingBoardProxyWorkingStatusService(), new JxCenterWorkingBoardProxyEnergyRateService(),
new JxCenterWorkingBoardProxyOrderService(new JxCenterWorkingBoardProxyOutPutService(new JxCenterWorkingBoardProxyRepairService(new JxCenterWorkingBoardProxySpcrService())))
)).queryCenterWorkingBoardData(dataMap);
default:
return dataMap;

@ -0,0 +1,53 @@
package cn.estsh.i3plus.ext.mes.apiservice.serviceimpl.busi.jx;
import cn.estsh.i3plus.ext.mes.api.busi.jx.IJxCenterWorkingBoardService;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.springframework.util.StopWatch;
import java.util.Map;
/**
* @Author : wangjie
* @CreateDate : 2022-02-15
* @Modify:
**/
@Slf4j
public class JxCenterWorkingBoardWatchService implements IJxCenterWorkingBoardService {
private IJxCenterWorkingBoardService proxyService;
public JxCenterWorkingBoardWatchService(IJxCenterWorkingBoardService proxyService) {
this.proxyService = proxyService;
}
@Override
public Map<String, Object> queryCenterWorkingBoardData(Map<String, Object> dataMap) {
log.info("嘉兴产线运行看板 --- WATCH START --- DATA:{} --- THREAD:{}", JSONObject.toJSONString(dataMap), Thread.currentThread().getName());
StopWatch stopWatch = new StopWatch();
stopWatch.start();
try {
dataMap = proxyService.queryCenterWorkingBoardData(dataMap);
} catch (Exception e) {
log.info("嘉兴产线运行看板 --- WATCH EXCEPTION --- {} --- THREAD:{} --- {} ---", e.toString(), Thread.currentThread().getName(), "\r\n" + JSONObject.toJSONString(e));
} finally {
stopWatch.stop();
log.info("嘉兴产线运行看板 --- WATCH END --- 耗时:{}ms --- DATA:{} --- THREAD:{}", stopWatch.getTotalTimeMillis(), JSONObject.toJSONString(dataMap), Thread.currentThread().getName());
}
return dataMap;
}
}
Loading…
Cancel
Save