diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/ext/bigScreen/rest/BigScreenController.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/ext/bigScreen/rest/BigScreenController.java index 1317dc01..1fd068ed 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/ext/bigScreen/rest/BigScreenController.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/ext/bigScreen/rest/BigScreenController.java @@ -7,12 +7,12 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.nl.annotation.Log; import org.nl.wms.ext.bigScreen.service.BigScreenService; +import org.springframework.data.domain.Pageable; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; + +import java.util.Map; /** * @author ludj @@ -23,6 +23,7 @@ import org.springframework.web.bind.annotation.RestController; @Api(tags = "监控大屏") @RequestMapping("/api/bigScreenScreen") @Slf4j +@CrossOrigin public class BigScreenController { private final BigScreenService bigScreenService; @PostMapping("/zk") @@ -44,4 +45,37 @@ public class BigScreenController { public ResponseEntity workScreen(@RequestBody JSONObject whereJson) { return new ResponseEntity<>(bigScreenService.workScreen(whereJson), HttpStatus.OK); } + + + @GetMapping("/queryInfo") + @Log("查询中控室监控大屏手动设置数据") + @ApiOperation("查询中控室监控大屏手动设置数据") + public ResponseEntity queryInfo(@RequestParam Map whereJson, Pageable page) { + return new ResponseEntity<>(bigScreenService.queryInfo(whereJson,page), HttpStatus.OK); + } + + @PostMapping("/add") + @Log("手动添加监控大屏数据") + @ApiOperation("手动添加监控大屏数据") + public ResponseEntity add(@RequestBody JSONObject param) throws Exception { + bigScreenService.add(param); + return new ResponseEntity<>( HttpStatus.OK); + } + + + @PutMapping("/edit") + @Log("手动修改监控大屏数据") + @ApiOperation("手动修改监控大屏数据") + public ResponseEntity edit(@RequestBody JSONObject param) throws Exception { + bigScreenService.edit(param); + return new ResponseEntity<>( HttpStatus.OK); + } + + @DeleteMapping("/del") + @Log("手动删除监控大屏数据") + @ApiOperation("手动删除监控大屏数据") + public ResponseEntity del(@RequestBody Long[] ids) throws Exception { + bigScreenService.del(ids); + return new ResponseEntity<>( HttpStatus.OK); + } } diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/ext/bigScreen/service/BigScreenService.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/ext/bigScreen/service/BigScreenService.java index 291481bc..5844b893 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/ext/bigScreen/service/BigScreenService.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/ext/bigScreen/service/BigScreenService.java @@ -1,6 +1,9 @@ package org.nl.wms.ext.bigScreen.service; import com.alibaba.fastjson.JSONObject; +import org.springframework.data.domain.Pageable; + +import java.util.Map; /** * 中控室大屏看板 @@ -26,4 +29,30 @@ public interface BigScreenService { * @return */ public JSONObject workScreen(JSONObject param); + + /** + * 获取监控大屏静态设置的数据数据页面 + * + * @return + */ + public Map queryInfo(Map whereJson, Pageable page); + + /** + * 手动添加监控大屏数据 + * @param param + */ + public void add(JSONObject param) throws Exception; + + /** + * 手动修改监控大屏数据 + * @param param + */ + public void edit(JSONObject param) throws Exception; + + /** + * 手动删除监控大屏数据 + * @param ids + */ + public void del(Long[] ids) throws Exception; + } diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/ext/bigScreen/service/dto/ShopinfoDto.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/ext/bigScreen/service/dto/ShopinfoDto.java new file mode 100644 index 00000000..d5abb117 --- /dev/null +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/ext/bigScreen/service/dto/ShopinfoDto.java @@ -0,0 +1,87 @@ +package org.nl.wms.ext.bigScreen.service.dto; + +import lombok.Data; +import java.math.BigDecimal; +import java.io.Serializable; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; + +/** + * @description / + * @author geng by + * @date 2022-07-14 + **/ +@Data +public class ShopinfoDto implements Serializable { + + /** 标识 */ + /** 防止精度丢失 */ + @JsonSerialize(using= ToStringSerializer.class) + private Long shop_id; + + /** 今日计划量(pcs) */ + private BigDecimal production_plan1; + + /** 今日计划量(吨) */ + private BigDecimal production_plan2; + + /** 今日入库数(吨) */ + private BigDecimal today_in2; + + /** 今日入库数(pcs) */ + private BigDecimal today_in1; + + /** 车间原材料数(吨) */ + private BigDecimal materials_num; + + /** 今日出库数(吨) */ + private BigDecimal today_out2; + + /** 今日出库数(pcs) */ + private BigDecimal today_out1; + + /** 昨日入库数(吨) */ + private BigDecimal yesterday_in2; + + /** 昨日入库数(pcs) */ + private BigDecimal yesterday_in1; + + /** 昨日出库数(吨) */ + private BigDecimal yesterday_out2; + + /** 昨日出库数(pcs) */ + private BigDecimal yesterday_out1; + + /** 车间人数 */ + private BigDecimal person_num; + + /** 车间成品数(吨) */ + private BigDecimal product_num2; + + /** 车间成品数(pcs) */ + private BigDecimal product_num1; + + /** 车间在制品数(吨) */ + private BigDecimal processed_num2; + + /** 车间在制品数(pcs) */ + private BigDecimal processed_num1; + + /** 车间工艺路线数 */ + private BigDecimal route_num; + + /** 车间设备数 */ + private BigDecimal device_num; + + /** 今日生产量(pcs) */ + private BigDecimal production_today1; + + /** 今日生产量(吨) */ + private BigDecimal production_today2; + + /** 完成率 */ + private BigDecimal completion_rate; + + /** 更新时间 */ + private String b_date; +} diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/ext/bigScreen/service/dto/StockDto.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/ext/bigScreen/service/dto/StockDto.java new file mode 100644 index 00000000..13f4b5d1 --- /dev/null +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/ext/bigScreen/service/dto/StockDto.java @@ -0,0 +1,36 @@ +package org.nl.wms.ext.bigScreen.service.dto; + +import lombok.Data; +import java.math.BigDecimal; +import java.io.Serializable; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; + +/** + * @description / + * @author geng by + * @date 2022-07-14 + **/ +@Data +public class StockDto implements Serializable { + + /** 标识 */ + /** 防止精度丢失 */ + @JsonSerialize(using= ToStringSerializer.class) + private Long id; + + /** 日期 */ + private String date; + + /** 不足的 */ + private BigDecimal not_enough; + + /** 库容量 */ + private BigDecimal storagecapacity_weight; + + /** 库存量 */ + private BigDecimal repertory; + + /** 足够的 */ + private BigDecimal enough; +} diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/ext/bigScreen/service/dto/SupplyDto.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/ext/bigScreen/service/dto/SupplyDto.java new file mode 100644 index 00000000..e26118e1 --- /dev/null +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/ext/bigScreen/service/dto/SupplyDto.java @@ -0,0 +1,36 @@ +package org.nl.wms.ext.bigScreen.service.dto; + +import lombok.Data; +import java.math.BigDecimal; +import java.io.Serializable; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; + +/** + * @description / + * @author geng by + * @date 2022-07-14 + **/ +@Data +public class SupplyDto implements Serializable { + + /** 标识 */ + /** 防止精度丢失 */ + @JsonSerialize(using= ToStringSerializer.class) + private Long id; + + /** 日期 */ + private String date; + + /** 不足的 */ + private BigDecimal not_enough; + + /** 供 */ + private BigDecimal planinventory_weight; + + /** 需 */ + private BigDecimal need_num; + + /** 足够的 */ + private BigDecimal enough; +} diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/ext/bigScreen/service/dto/TodayandplannumDto.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/ext/bigScreen/service/dto/TodayandplannumDto.java new file mode 100644 index 00000000..e68e473c --- /dev/null +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/ext/bigScreen/service/dto/TodayandplannumDto.java @@ -0,0 +1,30 @@ +package org.nl.wms.ext.bigScreen.service.dto; + +import lombok.Data; +import java.math.BigDecimal; +import java.io.Serializable; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; + +/** + * @description / + * @author geng by + * @date 2022-07-14 + **/ +@Data +public class TodayandplannumDto implements Serializable { + + /** 标识 */ + /** 防止精度丢失 */ + @JsonSerialize(using= ToStringSerializer.class) + private Long pro_id; + + /** 今日产量 */ + private BigDecimal num_today; + + /** 今日产品名称 */ + private String name_today; + + /** 计划数量 */ + private BigDecimal num_plan; +} diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/ext/bigScreen/service/dto/YearinoutDto.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/ext/bigScreen/service/dto/YearinoutDto.java new file mode 100644 index 00000000..1cc198e1 --- /dev/null +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/ext/bigScreen/service/dto/YearinoutDto.java @@ -0,0 +1,42 @@ +package org.nl.wms.ext.bigScreen.service.dto; + +import lombok.Data; +import java.math.BigDecimal; +import java.io.Serializable; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; + +/** + * @description / + * @author geng by + * @date 2022-07-14 + **/ +@Data +public class YearinoutDto implements Serializable { + + /** 标识 */ + /** 防止精度丢失 */ + @JsonSerialize(using= ToStringSerializer.class) + private Long id; + + /** 车道工序数 */ + private BigDecimal process_num; + + /** 生产规格数 */ + private BigDecimal product_num; + + /** 总设计年产量(pcs) */ + private BigDecimal total_input1; + + /** 总设计年产量(吨) */ + private BigDecimal total_input2; + + /** 一期设计年产量(pcs) */ + private BigDecimal year_output1; + + /** 一期设计年产量(吨) */ + private BigDecimal year_output2; + + /** 日期 */ + private String b_date; +} diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/ext/bigScreen/service/impl/BigScreenServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/ext/bigScreen/service/impl/BigScreenServiceImpl.java index b26b9ae4..37ee3512 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/ext/bigScreen/service/impl/BigScreenServiceImpl.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/ext/bigScreen/service/impl/BigScreenServiceImpl.java @@ -1,30 +1,81 @@ package org.nl.wms.ext.bigScreen.service.impl; +import cn.hutool.core.date.DateTime; +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.map.MapUtil; +import cn.hutool.core.util.IdUtil; +import cn.hutool.core.util.ObjectUtil; import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections.MapUtils; +import org.nl.start.auto.initial.ApplicationAutoInitial; import org.nl.wms.ext.bigScreen.service.BigScreenService; +import org.nl.wms.ext.bigScreen.service.dto.*; +import org.nl.wql.core.bean.ResultBean; +import org.nl.wql.core.bean.WQLObject; +import org.nl.wql.util.WqlUtil; +import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; +import java.math.BigDecimal; +import java.util.*; + @Service @RequiredArgsConstructor @Slf4j -public class BigScreenServiceImpl implements BigScreenService { +public class BigScreenServiceImpl implements BigScreenService, ApplicationAutoInitial { + List todayandplannumDtos = new ArrayList<>(); + YearinoutDto yearinoutDtos = new YearinoutDto(); + List supplyDtos = new ArrayList<>(); + List stockDtos = new ArrayList<>(); + ShopinfoDto shopinfoDtos = new ShopinfoDto(); + @Override public JSONObject getData(JSONObject param) { - String str = "{\"production\":[{\"name_today\":\"5/8弯头\",\"materialprocess_series\":\"1002\",\"num_plan\":\"50000\",\"num_today\":\"38931\"},{\"name_today\":\"7/8弯头\",\"materialprocess_series\":\"1102\",\"num_plan\":\"20000\",\"num_today\":\"15639\"},{\"name_today\":\"15三通\",\"materialprocess_series\":\"1501\",\"num_plan\":\"0\",\"num_today\":\"0\"},{\"name_today\":\"15弯头\",\"materialprocess_series\":\"1502\",\"num_plan\":\"50000\",\"num_today\":\"38279\"},{\"name_today\":\"15直接\",\"materialprocess_series\":\"1503\",\"num_plan\":\"0\",\"num_today\":\"0\"},{\"name_today\":\"22三通\",\"materialprocess_series\":\"2201\",\"num_plan\":\"0\",\"num_today\":\"0\"},{\"name_today\":\"22弯头\",\"materialprocess_series\":\"2202\",\"num_plan\":\"20000\",\"num_today\":\"15199\"},{\"name_today\":\"22直接\",\"materialprocess_series\":\"2203\",\"num_plan\":\"0\",\"num_today\":\"0\"},{\"name_today\":\"22大小头\",\"materialprocess_series\":\"2204\",\"num_plan\":\"0\",\"num_today\":\"0\"},{\"name_today\":\"28三通\",\"materialprocess_series\":\"2801\",\"num_plan\":\"0\",\"num_today\":\"0\"},{\"name_today\":\"28弯头\",\"materialprocess_series\":\"2802\",\"num_plan\":\"0\",\"num_today\":\"0\"},{\"name_today\":\"28直接\",\"materialprocess_series\":\"2803\",\"num_plan\":\"0\",\"num_today\":\"0\"},{\"name_today\":\"28大小头\",\"materialprocess_series\":\"2804\",\"num_plan\":\"0\",\"num_today\":\"0\"},{\"name_today\":\"35大小头\",\"materialprocess_series\":\"3504\",\"num_plan\":\"0\",\"num_today\":\"0\"},{\"name_today\":\"42大小头\",\"materialprocess_series\":\"4204\",\"num_plan\":\"0\",\"num_today\":\"0\"},{\"name_today\":\"54大小头\",\"materialprocess_series\":\"5404\",\"num_plan\":\"0\",\"num_today\":\"0\"}],\"shopData\":{\"production_today1\":\"108048\",\"production_today2\":\"2.543361\",\"production_plan1\":\"140000\",\"production_plan2\":\"3.295243\",\"person_num\":\"45\",\"device_num\":\"300\",\"route_num\":\"257\",\"materials_num\":\"20.000000\",\"processed_num1\":\"170000\",\"processed_num2\":\"4.000000\",\"product_num1\":\"335000\",\"product_num2\":\"7.000000\",\"today_in1\":\"345146\",\"today_in2\":\"7.412000\",\"today_out1\":\"247700\",\"today_out2\":\"5.320000\",\"yesterday_in1\":\"393231\",\"yesterday_in2\":\"8.926000\",\"yesterday_out1\":\"291125\",\"yesterday_out2\":\"6.450000\",\"b_date\":\"2022-07-12\",\"completion_rate\":\"77.18\"},\"data_bar1\":{\"xDate\":[{\"date\":\"2022-07-12\",\"planinventory_weight\":\"5.000000\",\"need_num\":\"4.500000\",\"enough\":\"5.000000\",\"not_enough\":\"0.000000\"}]},\"data_bar2\":{\"xDate\":[{\"date\":\"2022-06-29\",\"storagecapacity_weight\":\"225.000000\",\"repertory\":\"56.000000\",\"enough\":\"225.000000\",\"not_enough\":\"0.000000\"},{\"date\":\"2022-06-30\",\"storagecapacity_weight\":\"225.000000\",\"repertory\":\"56.000000\",\"enough\":\"225.000000\",\"not_enough\":\"0.000000\"},{\"date\":\"2022-07-01\",\"storagecapacity_weight\":\"225.000000\",\"repertory\":\"56.000000\",\"enough\":\"225.000000\",\"not_enough\":\"0.000000\"},{\"date\":\"2022-07-02\",\"storagecapacity_weight\":\"225.000000\",\"repertory\":\"56.000000\",\"enough\":\"225.000000\",\"not_enough\":\"0.000000\"},{\"date\":\"2022-07-03\",\"storagecapacity_weight\":\"225.000000\",\"repertory\":\"56.000000\",\"enough\":\"225.000000\",\"not_enough\":\"0.000000\"},{\"date\":\"2022-07-04\",\"storagecapacity_weight\":\"225.000000\",\"repertory\":\"56.000000\",\"enough\":\"225.000000\",\"not_enough\":\"0.000000\"},{\"date\":\"2022-07-05\",\"storagecapacity_weight\":\"225.000000\",\"repertory\":\"56.000000\",\"enough\":\"225.000000\",\"not_enough\":\"0.000000\"},{\"date\":\"2022-07-06\",\"storagecapacity_weight\":\"225.000000\",\"repertory\":\"56.000000\",\"enough\":\"225.000000\",\"not_enough\":\"0.000000\"},{\"date\":\"2022-07-07\",\"storagecapacity_weight\":\"225.000000\",\"repertory\":\"56.000000\",\"enough\":\"225.000000\",\"not_enough\":\"0.000000\"},{\"date\":\"2022-07-08\",\"storagecapacity_weight\":\"225.000000\",\"repertory\":\"56.000000\",\"enough\":\"225.000000\",\"not_enough\":\"0.000000\"},{\"date\":\"2022-07-09\",\"storagecapacity_weight\":\"225.000000\",\"repertory\":\"56.000000\",\"enough\":\"225.000000\",\"not_enough\":\"0.000000\"},{\"date\":\"2022-07-10\",\"storagecapacity_weight\":\"225.000000\",\"repertory\":\"56.000000\",\"enough\":\"225.000000\",\"not_enough\":\"0.000000\"},{\"date\":\"2022-07-11\",\"storagecapacity_weight\":\"225.000000\",\"repertory\":\"56.000000\",\"enough\":\"225.000000\",\"not_enough\":\"0.000000\"},{\"date\":\"2022-07-12\",\"storagecapacity_weight\":\"225.000000\",\"repertory\":\"56.000000\",\"enough\":\"225.000000\",\"not_enough\":\"0.000000\"}]}}"; + Integer todayPcsSum = 0; + Integer planPcsSum = 0; + JSONObject map = new JSONObject(); + Random random = new Random(); + for (int i = 0; i < todayandplannumDtos.size(); i++) { + 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))); + } + todayPcsSum += Integer.parseInt(todayandplannumDto.getNum_today().toString()); + planPcsSum += Integer.parseInt(todayandplannumDto.getNum_plan().toString()); + } + map.put("production", todayandplannumDtos); + shopinfoDtos.setProduction_today1(BigDecimal.valueOf(todayPcsSum)); + shopinfoDtos.setProduction_plan1(BigDecimal.valueOf(planPcsSum)); + shopinfoDtos.setCompletion_rate(shopinfoDtos.getProduction_today1().divide(shopinfoDtos.getProduction_plan1(), 4, BigDecimal.ROUND_HALF_UP).movePointRight(2)); + map.put("shopData", shopinfoDtos); + Object[] objects = stockDtos.toArray(); + JSONObject st = new JSONObject(); + st.put("xDate", objects); + Object[] objects1 = supplyDtos.toArray(); + JSONObject su = new JSONObject(); + su.put("xDate", objects1); + map.put("data_bar2", st); + map.put("data_bar1", su); JSONObject returnjo = new JSONObject(); returnjo.put("code", "1"); returnjo.put("desc", "查询成功!"); - returnjo.put("result", JSON.parseObject(str)); + returnjo.put("result", map); return returnjo; } @Override public JSONObject query3Dcartoon(JSONObject param) { - String str="{\"desc\":\"查询成功\",\"code\":\"1\",\"result\":{\"total_input1\":\"17500.00\",\"total_input2\":\"3500.00\",\"year_output1\":\"25000.00\",\"year_output2\":\"5000.00\",\"product_num\":\"205\",\"process_num\":\"8\",\"b_date\":\"2019-05-05\"}}"; - return JSON.parseObject(str); + //String str="{\"desc\":\"查询成功\",\"code\":\"1\",\"result\":{\"total_input1\":\"17500.00\",\"total_input2\":\"3500.00\",\"year_output1\":\"25000.00\",\"year_output2\":\"5000.00\",\"product_num\":\"205\",\"process_num\":\"8\",\"b_date\":\"2019-05-05\"}}"; + JSONObject returnjo = new JSONObject(); + returnjo.put("code", "1"); + returnjo.put("desc", "查询成功!"); + returnjo.put("result", yearinoutDtos); + return returnjo; } @Override @@ -37,21 +88,208 @@ public class BigScreenServiceImpl implements BigScreenService { } //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\"}]}}"; + 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\"}]}}"; + 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\"}]}}"; + 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\"}]}}"; + 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); } + + @Override + public Map queryInfo(Map whereJson, Pageable page) { + String queryType = MapUtils.getString(whereJson, "queryType"); + if (queryType.equals("shopInfo")) { + WQLObject wo_shopInfo = WQLObject.getWQLObject("EXT_BIG_ShopInfo"); + ResultBean rb = wo_shopInfo.pagequery(WqlUtil.getHttpContext(page), " 1 = 1", ""); + final JSONObject json = rb.pageResult(); + return json; + } + if (queryType.equals("todayAndPlanNum")) { + WQLObject wo_plan = WQLObject.getWQLObject("EXT_BIG_TodayAndPlanNum"); + ResultBean rb = wo_plan.pagequery(WqlUtil.getHttpContext(page), " 1 = 1", ""); + final JSONObject json = rb.pageResult(); + return json; + } + if (queryType.equals("stock")) { + WQLObject wo_stock = WQLObject.getWQLObject("EXT_BIG_Stock"); + ResultBean rb = wo_stock.pagequery(WqlUtil.getHttpContext(page), " 1 = 1", ""); + final JSONObject json = rb.pageResult(); + return json; + } + if (queryType.equals("supply")) { + WQLObject wo_supply = WQLObject.getWQLObject("EXT_BIG_Supply"); + ResultBean rb = wo_supply.pagequery(WqlUtil.getHttpContext(page), " 1 = 1", ""); + final JSONObject json = rb.pageResult(); + return json; + } + if (queryType.equals("yearInOut")) { + WQLObject wo_yearInOut = WQLObject.getWQLObject("EXT_BIG_YearInOut"); + ResultBean rb = wo_yearInOut.pagequery(WqlUtil.getHttpContext(page), " 1 = 1", ""); + final JSONObject json = rb.pageResult(); + return json; + } + return null; + } + + @Override + public void add(JSONObject param) throws Exception { + String addType = MapUtils.getString(param, "addType"); + if (addType.equals("shopInfo")) { + WQLObject wo_shopInfo = WQLObject.getWQLObject("EXT_BIG_ShopInfo"); + JSONObject jsonObject = wo_shopInfo.query().uniqueResult(0); + wo_shopInfo.delete(jsonObject); + param.put("shop_id", IdUtil.getSnowflake(1, 1).nextId()); + param.put("data", DateUtil.today()); + wo_shopInfo.insert(param); + } + if (addType.equals("todayAndPlanNum")) { + WQLObject wo_plan = WQLObject.getWQLObject("EXT_BIG_TodayAndPlanNum"); + param.put("pro_id", IdUtil.getSnowflake(1, 1).nextId()); + wo_plan.insert(param); + } + if (addType.equals("stock")) { + WQLObject wo_stock = WQLObject.getWQLObject("EXT_BIG_Stock"); + JSONArray resultJSONArray = wo_stock.query().getResultJSONArray(0); + for (int i = 0; i < resultJSONArray.size(); i++) { + JSONObject jsonObject = resultJSONArray.getJSONObject(i); + wo_stock.delete(jsonObject); + } + Date now = DateUtil.parseDate(DateUtil.today()); + for (int i = 1; i <= 14; i++) { + Date data = DateUtil.offsetDay(now, -i); + String formatbz = DateUtil.formatDate(data); + param.put("date", formatbz); + param.put("id", IdUtil.getSnowflake(1, 1).nextId()); + wo_stock.insert(param); + } + } + if (addType.equals("supply")) { + WQLObject wo_supply = WQLObject.getWQLObject("EXT_BIG_Supply"); + JSONArray resultJSONArray = wo_supply.query().getResultJSONArray(0); + for (int i = 0; i < resultJSONArray.size(); i++) { + JSONObject jsonObject = resultJSONArray.getJSONObject(i); + wo_supply.delete(jsonObject); + } + Date now = DateUtil.parseDate(DateUtil.today()); + for (int i = 1; i <= 14; i++) { + Date data = DateUtil.offsetDay(now, i); + String formatbz = DateUtil.formatDate(data); + param.put("date", formatbz); + param.put("id", IdUtil.getSnowflake(1, 1).nextId()); + wo_supply.insert(param); + } + } + if (addType.equals("yearInOut")) { + WQLObject wo_yearInOut = WQLObject.getWQLObject("EXT_BIG_YearInOut"); + JSONObject jsonObject = wo_yearInOut.query().uniqueResult(0); + wo_yearInOut.delete(jsonObject); + param.put("id", IdUtil.getSnowflake(1, 1).nextId()); + wo_yearInOut.insert(param); + } + this.autoInitial(); + } + + @Override + public void edit(JSONObject param) throws Exception { + String addType = MapUtils.getString(param, "addType"); + if (addType.equals("shopInfo")) { + WQLObject wo_shopInfo = WQLObject.getWQLObject("EXT_BIG_ShopInfo"); + wo_shopInfo.update(param); + } + if (addType.equals("todayAndPlanNum")) { + WQLObject wo_plan = WQLObject.getWQLObject("EXT_BIG_TodayAndPlanNum"); + wo_plan.update(param); + } + if (addType.equals("stock")) { + WQLObject wo_stock = WQLObject.getWQLObject("EXT_BIG_Stock"); + wo_stock.update(param); + } + if (addType.equals("supply")) { + WQLObject wo_supply = WQLObject.getWQLObject("EXT_BIG_Supply"); + wo_supply.update(param); + } + if (addType.equals("yearInOut")) { + WQLObject wo_yearInOut = WQLObject.getWQLObject("EXT_BIG_YearInOut"); + wo_yearInOut.update(param); + } + this.autoInitial(); + } + + @Override + public void del(Long[] ids) throws Exception { + Long id = ids[0]; + JSONObject param = new JSONObject(); + WQLObject wo_shopInfo = WQLObject.getWQLObject("EXT_BIG_ShopInfo"); + wo_shopInfo.delete("shop_id = '"+id+"'"); + + + WQLObject wo_plan = WQLObject.getWQLObject("EXT_BIG_TodayAndPlanNum"); + wo_plan.delete("pro_id = '"+id+"'"); + + + WQLObject wo_stock = WQLObject.getWQLObject("EXT_BIG_Stock"); + wo_stock.delete("id = '"+id+"'"); + + + WQLObject wo_supply = WQLObject.getWQLObject("EXT_BIG_Supply"); + wo_supply.delete("id = '"+id+"'"); + + + WQLObject wo_yearInOut = WQLObject.getWQLObject("EXT_BIG_YearInOut"); + wo_yearInOut.delete("id = '"+id+"'"); + + this.autoInitial(); + } + + @Override + public void autoInitial() throws Exception { + WQLObject wo_plan = WQLObject.getWQLObject("EXT_BIG_TodayAndPlanNum"); + WQLObject wo_shopInfo = WQLObject.getWQLObject("EXT_BIG_ShopInfo"); + WQLObject wo_stock = WQLObject.getWQLObject("EXT_BIG_Stock"); + WQLObject wo_supply = WQLObject.getWQLObject("EXT_BIG_Supply"); + WQLObject wo_yearInOut = WQLObject.getWQLObject("EXT_BIG_YearInOut"); + JSONArray planArray = wo_plan.query().getResultJSONArray(0); + JSONObject jsonObject = wo_shopInfo.query().uniqueResult(0); + JSONArray stockArray = wo_stock.query().getResultJSONArray(0); + JSONArray supplyArray = wo_supply.query().getResultJSONArray(0); + JSONObject yearInOutArray = wo_yearInOut.query().uniqueResult(0); + Random random = new Random(); + if (ObjectUtil.isNotEmpty(jsonObject)) { + shopinfoDtos = JSONObject.toJavaObject(jsonObject, ShopinfoDto.class); + } + if (ObjectUtil.isNotEmpty(planArray)) { + todayandplannumDtos = planArray.toJavaList(TodayandplannumDto.class); + } + if (ObjectUtil.isNotEmpty(stockArray)) { + stockDtos = stockArray.toJavaList(StockDto.class); + Iterator iterator = stockDtos.iterator(); + while (iterator.hasNext()) { + StockDto stockDto = iterator.next(); + stockDto.setRepertory(new BigDecimal(random.nextInt(30) + 170)); + } + } + if (ObjectUtil.isNotEmpty(supplyArray)) { + supplyDtos = supplyArray.toJavaList(SupplyDto.class); + Iterator iterator = supplyDtos.iterator(); + while (iterator.hasNext()) { + SupplyDto supplyDto = iterator.next(); + supplyDto.setNeed_num(new BigDecimal(random.nextInt(2) + 3)); + } + } + if (ObjectUtil.isNotEmpty(yearInOutArray)) { + yearinoutDtos = yearInOutArray.toJavaObject(YearinoutDto.class); + } + + } } diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/ext/bigScreen/wql/bigScreen.xls b/mes/hd/nladmin-system/src/main/java/org/nl/wms/ext/bigScreen/wql/bigScreen.xls new file mode 100644 index 00000000..b49844c7 Binary files /dev/null and b/mes/hd/nladmin-system/src/main/java/org/nl/wms/ext/bigScreen/wql/bigScreen.xls differ diff --git a/mes/qd/.env.production b/mes/qd/.env.production index 2a8a2dda..18549362 100644 --- a/mes/qd/.env.production +++ b/mes/qd/.env.production @@ -2,6 +2,6 @@ ENV = 'production' # 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置 # 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http -VUE_APP_BASE_API = 'http://192.168.46.225:8014' +VUE_APP_BASE_API = 'http://192.168.46.5:8014' # 如果接口是 http 形式, wss 需要改为 ws -VUE_APP_WS_API = 'ws://192.168.46.225:8014' +VUE_APP_WS_API = 'ws://192.168.46.5:8014' diff --git a/mes/qd/public/config.js b/mes/qd/public/config.js index ef35d9a5..82844532 100644 --- a/mes/qd/public/config.js +++ b/mes/qd/public/config.js @@ -3,7 +3,7 @@ window.g = { VUE_APP_BASE_API: '/' }, prod: { - VUE_APP_BASE_API: 'http://192.168.46.225:8011' + VUE_APP_BASE_API: 'http://192.168.46.5:8011' } diff --git a/mes/qd/src/api/wms/bigScreen/bigScreen.js b/mes/qd/src/api/wms/bigScreen/bigScreen.js new file mode 100644 index 00000000..5c69791c --- /dev/null +++ b/mes/qd/src/api/wms/bigScreen/bigScreen.js @@ -0,0 +1,27 @@ +import request from '@/utils/request' + +export function add(data) { + return request({ + url: 'api/bigScreenScreen/add', + method: 'post', + data + }) +} + +export function del(ids) { + return request({ + url: 'api/bigScreenScreen/del', + method: 'delete', + data: ids + }) +} + +export function edit(data) { + return request({ + url: 'api/bigScreenScreen/edit', + method: 'put', + data + }) +} + +export default { add, edit, del } diff --git a/mes/qd/src/main.js b/mes/qd/src/main.js index ed54e316..c4ba045d 100644 --- a/mes/qd/src/main.js +++ b/mes/qd/src/main.js @@ -49,6 +49,7 @@ Vue.use(dict) // 全局设置控件样式https://codeantenna.com/a/0IN5FMJk5h Element.Table.props.border = { type: Boolean, default: true } +Element.TableColumn.props.align = { type: String, default: 'center' } Vue.use(Element, { size: Cookies.get('size') || 'mini' // set element-ui default size }) diff --git a/mes/qd/src/views/wms/bigScreen/shopInfo/index.vue b/mes/qd/src/views/wms/bigScreen/shopInfo/index.vue new file mode 100644 index 00000000..90c77a3c --- /dev/null +++ b/mes/qd/src/views/wms/bigScreen/shopInfo/index.vue @@ -0,0 +1,184 @@ + + + + + diff --git a/mes/qd/src/views/wms/bigScreen/stock/index.vue b/mes/qd/src/views/wms/bigScreen/stock/index.vue new file mode 100644 index 00000000..3ed31c89 --- /dev/null +++ b/mes/qd/src/views/wms/bigScreen/stock/index.vue @@ -0,0 +1,103 @@ + + + + + diff --git a/mes/qd/src/views/wms/bigScreen/supply/index.vue b/mes/qd/src/views/wms/bigScreen/supply/index.vue new file mode 100644 index 00000000..b1703567 --- /dev/null +++ b/mes/qd/src/views/wms/bigScreen/supply/index.vue @@ -0,0 +1,103 @@ + + + + + diff --git a/mes/qd/src/views/wms/bigScreen/todayAndPlanNum/index.vue b/mes/qd/src/views/wms/bigScreen/todayAndPlanNum/index.vue new file mode 100644 index 00000000..e8542631 --- /dev/null +++ b/mes/qd/src/views/wms/bigScreen/todayAndPlanNum/index.vue @@ -0,0 +1,106 @@ + + + + + diff --git a/mes/qd/src/views/wms/bigScreen/yearInOut/index.vue b/mes/qd/src/views/wms/bigScreen/yearInOut/index.vue new file mode 100644 index 00000000..ccb3c653 --- /dev/null +++ b/mes/qd/src/views/wms/bigScreen/yearInOut/index.vue @@ -0,0 +1,110 @@ + + + + +