tags/yfai-mes-ext-v1.0
王杰 1 year ago
parent 1ca09aadc8
commit aa1964420e

@ -189,6 +189,8 @@ public class JxCenterWorkingBoardCenterTwoService extends JxCenterWorkingBoardCo
List<MesWorkOrder> workOrderList2Sort = getWorkOrderList2Sort(workOrderList, outPutStatisticsList, workCenterExtDb);
outPutStatisticsList = sortOutPutStatisticsList(outPutStatisticsList);
Set<String> partNoList = new TreeSet<>();
if (!CollectionUtils.isEmpty(outPutStatisticsList)) partNoList.add(outPutStatisticsList.get(0).getPartNo());
if (!CollectionUtils.isEmpty(workOrderList2Sort)) workOrderList2Sort.stream().filter(o -> null != o).forEach(o -> partNoList.add(o.getPartNo()));
@ -206,7 +208,7 @@ public class JxCenterWorkingBoardCenterTwoService extends JxCenterWorkingBoardCo
Map<String, List<MesOutPutStatistics>> itemMap2OutPut = getOutPutStatisticsMapByOrderNo(outPutList);
psData.addChartData2ChartDataLists(5, partNo, statisticsPlanQty(orderList, itemMap2OutPut, workCenterExtDb), getOutPutStatisticsList2AmountQty(outPutList), !CollectionUtils.isEmpty(psData.getChartDataLists()) ? "#ffffff" : "#008000");
psData.addChartData2ChartDataLists(5, partNo, statisticsPlanQty(orderList, itemMap2OutPut, workCenterExtDb), getOutPutStatisticsList2AmountQty(outPutList), !CollectionUtils.isEmpty(psData.getChartDataLists()) ? null : "#008000");
}

@ -58,6 +58,12 @@ public class JxCenterWorkingBoardDispatchService implements IJxCenterWorkingBoar
new JxCenterWorkingBoardProxyOrderService(new JxCenterWorkingBoardProxyOutPutService(new JxCenterWorkingBoardProxySpcrService(new JxCenterWorkingBoardProxySpcPmService())))
)).queryCenterWorkingBoardData(dataMap);
// case "workDaily":
// return new JxCenterWorkingBoardWatchService(new JxCenterWorkingBoardWorkDailyService(
// new JxCenterWorkingBoardProxyCenterService(),
// new JxCenterWorkingBoardProxyOutPutService(new JxCenterWorkingBoardProxySpcrService(new JxCenterWorkingBoardProxySpcPmService(new JxCenterWorkingBoardProxyAssistService())))
// )).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 cn.estsh.i3plus.ext.mes.pojo.bean.MesAssistOutAndEnter;
import cn.estsh.i3plus.ext.mes.pojo.bean.MesShiftProdCenterPm;
import cn.estsh.i3plus.ext.mes.pojo.repository.MesAssistOutAndEnterRepository;
import cn.estsh.i3plus.ext.mes.pojo.repository.MesShiftProdCenterPmRepository;
import cn.estsh.i3plus.ext.mes.pojo.util.MesExtConstWords;
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
import cn.estsh.impp.framework.boot.util.SpringContextsUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import java.util.List;
import java.util.Map;
/**
* @Author : wangjie
* @CreateDate : 2022-02-15
* @Modify:
**/
@Slf4j
public class JxCenterWorkingBoardProxyAssistService implements IJxCenterWorkingBoardService {
private MesAssistOutAndEnterRepository assistOutAndEnterRepository;
public JxCenterWorkingBoardProxyAssistService() {
this.assistOutAndEnterRepository = (MesAssistOutAndEnterRepository) SpringContextsUtil.getBean("mesAssistOutAndEnterRepository");
}
@Override
public Map<String, Object> queryCenterWorkingBoardData(Map<String, Object> dataMap) {
String organizeCode = (String) dataMap.get(MesExtConstWords.ORGANIZE_CODE);
String workCenterCode = (String) dataMap.get(MesExtConstWords.WORK_CENTER_CODE);
String startTime = (String) dataMap.get(MesExtConstWords.START_TIME);
String endTime = (String) dataMap.get(MesExtConstWords.END_TIME);
DdlPackBean packBean = DdlPackBean.getDdlPackBean(organizeCode);
DdlPreparedPack.timeBuilder(startTime, endTime, MesExtConstWords.WORK_TIME, true, true, packBean);
List<MesAssistOutAndEnter> assistOutAndEnterList = assistOutAndEnterRepository.findByHqlWhere(packBean);
if (CollectionUtils.isEmpty(assistOutAndEnterList)) return dataMap;
dataMap.put(MesAssistOutAndEnter.class.getSimpleName(), assistOutAndEnterList);
return dataMap;
}
}

@ -23,15 +23,22 @@ import java.util.Map;
@Slf4j
public class JxCenterWorkingBoardProxySpcPmService implements IJxCenterWorkingBoardService {
private IJxCenterWorkingBoardService proxyService;
private MesShiftProdCenterPmRepository shiftProdCenterPmRepository;
public JxCenterWorkingBoardProxySpcPmService() {
this.shiftProdCenterPmRepository = (MesShiftProdCenterPmRepository) SpringContextsUtil.getBean("mesShiftProdCenterPmRepository");
public JxCenterWorkingBoardProxySpcPmService() {}
public JxCenterWorkingBoardProxySpcPmService(IJxCenterWorkingBoardService proxyService) {
this.proxyService = proxyService;
}
@Override
public Map<String, Object> queryCenterWorkingBoardData(Map<String, Object> dataMap) {
if (null != proxyService) proxyService.queryCenterWorkingBoardData(dataMap);
this.shiftProdCenterPmRepository = (MesShiftProdCenterPmRepository) SpringContextsUtil.getBean("mesShiftProdCenterPmRepository");
String organizeCode = (String) dataMap.get(MesExtConstWords.ORGANIZE_CODE);
String workCenterCode = (String) dataMap.get(MesExtConstWords.WORK_CENTER_CODE);
String workTime = (String) dataMap.get(MesExtConstWords.WORK_TIME);

Loading…
Cancel
Save