This commit is contained in:
2022-07-25 17:19:42 +08:00
parent baf747802e
commit 332ee8d089
5 changed files with 59 additions and 87 deletions

View File

@@ -27,4 +27,6 @@ public class TodayandplannumDto implements Serializable {
/** 计划数量 */
private BigDecimal num_plan;
private BigDecimal isBigZero = new BigDecimal(0);
}

View File

@@ -32,7 +32,6 @@ public class BigScreenServiceImpl implements BigScreenService, ApplicationAutoIn
List<SupplyDto> supplyDtos = new ArrayList<>();
List<StockDto> stockDtos = new ArrayList<>();
ShopinfoDto shopinfoDtos = new ShopinfoDto();
@Override
public JSONObject getData(JSONObject param) {
Integer todayPcsSum = 0;
@@ -43,7 +42,20 @@ public class BigScreenServiceImpl implements BigScreenService, ApplicationAutoIn
TodayandplannumDto todayandplannumDto = todayandplannumDtos.get(i);
int compareTo = todayandplannumDto.getNum_plan().compareTo(BigDecimal.ZERO);
if (compareTo != 0) {
todayandplannumDto.setNum_today(todayandplannumDto.getNum_today().add(new BigDecimal(random.nextInt(3) + 3)));
BigDecimal num_plan = todayandplannumDto.getNum_plan();
BigDecimal everyPro = num_plan.divide(new BigDecimal(12 * 60 * 12),4, BigDecimal.ROUND_HALF_UP);
int compare = todayandplannumDto.getIsBigZero().compareTo(new BigDecimal(1));
int compare1 = everyPro.compareTo(new BigDecimal(1));
if (compare1 != -1){
todayandplannumDto.setNum_today(todayandplannumDto.getNum_today().add(everyPro).setScale(0,BigDecimal.ROUND_DOWN));
} else {
if (compare == -1){
todayandplannumDto.setIsBigZero(todayandplannumDto.getIsBigZero().add(everyPro));
} else {
todayandplannumDto.setNum_today(todayandplannumDto.getNum_today().add(todayandplannumDto.getIsBigZero()).setScale(0,BigDecimal.ROUND_DOWN));
todayandplannumDto.setIsBigZero(new BigDecimal(0));
}
}
}
todayPcsSum += Integer.parseInt(todayandplannumDto.getNum_today().toString());
planPcsSum += Integer.parseInt(todayandplannumDto.getNum_plan().toString());

View File

@@ -297,8 +297,6 @@ public class HailiangPackerStationDeviceDriver extends AbstractOpcDeviceDriver i
this.writing("to_clear", "1");
this.writing("to_pause", "1");
logServer.deviceLogToacs(this.device_code, "", "", device_code + ":,任务确认完成,电器信号写入成功");
} else {
logServer.deviceLogToacs(this.device_code, "", "", device_code + ":,move:" + move + ",order_finish>" + order_finish + ",last_order_finish>" + last_order_finish);
}
if (ObjectUtil.isEmpty(inst)) {
@@ -414,25 +412,6 @@ public class HailiangPackerStationDeviceDriver extends AbstractOpcDeviceDriver i
}
}
protected void thingToNothing() {
log.debug("从有货到无货 清理数据");
this.setRequireSucess(false);
this.setApplySucess(false);
}
public void set_last_container(String barcode, String type_desc) {
this.setInst_message(null);
this.setContainer(null);
this.set_last_container(barcode);
this.set_last_container_type_desc(type_desc);
}
public void set_last_container(String barcode) {
}
public void set_last_container_type_desc(String type) {
}
public synchronized boolean apply_take_empty_task() throws Exception {
WQLObject runpointwo = WQLObject.getWQLObject("acs_device_runpoint");
@@ -463,8 +442,10 @@ public class HailiangPackerStationDeviceDriver extends AbstractOpcDeviceDriver i
if (hailiangEngravingCacheDeviceDriver.getMove() != 0) {
continue;
}
//querySameDestinationTask 查询是否有相同终点的任务
int num = taskserver.querySameDestinationTask(next_device_code);
if (num != 0) {
int numE = taskserver.querySameOriginTask(this.getDevice_code());
if (num != 0 || numE != 0) {
continue;
}
//判断缓存位是否锁定
@@ -504,7 +485,6 @@ public class HailiangPackerStationDeviceDriver extends AbstractOpcDeviceDriver i
} catch (Exception e) {
logServer.deviceLogToacs(this.device_code, "", "", device_code + ":创建任务失败," + String.valueOf(e.getMessage()));
}
logServer.deviceLogToacs(this.device_code, "", "", device_code + ":创建任务成功");
}
}
//生成任务成功
@@ -557,8 +537,10 @@ public class HailiangPackerStationDeviceDriver extends AbstractOpcDeviceDriver i
if (hailiangEngravingCacheDeviceDriver.getMove() == 0 || hailiangEngravingCacheDeviceDriver.getMove() == 1) {
continue;
}
//querySameOriginTask 查询是否有相同起点的任务
int num = taskserver.querySameOriginTask(start_device_code);
if (num != 0) {
int numN = taskserver.querySameDestinationTask(this.getDevice_code());
if (num != 0 || numN != 0) {
continue;
}
String material = route_link_device.getMaterial_type();
@@ -594,13 +576,10 @@ public class HailiangPackerStationDeviceDriver extends AbstractOpcDeviceDriver i
} catch (Exception e) {
logServer.deviceLogToacs(this.device_code, "", "", device_code + ":创建任务失败," + String.valueOf(e.getMessage()));
}
logServer.deviceLogToacs(this.device_code, "", "", device_code + ":创建任务成功");
}
}
}
//生成任务成功
if (flag) {
logServer.deviceLogToacs(this.device_code, "", "", device_code + ":缺料请求任务生成成功");

View File

@@ -1196,7 +1196,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
for (int i = 0; i < this.tasks.size(); i++) {
TaskDto task = tasks.get(i);
//处理空盘位站点
String start_code = task.getStart_point_code();
String start_code = task.getNext_device_code();
if (start_code.indexOf(".") != -1) {
start_code = start_code.substring(0, start_code.indexOf("."));
}
@@ -1213,7 +1213,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
for (int i = 0; i < this.tasks.size(); i++) {
TaskDto task = tasks.get(i);
//处理空盘位站点
String next_code = task.getNext_point_code();
String next_code = task.getStart_device_code();
if (next_code.indexOf(".") != -1) {
next_code = next_code.substring(0, next_code.indexOf("."));
}

View File

@@ -232,62 +232,41 @@ export default {
{ id: 11, name: '区域横', img1: '区域横' },
{ id: 12, name: '区域竖', img1: '区域竖' },
{ id: 13, name: '专机', img1: '专机' },
{ id: 14, name: '三通一体机', img1: '三通一体机' },
{ id: 15, name: '储料仓', img1: '储料仓' },
{ id: 16, name: '刻字机', img1: '刻字机' },
{ id: 17, name: '包装机1', img1: '包装机1' },
{ id: 18, name: '包装机2', img1: '包装机2' },
{ id: 19, name: '包装机3', img1: '包装机3' },
{ id: 20, name: '包装机4', img1: '包装机4' },
{ id: 21, name: '推弯成型1', img1: '推弯成型1' },
{ id: 22, name: '推弯成型2', img1: '推弯成型2' },
{ id: 23, name: '推弯成型3', img1: '推弯成型3' },
{ id: 24, name: '清洗机1', img1: '清洗机1' },
{ id: 25, name: '清洗机2', img1: '清洗机2' },
{ id: 26, name: '清洗机3', img1: '清洗机3' },
{ id: 27, name: '清洗机4', img1: '清洗机4' },
{ id: 28, name: '清洗机5', img1: '清洗机5' },
{ id: 29, name: '盘管下料1', img1: '盘管下料1' },
{ id: 30, name: '盘管下料2', img1: '盘管下料2' },
{ id: 31, name: '盘管下料3', img1: '盘管下料3' },
{ id: 32, name: '直管下料1', img1: '直管下料1' },
{ id: 33, name: '直管下料2', img1: '直管下料2' },
{ id: 34, name: '直管下料3', img1: '直管下料3' },
{ id: 35, name: '', img1: '' },
{ id: 36, name: '', img1: '' },
{ id: 37, name: '', img1: '' },
{ id: 38, name: '', img1: '' },
{ id: 39, name: '', img1: '' },
{ id: 40, name: '', img1: '' },
{ id: 41, name: '', img1: '' },
{ id: 42, name: '', img1: '' },
{ id: 43, name: '', img1: '' },
{ id: 44, name: '', img1: '' },
{ id: 45, name: '', img1: '' },
{ id: 46, name: '', img1: '' },
{ id: 47, name: '', img1: '' },
{ id: 48, name: '', img1: '' },
{ id: 49, name: '品', img1: '品' },
{ id: 50, name: '孔', img1: '孔' },
{ id: 51, name: '字', img1: '字' },
{ id: 52, name: '屑', img1: '屑' },
{ id: 53, name: '工', img1: '工' },
{ id: 54, name: '弯', img1: '弯' },
{ id: 55, name: '拉', img1: '拉' },
{ id: 56, name: '推', img1: '推' },
{ id: 57, name: '旋', img1: '旋' },
{ id: 58, name: '无', img1: '无' },
{ id: 59, name: '机', img1: '机' },
{ id: 60, name: '桶', img1: '桶' },
{ id: 61, name: '洗', img1: '洗' },
{ id: 62, name: '清', img1: '清' },
{ id: 63, name: '盘', img1: '盘' },
{ id: 64, name: '码', img1: '码' },
{ id: 65, name: '直', img1: '直' },
{ id: 66, name: '管', img1: '管' },
{ id: 67, name: '包', img1: '包' },
{ id: 68, name: '装', img1: '装' },
{ id: 69, name: '镗', img1: '镗' }
{ id: 14, name: '', img1: '' },
{ id: 15, name: '', img1: '' },
{ id: 16, name: '', img1: '' },
{ id: 17, name: '', img1: '' },
{ id: 18, name: '', img1: '' },
{ id: 19, name: '', img1: '' },
{ id: 20, name: '', img1: '' },
{ id: 21, name: '', img1: '' },
{ id: 22, name: '', img1: '' },
{ id: 23, name: '', img1: '' },
{ id: 24, name: '', img1: '' },
{ id: 25, name: '', img1: '' },
{ id: 26, name: '', img1: '' },
{ id: 27, name: '', img1: '' },
{ id: 28, name: '', img1: '' },
{ id: 29, name: '', img1: '' },
{ id: 30, name: '', img1: '' },
{ id: 31, name: '', img1: '' },
{ id: 32, name: '', img1: '' },
{ id: 33, name: '', img1: '' },
{ id: 34, name: '', img1: '' },
{ id: 35, name: '', img1: '' },
{ id: 36, name: '', img1: '' },
{ id: 37, name: '', img1: '' },
{ id: 38, name: '', img1: '' },
{ id: 39, name: '', img1: '' },
{ id: 40, name: '', img1: '' },
{ id: 41, name: '', img1: '' },
{ id: 42, name: '', img1: '' },
{ id: 43, name: '', img1: '' },
{ id: 44, name: '', img1: '' },
{ id: 45, name: '', img1: '' },
{ id: 46, name: '', img1: '' },
{ id: 47, name: '', img1: '' },
{ id: 48, name: '', img1: '' }
],
arr2: [],
stageSelectList: [],