From f8dccd27637784989ec9801623f6e3eafd39f6d3 Mon Sep 17 00:00:00 2001 From: wenjy Date: Sat, 15 Oct 2022 21:46:53 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E7=AE=B1=E5=A3=B3=E7=9C=8B?= =?UTF-8?q?=E6=9D=BF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Maven__cn_hutool_hutool_all_5_8_0_M4.xml | 13 + deviceboard/deviceboard.iml | 1 + pom.xml | 6 + productionboard/productionboard.iml | 1 + .../controller/StorageController.java | 54 +--- .../mapper/BaseLocationInfoMapper.java | 38 +++ .../mapper/RecordTaskMapper.java | 14 ++ .../service/impl/BaseLocationServiceImpl.java | 234 ++++++++++-------- .../static/js/common/echarts.common.js | 117 +-------- .../main/resources/static/js/storage/index.js | 37 ++- .../controller/StorageController.class | Bin 2001 -> 2974 bytes .../mapper/BaseLocationInfoMapper.class | Bin 425 -> 3045 bytes .../mapper/RecordTaskMapper.class | Bin 407 -> 1443 bytes .../impl/BaseLocationServiceImpl.class | Bin 9688 -> 5603 bytes .../classes/static/css/foamBox/style.css | 5 - .../classes/static/js/aluminumLiner/index.js | 4 +- .../static/js/common/echarts.common.js | 115 +-------- .../target/classes/static/js/foamBox/index.js | 18 +- .../target/classes/static/js/storage/index.js | 37 ++- visualboard.iml | 1 + 20 files changed, 284 insertions(+), 411 deletions(-) create mode 100644 .idea/libraries/Maven__cn_hutool_hutool_all_5_8_0_M4.xml diff --git a/.idea/libraries/Maven__cn_hutool_hutool_all_5_8_0_M4.xml b/.idea/libraries/Maven__cn_hutool_hutool_all_5_8_0_M4.xml new file mode 100644 index 0000000..5c7d413 --- /dev/null +++ b/.idea/libraries/Maven__cn_hutool_hutool_all_5_8_0_M4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/deviceboard/deviceboard.iml b/deviceboard/deviceboard.iml index bafa983..8e1c90e 100644 --- a/deviceboard/deviceboard.iml +++ b/deviceboard/deviceboard.iml @@ -115,5 +115,6 @@ + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 9160f6d..dc74c8c 100644 --- a/pom.xml +++ b/pom.xml @@ -95,6 +95,12 @@ 12.1.0.2.0 + + cn.hutool + hutool-all + 5.8.0.M4 + + diff --git a/productionboard/productionboard.iml b/productionboard/productionboard.iml index bafa983..8e1c90e 100644 --- a/productionboard/productionboard.iml +++ b/productionboard/productionboard.iml @@ -115,5 +115,6 @@ + \ No newline at end of file diff --git a/productionboard/src/main/java/com/productionboard/controller/StorageController.java b/productionboard/src/main/java/com/productionboard/controller/StorageController.java index 1078d4e..e9ab4ef 100644 --- a/productionboard/src/main/java/com/productionboard/controller/StorageController.java +++ b/productionboard/src/main/java/com/productionboard/controller/StorageController.java @@ -1,5 +1,6 @@ package com.productionboard.controller; +import cn.hutool.http.HttpUtil; import com.productionboard.service.IBaseLocationService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -47,10 +48,16 @@ public class StorageController { return prefix; } - /* @GetMapping("/getProductionPlan") + @GetMapping("/getProductionPlan") @ResponseBody() public String productionPlan(){ - String info = + + String urlStr = "http://10.100.71.119:8012/system/NorthWareHouse/getPlanInfo"; + + String param = "{\"StartTime\":\"2018-10-10 09:42:02\",\"EndTime\":\"2018-10-29 09:42:02\",\"StartIndex\":\"0\",\"PageSize\":\"30\"}"; + String response = HttpUtil.post(urlStr,param); + + String info = "{\n" + " \"header\":[\n" + " \"计划型号\",\n" @@ -59,47 +66,12 @@ public class StorageController { + " \"差异值\",\n" + " \"计划进度\"\n" + " ],\n" - + " \"data\":[\n" - + " [\n" - + " \"20210\",\n" - + " \"50\",\n" - + " \"25\",\n" - + " \"25\",\n" - + " \"50%\"\n" - + " ],\n" - + " [\n" - + " \"20210\",\n" - + " \"50\",\n" - + " \"25\",\n" - + " \"25\",\n" - + " \"50%\"\n" - + " ],\n" - + " [\n" - + " \"20210\",\n" - + " \"50\",\n" - + " \"25\",\n" - + " \"25\",\n" - + " \"50%\"\n" - + " ],\n" - + " [\n" - + " \"20210\",\n" - + " \"50\",\n" - + " \"25\",\n" - + " \"25\",\n" - + " \"50%\"\n" - + " ],\n" - + " [\n" - + " \"20210\",\n" - + " \"50\",\n" - + " \"25\",\n" - + " \"25\",\n" - + " \"50%\"\n" - + " ]\n" - + " ]\n" + + " \"data\":\n" + +response + "}"; - + System.out.println(info); return info; - }*/ + } /** * 库存统计 diff --git a/productionboard/src/main/java/com/productionboard/mapper/BaseLocationInfoMapper.java b/productionboard/src/main/java/com/productionboard/mapper/BaseLocationInfoMapper.java index 422c9eb..7c1523a 100644 --- a/productionboard/src/main/java/com/productionboard/mapper/BaseLocationInfoMapper.java +++ b/productionboard/src/main/java/com/productionboard/mapper/BaseLocationInfoMapper.java @@ -3,6 +3,11 @@ package com.productionboard.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.productionboard.entity.BaseLocationInfo; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.springframework.stereotype.Service; + +import java.util.List; /** *

@@ -15,4 +20,37 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface BaseLocationInfoMapper extends BaseMapper { + @Select( + "select t1.objid, t1.location_code, t1.location_name,\n" + + " NVL(substr(t2.DETIAL_MATERIAL_NAME,instr(t2.DETIAL_MATERIAL_NAME,',',1,1)+1,instr(t2.DETIAL_MATERIAL_NAME,',',1,2)-1-instr(t2.DETIAL_MATERIAL_NAME,',',1,1)),'--') as material_type,\n" + + " t1.store_code, t1.location_area, t1.location_row, t1.location_line,\n" + + " t1.location_tier, t1.location_status, t1.efficiency,\n" + + " t1.delete_flag, t1.record_time\n" + + " from base_location_info t1\n" + + " left join IMOS_TE_BOM @SCADA_DBLINK t2 on t1.MATERIAL_TYPE = t2.DETIAL_MATERIAL_CODE\n" + + "where t1.STORE_CODE = #{STORE_CODE}") + List SelectLocationInfo(@Param("STORE_CODE") String STORE_CODE); + + @Select( + "select * from BASE_LOCATION_INFO where STORE_CODE = #{STORE_CODE} and LOCATION_STATUS = 1") + List SelectInUseLocationInfo(@Param("STORE_CODE") String STORE_CODE); + + @Select( + "select *\n" + + "from (select t1.objid, t1.location_code, t1.location_name,\n" + + " NVL(substr(t2.DETIAL_MATERIAL_NAME,instr(t2.DETIAL_MATERIAL_NAME,',',1,1)+1,instr(t2.DETIAL_MATERIAL_NAME,',',1,2)-1-instr(t2.DETIAL_MATERIAL_NAME,',',1,1)),'--') as material_type,\n" + + " t1.store_code, t1.location_area, t1.location_row, t1.location_line,\n" + + " t1.location_tier, t1.location_status, t1.efficiency,\n" + + " t1.delete_flag, t1.record_time\n" + + " from base_location_info t1\n" + + " left join IMOS_TE_BOM @SCADA_DBLINK t2 on t1.MATERIAL_TYPE = t2.DETIAL_MATERIAL_CODE\n" + + "where t1.LOCATION_STATUS = 1 and t1.DELETE_FLAG = 1) a\n" + + "where a.STORE_CODE = #{STORE_CODE} and a.material_type = #{MATERIAL_TYPE} and a.LOCATION_AREA = #{LOCATION_AREA}") + List SelectLocationInfoByArea( + @Param("STORE_CODE") String STORE_CODE, + @Param("LOCATION_AREA") String LOCATION_AREA, + @Param("MATERIAL_TYPE") String MATERIAL_TYPE); + + @Select("select * from BASE_LOCATION_INFO where STORE_CODE = #{STORE_CODE} and LOCATION_AREA = #{LOCATION_AREA} and LOCATION_STATUS = 1") + List SelectInUseLocationInfoByArea(@Param("STORE_CODE") String STORE_CODE,@Param("LOCATION_AREA") String LOCATION_AREA); } diff --git a/productionboard/src/main/java/com/productionboard/mapper/RecordTaskMapper.java b/productionboard/src/main/java/com/productionboard/mapper/RecordTaskMapper.java index 087a74e..2657066 100644 --- a/productionboard/src/main/java/com/productionboard/mapper/RecordTaskMapper.java +++ b/productionboard/src/main/java/com/productionboard/mapper/RecordTaskMapper.java @@ -1,8 +1,13 @@ package com.productionboard.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.productionboard.entity.MesProduction.PlanInfo; import com.productionboard.entity.RecordTask; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; /** *

@@ -15,4 +20,13 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface RecordTaskMapper extends BaseMapper { + @Select( + "select * from RECORD_TASK where to_char(RECORD_TIME, 'yyyy-MM-dd') = to_char(sysdate, 'yyyy-MM-dd') And STORE_CODE = #{STORE_CODE}") + List getRecordTasks(@Param("STORE_CODE") String STORE_CODE); + + @Select("select *\n" + + "from RECORD_TASK\n" + + "where to_char(RECORD_TIME, 'yyyy-MM-dd') = to_char(sysdate, 'yyyy-MM-dd')\n" + + " and STORE_CODE = #{STORE_CODE} and LOCATION_AREA = #{LOCATION_AREA} and TASK_TYPE = #{TASK_TYPE}") + List SelectRecordTaskByTaskType(@Param("STORE_CODE") String STORE_CODE,@Param("LOCATION_AREA") String LOCATION_AREA,@Param("TASK_TYPE") String TASK_TYPE); } diff --git a/productionboard/src/main/java/com/productionboard/service/impl/BaseLocationServiceImpl.java b/productionboard/src/main/java/com/productionboard/service/impl/BaseLocationServiceImpl.java index 9eadae4..9344be8 100644 --- a/productionboard/src/main/java/com/productionboard/service/impl/BaseLocationServiceImpl.java +++ b/productionboard/src/main/java/com/productionboard/service/impl/BaseLocationServiceImpl.java @@ -1,5 +1,8 @@ package com.productionboard.service.impl; +import cn.hutool.http.HttpRequest; +import cn.hutool.http.HttpResponse; +import cn.hutool.http.HttpUtil; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; @@ -26,123 +29,146 @@ import java.util.stream.Collectors; @Service public class BaseLocationServiceImpl implements IBaseLocationService { - @Autowired - private BaseLocationInfoMapper lcoationMapper; + @Autowired private BaseLocationInfoMapper lcoationMapper; + + @Autowired private RecordTaskMapper recordTaskMapper; + + private SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); + + @Override + public String getStoreStatistics(String ids) { + String STORE_CODE = "A"; + QueryWrapper wrapper = new QueryWrapper<>(); + switch (ids) { + case "0": + wrapper.eq("STORE_CODE", "B"); + STORE_CODE = "B"; + break; + case "1": + wrapper.eq("STORE_CODE", "A"); + STORE_CODE = "A"; + break; + default: + break; + } + + List baseLocationInfos = lcoationMapper.SelectLocationInfo(STORE_CODE); + List materialType = + baseLocationInfos.stream() + .map(BaseLocationInfo::getMaterialType) + .distinct() + .collect(Collectors.toList()); + + Map> collect = + baseLocationInfos.stream() + .collect(Collectors.groupingBy(BaseLocationInfo::getMaterialType)); + List result = new ArrayList<>(); + + for (String item : materialType) { + JSONObject jsonObject = new JSONObject(); + jsonObject.put("materialName",item); + jsonObject.put("lineStoreAmount",lcoationMapper.SelectLocationInfoByArea(STORE_CODE,"1",item).size()); + jsonObject.put("hullStoreAmount",lcoationMapper.SelectLocationInfoByArea(STORE_CODE,"2",item).size()); + result.add(jsonObject); + } + + + String s = JSONArray.toJSONString(result); + System.out.println("物料库存统计:" + s); + return s; + } + + @Override + public String getParamJson(String ids) { - @Autowired - private RecordTaskMapper recordTaskMapper; + String urlStr = "http://10.100.71.119:8012/system/NorthWareHouse/getStoreInfo"; - private SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); + switch (ids) { + case "0": + urlStr = "http://10.100.71.119:8012/system/NorthWareHouse/getStoreInfo"; + break; + case "1": + urlStr = "http://10.100.71.119:8012/system/SouthWareHouse/getStoreInfo"; + break; + default: + break; + } + + String param = + "{\"StartTime\":\"2018-10-10 09:42:02\",\"EndTime\":\"2018-10-29 09:42:02\",\"StartIndex\":\"0\",\"PageSize\":\"30\"}"; + String response = HttpUtil.post(urlStr, param); + return response; - @Override - public String getStoreStatistics(String ids) { - QueryWrapper wrapper = new QueryWrapper<>(); + /*String[] result =new String[12]; + String STORE_CODE = "A"; + try{ + QueryWrapper locationWrapper = new QueryWrapper(); + QueryWrapper taskWrapper = new QueryWrapper<>(); switch (ids) { case"0": - wrapper.eq("STORE_CODE","B"); + locationWrapper.eq("STORE_CODE","B"); + STORE_CODE = "B"; break; case"1": - wrapper.eq("STORE_CODE","A"); + locationWrapper.eq("STORE_CODE","A"); + STORE_CODE = "A"; break; default: break; } - List baseLocationInfos = lcoationMapper.selectList(wrapper); - Map> collect = baseLocationInfos.stream().collect(Collectors.groupingBy(BaseLocationInfo::getMaterialType)); - List result = new ArrayList<>(); - - for (String item : collect.keySet()) { - JSONObject jsonObject = new JSONObject(); - jsonObject.put("materialName",item); - jsonObject.put("lineStoreAmount",collect.get(item).stream().filter(x->x.getLocationArea().equals("1")).collect(Collectors.toList()).size()); - jsonObject.put("hullStoreAmount",collect.get(item).stream().filter(x->x.getLocationArea().equals("2")).collect(Collectors.toList()).size()); - result.add(jsonObject); + int inAmount1 = recordTaskMapper.SelectRecordTaskByTaskType("A", "1", "1").size(); + int outAmount1 = recordTaskMapper.SelectRecordTaskByTaskType("A", "1", "2").size(); + //2号库入库数量、出库数量:1入库2出库 + int inAmount2 = recordTaskMapper.SelectRecordTaskByTaskType("A", "2", "1").size(); + int outAmount2 = recordTaskMapper.SelectRecordTaskByTaskType("A", "2", "2").size(); + result[0] = inAmount1+""; + result[1] = outAmount1+""; + result[2] = inAmount2+""; + result[3] = outAmount2+""; + + List baseLocationInfos = lcoationMapper.selectList(locationWrapper); + if(baseLocationInfos.size() > 0){ + + //正在使用 + int inUse = lcoationMapper.SelectInUseLocationInfo(STORE_CODE).size(); + System.out.println("正在使用:"+inUse); + //未使用 + int unUse = baseLocationInfos.size() - inUse; + + //1#正在使用 + int size1 = baseLocationInfos.stream().filter(x -> x.getLocationArea().equals("1")).collect(Collectors.toList()).size(); + int size2 = baseLocationInfos.stream().filter(x -> x.getLocationArea().equals("2")).collect(Collectors.toList()).size(); + int inUse1 = lcoationMapper.SelectInUseLocationInfoByArea(STORE_CODE,"1").size(); + int inUse2 = lcoationMapper.SelectInUseLocationInfoByArea(STORE_CODE,"2").size(); + int unUse1 = size1 - inUse1; + int unUse2 = size2 - inUse2; + + result[4] = inUse1+""; + result[5] = unUse1+""; + result[6] = inUse2+""; + result[7] = unUse2+""; + result[8] = unUse+""; + + // 创建一个数值格式化对象 + NumberFormat numberFormat = NumberFormat.getInstance(); + // 设置精确到小数点后2位 + numberFormat.setMaximumFractionDigits(2); + String unUsePercentage = numberFormat.format((float)unUse/(float)baseLocationInfos.size()*100); + System.out.println("diliverNum和queryMailNum的百分比为:" + result + "%"); + result[9] = unUsePercentage+"%"; + result[10] = inUse+""; + String inUsePercentage = numberFormat.format((float)inUse/(float)baseLocationInfos.size()*100); + result[11] = inUsePercentage+"%"; } - String s = JSONArray.toJSONString(result); - System.out.println("物料库存统计:"+s); - return s; + }catch (Exception e){ + System.out.println("门体库参数统计getParamJson异常:"+e.getMessage()); + for (int i = 0; i < 12; i++) { + // + result[i] = i+""; + } } - @Override - public String getParamJson(String ids) { - String[] result =new String[12]; - - try{ - QueryWrapper locationWrapper = new QueryWrapper(); - QueryWrapper taskWrapper = new QueryWrapper<>(); - switch (ids) { - case"0": - locationWrapper.eq("STORE_CODE","B"); - taskWrapper.eq("STORE_CODE","B"); - break; - case"1": - locationWrapper.eq("STORE_CODE","A"); - taskWrapper.eq("STORE_CODE","A"); - break; - default: - break; - } - taskWrapper.like("RECORD_TIME",simpleDateFormat.format(new Date())); - - List recordTasks = recordTaskMapper.selectList(taskWrapper); - - if(recordTasks.size()>0){ - //1号库入库数量、出库数量:1入库2出库 - int inAmount1 = recordTasks.stream().filter(x -> x.getLocationArea().equals("1") && x.getTaskType().equals("1")).collect(Collectors.toList()).size(); - int outAmount1 = recordTasks.stream().filter(x -> x.getLocationArea().equals("1") && x.getTaskType().equals("2")).collect(Collectors.toList()).size(); - //2号库入库数量、出库数量:1入库2出库 - int inAmount2 = recordTasks.stream().filter(x -> x.getLocationArea().equals("2") && x.getTaskType().equals("1")).collect(Collectors.toList()).size(); - int outAmount2 = recordTasks.stream().filter(x -> x.getLocationArea().equals("2") && x.getTaskType().equals("2")).collect(Collectors.toList()).size(); - result[0] = inAmount1+""; - result[1] = outAmount1+""; - result[2] = inAmount2+""; - result[3] = outAmount2+""; - - } - - List baseLocationInfos = lcoationMapper.selectList(locationWrapper); - if(baseLocationInfos.size() > 0){ - - //正在使用 - int inUse = baseLocationInfos.stream().filter(x -> x.getLocationStatus() == 1L).collect(Collectors.toList()).size(); - System.out.println("正在使用:"+inUse); - //未使用 - int unUse = baseLocationInfos.size() - inUse; - - //1#正在使用 - int size1 = baseLocationInfos.stream().filter(x -> x.getLocationArea().equals("1")).collect(Collectors.toList()).size(); - int size2 = baseLocationInfos.stream().filter(x -> x.getLocationArea().equals("2")).collect(Collectors.toList()).size(); - int inUse1 = baseLocationInfos.stream().filter(x -> x.getLocationArea().equals("1") && x.getLocationStatus().equals("1")).collect(Collectors.toList()).size(); - int inUse2 = baseLocationInfos.stream().filter(x -> x.getLocationArea().equals("2") && x.getLocationStatus().equals("1")).collect(Collectors.toList()).size(); - int unUse1 = size1 - inUse1; - int unUse2 = size2 - inUse2; - - result[4] = inUse1+""; - result[5] = unUse1+""; - result[6] = inUse2+""; - result[7] = unUse2+""; - result[8] = unUse+""; - - // 创建一个数值格式化对象 - NumberFormat numberFormat = NumberFormat.getInstance(); - // 设置精确到小数点后2位 - numberFormat.setMaximumFractionDigits(2); - String unUsePercentage = numberFormat.format((float)unUse/(float)baseLocationInfos.size()*100); - System.out.println("diliverNum和queryMailNum的百分比为:" + result + "%"); - result[9] = unUsePercentage+"%"; - result[10] = inUse+""; - String inUsePercentage = numberFormat.format((float)inUse/(float)baseLocationInfos.size()*100); - result[11] = inUsePercentage+"%"; - } - }catch (Exception e){ - System.out.println("门体库参数统计getParamJson异常:"+e.getMessage()); - for (int i = 0; i < 12; i++) { - // - result[i] = i+""; - } - } - - return JSONArray.toJSONString(result); - } + return JSONArray.toJSONString(result);*/ + } } diff --git a/productionboard/src/main/resources/static/js/common/echarts.common.js b/productionboard/src/main/resources/static/js/common/echarts.common.js index 95169cf..742fff8 100644 --- a/productionboard/src/main/resources/static/js/common/echarts.common.js +++ b/productionboard/src/main/resources/static/js/common/echarts.common.js @@ -1191,16 +1191,6 @@ const multipleThreeDimensionalCylindrical = (res, ids) => { let lineWidth = 1; let isDataZoom = xValue.length > 3 let stepSize = 1 / (xValue.length / 3) * 100 - // hullStoreAmount.forEach((val, index) => { - // if (val == 0) { - // hullStoreAmount[index] = 0 - // } - // }) - // lineStoreAmount.forEach((val, index) => { - // if (val == 0) { - // lineStoreAmount[index] = 0 - // } - // }) let option = { grid: { left: "0%", @@ -1226,7 +1216,7 @@ const multipleThreeDimensionalCylindrical = (res, ids) => { color: "#fff", fontSize: fontSize, }, - data: ["箱壳库", "内胆库"], + data: ["内胆库", "箱壳库"], }, xAxis: [ { @@ -1328,59 +1318,6 @@ const multipleThreeDimensionalCylindrical = (res, ids) => { color: "#26B2E8", data: hullStoreAmount, }, - // { - // // 左侧下内圈 - // name: "", - // type: "pictorialBar", - // tooltip: { - // show: false, - // }, - // symbolSize: function (val) { - // if (val == 0) { - // return [0, 0] - // }else{ - // return [37, 20] - // } - // }, - // symbolOffset: [-39, 20], - // z: 10, - // itemStyle: { - // normal: { - // color: "transparent", - // borderColor: "#2EA9E5", - // borderType: "solid", - // borderWidth: 20, - // }, - // }, - // - // data: hullStoreAmount, - // }, - // { - // // 左侧下外圈 - // name: "", - // type: "pictorialBar", - // tooltip: { - // show: false, - // }, - // symbolSize: function (val) { - // if (val == 0) { - // return [0, 0] - // }else{ - // return [50, 25] - // } - // }, - // symbolOffset: [-39, 25], - // z: 10, - // itemStyle: { - // normal: { - // color: "transparent", - // borderColor: "#26B2E8", - // borderType: "solid", - // borderWidth: 20, - // }, - // }, - // data: hullStoreAmount, - // }, { // 左侧下圆片 name: "", @@ -1396,7 +1333,7 @@ const multipleThreeDimensionalCylindrical = (res, ids) => { }, { type: "bar", - name: "箱壳库", + name: "内胆库", barWidth: "26", barGap: "200%", barCateGoryGap: "10%", @@ -1441,54 +1378,6 @@ const multipleThreeDimensionalCylindrical = (res, ids) => { color: "#20D3AB", data: lineStoreAmount, }, - // { - // // 右柱下内圈 - // name: "", - // type: "pictorialBar", - // tooltip: { - // show: false, - // }, - // symbolPosition:'start', - // symbolSize: function (val,data) { - // console.log(val) - // if (!lineStoreAmount[data.dataIndex] > 0) return [0, 0] - // return [37, 20] - // }, - // symbolOffset: [39, 20], - // z: 10, - // itemStyle: { - // normal: { - // color: "transparent", - // borderColor: "#20D3AB", - // borderType: "solid", - // borderWidth: 20, - // }, - // }, - // data: hullStoreAmount, - // }, - // { - // // 右柱下外圈 - // name: "", - // type: "pictorialBar", - // tooltip: { - // show: false, - // }, - // symbolSize: function (val,data) { - // if (!lineStoreAmount[data.dataIndex] > 0) return [0, 0] - // return [50, 25] - // }, - // symbolOffset: [39, 25], - // z: 10, - // itemStyle: { - // normal: { - // color: "transparent", - // borderColor: "#20D3AB", - // borderType: "solid", - // borderWidth: 20, - // }, - // }, - // data: hullStoreAmount, - // }, { // 右柱下圆片 name: "", @@ -1504,7 +1393,7 @@ const multipleThreeDimensionalCylindrical = (res, ids) => { }, { type: "bar", - name: "内胆库", + name: "箱壳库", barWidth: "26", barGap: "200%", barCateGoryGap: "10%", diff --git a/productionboard/src/main/resources/static/js/storage/index.js b/productionboard/src/main/resources/static/js/storage/index.js index f4b81ff..9157a5d 100644 --- a/productionboard/src/main/resources/static/js/storage/index.js +++ b/productionboard/src/main/resources/static/js/storage/index.js @@ -27,24 +27,39 @@ $(()=>{ tableAnimation('#productionPlan') //当前库存统计 - $.getJSON(`/storage/getStoreStatistics?ids=${ids}`, function (result) { - multipleThreeDimensionalCylindrical(result, document.getElementById("theCurrentInventory")); + $.getJSON('/tankShell/getMaterialStoreJson', function (result) { + multipleThreeDimensionalCylindrical(result,document.getElementById("theCurrentInventory")); }); + //库位参数 $.getJSON(`/storage/getParamJson?ids=${ids}`, function (result) { + + console.log(result); + //单日出入库统计 - storageStatistics(result[0] == null ? 0 : result[0],result[1] == null ? 0 : result[1],result[2] == null ? 0 : result[2],result[3] == null ? 0 : result[3]); + storageStatistics(result.inStoreLeftCount,result.outStoreLeftCount,result.inStoreRightCount,result.outStoreRightCount); //库存统计 - $("#emptyLocation-left").text(result[4] == null ? 0 : result[4]); - $("#haveUsedLocation-left").text(result[6] == null ? 0 : result[5]); - $("#emptyLocation-right").text(result[5] == null ? 0 : result[6]); - $("#haveUsedLocation-right").text(result[7] == null ? 0 : result[7]); + $("#emptyLocation-left").text(result.freeStoreLeftCount); + $("#haveUsedLocation-left").text(result.useStoreLeftCount); + $("#emptyLocation-right").text(result.freeStoreRightCount); + $("#haveUsedLocation-right").text(result.useStoreRightCount); //库位占比 - $("#emptyLocationNumber").text(result[8] == null ? 0 : result[8]); - $("#emptyLocationRatio").text(result[9] == null ? 0 : result[9]); - $("#haveUsedLocationNumber").text(result[10] == null ? 0 : result[10]); - $("#haveUsedLocationRatio").text(result[11] == null ? 0 : result[11]); + $("#emptyLocationNumber").text(result.freeStoreCount); + $("#emptyLocationRatio").text(GetPercent(result.freeStoreCount,312)); + $("#haveUsedLocationNumber").text(result.useStoreCount); + $("#haveUsedLocationRatio").text(GetPercent(result.useStoreCount,312)); }); + + //百分比 + function GetPercent(num, total) { + num = parseFloat(num); + total = parseFloat(total); + if (isNaN(num) || isNaN(total)) { + return "-"; + } + return total <= 0 ? "0%" : (Math.round(num / total * 10000) / 100.00)+"%"; + } + }) \ No newline at end of file diff --git a/productionboard/target/classes/com/productionboard/controller/StorageController.class b/productionboard/target/classes/com/productionboard/controller/StorageController.class index a67def66478662d62463d6d144d0e8442da09be1..0e4512878453fb73c7cb5c24178b34c5a3f06cce 100644 GIT binary patch literal 2974 zcmb7GYi|@)7=C7V+r4y`!g3R+QbvJZww>Klq1^&X5$IxX(o#f3o!vcc2X<$cnOU$B z65|(1G{KM<6HQF~q905M8f_7Ye)oSY!9QVq&g^EpZ5PmO=bSm0_j#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G$wDJW@oEW_`uJg?%a>9FK=4dJ_*2p8Oq=iz{f0N0$-n z;}hS+W*P12z|YvcE3k|$y8_Y_UxO(}NO+h=rRl??R5M168PAl#s)Cv+e$EfjY^9LB$ysm^pdqb{W`MeABEO0_8JPFdgqL`33}M$?vdVWqD?X72@TNNiZx z+1Odxdjt<4zB8mGB62ckzW@FAKbO8|Px9&g{sBN7t2*2m)ev_w7H9AstdNXc3;C274VkLfzpOE8P2{K@X&el(NY+dnl>gIWoCAz#dt zGWp!vo{D(`3s_XKWMCO91`L=g(gu3aYaoJNYuov1?Km4Q&iye2IoVA-nTLsxP)*Cp zzsL5nJ^v2coX*>8U1|PE1ARIxK%WCmXrwY21$+5ugSr_ljCrj$ZKEvmTi6wZ@S~3> zgfLHnJQIl8^#Lf1r@rciYGtnInL-=dIjw`b3X0z}5ukL*%m8DkFbAnSg)OtNi(hw9 ziqjn7sw5h<>hF7Vp8A{{w)F{02DVfbzcp1OEdIBHV2+H)P*Y`>_P$Fzt~FXY2#s C13uRP diff --git a/productionboard/target/classes/com/productionboard/mapper/BaseLocationInfoMapper.class b/productionboard/target/classes/com/productionboard/mapper/BaseLocationInfoMapper.class index 7a4ee2635e5cb681c4ad178d2cc7c28450f66e14..495f6ebf65be0d1bb4a889da7a825e6174c4f2d1 100644 GIT binary patch literal 3045 zcmeHJZ*SW~7=JGP6B<_7Mn^Zsz;uH)kk(3tcvC<)jSCS@GS%6ni5J$zxujP)zUX{j z6`}FLc)?Pa2h0jXp|l?e91~*^v%~ zq3Q>sf6fQBWEac==YoeutKD_Ip6xZdZR02R*lJo{v*ENlzZ&Y$5Mh$# zEKj{>k8R@zd~qd%Nl8~O&X{D$fxOI7`{D2T;|l^i#iGpGqfnh+zM(qxDJ;(Iv`ky! zlVbT3cs487uMHiIhUMCx(>=C&t!~F_bxyiQiZ;jgGE{?x10y@)_N?9$7j^0c?xwfS z_giCXVI>gwWkDlfWs9ql1^ls@-EE!P7Jet z)^YEcA?5ZWGh{WL_ml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DW@EJ9mBt$-?NjrkcL_W1C6bnU9i)sBheH~|K z!~!wxFs3MqQ(ZP^f|Snkk=Hbr7gweW-)FeHW|rAC>jb;1VxhyR_hH?^kBnH=Av81v zzlyVuAWo@fN9Xk8oLG=UKj!vhUM%=LZ4-dGb?edTADV(SSajja`_F zTQCog;#@q1`FI=W;T@chAEHU>&@7i?fn1IY?-umA8xLxhA&gZ}a>yb_&)tGwBaiKj)<^Mu?7&V+_!PcNNw%Yk^iRRH+!4fe z(K&dy!Mox6)WKUv&)J^y~Phxq3p^dagsd`iO&GO}h;%?GIYh?-~`ZY0QFxJkp! z8aVC+ev8K`56G8ds!+PM5Wc|#N%F5sfk;Gu1*f#RLEP>>n*y_%s(g*XSXCjO=W~A{ zoF{N@hjXmTjpwoc#^6Cj_+AX?U|moJ^ip>pABgd%!a3eh2Q->H*qYrm+HP@3m7Ev7)W429EV8?jDHG=_?VmQ*5CT|}XS%O--xa1mu$C6t;X z$|aRh^t$T0nndG>x^SJIXdGG36y=zSfi_@|`cMJPEa?G9issWx;YBhdOW{R2C0;m$ z0Y6}!>K1u*KpvLHk#^LUoyZ5YM%7r35d zAsFZXGCspu0B`t#&)OyAb)U~JFhTz@oJp(iLx4Ii!6Pg?(42yvX4R77K^NZhCwVJ>R5i%z}X$^EtcB*d>Uc8}$iwAE55{GKMwhH@*>z zG<^OK;2+CAFCXx~5eyU`{`sDbG)3qp$qqhMA(%X~AFHDsb`La~^EIk`T>cO=Hb()f z4hpEMyXy5or3X5)$vDWW3R}P`_$FN}1zrauATM_AWqCQ}>BPKpC&7zX1((-6SFdnU zFQtReqeIq1H|*-*8p#oymyfc { let Res = {} Res.data=res.map(val => { - return [val.spe,val.oq,val.aq,val.cha,val.round,] + return [val["spe"],val["oq"],val["aq"],val["cha"],val.round,] }) Res.header = ['型号', '计划数', '完成数', '差异数', '执行进度'] dynamicTable({ @@ -51,7 +51,7 @@ $(() => { header: Res.header, data: Res.data, index: false, - fontColor: '#B4B7BF ', + fontColor: '#B4B7BF', indexBGC: '#86F3FF', headerBGC: 'rgba(8,36,75,0.2)', oddRowBGC: 'rgba(8,36,75,0.2)', diff --git a/productionboard/target/classes/static/js/common/echarts.common.js b/productionboard/target/classes/static/js/common/echarts.common.js index dd3d183..742fff8 100644 --- a/productionboard/target/classes/static/js/common/echarts.common.js +++ b/productionboard/target/classes/static/js/common/echarts.common.js @@ -1191,16 +1191,6 @@ const multipleThreeDimensionalCylindrical = (res, ids) => { let lineWidth = 1; let isDataZoom = xValue.length > 3 let stepSize = 1 / (xValue.length / 3) * 100 - // hullStoreAmount.forEach((val, index) => { - // if (val == 0) { - // hullStoreAmount[index] = 0 - // } - // }) - // lineStoreAmount.forEach((val, index) => { - // if (val == 0) { - // lineStoreAmount[index] = 0 - // } - // }) let option = { grid: { left: "0%", @@ -1328,59 +1318,6 @@ const multipleThreeDimensionalCylindrical = (res, ids) => { color: "#26B2E8", data: hullStoreAmount, }, - // { - // // 左侧下内圈 - // name: "", - // type: "pictorialBar", - // tooltip: { - // show: false, - // }, - // symbolSize: function (val) { - // if (val == 0) { - // return [0, 0] - // }else{ - // return [37, 20] - // } - // }, - // symbolOffset: [-39, 20], - // z: 10, - // itemStyle: { - // normal: { - // color: "transparent", - // borderColor: "#2EA9E5", - // borderType: "solid", - // borderWidth: 20, - // }, - // }, - // - // data: hullStoreAmount, - // }, - // { - // // 左侧下外圈 - // name: "", - // type: "pictorialBar", - // tooltip: { - // show: false, - // }, - // symbolSize: function (val) { - // if (val == 0) { - // return [0, 0] - // }else{ - // return [50, 25] - // } - // }, - // symbolOffset: [-39, 25], - // z: 10, - // itemStyle: { - // normal: { - // color: "transparent", - // borderColor: "#26B2E8", - // borderType: "solid", - // borderWidth: 20, - // }, - // }, - // data: hullStoreAmount, - // }, { // 左侧下圆片 name: "", @@ -1396,7 +1333,7 @@ const multipleThreeDimensionalCylindrical = (res, ids) => { }, { type: "bar", - name: "箱壳库", + name: "内胆库", barWidth: "26", barGap: "200%", barCateGoryGap: "10%", @@ -1441,54 +1378,6 @@ const multipleThreeDimensionalCylindrical = (res, ids) => { color: "#20D3AB", data: lineStoreAmount, }, - // { - // // 右柱下内圈 - // name: "", - // type: "pictorialBar", - // tooltip: { - // show: false, - // }, - // symbolPosition:'start', - // symbolSize: function (val,data) { - // console.log(val) - // if (!lineStoreAmount[data.dataIndex] > 0) return [0, 0] - // return [37, 20] - // }, - // symbolOffset: [39, 20], - // z: 10, - // itemStyle: { - // normal: { - // color: "transparent", - // borderColor: "#20D3AB", - // borderType: "solid", - // borderWidth: 20, - // }, - // }, - // data: hullStoreAmount, - // }, - // { - // // 右柱下外圈 - // name: "", - // type: "pictorialBar", - // tooltip: { - // show: false, - // }, - // symbolSize: function (val,data) { - // if (!lineStoreAmount[data.dataIndex] > 0) return [0, 0] - // return [50, 25] - // }, - // symbolOffset: [39, 25], - // z: 10, - // itemStyle: { - // normal: { - // color: "transparent", - // borderColor: "#20D3AB", - // borderType: "solid", - // borderWidth: 20, - // }, - // }, - // data: hullStoreAmount, - // }, { // 右柱下圆片 name: "", @@ -1504,7 +1393,7 @@ const multipleThreeDimensionalCylindrical = (res, ids) => { }, { type: "bar", - name: "内胆库", + name: "箱壳库", barWidth: "26", barGap: "200%", barCateGoryGap: "10%", diff --git a/productionboard/target/classes/static/js/foamBox/index.js b/productionboard/target/classes/static/js/foamBox/index.js index a920f1b..710886f 100644 --- a/productionboard/target/classes/static/js/foamBox/index.js +++ b/productionboard/target/classes/static/js/foamBox/index.js @@ -119,16 +119,14 @@ $(() => { }) const deviceStatus = (statusArray) => { - let info = ` - - - - - - - - -
`; + let info = ` + + + + + + +`; $(".foamingLineRunStatus table tr").append(info); diff --git a/productionboard/target/classes/static/js/storage/index.js b/productionboard/target/classes/static/js/storage/index.js index f4b81ff..9157a5d 100644 --- a/productionboard/target/classes/static/js/storage/index.js +++ b/productionboard/target/classes/static/js/storage/index.js @@ -27,24 +27,39 @@ $(()=>{ tableAnimation('#productionPlan') //当前库存统计 - $.getJSON(`/storage/getStoreStatistics?ids=${ids}`, function (result) { - multipleThreeDimensionalCylindrical(result, document.getElementById("theCurrentInventory")); + $.getJSON('/tankShell/getMaterialStoreJson', function (result) { + multipleThreeDimensionalCylindrical(result,document.getElementById("theCurrentInventory")); }); + //库位参数 $.getJSON(`/storage/getParamJson?ids=${ids}`, function (result) { + + console.log(result); + //单日出入库统计 - storageStatistics(result[0] == null ? 0 : result[0],result[1] == null ? 0 : result[1],result[2] == null ? 0 : result[2],result[3] == null ? 0 : result[3]); + storageStatistics(result.inStoreLeftCount,result.outStoreLeftCount,result.inStoreRightCount,result.outStoreRightCount); //库存统计 - $("#emptyLocation-left").text(result[4] == null ? 0 : result[4]); - $("#haveUsedLocation-left").text(result[6] == null ? 0 : result[5]); - $("#emptyLocation-right").text(result[5] == null ? 0 : result[6]); - $("#haveUsedLocation-right").text(result[7] == null ? 0 : result[7]); + $("#emptyLocation-left").text(result.freeStoreLeftCount); + $("#haveUsedLocation-left").text(result.useStoreLeftCount); + $("#emptyLocation-right").text(result.freeStoreRightCount); + $("#haveUsedLocation-right").text(result.useStoreRightCount); //库位占比 - $("#emptyLocationNumber").text(result[8] == null ? 0 : result[8]); - $("#emptyLocationRatio").text(result[9] == null ? 0 : result[9]); - $("#haveUsedLocationNumber").text(result[10] == null ? 0 : result[10]); - $("#haveUsedLocationRatio").text(result[11] == null ? 0 : result[11]); + $("#emptyLocationNumber").text(result.freeStoreCount); + $("#emptyLocationRatio").text(GetPercent(result.freeStoreCount,312)); + $("#haveUsedLocationNumber").text(result.useStoreCount); + $("#haveUsedLocationRatio").text(GetPercent(result.useStoreCount,312)); }); + + //百分比 + function GetPercent(num, total) { + num = parseFloat(num); + total = parseFloat(total); + if (isNaN(num) || isNaN(total)) { + return "-"; + } + return total <= 0 ? "0%" : (Math.round(num / total * 10000) / 100.00)+"%"; + } + }) \ No newline at end of file diff --git a/visualboard.iml b/visualboard.iml index 3aaa796..db0ef63 100644 --- a/visualboard.iml +++ b/visualboard.iml @@ -115,5 +115,6 @@ + \ No newline at end of file