|
|
|
|
@@ -1,5 +1,6 @@
|
|
|
|
|
package org.nl.wms.ext_manage.bigScreen.service.impl;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.date.DateTime;
|
|
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
|
|
import cn.hutool.core.util.IdUtil;
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
|
|
@@ -11,10 +12,15 @@ import lombok.RequiredArgsConstructor;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.apache.commons.collections4.MapUtils;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
import org.apache.commons.lang3.time.DateFormatUtils;
|
|
|
|
|
import org.nl.common.TableDataInfo;
|
|
|
|
|
import org.nl.common.utils.MapOf;
|
|
|
|
|
import org.nl.modules.wql.core.bean.ResultBean;
|
|
|
|
|
import org.nl.modules.wql.core.bean.WQLObject;
|
|
|
|
|
import org.nl.modules.wql.util.WqlUtil;
|
|
|
|
|
import org.nl.start.auto.initial.ApplicationAutoInitial;
|
|
|
|
|
import org.nl.wms.analysis_manage.qlmanage.dto.QualityQuery;
|
|
|
|
|
import org.nl.wms.analysis_manage.scrapRate.service.dto.ScrapRateQuery;
|
|
|
|
|
import org.nl.wms.ext_manage.bigScreen.service.BigScreenService;
|
|
|
|
|
import org.nl.wms.ext_manage.bigScreen.service.dto.*;
|
|
|
|
|
|
|
|
|
|
@@ -23,6 +29,7 @@ import org.nl.wms.product_manage.service.device.IPdmBiDeviceService;
|
|
|
|
|
import org.nl.wms.product_manage.service.device.dao.PdmBiDevice;
|
|
|
|
|
import org.nl.wms.product_manage.service.workorder.IPdmProduceWorkorderService;
|
|
|
|
|
import org.nl.wms.product_manage.service.workprocedure.IPdmBiWorkprocedureService;
|
|
|
|
|
import org.nl.wms.product_manage.service.workprocedure.dao.PdmBiWorkprocedure;
|
|
|
|
|
import org.nl.wms.system_manage.service.dict.ISysDictService;
|
|
|
|
|
import org.nl.wms.system_manage.service.dict.dao.Dict;
|
|
|
|
|
import org.nl.wms.system_manage.service.param.ISysParamService;
|
|
|
|
|
@@ -33,7 +40,12 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
import java.text.DateFormat;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
import java.util.function.BiConsumer;
|
|
|
|
|
import java.util.function.Function;
|
|
|
|
|
import java.util.function.Predicate;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
@Service
|
|
|
|
|
@RequiredArgsConstructor
|
|
|
|
|
@@ -47,6 +59,8 @@ public class BigScreenServiceImpl implements BigScreenService, ApplicationAutoIn
|
|
|
|
|
private ISysDictService dictService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private IPdmBiDeviceService deviceService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private ISysParamService sysParamService;
|
|
|
|
|
|
|
|
|
|
List<TodayandplannumDto> todayandplannumDtos = new ArrayList<>();
|
|
|
|
|
YearinoutDto yearinoutDtos = new YearinoutDto();
|
|
|
|
|
@@ -120,62 +134,92 @@ public class BigScreenServiceImpl implements BigScreenService, ApplicationAutoIn
|
|
|
|
|
public JSONObject workScreen(JSONObject param) {
|
|
|
|
|
/**
|
|
|
|
|
* 1。配置web_flag对应工序id
|
|
|
|
|
* 判断是否虚拟数据
|
|
|
|
|
* 2.数据库查看当前工序设备,
|
|
|
|
|
* 3.查询设备对应工单信息
|
|
|
|
|
* 4.查询设备故障记录表
|
|
|
|
|
* 5.统计周工单
|
|
|
|
|
*/
|
|
|
|
|
JSONObject result = new JSONObject();
|
|
|
|
|
result.put("code","1");
|
|
|
|
|
result.put("desc","查询成功");
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotEmpty(param.getString("web_flag"))){
|
|
|
|
|
Dict one = dictService.getOne(new UpdateWrapper<Dict>()
|
|
|
|
|
.eq("code", "WEB_FLAG")
|
|
|
|
|
.eq("label", param.getString("web_flag")));
|
|
|
|
|
String screenname = one.getName();
|
|
|
|
|
List<String> ids = new ArrayList<>();
|
|
|
|
|
if (StringUtils.isNotEmpty(one.getPara1())){
|
|
|
|
|
ids.add(one.getPara1());
|
|
|
|
|
Param off = sysParamService.getOne(new QueryWrapper<Param>().eq("code", "BIGSCREEN_ORDER"));
|
|
|
|
|
if (off!=null && "1".equals(off.getValue())){
|
|
|
|
|
String remark = off.getRemark();
|
|
|
|
|
JSONObject map = JSONObject.parseObject(remark);
|
|
|
|
|
JSONObject flag = map.getJSONObject(param.getString("web_flag"));
|
|
|
|
|
result.put("result",flag);
|
|
|
|
|
}else {
|
|
|
|
|
//获取工序信息
|
|
|
|
|
Dict one = dictService.getOne(new UpdateWrapper<Dict>()
|
|
|
|
|
.eq("code", "WEB_FLAG")
|
|
|
|
|
.eq("label", param.getString("web_flag")));
|
|
|
|
|
if (StringUtils.isNotEmpty(one.getPara1())) {
|
|
|
|
|
ids.add(one.getPara1());
|
|
|
|
|
}
|
|
|
|
|
if (StringUtils.isNotEmpty(one.getPara2())) {
|
|
|
|
|
ids.add(one.getPara2());
|
|
|
|
|
}
|
|
|
|
|
if (StringUtils.isNotEmpty(one.getPara3())) {
|
|
|
|
|
ids.add(one.getPara3());
|
|
|
|
|
}
|
|
|
|
|
List<PdmBiWorkprocedure> workprocedures = workprocedureService.list(new QueryWrapper<PdmBiWorkprocedure>()
|
|
|
|
|
.in("workprocedure_id", ids));
|
|
|
|
|
Map<String, String> workprodureMap = workprocedures.stream().collect(HashMap::new, (k, workprocedure) -> k.put(workprocedure.getWorkprocedure_id(), workprocedure.getWorkprocedure_name()), HashMap::putAll);
|
|
|
|
|
|
|
|
|
|
List arr1 = new ArrayList<>();
|
|
|
|
|
for (String id : ids) {
|
|
|
|
|
JSONObject sreenCount = deviceService.deviceSreenCount(id);
|
|
|
|
|
int i = sreenCount.getInteger("device_num") - sreenCount.getInteger("device_runningnum");
|
|
|
|
|
sreenCount.put("device_waitingnum",i<0?0:i);
|
|
|
|
|
sreenCount.put("shutdownnum",i<0?0:i);
|
|
|
|
|
sreenCount.put("workprocedure_name",workprodureMap.get(id));
|
|
|
|
|
arr1.add(sreenCount);
|
|
|
|
|
}
|
|
|
|
|
//日工单
|
|
|
|
|
List<Map> arr2 = workorderService.sreenDailyOrder(ids);
|
|
|
|
|
//设备报警信息arr4
|
|
|
|
|
List<Map> arr4 = deviceService.repairList(ids);
|
|
|
|
|
//故障曲线
|
|
|
|
|
List<Map> collect = arr4.stream().filter(map -> {
|
|
|
|
|
Object date_time = map.get("date_time");
|
|
|
|
|
if (date_time != null) {
|
|
|
|
|
return map.get("date_time").equals(DateUtil.today());
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}).collect(Collectors.toList());
|
|
|
|
|
Map<String, List<Map>> todayarr = collect.stream().collect(Collectors.groupingBy(g -> String.valueOf(g.get("workprocedure_id"))));
|
|
|
|
|
Map<String, List<Map>> historyarr = arr4.stream().collect(Collectors.groupingBy(g -> String.valueOf(g.get("workprocedure_id"))));
|
|
|
|
|
|
|
|
|
|
List<Object[]> arr5 = new ArrayList<>();
|
|
|
|
|
arr5.add(new Object[]{"product","累计","今日"});
|
|
|
|
|
for (String id : ids) {
|
|
|
|
|
arr5.add(new Object[]{workprodureMap.get(id),historyarr.get(id)==null?0:historyarr.get(id).size(),todayarr.get(id)==null?0:todayarr.get(id).size()});
|
|
|
|
|
}
|
|
|
|
|
//周工单情况
|
|
|
|
|
ScrapRateQuery query = new ScrapRateQuery();
|
|
|
|
|
DateTime dateTime = DateUtil.offsetWeek(new Date(), -1);
|
|
|
|
|
query.setWorkprocedure_ids(ids);//统计月
|
|
|
|
|
query.setStart_time(DateFormatUtils.format(dateTime, "yyyy-MM-dd"));
|
|
|
|
|
List<Map> scrapRate = workorderService.scrapRate(query);
|
|
|
|
|
Map map = scrapRate.get(0);
|
|
|
|
|
Map jo3 = MapOf.of("sumfinishproduce_qty", map.get("real_qty"),
|
|
|
|
|
"sumproduce_qty", map.get("plan_qty"),
|
|
|
|
|
"sumproducing_qty", map.get("real_qty"),
|
|
|
|
|
"sumweek_qty", map.get("real_qty"));
|
|
|
|
|
result.put("result",MapOf.of("screenname",one.getValue(),
|
|
|
|
|
"arr1",arr1,"arr2",arr2,"arr4",arr4,"arr5",arr5,"jo3",jo3,"jo6",MapOf.of("sumproduce_orderqty","1","sumfinishproduce_orderqty","2","sumproducing_orderqty","3")));
|
|
|
|
|
}
|
|
|
|
|
if (StringUtils.isNotEmpty(one.getPara2())){
|
|
|
|
|
ids.add(one.getPara2());
|
|
|
|
|
}
|
|
|
|
|
if (StringUtils.isNotEmpty(one.getPara3())){
|
|
|
|
|
ids.add(one.getPara3());
|
|
|
|
|
}
|
|
|
|
|
//查询所有工序设备列表: private Boolean is_delete;
|
|
|
|
|
//
|
|
|
|
|
// /**
|
|
|
|
|
// * 是否在用
|
|
|
|
|
// */
|
|
|
|
|
// private Boolean is_used;
|
|
|
|
|
List<PdmBiDevice> list = deviceService.list(new QueryWrapper<PdmBiDevice>()
|
|
|
|
|
.in("workprocedure_id", ids)
|
|
|
|
|
.eq("is_delete", false));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
String str = null;
|
|
|
|
|
String web_flag="1";
|
|
|
|
|
//1车间下料看板
|
|
|
|
|
if ("1".equals(web_flag)) {
|
|
|
|
|
str = "{\"code\":\"1\",\"desc\":\"查询成功\",\"result\":{\"screenname\":\"车间下料看板\",\"arr1\":[{\"workprocedure_name\":\"盘管双斜口下料\",\"device_runningnum\":\"0\",\"device_errornum\":\"0\",\"device_waitingnum\":\"0\",\"shutdownnum\":\"5\",\"device_num\":\"5\"},{\"workprocedure_name\":\"直管双斜口下料\",\"device_runningnum\":\"0\",\"device_errornum\":\"0\",\"device_waitingnum\":\"0\",\"shutdownnum\":\"1\",\"device_num\":\"1\"},{\"workprocedure_name\":\"盘管无屑下料\",\"device_runningnum\":\"0\",\"device_errornum\":\"1\",\"device_waitingnum\":\"0\",\"shutdownnum\":\"3\",\"device_num\":\"4\"},{\"workprocedure_name\":\"直管无屑下料\",\"device_runningnum\":\"0\",\"device_errornum\":\"0\",\"device_waitingnum\":\"0\",\"shutdownnum\":\"1\",\"device_num\":\"1\"}],\"arr2\":[{\"produceschedule_date\":\"2021-05-06\",\"produceorder_code\":\"0506009\",\"workprocedure_name\":\"推弯一体机加工\",\"sysdic_name\":\"弯头工段\",\"worksection_type_scode\":\"01\",\"finishproduce_qty\":\"0\",\"produce_qty\":\"4200\",\"waiting_qty\":\"4200\",\"progress_qty\":\"0\"},{\"produceschedule_date\":\"2020-09-16\",\"produceorder_code\":\"0916014\",\"workprocedure_name\":\"盘管无屑下料\",\"sysdic_name\":\"综合工段\",\"worksection_type_scode\":\"02\",\"finishproduce_qty\":\"3500\",\"produce_qty\":\"3500\",\"waiting_qty\":\"0\",\"progress_qty\":\"100\"},{\"produceschedule_date\":\"2020-12-31\",\"produceorder_code\":\"1231013\",\"workprocedure_name\":\"三通拉伸\",\"sysdic_name\":\"综合工段\",\"worksection_type_scode\":\"02\",\"finishproduce_qty\":\"790\",\"produce_qty\":\"3500\",\"waiting_qty\":\"2710\",\"progress_qty\":\"23\"},{\"produceschedule_date\":\"2020-05-06\",\"produceorder_code\":\"0506009\",\"workprocedure_name\":\"三通拉伸\",\"sysdic_name\":\"综合工段\",\"worksection_type_scode\":\"02\",\"finishproduce_qty\":\"4225\",\"produce_qty\":\"6000\",\"waiting_qty\":\"1775\",\"progress_qty\":\"70\"}],\"jo3\":{\"sumproduce_qty\":\"0\",\"sumfinishproduce_qty\":\"0\",\"sumproducing_qty\":\"0\",\"sumweek_qty\":\"0\"},\"arr4\":[{\"device_name\":\"L28\",\"devicestatus_name\":\"急停报警\",\"update_date\":\" 00:00:30\"},{\"device_name\":\"1-L22\",\"devicestatus_name\":\"急停报警\",\"update_date\":\" 00:00:24\"},{\"device_name\":\"L22-2\",\"devicestatus_name\":\"急停报警\",\"update_date\":\" 00:00:21\"},{\"device_name\":\"L22-1\",\"devicestatus_name\":\"急停报警\",\"update_date\":\" 00:00:20\"}],\"arr5\":[[\"product\",\"昨日\",\"今日\"],[\"盘管双斜口\",\"2\",\"2\"],[\"直管双斜口\",\"1\",\"1\"],[\"盘管无屑\",\"1\",\"1\"],[\"直管无屑\",\"0\",\"0\"]],\"jo6\":{\"sumproduce_orderqty\":\"\",\"sumfinishproduce_orderqty\":\"\",\"sumproducing_orderqty\":\"\"},\"arr7\":[{\"count\":\"0\",\"date\":\"07-10\"},{\"count\":\"0\",\"date\":\"07-11\"},{\"count\":\"0\",\"date\":\"07-12\"},{\"count\":\"0\",\"date\":\"07-13\"},{\"count\":\"0\",\"date\":\"07-14\"},{\"count\":\"0\",\"date\":\"07-15\"},{\"count\":\"0\",\"date\":\"07-16\"}]}}";
|
|
|
|
|
}
|
|
|
|
|
//2车间旋压看板
|
|
|
|
|
if ("2".equals(web_flag)) {
|
|
|
|
|
str = "{\"code\":\"1\",\"desc\":\"查询成功\",\"result\":{\"screenname\":\"车间旋压看板\",\"arr1\":[{\"workprocedure_name\":\"旋压下料\",\"device_runningnum\":\"0\",\"device_errornum\":\"0\",\"device_waitingnum\":\"0\",\"shutdownnum\":\"12\",\"device_num\":\"12\"},{\"workprocedure_name\":\"滚槽/打点\",\"device_runningnum\":\"0\",\"device_errornum\":\"0\",\"device_waitingnum\":\"0\",\"shutdownnum\":\"3\",\"device_num\":\"3\"},{\"workprocedure_name\":\"直管有屑下料\",\"device_runningnum\":\"0\",\"device_errornum\":\"0\",\"device_waitingnum\":\"0\",\"shutdownnum\":\"3\",\"device_num\":\"3\"}],\"arr2\":[{\"produceschedule_date\":\"2021-05-06\",\"produceorder_code\":\"0506009\",\"workprocedure_name\":\"推弯一体机加工\",\"sysdic_name\":\"弯头工段\",\"worksection_type_scode\":\"01\",\"finishproduce_qty\":\"0\",\"produce_qty\":\"4200\",\"waiting_qty\":\"4200\",\"progress_qty\":\"0\"},{\"produceschedule_date\":\"2020-09-16\",\"produceorder_code\":\"0916014\",\"workprocedure_name\":\"盘管无屑下料\",\"sysdic_name\":\"综合工段\",\"worksection_type_scode\":\"02\",\"finishproduce_qty\":\"3500\",\"produce_qty\":\"3500\",\"waiting_qty\":\"0\",\"progress_qty\":\"100\"},{\"produceschedule_date\":\"2020-12-31\",\"produceorder_code\":\"1231013\",\"workprocedure_name\":\"三通拉伸\",\"sysdic_name\":\"综合工段\",\"worksection_type_scode\":\"02\",\"finishproduce_qty\":\"790\",\"produce_qty\":\"3500\",\"waiting_qty\":\"2710\",\"progress_qty\":\"23\"},{\"produceschedule_date\":\"2020-05-06\",\"produceorder_code\":\"0506009\",\"workprocedure_name\":\"三通拉伸\",\"sysdic_name\":\"综合工段\",\"worksection_type_scode\":\"02\",\"finishproduce_qty\":\"4225\",\"produce_qty\":\"6000\",\"waiting_qty\":\"1775\",\"progress_qty\":\"70\"}],\"jo3\":{\"sumproduce_qty\":\"0\",\"sumfinishproduce_qty\":\"0\",\"sumproducing_qty\":\"0\",\"sumweek_qty\":\"0\"},\"arr4\":[],\"arr5\":[[\"product\",\"昨日\",\"今日\"],[\"旋压下料\",\"1\",\"0\"],[\"滚槽/打点\",\"0\",\"0\"],[\"直管有屑下料\",\"0\",\"0\"]],\"jo6\":{\"sumproduce_orderqty\":\"\",\"sumfinishproduce_orderqty\":\"\",\"sumproducing_orderqty\":\"\"},\"arr7\":[{\"count\":\"0\",\"date\":\"07-10\"},{\"count\":\"0\",\"date\":\"07-11\"},{\"count\":\"0\",\"date\":\"07-12\"},{\"count\":\"0\",\"date\":\"07-13\"},{\"count\":\"0\",\"date\":\"07-14\"},{\"count\":\"0\",\"date\":\"07-15\"},{\"count\":\"0\",\"date\":\"07-16\"}]}}";
|
|
|
|
|
}
|
|
|
|
|
//3车间三通看板
|
|
|
|
|
if ("3".equals(web_flag)) {
|
|
|
|
|
str = "{\"code\":\"1\",\"desc\":\"查询成功\",\"result\":{\"screenname\":\"车间三通看板\",\"arr1\":[{\"workprocedure_name\":\"三通拉伸\",\"device_runningnum\":\"1\",\"device_errornum\":\"0\",\"device_waitingnum\":\"1\",\"shutdownnum\":\"7\",\"device_num\":\"9\"},{\"workprocedure_name\":\"三通一体机加工\",\"device_runningnum\":\"1\",\"device_errornum\":\"0\",\"device_waitingnum\":\"0\",\"shutdownnum\":\"8\",\"device_num\":\"9\"}],\"arr2\":[{\"produceschedule_date\":\"2021-05-06\",\"produceorder_code\":\"0506009\",\"workprocedure_name\":\"推弯一体机加工\",\"sysdic_name\":\"弯头工段\",\"worksection_type_scode\":\"01\",\"finishproduce_qty\":\"0\",\"produce_qty\":\"4200\",\"waiting_qty\":\"4200\",\"progress_qty\":\"0\"},{\"produceschedule_date\":\"2020-09-16\",\"produceorder_code\":\"0916014\",\"workprocedure_name\":\"盘管无屑下料\",\"sysdic_name\":\"综合工段\",\"worksection_type_scode\":\"02\",\"finishproduce_qty\":\"3500\",\"produce_qty\":\"3500\",\"waiting_qty\":\"0\",\"progress_qty\":\"100\"},{\"produceschedule_date\":\"2020-12-31\",\"produceorder_code\":\"1231013\",\"workprocedure_name\":\"三通拉伸\",\"sysdic_name\":\"综合工段\",\"worksection_type_scode\":\"02\",\"finishproduce_qty\":\"790\",\"produce_qty\":\"3500\",\"waiting_qty\":\"2710\",\"progress_qty\":\"23\"},{\"produceschedule_date\":\"2020-05-06\",\"produceorder_code\":\"0506009\",\"workprocedure_name\":\"三通拉伸\",\"sysdic_name\":\"综合工段\",\"worksection_type_scode\":\"02\",\"finishproduce_qty\":\"4225\",\"produce_qty\":\"6000\",\"waiting_qty\":\"1775\",\"progress_qty\":\"70\"}],\"jo3\":{\"sumproduce_qty\":\"0\",\"sumfinishproduce_qty\":\"0\",\"sumproducing_qty\":\"0\",\"sumweek_qty\":\"0\"},\"arr4\":[{\"device_name\":\"L22-3\",\"devicestatus_name\":\"专机故障报警\",\"update_date\":\" 00:00:29\"},{\"device_name\":\"L22-1\",\"devicestatus_name\":\"专机故障报警\",\"update_date\":\" 00:00:29\"},{\"device_name\":\"L15-4\",\"devicestatus_name\":\"专机故障报警\",\"update_date\":\" 00:00:29\"},{\"device_name\":\"L15-3\",\"devicestatus_name\":\"专机故障报警\",\"update_date\":\" 00:00:28\"}],\"arr5\":[[\"product\",\"昨日\",\"今日\"],[\"三通\",\"4\",\"4\"],[\"三通一体机\",\"0\",\"0\"]],\"jo6\":{\"sumproduce_orderqty\":\"\",\"sumfinishproduce_orderqty\":\"\",\"sumproducing_orderqty\":\"\"},\"arr7\":[{\"count\":\"0\",\"date\":\"07-10\"},{\"count\":\"0\",\"date\":\"07-11\"},{\"count\":\"0\",\"date\":\"07-12\"},{\"count\":\"0\",\"date\":\"07-13\"},{\"count\":\"0\",\"date\":\"07-14\"},{\"count\":\"0\",\"date\":\"07-15\"},{\"count\":\"0\",\"date\":\"07-16\"}]}}";
|
|
|
|
|
}
|
|
|
|
|
//4车间推弯看板
|
|
|
|
|
if ("4".equals(web_flag)) {
|
|
|
|
|
str = "{\"code\":\"1\",\"desc\":\"查询成功\",\"result\":{\"screenname\":\"车间推弯看板\",\"arr1\":[{\"workprocedure_name\":\"推弯一体机加工\",\"device_runningnum\":\"3\",\"device_errornum\":\"9\",\"device_waitingnum\":\"3\",\"shutdownnum\":\"16\",\"device_num\":\"31\"}],\"arr2\":[{\"produceschedule_date\":\"2021-05-06\",\"produceorder_code\":\"0506009\",\"workprocedure_name\":\"推弯一体机加工\",\"sysdic_name\":\"弯头工段\",\"worksection_type_scode\":\"01\",\"finishproduce_qty\":\"0\",\"produce_qty\":\"4200\",\"waiting_qty\":\"4200\",\"progress_qty\":\"0\"},{\"produceschedule_date\":\"2020-09-16\",\"produceorder_code\":\"0916014\",\"workprocedure_name\":\"盘管无屑下料\",\"sysdic_name\":\"综合工段\",\"worksection_type_scode\":\"02\",\"finishproduce_qty\":\"3500\",\"produce_qty\":\"3500\",\"waiting_qty\":\"0\",\"progress_qty\":\"100\"},{\"produceschedule_date\":\"2020-12-31\",\"produceorder_code\":\"1231013\",\"workprocedure_name\":\"三通拉伸\",\"sysdic_name\":\"综合工段\",\"worksection_type_scode\":\"02\",\"finishproduce_qty\":\"790\",\"produce_qty\":\"3500\",\"waiting_qty\":\"2710\",\"progress_qty\":\"23\"},{\"produceschedule_date\":\"2020-05-06\",\"produceorder_code\":\"0506009\",\"workprocedure_name\":\"三通拉伸\",\"sysdic_name\":\"综合工段\",\"worksection_type_scode\":\"02\",\"finishproduce_qty\":\"4225\",\"produce_qty\":\"6000\",\"waiting_qty\":\"1775\",\"progress_qty\":\"70\"}],\"jo3\":{\"sumproduce_qty\":\"31952\",\"sumfinishproduce_qty\":\"108048\",\"sumproducing_qty\":\"0\",\"sumweek_qty\":\"140000\"},\"arr4\":[],\"arr5\":[[\"product\",\"昨日\",\"今日\"],[\"推弯一体机加工\",\"0\",\"0\"]],\"jo6\":{\"sumproduce_orderqty\":\"\",\"sumfinishproduce_orderqty\":\"\",\"sumproducing_orderqty\":\"\"},\"arr7\":[{\"count\":\"0\",\"date\":\"07-10\"},{\"count\":\"0\",\"date\":\"07-11\"},{\"count\":\"0\",\"date\":\"07-12\"},{\"count\":\"0\",\"date\":\"07-13\"},{\"count\":\"0\",\"date\":\"07-14\"},{\"count\":\"0\",\"date\":\"07-15\"},{\"count\":\"0\",\"date\":\"07-16\"}]}}";
|
|
|
|
|
}
|
|
|
|
|
//6车间刻字包装看板
|
|
|
|
|
if ("6".equals(web_flag)) {
|
|
|
|
|
str = "{\"code\":\"1\",\"desc\":\"查询成功\",\"result\":{\"screenname\":\"车间刻字包装看板\",\"arr1\":[{\"workprocedure_name\":\"刻字\",\"device_runningnum\":\"0\",\"device_errornum\":\"0\",\"device_waitingnum\":\"0\",\"shutdownnum\":\"13\",\"device_num\":\"13\"},{\"workprocedure_name\":\"包装\",\"device_runningnum\":\"2\",\"device_errornum\":\"0\",\"device_waitingnum\":\"0\",\"shutdownnum\":\"0\",\"device_num\":\"2\"},{\"workprocedure_name\":\"码盘\",\"device_runningnum\":\"0\",\"device_errornum\":\"0\",\"device_waitingnum\":\"1\",\"shutdownnum\":\"0\",\"device_num\":\"1\"}],\"arr2\":[{\"produceschedule_date\":\"2021-05-06\",\"produceorder_code\":\"0506009\",\"workprocedure_name\":\"推弯一体机加工\",\"sysdic_name\":\"弯头工段\",\"worksection_type_scode\":\"01\",\"finishproduce_qty\":\"0\",\"produce_qty\":\"4200\",\"waiting_qty\":\"4200\",\"progress_qty\":\"0\"},{\"produceschedule_date\":\"2020-09-16\",\"produceorder_code\":\"0916014\",\"workprocedure_name\":\"盘管无屑下料\",\"sysdic_name\":\"综合工段\",\"worksection_type_scode\":\"02\",\"finishproduce_qty\":\"3500\",\"produce_qty\":\"3500\",\"waiting_qty\":\"0\",\"progress_qty\":\"100\"},{\"produceschedule_date\":\"2020-12-31\",\"produceorder_code\":\"1231013\",\"workprocedure_name\":\"三通拉伸\",\"sysdic_name\":\"综合工段\",\"worksection_type_scode\":\"02\",\"finishproduce_qty\":\"790\",\"produce_qty\":\"3500\",\"waiting_qty\":\"2710\",\"progress_qty\":\"23\"},{\"produceschedule_date\":\"2020-05-06\",\"produceorder_code\":\"0506009\",\"workprocedure_name\":\"三通拉伸\",\"sysdic_name\":\"综合工段\",\"worksection_type_scode\":\"02\",\"finishproduce_qty\":\"4225\",\"produce_qty\":\"6000\",\"waiting_qty\":\"1775\",\"progress_qty\":\"70\"}],\"jo3\":{\"sumproduce_qty\":\"0\",\"sumfinishproduce_qty\":\"0\",\"sumproducing_qty\":\"0\",\"sumweek_qty\":\"0\"},\"arr4\":[{\"device_name\":\"激光打标机06\",\"devicestatus_name\":\"急停报警\",\"update_date\":\" 00:00:35\"}],\"arr5\":[[\"product\",\"昨日\",\"今日\"],[\"刻字\",\"1\",\"1\"],[\"包装\",\"1\",\"0\"],[\"码盘\",\"0\",\"0\"]],\"jo6\":{\"sumproduce_orderqty\":\"\",\"sumfinishproduce_orderqty\":\"\",\"sumproducing_orderqty\":\"\"},\"arr7\":[{\"count\":\"0\",\"date\":\"07-10\"},{\"count\":\"0\",\"date\":\"07-11\"},{\"count\":\"0\",\"date\":\"07-12\"},{\"count\":\"0\",\"date\":\"07-13\"},{\"count\":\"0\",\"date\":\"07-14\"},{\"count\":\"0\",\"date\":\"07-15\"},{\"count\":\"0\",\"date\":\"07-16\"}]}}";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return JSONObject.parseObject(str);
|
|
|
|
|
//str = "{\"code\":\"1\",\"desc\":\"查询成功\",\"result\":{\"screenname\":\"车间推弯看板\",\"arr1\":[{\"workprocedure_name\":\"推弯一体机加工\",\"device_runningnum\":\"3\",\"device_errornum\":\"9\",\"device_waitingnum\":\"3\",\"shutdownnum\":\"16\",\"device_num\":\"31\"}],\"arr2\":[{\"produceschedule_date\":\"2021-05-06\",\"produceorder_code\":\"0506009\",\"workprocedure_name\":\"推弯一体机加工\",\"sysdic_name\":\"弯头工段\",\"worksection_type_scode\":\"01\",\"finishproduce_qty\":\"0\",\"produce_qty\":\"4200\",\"waiting_qty\":\"4200\",\"progress_qty\":\"0\"},{\"produceschedule_date\":\"2020-09-16\",\"produceorder_code\":\"0916014\",\"workprocedure_name\":\"盘管无屑下料\",\"sysdic_name\":\"综合工段\",\"worksection_type_scode\":\"02\",\"finishproduce_qty\":\"3500\",\"produce_qty\":\"3500\",\"waiting_qty\":\"0\",\"progress_qty\":\"100\"},{\"produceschedule_date\":\"2020-12-31\",\"produceorder_code\":\"1231013\",\"workprocedure_name\":\"三通拉伸\",\"sysdic_name\":\"综合工段\",\"worksection_type_scode\":\"02\",\"finishproduce_qty\":\"790\",\"produce_qty\":\"3500\",\"waiting_qty\":\"2710\",\"progress_qty\":\"23\"},{\"produceschedule_date\":\"2020-05-06\",\"produceorder_code\":\"0506009\",\"workprocedure_name\":\"三通拉伸\",\"sysdic_name\":\"综合工段\",\"worksection_type_scode\":\"02\",\"finishproduce_qty\":\"4225\",\"produce_qty\":\"6000\",\"waiting_qty\":\"1775\",\"progress_qty\":\"70\"}],\"jo3\":{\"sumproduce_qty\":\"31952\",\"sumfinishproduce_qty\":\"108048\",\"sumproducing_qty\":\"0\",\"sumweek_qty\":\"140000\"},\"arr4\":[],\"arr5\":[[\"product\",\"昨日\",\"今日\"],[\"推弯一体机加工\",\"0\",\"0\"]],\"jo6\":{\"sumproduce_orderqty\":\"\",\"sumfinishproduce_orderqty\":\"\",\"sumproducing_orderqty\":\"\"},\"arr7\":[{\"count\":\"0\",\"date\":\"07-10\"},{\"count\":\"0\",\"date\":\"07-11\"},{\"count\":\"0\",\"date\":\"07-12\"},{\"count\":\"0\",\"date\":\"07-13\"},{\"count\":\"0\",\"date\":\"07-14\"},{\"count\":\"0\",\"date\":\"07-15\"},{\"count\":\"0\",\"date\":\"07-16\"}]}}";
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|