|
@@ -3,6 +3,7 @@ package com.rongwei.bscommon.sys.service.impl;
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
import cn.hutool.core.date.DateField;
|
|
|
+import cn.hutool.core.date.DateUnit;
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
import cn.hutool.json.JSONConfig;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
@@ -14,6 +15,7 @@ import com.rongwei.bsentity.domain.*;
|
|
|
import com.rongwei.bsentity.vo.*;
|
|
|
import com.rongwei.rwadmincommon.system.vo.SysUserVo;
|
|
|
import com.rongwei.rwcommon.base.exception.CustomException;
|
|
|
+import com.rongwei.rwcommon.utils.DateUtils;
|
|
|
import com.rongwei.rwcommon.utils.SecurityUtil;
|
|
|
import com.rongwei.rwcommon.utils.StringUtils;
|
|
|
import com.rongwei.safecommon.utils.CXCommonUtils;
|
|
@@ -132,16 +134,13 @@ public class ApsServiceImpl implements ApsService {
|
|
|
List<ApsScheduleConfigDo> apsConfigs = apsScheduleConfigService.list();
|
|
|
ApsScheduleConfigDo apsScheduleConfig = null;
|
|
|
// 松散度
|
|
|
- BigDecimal looseness = null;
|
|
|
if (apsConfigs != null && apsConfigs.size() > 0) {
|
|
|
apsScheduleConfig = apsConfigs.get(0);
|
|
|
- looseness = apsScheduleConfig.getLooseness();
|
|
|
+ productionScheduleVo.setLooseness(apsScheduleConfig.getLooseness());
|
|
|
productionScheduleVo.setPlanSeconds(apsScheduleConfig.getScheduleruntime());
|
|
|
Map<String, Integer> roamTime = new HashMap<>();
|
|
|
- Integer workshopin = new BigDecimal(apsScheduleConfig.getWorkshopin()).multiply((looseness.divide(new BigDecimal("100"))).add(new BigDecimal("1")))
|
|
|
- .setScale(0, RoundingMode.CEILING).intValue();
|
|
|
- Integer workshopcross = new BigDecimal(apsScheduleConfig.getWorkshopcross()).multiply((looseness.divide(new BigDecimal("100"))).add(new BigDecimal("1")))
|
|
|
- .setScale(0, RoundingMode.CEILING).intValue();
|
|
|
+ Integer workshopin = apsScheduleConfig.getWorkshopin();
|
|
|
+ Integer workshopcross = apsScheduleConfig.getWorkshopcross();
|
|
|
roamTime.put("WORKSHOP_IN", workshopin);
|
|
|
roamTime.put("WORKSHOP_CROSS", workshopcross);
|
|
|
productionScheduleVo.setRoamTime(roamTime);
|
|
@@ -153,7 +152,7 @@ public class ApsServiceImpl implements ApsService {
|
|
|
if (apsScheduleConfig.getApsplanstartdate() != null) {
|
|
|
productionScheduleVo.setApsPlanStartDate(apsScheduleConfig.getApsplanstartdate());
|
|
|
} else {
|
|
|
- productionScheduleVo.setApsPlanStartDate(DateUtil.date().offset(DateField.HOUR, a));
|
|
|
+ productionScheduleVo.setApsPlanStartDate(DateUtil.parseDate(DateUtils.format(DateUtil.date(),"yyyy-MM-dd HH:mm")).offset(DateField.HOUR, a));
|
|
|
}
|
|
|
productionScheduleVo.setWashingtime(apsScheduleConfig.getWashingtime());
|
|
|
productionScheduleVo.setStandingtime(apsScheduleConfig.getStandingtime());
|
|
@@ -319,11 +318,14 @@ public class ApsServiceImpl implements ApsService {
|
|
|
er.setProcessType(processesDo.getProcess());
|
|
|
// 合金+输入物料+宽度+厚度
|
|
|
er.setSeriesProduceMark(operationDo.getMetal() + "^_^" + operationDo.getProducttype() + "^_^" + operationDo.getProwidth() + "^_^" + operationDo.getThickness() + "^_^" + outMaterDos.get(0).getThickness());
|
|
|
+ er.setVolumeMetal(operationDo.getMetal());
|
|
|
+ er.setVolumeMetalstate(operationDo.getMetalstate());
|
|
|
er.setPrepressworkmin(processesDo.getPrepressworkmin() == null ? null : processesDo.getPrepressworkmin().intValue());
|
|
|
er.setCutfinishmin(processesDo.getCutfinishmin() == null ? null : processesDo.getCutfinishmin().intValue());
|
|
|
// 单卷宽度、重量数据赋值
|
|
|
er.setTotalVolumeWidth(processesDo.getProwidth());
|
|
|
er.setTotalSinglerollweight(processesDo.getSinglerollweight());
|
|
|
+ er.setTotalThickness(processesDo.getThickness());
|
|
|
}
|
|
|
}
|
|
|
equipmentRunTimes.add(er);
|
|
@@ -466,6 +468,7 @@ public class ApsServiceImpl implements ApsService {
|
|
|
// 单卷宽度和重量
|
|
|
processes.setVolumeWidth(operationDo.getProwidth());
|
|
|
processes.setSinglerollweight(operationDo.getSinglerollweight());
|
|
|
+ processes.setVolumeThickness(operationDo.getThickness());
|
|
|
if (operationDo.getMinflowwaitmin() != null) {
|
|
|
processes.setMinWaitTime(operationDo.getMinflowwaitmin().intValue());
|
|
|
}
|