From 7efc6ed86025b610cab109a2e9f83362740d8ed4 Mon Sep 17 00:00:00 2001 From: 李旭东 <woaiguo66@sina.com> Date: 星期五, 08 十二月 2023 13:29:07 +0800 Subject: [PATCH] Merge branch 'master' of http://111.30.93.211:10101/r/supipe --- web/src/views/GoodManage/MixingScreen.vue | 526 +++ hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/hiddenDanger/entity/HiddenDangerEntity.java | 4 web/src/router/index.js | 208 + web/src/views/GoodManage/StockManage.vue | 4 hd/pipe/screen/src/main/java/com/thhy/screen/config/StartListener.java | 24 hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/steelcheck/entity/SteelStockRecord.java | 82 web/src/views/DuctpiecePLM/ReinManage/components/ReinsInvent.vue | 5 xcx/robePages/safeManage/approveHidden.vue | 4 hd/pipe/secure/src/main/resources/mapping/HiddenDangerMapper.xml | 42 hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/rebarprint/entity/dto/ProduceExportDto.java | 2 web/src/views/GoodManage/BearSignboard.vue | 373 ++ hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/mouldcheck/entity/RingCompleteCheck.java | 5 web/src/assets/mixing/list_bg.png | 0 hd/pipe/materialsManage/src/main/resources/mapping/MinXingPlantMapper.xml | 219 web/src/views/GoodManage/MixRatioScreen.vue | 573 ++++ web/src/api/modules/materials.js | 41 hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionInspection/mapper/RegionInspectionRecordMapper.java | 8 web/src/views/SecureManage/NipCheck/components/ScoreMarket.vue | 225 + hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/controller/AudioController.java | 13 hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/suSteelCageMaterialLabel/controller/SuSteelCageMaterialLabelController.java | 42 hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/service/PlatUserService.java | 7 hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/entity/dto/SteelDto.java | 16 hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/bigscreen/mapper/BigScreenMapper.java | 16 web/src/views/Basics/ConsigneeIndex.vue | 12 hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/integralAccount/service/IntegralDetailService.java | 55 web/src/views/SecureManage/RiskGrad/components/PollingTask.vue | 13 hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/entity/AreaAdmin.java | 16 web/src/api/modules/mixing.js | 5 web/src/assets/mixing/name_bg.png | 0 hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/rebarprint/service/impl/TSteelProduceServiceImpl.java | 4 hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/bigscreen/controller/ExecProListener.java | 26 hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/integralAccount/service/impl/IntegralDetailServiceImpl.java | 222 + xcx/robePages/safeManage/detailsHidden.vue | 20 web/src/assets/mixing/list_l_bg.png | 0 hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/integralAccount/controller/IntegraDetailController.java | 84 web/src/assets/mixing/container_80.png | 0 hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/mapper/TMaterialReleaseMappper.java | 24 hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/entity/PipeListVo.java | 2 hd/pipe/screen/src/main/resources/mapping/BigScreenMapper.xml | 100 hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/integralAccount/mapper/IntegralDetailMapper.java | 60 hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/controller/MixingPlantNewScheduled.java | 35 web/src/views/MixingInfo/workShop.vue | 187 + hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/entity/DoorUserVo.java | 5 hd/pipe/screen/src/main/java/com/thhy/screen/utils/HttpUtils.java | 2 hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/suMaterialWarehouse/entity/SuMaterialWarehouseEntity.java | 2 web/src/views/DuctpiecePLM/DuctProduct/ProductAnalyse.vue | 6 hd/pipe/filectrl/src/main/resources/fastdfs.properties | 3 hd/pipe/materialsManage/src/main/resources/mapping/SuSteelCageMaterialLabelMapper.xml | 238 + hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/mixingstationstorage/service/impl/MinXingPlantServiceImpl.java | 5 web/src/views/ProjectManage/SectionManage.vue | 6 hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/service/WeighService.java | 14 hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/entity/dto/MaterialStockRecordDto.java | 14 hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionInspection/service/impl/RegionInspectionServiceImpl.java | 10 xcx/robePages/safeManage/checkHidden.vue | 2 hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/entity/TMixingConsume.java | 5 hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/controller/WeighController.java | 36 hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/integralAccount/entity/IntegralDetailDto.java | 54 web/src/views/GoodManage/components/MixingIncome.vue | 18 web/src/views/SecureManage/RiskGrad/AreaPolling.vue | 13 hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/service/AudioService.java | 5 hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/controller/ExecFaceListener.java | 22 hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/service/PipeInfoService.java | 4 web/src/assets/mixing/container_100.png | 0 hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/suSteelCageMaterialLabel/service/impl/SuSteelCageMaterialLabelServiceImpl.java | 68 web/src/views/DuctpiecePLM/ReinManage/components/ProductsData.vue | 6 hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/controller/PipeScreenController.java | 15 web/src/views/MixingInfo/mixRatio.vue | 253 + web/src/views/SecureManage/RiskGrad/components/TaskPunchcard.vue | 21 hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/entity/GroupInfoVo.java | 16 web/src/assets/mixing/header.png | 0 hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/mapper/PipeInfoMapper.java | 12 web/src/assets/mixing/container_90.png | 0 hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/mouldcheck/service/impl/ModCheckServiceImpl.java | 21 web/src/views/MixingInfo/mixing.vue | 317 ++ hd/pipe/materialsManage/src/main/resources/mapping/TSteelProduceMapper.xml | 6 web/src/assets/mixing/container_60.png | 0 web/src/views/SecureManage/BroadcastSystem.vue | 351 ++ hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/bigscreen/service/impl/ProduceListenServiceImpl.java | 14 hd/pipe/materialsManage/src/main/resources/mapping/WeighMapper.xml | 399 ++ hd/pipe/materialsManage/src/main/resources/mapping/TMaterialReleaseMapper.xml | 190 + web/src/assets/work_shop.png | 0 web/src/views/DuctpiecePLM/ProductTerminal/components/ReinsPrint.vue | 20 hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/controller/FaceServer.java | 21 web/src/views/MixingInfo/components/List.vue | 91 web/src/views/ProjectManage/components/RawConsump.vue | 10 hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/entity/dto/MouldDto.java | 15 hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/entity/AudioFile.java | 19 hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/service/impl/WeighServiceImpl.java | 81 hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/integralAccount/entity/IntegralDetailEntity.java | 47 hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/entity/dto/PieceDto.java | 3 web/src/assets/mixing/container_40.png | 0 hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/service/impl/AudioServiceImpl.java | 22 hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/entity/MaterialThingDto.java | 32 web/src/views/MixingInfo/messageInfo.vue | 293 + hd/pipe/secure/src/main/resources/mapping/RegionInspectionRecordMapper.xml | 77 hd/pipe/screen/src/main/java/com/thhy/screen/utils/AudioUtils.java | 20 hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/mouldcheck/controller/ModCheckController.java | 6 hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/steelcheck/service/impl/SteelCheckServiceImpl.java | 18 hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionInspection/service/impl/RegionInspectionRecordServiceImpl.java | 26 hd/pipe/common/src/main/java/com/thhy/general/common/enums/ProListenType.java | 4 hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/mapper/PlatUserMapper.java | 11 hd/pipe/secure/src/main/resources/mapping/IntegralDetailMapper.xml | 325 ++ web/src/views/DuctpiecePLM/DuctpieceIndex.vue | 1 hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/entity/TMixing.java | 6 web/src/views/ReincageManage/ReincageProduct.vue | 3 hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/suSteelCageMaterialLabel/entity/SuSteelCageMaterialLabelEntity.java | 41 hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/service/impl/TMaterialReleaseServiceImpl.java | 92 web/src/views/DuctpiecePLM/ReinManage/components/RingsNumber.vue | 3 hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/hiddenDanger/service/impl/HiddenDangerServiceImpl.java | 74 web/src/assets/mixing/container_20.png | 0 hd/pipe/common/src/main/java/com/thhy/general/utils/UUIDUtils.java | 4 hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/service/TMaterialReleaseService.java | 14 web/src/views/DuctpiecePLM/DuctProduct/ProductIndex.vue | 35 web/src/views/SecureManage/NipCheck/NipTips.vue | 35 hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/mapper/WeighMapper.java | 38 hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/integralAccount/entity/IntegralAccountEntity.java | 34 web/src/views/GoodManage/CostStatistics/RawCost.vue | 6 hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/steelstock/mapper/SteelStockMapper.java | 6 hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/mixingstationstorage/entity/MinXingPlantVo.java | 15 hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/mouldcheck/service/ModCheckService.java | 2 hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/suSteelCageMaterialLabel/service/SuSteelCageMaterialLabelService.java | 22 xcx/robePages/safeManage/addHidden.vue | 67 hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/mixingstationstorage/dto/MinXingPlantDto.java | 3 hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/entity/MaterialThingNumDto.java | 13 hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/service/impl/PipeInfoServiceImpl.java | 16 web/src/assets/mixing/container_10.png | 0 web/src/assets/mixing/list_r_bg.png | 0 xcx/pages/loginIndex/index.vue | 132 web/src/api/modules/ductpiecePLM.js | 3 web/src/api/modules/safety.js | 56 hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/suSteelCageMaterialLabel/mapper/SuSteelCageMaterialLabelMapper.java | 25 web/src/assets/mixing/mixing_bg1.png | 0 web/src/components/uploadImage.vue | 8 web/src/views/ProjectManage/AmountManage.vue | 25 hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/mouldcheck/entity/ModCheckDto.java | 2 hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/entity/NamePhoneDepart.java | 19 xcx/robePages/safeManage/hiddenReport.vue | 4 hd/pipe/StaffManage/src/main/resources/mapping/PlatUserMapper.xml | 49 hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/mixmateria/service/impl/MixMaterialServiceImpl.java | 2 hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/entity/dto/AssistGoodDto.java | 16 hd/pipe/mobile/src/main/resources/mapping/SteelStockMapper.xml | 72 hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/service/impl/PlatUserServiceImpl.java | 35 hd/pipe/materialsManage/src/main/resources/mapping/SuMaterialWarehouseMapper.xml | 4 web/src/views/DuctpiecePLM/ReinManage/ReinsProduct.vue | 3 web/src/views/SecureManage/NipCheck/components/ScoreDetails.vue | 256 + web/src/assets/mixing/mixing_bg3.png | 0 hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/entity/TSuMaterialWarehouseRecord.java | 103 hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/controller/TMaterialReleaseController.java | 42 hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/entity/AudioDto.java | 5 hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionInspection/controller/RegionInspectionRecordController.java | 3 hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionInspection/entity/RegionInspectionHazardInformEntity.java | 4 web/src/views/LayoutIndex/components/LayoutAside.vue | 2 xcx/pages/labourHome/index.vue | 2 hd/pipe/mobile/src/main/resources/mapping/PipeInfoMapper.xml | 97 hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionInspection/entity/RegionInspectionRecordEntity.java | 2 155 files changed, 7,515 insertions(+), 584 deletions(-) diff --git a/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/controller/ExecFaceListener.java b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/controller/ExecFaceListener.java index 982d62f..128e09a 100644 --- a/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/controller/ExecFaceListener.java +++ b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/controller/ExecFaceListener.java @@ -4,6 +4,7 @@ import com.thhy.general.common.BasicResult; import com.thhy.general.config.GlobalConfig; import com.thhy.general.utils.SpringContextUtils; +import com.thhy.staff.modules.biz.platuser.entity.AreaAdmin; import com.thhy.staff.modules.biz.platuser.service.PlatUserService; import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyContext; import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyStatus; @@ -19,6 +20,7 @@ import java.io.IOException; import java.io.UnsupportedEncodingException; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.CopyOnWriteArraySet; @@ -70,8 +72,28 @@ dataMapList.add(map); Map<String,Object> map1 = userService.groupUserWork(userToken); Map<String,Object> map2 = userService.faceRecord(userToken); + + List<HashMap<String,Object>> AudioGroupList = userService.queryGroups(); + Map<String, Object> map3 = new HashMap<>(); + map3.put("mod","audioGroup"); + map3.put("groupList",AudioGroupList); + + + List<HashMap<String,Object>> HelmetWarnList = userService.queryHelmetWarn(); + Map<String, Object> map4 = new HashMap<>(); + map4.put("mod","helmetWarn"); + map4.put("helmetWarnList",HelmetWarnList); + + List<AreaAdmin> areaAdminList = userService.areaAdminInfo(); + Map<String, Object> map5 = new HashMap<>(); + map5.put("mod","areaAdmin"); + map5.put("areaAdminList",areaAdminList); + dataMapList.add(map1); dataMapList.add(map2); + dataMapList.add(map3); + dataMapList.add(map4); + dataMapList.add(map5); try { session.getBasicRemote().sendText(JSON.toJSONString(dataMapList)); } catch (IOException e) { diff --git a/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/controller/FaceServer.java b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/controller/FaceServer.java index 1729fca..a2eda24 100644 --- a/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/controller/FaceServer.java +++ b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/controller/FaceServer.java @@ -3,6 +3,7 @@ import com.alibaba.fastjson.JSON; import com.thhy.general.config.GlobalConfig; import com.thhy.general.utils.SpringContextUtils; +import com.thhy.staff.modules.biz.platuser.entity.AreaAdmin; import com.thhy.staff.modules.biz.platuser.service.PlatUserService; import org.redisson.api.RBucket; import org.redisson.api.RedissonClient; @@ -68,8 +69,28 @@ dataMapList.add(map); Map<String,Object> map1 = userService.groupUserWork(userToken); Map<String,Object> map2 = userService.faceRecord(userToken); + + + List<HashMap<String,Object>> AudioGroupList = userService.queryGroups(); + Map<String, Object> map3 = new HashMap<>(); + map3.put("mod","audioGroup"); + map3.put("groupList",AudioGroupList); + + + List<HashMap<String,Object>> HelmetWarnList = userService.queryHelmetWarn(); + Map<String, Object> map4 = new HashMap<>(); + map4.put("mod","helmetWarn"); + map4.put("helmetWarnList",HelmetWarnList); + + List<AreaAdmin> areaAdminList = userService.areaAdminInfo(); + Map<String, Object> map5 = new HashMap<>(); + map5.put("mod","areaAdmin"); + map5.put("areaAdminList",areaAdminList); dataMapList.add(map1); dataMapList.add(map2); + dataMapList.add(map3); + dataMapList.add(map4); + dataMapList.add(map5); try { session.getBasicRemote().sendText(JSON.toJSONString(dataMapList)); } catch (IOException e) { diff --git a/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/entity/AreaAdmin.java b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/entity/AreaAdmin.java new file mode 100644 index 0000000..4d71a81 --- /dev/null +++ b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/entity/AreaAdmin.java @@ -0,0 +1,16 @@ +package com.thhy.staff.modules.biz.platuser.entity; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +@Data +public class AreaAdmin implements Serializable { + + private String areaId; + + private String areaName; + + private List<NamePhoneDepart> npdList; +} diff --git a/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/entity/DoorUserVo.java b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/entity/DoorUserVo.java index 529288b..ba00bfb 100644 --- a/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/entity/DoorUserVo.java +++ b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/entity/DoorUserVo.java @@ -3,11 +3,12 @@ import lombok.Data; import java.io.Serializable; +import java.util.Date; @Data public class DoorUserVo implements Serializable { - private String createTime; + private Date createTime; private String realName; @@ -18,4 +19,6 @@ private String jobNum; private String id; + + private String photo; } diff --git a/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/entity/NamePhoneDepart.java b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/entity/NamePhoneDepart.java new file mode 100644 index 0000000..3c3e808 --- /dev/null +++ b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/entity/NamePhoneDepart.java @@ -0,0 +1,19 @@ +package com.thhy.staff.modules.biz.platuser.entity; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class NamePhoneDepart implements Serializable { + + private String userId; + + private String realName; + + private String phone; + + private String photo; + + private String departName; +} diff --git a/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/mapper/PlatUserMapper.java b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/mapper/PlatUserMapper.java index c9398a4..28a68c6 100644 --- a/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/mapper/PlatUserMapper.java +++ b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/mapper/PlatUserMapper.java @@ -9,6 +9,7 @@ import org.springframework.stereotype.Component; import java.io.Serializable; +import java.util.HashMap; import java.util.List; /** @@ -119,4 +120,14 @@ int countByFaceId(String faceId); void insertSamplePlatUser(PlatUser platUser); + + List<HashMap<String,Object>> queryGroups(); + + List<HashMap<String,Object>> queryHelmetWarn(); + + List<AreaAdmin> queryAreaInfo(); + + List<NamePhoneDepart> queryAdminByArea(String regionWarrantyId); + + List<String> faceArea(); } diff --git a/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/service/PlatUserService.java b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/service/PlatUserService.java index 9899ab2..41da0fd 100644 --- a/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/service/PlatUserService.java +++ b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/service/PlatUserService.java @@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletRequest; import java.io.Serializable; +import java.util.HashMap; import java.util.List; import java.util.Map; @@ -55,4 +56,10 @@ Map<String,Object> groupUserWork(String token); void doorlisWithPic(DoorLisPic doorLisPic); + + List<HashMap<String,Object>> queryGroups(); + + List<HashMap<String,Object>> queryHelmetWarn(); + + List<AreaAdmin> areaAdminInfo(); } diff --git a/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/service/impl/PlatUserServiceImpl.java b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/service/impl/PlatUserServiceImpl.java index c9fbf76..f4210ea 100644 --- a/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/service/impl/PlatUserServiceImpl.java +++ b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/service/impl/PlatUserServiceImpl.java @@ -25,6 +25,7 @@ import com.thhy.staff.utils.ProcessFlag; import com.thhy.staff.utils.StaffNoUtils; import io.netty.channel.ChannelHandlerContext; +import net.bytebuddy.build.Plugin; import org.checkerframework.checker.units.qual.A; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -34,6 +35,7 @@ import java.io.Serializable; import java.math.BigDecimal; import java.math.RoundingMode; +import java.text.SimpleDateFormat; import java.util.*; import java.util.concurrent.CopyOnWriteArraySet; @@ -530,13 +532,18 @@ int userCount = platUserMapper.queryPlatUser(userInfo.getCompanyId()); Map<String, Object> map = new HashMap<>(); map.put("mod","facerecord"); - map.put("totalUserCount",userCount); - map.put("watchUserCount",0); - map.put("dangerUserCount",0); + //map.put("totalUserCount",userCount); + //map.put("watchUserCount",0); + //map.put("dangerUserCount",0); + + List<String> faceAreas = platUserMapper.faceArea(); + map.put("faceAreas",faceAreas); + List<DoorUserVo> list = platUserMapper.queryDoorUser(); map.put("doorUserList",list); PlatUserFace platUserFace = platUserMapper.queryFaceUserByJobNum(list.get(0).getJobNum()); - platUserFace.setPassTime(list.get(0).getCreateTime()); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + platUserFace.setPassTime(sdf.format(list.get(0).getCreateTime())); platUserFace.setRecordId(list.get(0).getId()); map.put("firstUserInfo",platUserFace); return map; @@ -593,6 +600,26 @@ platUserMapper.insertDoorListener(doorLisPic); } + @Override + public List<HashMap<String, Object>> queryGroups() { + return platUserMapper.queryGroups(); + } + + @Override + public List<HashMap<String, Object>> queryHelmetWarn() { + return platUserMapper.queryHelmetWarn(); + } + + @Override + public List<AreaAdmin> areaAdminInfo() { + List<AreaAdmin> areaAdminList = platUserMapper.queryAreaInfo(); + for(AreaAdmin areaAdmin : areaAdminList){ + List<NamePhoneDepart> namePhoneDepartList = platUserMapper.queryAdminByArea(areaAdmin.getAreaId()); + areaAdmin.setNpdList(namePhoneDepartList); + } + return areaAdminList; + } + public static void main(String[] args) { MqContent mqContent = new MqContent("sync_person", "notify"); String uu = "02d32ee86bec2b11e4b23eb6"; diff --git a/hd/pipe/StaffManage/src/main/resources/mapping/PlatUserMapper.xml b/hd/pipe/StaffManage/src/main/resources/mapping/PlatUserMapper.xml index 70a6c79..d8e6366 100644 --- a/hd/pipe/StaffManage/src/main/resources/mapping/PlatUserMapper.xml +++ b/hd/pipe/StaffManage/src/main/resources/mapping/PlatUserMapper.xml @@ -109,9 +109,12 @@ <if test="userId !=null and userId !=''"> sdu.user_id=#{userId} AND </if> + <if test="userType !=null and userType !=''"> + spu.user_type=#{userType} AND + </if> </trim> </where> - + order by spu.create_time desc </select> <select id="queryForPullDownDorm" resultType="com.thhy.staff.modules.biz.platuser.entity.PlatUserPullDown"> @@ -858,7 +861,8 @@ <select id="queryDoorUser" resultType="com.thhy.staff.modules.biz.platuser.entity.DoorUserVo"> - select fr.id,fr.create_time,fr.employee_no_string as userId,fd.through_type,spu.real_name as realName,spu.job_num as jobNum,sg.group_name as groupName,1 as staffStatus + select fr.id,fr.create_time as createTime,fr.employee_no_string as userId,fd.through_type,spu.real_name as realName,spu.job_num as jobNum, + sg.group_name as groupName,1 as staffStatus,spu.photo from t_face_record fr left join t_face_device fd on fd.dev_sno = fr.mac_address left join sys_plat_user spu on spu.user_id = fr.employee_no_string @@ -874,16 +878,13 @@ </select> <select id="countInDoorUserToday" resultType="int"> - select count(distinct fr.employee_no_string) - from t_face_record fr - left join sys_plat_user spu on spu.job_num = fr.employee_no_string - where fr.notice_type = 5 and fr.verify = 1 and spu.user_id is not null and (fr.mac_address='e0:ca:3c:f0:d9:3a' or fr.mac_address = 'e0:ca:3c:f0:a7:34' or fr.mac_address = 'e0:ca:3c:f0:d9:3b') - and DATE_FORMAT(sysdate(),'%Y-%m-%d') = DATE_FORMAT(fr.create_time,'%Y-%m-%d') + select count(employee_no_string) from t_face_record fr + where fr.verify = 1 and employee_no_string is not null and DATE_FORMAT(create_time,'%Y-%m-%d') = DATE_FORMAT(SYSDATE(),'%Y-%m-%d') </select> <select id="groupUserWorking" resultType="com.thhy.staff.modules.biz.platuser.entity.GroupWorking"> select sg.group_id as groupId,sg.group_name as groupName, - (select count(user_id) from sys_group_user where and is_use = 1 and group_id = sg.group_id) as groupUserCount + (select count(user_id) from sys_group_user where is_use = 1 and group_id = sg.group_id) as groupUserCount from sys_group sg left join sys_com_depart sd on sg.depart_id = sd.depart_id where sg.is_use = 1 and sd.company_id = #{companyId} @@ -894,7 +895,7 @@ from t_face_record fr left join sys_plat_user spu on spu.job_num = fr.employee_no_string left join sys_group_user sgu on sgu.user_id = spu.user_id and sgu.is_use = 1 - where sgu.group_id = #{groupId} and fr.notice_type = 5 and fr.verify = 1 and DATE_FORMAT(sysdate(),'%Y-%m-%d') = DATE_FORMAT(fr.create_time,'%Y-%m-%d') and (fr.mac_address='e0:ca:3c:f0:d9:3a' or fr.mac_address = 'e0:ca:3c:f0:a7:34' or fr.mac_address = 'e0:ca:3c:f0:d9:3b') + where sgu.group_id = #{groupId} and fr.verify = 1 and DATE_FORMAT(sysdate(),'%Y-%m-%d') = DATE_FORMAT(fr.create_time,'%Y-%m-%d') </select> <select id="queryFaceUserByJobNum" resultType="com.thhy.staff.modules.biz.platuser.entity.PlatUserFace"> @@ -966,4 +967,34 @@ </trim> </insert> + <select id="queryGroups" resultType="hashmap"> + select id,group_id as groupId,group_name as groupName from t_audio_group + </select> + + <select id="queryHelmetWarn" resultType="hashmap"> + select hr.device_id as deviceId,hr.sos_type,hr.user_name as userName,'' as position,hr.sm_time + from t_helmet_report hr + order by hr.sm_time + limit 10 + </select> + + <select id="queryAreaInfo" resultType="com.thhy.staff.modules.biz.platuser.entity.AreaAdmin"> + select reg.id as areaId,reg.region as areaName + from t_region_hazard_inform reg + </select> + + <select id="queryAdminByArea" resultType="com.thhy.staff.modules.biz.platuser.entity.NamePhoneDepart"> + select rwu.user_id,spu.real_name as realName,spu.phone,spu.photo,sd.depart_name as departName + from t_region_warranty_user rwu + left join sys_plat_user spu on spu.user_id = rwu.user_id + left join sys_depart_user sdu on sdu.user_id = spu.user_id + left join sys_depart sd on sd.depart_id = sdu.depart_id + where rwu.region_warranty_id = #{regionWarrantyId} + order by rwu.user_type + </select> + + <select id="faceArea" resultType="string"> + select DISTINCT area_name as areaName from t_face_device where area_name is not null + </select> + </mapper> diff --git a/hd/pipe/common/src/main/java/com/thhy/general/common/enums/ProListenType.java b/hd/pipe/common/src/main/java/com/thhy/general/common/enums/ProListenType.java index fe98bf6..ce0fdcf 100644 --- a/hd/pipe/common/src/main/java/com/thhy/general/common/enums/ProListenType.java +++ b/hd/pipe/common/src/main/java/com/thhy/general/common/enums/ProListenType.java @@ -6,9 +6,9 @@ public final static String PIPEPLANACTUAL = "pipePlanActual"; - public final static String PIPEMONTHPLANACTUAL = "pipeMonthPlanActual"; + public final static String STEELUSE = "steelUse"; - public final static String MATERIALWEEKANDMONTHS = "materialWeekAndMonths"; + public final static String RESTINFO = "restInfo"; public final static String WATERCULINFO = "waterCulInfo"; diff --git a/hd/pipe/common/src/main/java/com/thhy/general/utils/UUIDUtils.java b/hd/pipe/common/src/main/java/com/thhy/general/utils/UUIDUtils.java index cad5d90..f76a4bd 100644 --- a/hd/pipe/common/src/main/java/com/thhy/general/utils/UUIDUtils.java +++ b/hd/pipe/common/src/main/java/com/thhy/general/utils/UUIDUtils.java @@ -46,7 +46,7 @@ public static String createRingNum(Integer num){ StringBuilder sb = new StringBuilder(); - sb.append(addZero(num,6)); + sb.append(addZero(num,4)); return sb.toString(); } @@ -74,7 +74,7 @@ } public static void main(String[] args) { - System.out.println(createSteelNum("001",70)); + System.out.println(createRingNum(5)); } } diff --git a/hd/pipe/filectrl/src/main/resources/fastdfs.properties b/hd/pipe/filectrl/src/main/resources/fastdfs.properties index fb50d53..1814e9f 100644 --- a/hd/pipe/filectrl/src/main/resources/fastdfs.properties +++ b/hd/pipe/filectrl/src/main/resources/fastdfs.properties @@ -14,4 +14,5 @@ fastdfs.connection_pool.max_count_per_entry = 500 fastdfs.connection_pool.max_idle_time = 3600 fastdfs.connection_pool.max_wait_time_in_ms = 1000 -fastdfs.tracker_servers=60.205.226.79:22122 \ No newline at end of file +#fastdfs.tracker_servers=60.205.226.79:22122 +fastdfs.tracker_servers=192.168.0.248:22122 \ No newline at end of file diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/controller/MixingPlantNewScheduled.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/controller/MixingPlantNewScheduled.java index c70f37a..e52fa33 100644 --- a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/controller/MixingPlantNewScheduled.java +++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/controller/MixingPlantNewScheduled.java @@ -1,6 +1,7 @@ package com.thhy.materials.modules.biz.concret.controller; +import com.thhy.materials.modules.biz.concret.entity.SysSteel; import com.thhy.materials.modules.biz.concret.entity.dto.DicetName; import com.thhy.materials.modules.biz.concret.entity.dto.TMinxingPlant; import com.thhy.materials.modules.biz.concret.entity.dto.WeighDto; @@ -238,5 +239,39 @@ } + //苏州项目------- 地磅入库 记录,及库存修改 钢筋 + @Scheduled(fixedRate = 2000000) // 每隔3秒执行一次任务 + public void weighbridgeSteel() { + //查询搅拌 所有类型 + List<SysSteel> steels = weighService.steelType(); + + List<TWeighbridge> tWeighbridges = weighMapper.weighbridgeListType(); + for (SysSteel steel : steels){ + for (TWeighbridge weighbridge :tWeighbridges){ + if(steel.getSteelName().equals(weighbridge.getMatname())&&steel.getSteelModel().equals(weighbridge.getMatmodel())){ + //净重 + String jweight = weighbridge.getJweight(); + HashMap<String, Object> hashMap = new HashMap<>(); + hashMap.put("id",""); + hashMap.put("steelId",steel.getSteelId()); + hashMap.put("stockType",1); + hashMap.put("changeStock",jweight); + hashMap.put("companyId","031e3dd577e8ed28e96aa69b"); + BigDecimal b1 = new BigDecimal(jweight); + BigDecimal b2 = new BigDecimal(steel.getStock()); + RLock lock = redissonclient.getLock("materlock"); + if(!lock.isLocked()) { + lock.lock(10, TimeUnit.SECONDS); + //插入记录表//苏州项目(入库计入增加) + weighMapper.steelRecordIn(hashMap); + //更改记录值 + weighMapper.steelUp(steel.getSteelId(),b1.add(b2).doubleValue()); + lock.unlock(); + } + weighMapper.weighbridgeUpdateType(weighbridge.getWeighbridgeId()); + } + } + } + } } diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/controller/TMaterialReleaseController.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/controller/TMaterialReleaseController.java index a9d2e96..bffdcd8 100644 --- a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/controller/TMaterialReleaseController.java +++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/controller/TMaterialReleaseController.java @@ -88,6 +88,10 @@ //搅拌站 (2023-11-14) 添加原料 入站 @PostMapping("/mixingInsert") public BasicResult mixingInsert(@RequestBody HashMap<String,Object> values) { + System.out.println("-------"); + System.out.println("-------"); + System.out.println("-------"); + System.out.println(values); return materialReleaseService.mixingInsert(values); } @@ -109,13 +113,51 @@ return materialReleaseService.mixingConsumeIn(values); } + // 拌合站 (2023-12-5) 标识牌, 手动修改 原料消耗 t_mixing_consume -> t_mixing_signboard + @PostMapping("/mixingConsumeUp") + public BasicResult mixingConsumeUp(@RequestBody Map<String,Object> values){ + return materialReleaseService.mixingConsumeUp(values); + } + //搅拌站 删除 + @PostMapping("/mixingConsumeDel") + public BasicResult mixingConsumeDel(@RequestBody HashMap<String,Object> values) { + return materialReleaseService.mixingConsumeDel(values); + } + + // !!!列表 :拌合站 (2023-11-16) 标识牌, 手动添加 原料消耗 t_mixing_consume -> t_mixing_signboard @PostMapping("/mixingConsumeList") public BasicResult mixingConsumeList(@RequestBody Map<String,Object> values){ return materialReleaseService.mixingConsumeList(values); } + // !!!列表 :拌合站 (2023-11-16) 标识牌下拉 + @GetMapping("/mixingConsumePull") + public BasicResult mixingConsumePull(){ + return materialReleaseService.mixingConsumePull(); + } + // + @GetMapping("/siloPull") + public BasicResult siloPull(){ + return materialReleaseService.siloPull(); + } + // web 端拌合站屏 列表 + @PostMapping("/siloMixingList") + public BasicResult siloMixingList(@RequestBody Map<String,Object> values){ + return materialReleaseService.siloMixingList(values); + } + //搅拌站 (2023-11-14) 修改 + @PostMapping("/mixingUpdate") + public BasicResult mixingUpdate(@RequestBody HashMap<String,Object> values) { + return materialReleaseService.mixingUpdate(values); + } + + //搅拌站 删除 + @PostMapping("/mixingDel") + public BasicResult mixingDel(@RequestBody HashMap<String,Object> values) { + return materialReleaseService.mixingDel(values); + } diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/entity/TMixing.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/entity/TMixing.java index 0ea19b1..3325f12 100644 --- a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/entity/TMixing.java +++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/entity/TMixing.java @@ -63,9 +63,11 @@ private Integer stata; /** - * 报告编号 + * id */ private String siloId; + //拌合站名称 + private String siloName; /** * 报告编号 */ @@ -74,6 +76,8 @@ * 检验时间 */ private String inspectDate; + //1 展示 2不展示 + private Integer types; /** * This field was generated by MyBatis Generator. diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/entity/TMixingConsume.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/entity/TMixingConsume.java index 0a243a9..49b95b8 100644 --- a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/entity/TMixingConsume.java +++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/entity/TMixingConsume.java @@ -1,5 +1,6 @@ package com.thhy.materials.modules.biz.concret.entity; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import lombok.Getter; import lombok.Setter; @@ -64,6 +65,10 @@ private String dictName; private Integer star; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private String createTime; + //施工单位 + private String constructionUnit; /** * This field was generated by MyBatis Generator. diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/entity/dto/PieceDto.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/entity/dto/PieceDto.java index f5bc41f..970c692 100644 --- a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/entity/dto/PieceDto.java +++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/entity/dto/PieceDto.java @@ -11,6 +11,9 @@ private Integer byId; + private String bldTim; + + private Integer types; private List<TRawMaterial> rawMaterials; diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/mapper/TMaterialReleaseMappper.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/mapper/TMaterialReleaseMappper.java index 06a02d4..574b207 100644 --- a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/mapper/TMaterialReleaseMappper.java +++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/mapper/TMaterialReleaseMappper.java @@ -26,9 +26,9 @@ List<PieceDto> pieceList(HashMap<String, Object> values); - List<TRawMaterial> materialRew(Integer byId); + List<TRawMaterial> materialRew(@Param("byId") Integer byId,@Param("types")Integer types); - void mixingInsert(@Idkey("mixingId") HashMap<String, Object> values); + void mixingInsert(@Idkey("mixingId") Map<String,Object> mixing); List<TMixing> mixingList(HashMap<String, Object> values); @@ -38,7 +38,7 @@ void mixingConsumeIn(@Idkey("mixingSignboardId") Map<String, Object> values); - void mixingConsumeInTwo(@Idkey("mixingConsumeId") TMixingConsume mixingConsume); + void mixingConsumeInTwo(@Idkey("mixingConsumeId") Map<String,Object> mixingConsume); Integer starInt(); @@ -47,4 +47,22 @@ Integer starIntSig(String mixingSignboardId); List<TMixingConsume> mixingConsumes(@Param("mixingSignboardId") String mixingSignboardId,@Param("star") Integer star); + + List<TMixingSignboard> mixingConsumePull(); + + List<TSilo> siloPull(); + + void mixingUpdateType(String siloId); + + List<TMixing> siloMixingList(Map<String, Object> values); + + void mixingUpdate(Map<String, Object> mixing); + + void mixingDel(String mixingId); + + void mixingConsumeUpTwo(Map<String, Object> mixingConsume); + + void mixingConsumeDel(@Param("mixingConsumeId") String mixingConsumeId,@Param("star") Integer star); + + void mixingConsumeDelSign(@Param("mixingSignboardId") String mixingSignboardId,@Param("star") Integer star); } diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/service/TMaterialReleaseService.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/service/TMaterialReleaseService.java index 8876597..4009295 100644 --- a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/service/TMaterialReleaseService.java +++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/service/TMaterialReleaseService.java @@ -31,4 +31,18 @@ BasicResult mixingConsumeIn(Map<String, Object> values); BasicResult mixingConsumeList(Map<String, Object> values); + + BasicResult mixingConsumePull(); + + BasicResult siloPull(); + + BasicResult siloMixingList(Map<String, Object> values); + + BasicResult mixingUpdate(HashMap<String, Object> values); + + BasicResult mixingDel(HashMap<String, Object> values); + + BasicResult mixingConsumeUp(Map<String, Object> values); + + BasicResult mixingConsumeDel(HashMap<String, Object> values); } diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/service/impl/TMaterialReleaseServiceImpl.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/service/impl/TMaterialReleaseServiceImpl.java index 8e1befc..778f6af 100644 --- a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/service/impl/TMaterialReleaseServiceImpl.java +++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/service/impl/TMaterialReleaseServiceImpl.java @@ -1,5 +1,6 @@ package com.thhy.materials.modules.biz.concret.service.impl; +import com.alibaba.nacos.api.utils.StringUtils; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.thhy.general.common.BasicResult; @@ -213,7 +214,7 @@ PageHelper.startPage(pageNum,pageSize); List<PieceDto> pieceDtos = materialReleaseMappper.pieceList(values); for (PieceDto pieceDto : pieceDtos){ - List<TRawMaterial> rawMaterials = materialReleaseMappper.materialRew(pieceDto.getById()); + List<TRawMaterial> rawMaterials = materialReleaseMappper.materialRew(pieceDto.getById(),pieceDto.getTypes()); pieceDto.setRawMaterials(rawMaterials); } PageInfo<PieceDto> pieceDtoPageInfo = new PageInfo<>(pieceDtos); @@ -222,8 +223,14 @@ @Override public BasicResult mixingInsert(HashMap<String, Object> values) { - values.put("mixingId",""); - materialReleaseMappper.mixingInsert(values); + List<Map<String,Object>> mixingList = (List<Map<String,Object>>) values.get("mixingList"); + for (Map<String,Object> mixing : mixingList){ + materialReleaseMappper.mixingUpdateType(mixing.get("siloId").toString()); + mixing.put("types",1); + mixing.put("mixingId",""); + mixing.put("stata",2); + materialReleaseMappper.mixingInsert(mixing); + } return BasicResult.success(); } @@ -250,14 +257,19 @@ @Override @Transactional public BasicResult mixingConsumeIn(Map<String, Object> values) { - values.put("mixingSignboardId",""); - materialReleaseMappper.mixingConsumeIn(values); +// values.put("mixingSignboardId",""); +// materialReleaseMappper.mixingConsumeIn(values); String mixingSignboardId = values.get("mixingSignboardId").toString(); Integer star = materialReleaseMappper.starInt(); - List<TMixingConsume> mixingConsumes = (List<TMixingConsume>) values.get("mixingConsume"); - for (TMixingConsume mixingConsume :mixingConsumes){ - mixingConsume.setMixingSignboardId(mixingSignboardId); - mixingConsume.setStar(star+1); + List<Map<String,Object>> mixingConsumes = (List<Map<String,Object>>) values.get("mixingConsume"); + for (Map<String,Object> mixingConsume :mixingConsumes){ + mixingConsume.put("mixingSignboardId",mixingSignboardId); + if(star!=null){ + mixingConsume.put("star",star+1); + }else { + mixingConsume.put("star",1); + } + //mixingConsume.put("mixingConsumeId",""); materialReleaseMappper.mixingConsumeInTwo(mixingConsume); } return BasicResult.success(); @@ -271,10 +283,72 @@ List<TMixingSignboard> mixingSignboards = materialReleaseMappper.mixingSignboardList(values); for (TMixingSignboard mixingSignboard : mixingSignboards){ Integer star = materialReleaseMappper.starIntSig(mixingSignboard.getMixingSignboardId()); + //values.put("") List<TMixingConsume> mixingConsumes = materialReleaseMappper.mixingConsumes(mixingSignboard.getMixingSignboardId(),star); mixingSignboard.setTMixingConsumes(mixingConsumes); } PageInfo<TMixingSignboard> tMixingSignboardPageInfo = new PageInfo<>(mixingSignboards); return BasicResult.success(tMixingSignboardPageInfo); } + + @Override + public BasicResult mixingConsumePull() { + List<TMixingSignboard> mixingSignboards = materialReleaseMappper.mixingConsumePull(); + return BasicResult.success(mixingSignboards); + } + + @Override + public BasicResult siloPull() { + List<TSilo> silos = materialReleaseMappper.siloPull(); + return BasicResult.success(silos); + } + + @Override + public BasicResult siloMixingList(Map<String, Object> values) { + List<TMixing> tMixings = materialReleaseMappper.siloMixingList(values); + return BasicResult.success(tMixings); + } + + @Override + public BasicResult mixingUpdate(HashMap<String, Object> values) { + List<Map<String,Object>> mixingList = (List<Map<String,Object>>) values.get("mixingList"); + for (Map<String,Object> mixing : mixingList){ + materialReleaseMappper.mixingUpdate(mixing); + } + return BasicResult.success(); + } + + @Override + public BasicResult mixingDel(HashMap<String, Object> values) { + List<String> mixingList = (List<String>) values.get("mixingIds"); + for (String mixingId : mixingList){ + materialReleaseMappper.mixingDel(mixingId); + } + return BasicResult.success(); + } + + @Override + public BasicResult mixingConsumeUp(Map<String, Object> values) { + String mixingSignboardId = values.get("mixingSignboardId").toString(); + Integer star = materialReleaseMappper.starInt(); + materialReleaseMappper.mixingConsumeDelSign(mixingSignboardId,star); + List<Map<String,Object>> mixingConsumes = (List<Map<String,Object>>) values.get("mixingConsume"); + for (Map<String,Object> mixingConsume :mixingConsumes){ + mixingConsume.put("mixingSignboardId",mixingSignboardId); + mixingConsume.put("star",star); + //mixingConsume.put("mixingConsumeId",""); + materialReleaseMappper.mixingConsumeInTwo(mixingConsume); + } + return BasicResult.success(); + } + + @Override + public BasicResult mixingConsumeDel(HashMap<String, Object> values) { + Integer star = Integer.valueOf(values.get("star").toString()); + List<String> mixingConsumeIds = (List<String>) values.get("mixingConsumeIds"); + for (String mixingConsumeId : mixingConsumeIds){ + materialReleaseMappper.mixingConsumeDel(mixingConsumeId,star); + } + return BasicResult.success(); + } } diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/mixingstationstorage/dto/MinXingPlantDto.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/mixingstationstorage/dto/MinXingPlantDto.java index 05a2dea..965d030 100644 --- a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/mixingstationstorage/dto/MinXingPlantDto.java +++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/mixingstationstorage/dto/MinXingPlantDto.java @@ -11,9 +11,10 @@ public class MinXingPlantDto { private String dictId;// 管片原料类型(字典表) private String companyId;//分公司id - private String supplierId;//供应商ID + private String supplierName;//供应商ID private String startTime; private String endTime; private Integer pageNum; private Integer pageSize; + } diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/mixingstationstorage/entity/MinXingPlantVo.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/mixingstationstorage/entity/MinXingPlantVo.java index 145f97a..977222e 100644 --- a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/mixingstationstorage/entity/MinXingPlantVo.java +++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/mixingstationstorage/entity/MinXingPlantVo.java @@ -27,7 +27,7 @@ private Integer byId;//序号 @Excel(sort = 1,title = "入库时间") - private String createDate;//字符串的入库时间 + private Date createDate;//字符串的入库时间 @Excel(sort = 2,title = "供应商") private String supplierName;//供应商名称 @@ -43,4 +43,17 @@ @Excel(sort = 6,title = "入库人") private String username; + + + private String id; + private Integer type; + private Integer opType; + private String materialName; + private double materialValue; + private double beforeStock; + private double afterStock; + private String remark; + private String pipeId; + private String pipeNum; + } diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/mixingstationstorage/service/impl/MinXingPlantServiceImpl.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/mixingstationstorage/service/impl/MinXingPlantServiceImpl.java index 869529a..460e94d 100644 --- a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/mixingstationstorage/service/impl/MinXingPlantServiceImpl.java +++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/mixingstationstorage/service/impl/MinXingPlantServiceImpl.java @@ -8,6 +8,7 @@ import com.thhy.general.config.SysUserInfo; import com.thhy.general.exception.BasicException; import com.thhy.general.utils.ExcelUtils; +import com.thhy.general.utils.UUIDUtils; import com.thhy.general.utils.UserInfoUtils; import com.thhy.materials.modules.biz.materialsplan.entity.RsbStatDto; import com.thhy.materials.modules.biz.materialsplan.entity.StatResultVo; @@ -59,6 +60,10 @@ String companyId = sysUserInfo.getCompanyId(); minXingPlantVo.setCompanyId(companyId); minXingPlantVo.setCreateUser(sysUserInfo.getUserId()); + minXingPlantVo.setId(UUIDUtils.create()); + minXingPlantVo.setOpType(1); + minXingPlantVo.setMaterialValue(minXingPlantVo.getChangeStock()); + minXingPlantVo.setType(4); minXingPlantMapper.insert(minXingPlantVo); RLock lock = redissonClient.getLock("materlock"); try { diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/mixmateria/service/impl/MixMaterialServiceImpl.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/mixmateria/service/impl/MixMaterialServiceImpl.java index d7e3448..1d9bf5f 100644 --- a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/mixmateria/service/impl/MixMaterialServiceImpl.java +++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/mixmateria/service/impl/MixMaterialServiceImpl.java @@ -103,7 +103,7 @@ ml.setMixMaterialId(mixMaterial.getId()); infoMapper.insert(ml); }); - screenMqUtils.send(ProListenType.MATERIALWEEKANDMONTHS); + //screenMqUtils.send(ProListenType.MATERIALWEEKANDMONTHS); } /** diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/rebarprint/entity/dto/ProduceExportDto.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/rebarprint/entity/dto/ProduceExportDto.java index 3eb944c..d1a44e3 100644 --- a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/rebarprint/entity/dto/ProduceExportDto.java +++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/rebarprint/entity/dto/ProduceExportDto.java @@ -47,5 +47,7 @@ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private String printTime; + private String platUserName; + } diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/rebarprint/service/impl/TSteelProduceServiceImpl.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/rebarprint/service/impl/TSteelProduceServiceImpl.java index fed3638..23e4dbd 100644 --- a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/rebarprint/service/impl/TSteelProduceServiceImpl.java +++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/rebarprint/service/impl/TSteelProduceServiceImpl.java @@ -238,7 +238,7 @@ }else { exportDto.setQualityTime(produceDto.getQualityTime().toString()); } - exportDto.setRealName(produceDto.getRealName()); + exportDto.setPlatUserName(produceDto.getPlatUserName()); exportDto.setQualityUserName(produceDto.getQualityUserName()); if(produceDto.getIsQualified()!=null && produceDto.getIsQualified()==1){ @@ -263,7 +263,7 @@ excel.addHeaderAlias("blockName", "块号"); excel.addHeaderAlias("groupName", "生产班组"); excel.addHeaderAlias("printTime", "打印时间"); - excel.addHeaderAlias("realName", "制作人"); + excel.addHeaderAlias("platUserName", "制作人"); excel.addHeaderAlias("qualityUserName", "质检人"); excel.addHeaderAlias("qualityTime", "质检时间"); excel.addHeaderAlias("isQualified", "是否合格"); diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/suMaterialWarehouse/entity/SuMaterialWarehouseEntity.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/suMaterialWarehouse/entity/SuMaterialWarehouseEntity.java index 606c4c6..806751e 100644 --- a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/suMaterialWarehouse/entity/SuMaterialWarehouseEntity.java +++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/suMaterialWarehouse/entity/SuMaterialWarehouseEntity.java @@ -25,7 +25,7 @@ private String nameOfOrigin;//场地名称 private String materialName;//物料名称 - private Integer incomingQuantity;//进厂数量 + private Double incomingQuantity;//进厂数量 private Date createTime;//创建时间 diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/suSteelCageMaterialLabel/controller/SuSteelCageMaterialLabelController.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/suSteelCageMaterialLabel/controller/SuSteelCageMaterialLabelController.java new file mode 100644 index 0000000..5f20734 --- /dev/null +++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/suSteelCageMaterialLabel/controller/SuSteelCageMaterialLabelController.java @@ -0,0 +1,42 @@ +package com.thhy.materials.modules.biz.suSteelCageMaterialLabel.controller; + +import com.thhy.general.common.BasicResult; +import com.thhy.materials.modules.biz.suSteelCageMaterialLabel.entity.SuSteelCageMaterialLabelEntity; +import com.thhy.materials.modules.biz.suSteelCageMaterialLabel.service.SuSteelCageMaterialLabelService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.Map; + +/** + * @Author QiuYuHao + * @CreateDate 2023-11-29 13:17:17 + * 钢筋笼标识牌控制层 + */ +@RestController +@RequestMapping("suSteelCageMaterialLabel") +public class SuSteelCageMaterialLabelController { + + @Autowired + private SuSteelCageMaterialLabelService service; + + @PostMapping("insertAndUpdate") + public BasicResult insertAndUpdate(@RequestBody SuSteelCageMaterialLabelEntity suVo) { + return service.insertAndUpdate(suVo); + } + + @GetMapping("delete") + public BasicResult delete(@RequestParam String id) { + return service.delete(id); + } + + @PostMapping("selectPageList") + public BasicResult selectPageList(@RequestBody Map map) { + return service.selectPageList(map); + } + + @GetMapping("selectInfo") + public BasicResult selectInfo(@RequestParam(required = false) String id,@RequestParam(required = false) String region) { + return service.selectInfo(id,region); + } +} diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/suSteelCageMaterialLabel/entity/SuSteelCageMaterialLabelEntity.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/suSteelCageMaterialLabel/entity/SuSteelCageMaterialLabelEntity.java new file mode 100644 index 0000000..463dec5 --- /dev/null +++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/suSteelCageMaterialLabel/entity/SuSteelCageMaterialLabelEntity.java @@ -0,0 +1,41 @@ +package com.thhy.materials.modules.biz.suSteelCageMaterialLabel.entity; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.checkerframework.checker.units.qual.A; + +import java.io.Serializable; +import java.util.Date; + +/** + * @Author QiuYuHao + * @CreateDate 2023-11-29 13:18:51 + * 钢筋笼标识牌实体 + */ +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class SuSteelCageMaterialLabelEntity implements Serializable { + + private String id;// + private String region;// 区域 + private String materialName;// 材料名称 + private String manufacturer;// 生产厂家 + private String specifications;// 规格型号 + private String heatNumber;// 炉(批)号 + private String inNumber;// 进场数量 + private String reportTime;// 报检日期 + private String reportNum;// 报告编号 + private Integer status;// 检验状态 + private String companyId;// varchar + private Integer isUse; + private Date createTime; + private String createUser; + private Date updateTime; + private String updateUser; + private Integer type;// 录入方式 0自动 1手动 + +} diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/suSteelCageMaterialLabel/mapper/SuSteelCageMaterialLabelMapper.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/suSteelCageMaterialLabel/mapper/SuSteelCageMaterialLabelMapper.java new file mode 100644 index 0000000..61d3877 --- /dev/null +++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/suSteelCageMaterialLabel/mapper/SuSteelCageMaterialLabelMapper.java @@ -0,0 +1,25 @@ +package com.thhy.materials.modules.biz.suSteelCageMaterialLabel.mapper; + +import com.thhy.general.common.BasicResult; +import com.thhy.materials.modules.biz.suSteelCageMaterialLabel.entity.SuSteelCageMaterialLabelEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +/** + * @Author QiuYuHao + * @CreateDate 2023-11-29 13:23:53 + */ +@Mapper +public interface SuSteelCageMaterialLabelMapper { + + void insertAndUpdate(SuSteelCageMaterialLabelEntity suSteelCageMaterialLabelEntity); + + void delete(String id); + + List<SuSteelCageMaterialLabelEntity> selectPageList(Map map); + + SuSteelCageMaterialLabelEntity selectInfo(@Param("id") String id,@Param("region") String region); +} diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/suSteelCageMaterialLabel/service/SuSteelCageMaterialLabelService.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/suSteelCageMaterialLabel/service/SuSteelCageMaterialLabelService.java new file mode 100644 index 0000000..9dbc345 --- /dev/null +++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/suSteelCageMaterialLabel/service/SuSteelCageMaterialLabelService.java @@ -0,0 +1,22 @@ +package com.thhy.materials.modules.biz.suSteelCageMaterialLabel.service; + +import com.thhy.general.common.BasicResult; +import com.thhy.materials.modules.biz.suSteelCageMaterialLabel.entity.SuSteelCageMaterialLabelEntity; + +import java.util.Map; + +/** + * @Author QiuYuHao + * @CreateDate 2023-11-29 13:24:06 + * 钢筋笼材料标识牌接口 + */ +public interface SuSteelCageMaterialLabelService { + + BasicResult insertAndUpdate(SuSteelCageMaterialLabelEntity suSteelCageMaterialLabelEntity); + + BasicResult delete(String id); + + BasicResult selectPageList(Map map); + + BasicResult selectInfo(String id,String region); +} diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/suSteelCageMaterialLabel/service/impl/SuSteelCageMaterialLabelServiceImpl.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/suSteelCageMaterialLabel/service/impl/SuSteelCageMaterialLabelServiceImpl.java new file mode 100644 index 0000000..e645c6d --- /dev/null +++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/suSteelCageMaterialLabel/service/impl/SuSteelCageMaterialLabelServiceImpl.java @@ -0,0 +1,68 @@ +package com.thhy.materials.modules.biz.suSteelCageMaterialLabel.service.impl; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.thhy.general.common.BasicResult; +import com.thhy.general.config.SysUserInfo; +import com.thhy.general.utils.UUIDUtils; +import com.thhy.general.utils.UserInfoUtils; +import com.thhy.materials.modules.biz.suSteelCageMaterialLabel.entity.SuSteelCageMaterialLabelEntity; +import com.thhy.materials.modules.biz.suSteelCageMaterialLabel.mapper.SuSteelCageMaterialLabelMapper; +import com.thhy.materials.modules.biz.suSteelCageMaterialLabel.service.SuSteelCageMaterialLabelService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.Map; + +/** + * @Author QiuYuHao + * @CreateDate 2023-11-29 13:26:31 + * 钢筋笼材料标示牌实现 + */ +@Service +public class SuSteelCageMaterialLabelServiceImpl implements SuSteelCageMaterialLabelService { + + @Autowired + private SuSteelCageMaterialLabelMapper suSteelCageMaterialLabelMapper; + + @Override + public BasicResult insertAndUpdate(SuSteelCageMaterialLabelEntity suVo) { + SysUserInfo sysUserInfo = UserInfoUtils.getInstance().getUserInfo(); + String userId = sysUserInfo.getUserId(); + String companyId = sysUserInfo.getCompanyId(); + if (suVo.getId() == null){ + suVo.setId(UUIDUtils.create()); + suVo.setCreateTime(new Date()); + suVo.setCreateUser(userId); + suVo.setCompanyId(companyId); + }else { + suVo.setUpdateTime(new Date()); + suVo.setUpdateUser(userId); + } + suSteelCageMaterialLabelMapper.insertAndUpdate(suVo); + return BasicResult.success(); + } + + @Override + public BasicResult delete(String id) { + suSteelCageMaterialLabelMapper.delete(id); + return BasicResult.success(); + } + + @Override + public BasicResult selectPageList(Map map) { + SysUserInfo sysUserInfo = UserInfoUtils.getInstance().getUserInfo(); + String companyId = sysUserInfo.getCompanyId(); + int pageNum = (int) map.get("pageNum"); + int pageSize = (int) map.get("pageSize"); + map.put("companyId",companyId); + PageHelper.startPage(pageNum,pageSize); + return BasicResult.success(new PageInfo<>(suSteelCageMaterialLabelMapper.selectPageList(map))); + } + + @Override + public BasicResult selectInfo(String id, String region) { + return BasicResult.success(suSteelCageMaterialLabelMapper.selectInfo(id,region )); + } +} diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/controller/WeighController.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/controller/WeighController.java index c782925..d6c047d 100644 --- a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/controller/WeighController.java +++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/controller/WeighController.java @@ -8,10 +8,7 @@ import com.thhy.materials.modules.biz.weigh.service.WeighService; import org.omg.CORBA.StringHolder; import org.springframework.beans.factory.annotation.Autowired; -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; @@ -40,6 +37,35 @@ return weighService.weighbridgeList(values); } + //原料库存 + @PostMapping("/headThingJsInventory") + public BasicResult headThingJsInventory(){ + return weighService.headThingJsInventory(); + } + //料仓列表 + @PostMapping("/materialWarehouseRecordList") + public BasicResult materialWarehouseRecordList(@RequestBody Map<String,Object> values){ + return weighService.materialWarehouseRecordList(values); + } - + //料仓添加进仓 + @PostMapping("/materialWarehouseRecordInsert") + public BasicResult materialWarehouseRecordInsert(@RequestBody Map<String,Object> values){ + return weighService.materialWarehouseRecordInsert(values); + } + //料仓修改进仓 + @PostMapping("/materialWarehouseRecordUpdate") + public BasicResult materialWarehouseRecordUpdate(@RequestBody Map<String,Object> values){ + return weighService.materialWarehouseRecordUpdate(values); + } + //删除 + @GetMapping("/materialWarehouseRecordDel") + public BasicResult materialWarehouseRecordDel(@RequestParam String id){ + return weighService.materialWarehouseRecordDel(id); + } + // 环境监测 thingjs 数据 + @PostMapping("/headThingJsDateValue") + public BasicResult headThingJsDateValue(){ + return weighService.headThingJsDateValue(); + } } diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/entity/TSuMaterialWarehouseRecord.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/entity/TSuMaterialWarehouseRecord.java new file mode 100644 index 0000000..fcbef74 --- /dev/null +++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/entity/TSuMaterialWarehouseRecord.java @@ -0,0 +1,103 @@ +package com.thhy.materials.modules.biz.weigh.entity; + +import lombok.Data; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; + +import java.io.Serializable; +import java.util.Date; + +@Data +@Getter +@Setter +@ToString +public class TSuMaterialWarehouseRecord implements Serializable { + /** + * + */ + private String id; + + /** + * 桌号 + */ + private Integer tableNum; + + /** + * 产地名称 + */ + private String nameOfOrigin; + + /** + * 物料名称 + */ + private String materialName; + + /** + * 进厂数量 + */ + private Double incomingQuantity; + + /** + * 进厂日期 + */ + private Date inTime; + + /** + * 检验状态 + */ + private Integer status; + + /** + * 检验日期 + */ + private Date inspectionDate; + + /** + * 报告编号 + */ + private String reportNumber; + + /** + * 创建日期 + */ + private Date createTime; + + /** + * + */ + private String createUser; + + /** + * + */ + private Date updateTime; + + /** + * + */ + private String updateUser; + + /** + * + */ + private Integer isUse; + + /** + * + */ + private String companyId; + + /** + * 入库方式 1手动 2自动 + */ + private Integer type; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table t_su_material_warehouse_record + * + * @mbg.generated Thu Nov 30 14:55:49 CST 2023 + */ + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/entity/dto/AssistGoodDto.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/entity/dto/AssistGoodDto.java new file mode 100644 index 0000000..f317633 --- /dev/null +++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/entity/dto/AssistGoodDto.java @@ -0,0 +1,16 @@ +package com.thhy.materials.modules.biz.weigh.entity.dto; + +import lombok.Data; + +import java.io.Serializable; +@Data +public class AssistGoodDto implements Serializable { + //辅材名称 + private String assistName; + //辅材类型 + private String assistType; + //辅材库存 + private String stock; + + +} diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/entity/dto/MaterialStockRecordDto.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/entity/dto/MaterialStockRecordDto.java new file mode 100644 index 0000000..a229fcc --- /dev/null +++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/entity/dto/MaterialStockRecordDto.java @@ -0,0 +1,14 @@ +package com.thhy.materials.modules.biz.weigh.entity.dto; + +import lombok.Data; + +import java.io.Serializable; +@Data +public class MaterialStockRecordDto implements Serializable { + //原料名称 + private String materialName; + //原料值 + private String materialValue; + + +} diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/entity/dto/MouldDto.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/entity/dto/MouldDto.java new file mode 100644 index 0000000..b3b9fbc --- /dev/null +++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/entity/dto/MouldDto.java @@ -0,0 +1,15 @@ +package com.thhy.materials.modules.biz.weigh.entity.dto; + +import lombok.Data; + +import java.io.Serializable; +@Data +public class MouldDto implements Serializable { + //模具编号 + private String mouldNum; + //使用状态 + private String free; + //次数 + private String currentCycleTime; + +} diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/entity/dto/SteelDto.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/entity/dto/SteelDto.java new file mode 100644 index 0000000..dbc5e11 --- /dev/null +++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/entity/dto/SteelDto.java @@ -0,0 +1,16 @@ +package com.thhy.materials.modules.biz.weigh.entity.dto; + +import lombok.Data; + +import java.io.Serializable; +@Data +public class SteelDto implements Serializable { + //钢筋名 + private String steelName; + //钢筋型号 + private String steelModel; + //库存 + private String stock; + + +} diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/mapper/WeighMapper.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/mapper/WeighMapper.java index 9b87258..e1d4fb8 100644 --- a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/mapper/WeighMapper.java +++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/mapper/WeighMapper.java @@ -1,13 +1,21 @@ package com.thhy.materials.modules.biz.weigh.mapper; import com.thhy.general.annotations.Idkey; +import com.thhy.materials.modules.biz.concret.entity.SysSteel; import com.thhy.materials.modules.biz.concret.entity.dto.DicetName; import com.thhy.materials.modules.biz.concret.entity.dto.TMinxingPlant; import com.thhy.materials.modules.biz.concret.entity.dto.WeighDto; +import com.thhy.materials.modules.biz.helmet.entity.TDataSmock; +import com.thhy.materials.modules.biz.helmet.entity.TDataValue; import com.thhy.materials.modules.biz.video.entity.TVideoNo; import com.thhy.materials.modules.biz.weigh.dto.QueryWeighDto; +import com.thhy.materials.modules.biz.weigh.entity.TSuMaterialWarehouseRecord; import com.thhy.materials.modules.biz.weigh.entity.TWeighbridge; import com.thhy.materials.modules.biz.weigh.entity.WeighVo; +import com.thhy.materials.modules.biz.weigh.entity.dto.AssistGoodDto; +import com.thhy.materials.modules.biz.weigh.entity.dto.MaterialStockRecordDto; +import com.thhy.materials.modules.biz.weigh.entity.dto.MouldDto; +import com.thhy.materials.modules.biz.weigh.entity.dto.SteelDto; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.springframework.web.bind.annotation.PostMapping; @@ -81,4 +89,34 @@ void materialStockRecordIns(HashMap<String, Object> hashMap); void weighbridgeUpdateType(Integer weighbridgeId); + + List<MaterialStockRecordDto> materialStockInventory(); + + List<SteelDto> steelInventory(); + + List<AssistGoodDto> assistGoodInventory(); + + List<MouldDto> mouldInventory(); + + List<SysSteel> steelType(); + + void steelRecordIn(@Idkey("id") HashMap<String, Object> hashMap); + + void steelUp(@Param("steelId") String steelId,@Param("doubleValue") double doubleValue); + + List<TSuMaterialWarehouseRecord> materialWarehouseRecordList(Map<String, Object> values); + + void materialWarehouseRecordInsert(@Idkey("id") Map<String, Object> values); + + void materialWarehouseRecordUpdate(Map<String, Object> values); + + void materialWarehouseRecordDel(String id); + + List<TDataValue> headThingJsDateValue(); + + TDataSmock headThingJsDateSmock(); + + TDataValue headThingJsDateValueByOne(); + + List<TDataValue> headThingJsDateValueMonth(); } diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/service/WeighService.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/service/WeighService.java index 895dc22..169a7af 100644 --- a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/service/WeighService.java +++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/service/WeighService.java @@ -1,6 +1,7 @@ package com.thhy.materials.modules.biz.weigh.service; import com.thhy.general.common.BasicResult; +import com.thhy.materials.modules.biz.concret.entity.SysSteel; import com.thhy.materials.modules.biz.concret.entity.dto.DicetName; import com.thhy.materials.modules.biz.concret.entity.dto.TMinxingPlant; import com.thhy.materials.modules.biz.concret.entity.dto.WeighDto; @@ -40,4 +41,17 @@ BasicResult weighbridgeList(Map<String, Object> values); + BasicResult headThingJsInventory(); + + List<SysSteel> steelType(); + + BasicResult materialWarehouseRecordList(Map<String, Object> values); + + BasicResult materialWarehouseRecordInsert(Map<String, Object> values); + + BasicResult materialWarehouseRecordUpdate(Map<String, Object> values); + + BasicResult materialWarehouseRecordDel(String id); + + BasicResult headThingJsDateValue(); } diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/service/impl/WeighServiceImpl.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/service/impl/WeighServiceImpl.java index 3e1f773..d50bf9c 100644 --- a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/service/impl/WeighServiceImpl.java +++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/weigh/service/impl/WeighServiceImpl.java @@ -3,18 +3,27 @@ import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.thhy.general.common.BasicResult; +import com.thhy.materials.modules.biz.concret.entity.SysSteel; import com.thhy.materials.modules.biz.concret.entity.dto.DicetName; import com.thhy.materials.modules.biz.concret.entity.dto.TMinxingPlant; import com.thhy.materials.modules.biz.concret.entity.dto.WeighDto; +import com.thhy.materials.modules.biz.helmet.entity.TDataSmock; +import com.thhy.materials.modules.biz.helmet.entity.TDataValue; import com.thhy.materials.modules.biz.weigh.dto.QueryWeighDto; +import com.thhy.materials.modules.biz.weigh.entity.TSuMaterialWarehouseRecord; import com.thhy.materials.modules.biz.weigh.entity.TWeighbridge; import com.thhy.materials.modules.biz.weigh.entity.WeighVo; +import com.thhy.materials.modules.biz.weigh.entity.dto.AssistGoodDto; +import com.thhy.materials.modules.biz.weigh.entity.dto.MaterialStockRecordDto; +import com.thhy.materials.modules.biz.weigh.entity.dto.MouldDto; +import com.thhy.materials.modules.biz.weigh.entity.dto.SteelDto; import com.thhy.materials.modules.biz.weigh.mapper.WeighMapper; import com.thhy.materials.modules.biz.weigh.service.WeighService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import javax.annotation.Resource; +import java.util.HashMap; import java.util.List; import java.util.Map; @@ -95,4 +104,76 @@ PageInfo<TWeighbridge> tWeighbridgePageInfo = new PageInfo<>(weighbridges); return BasicResult.success(tWeighbridgePageInfo); } + + @Override + public BasicResult headThingJsInventory() { + + //原料库存 + List<MaterialStockRecordDto> materialStockDtos =weighMapper.materialStockInventory(); + //钢筋 + List<SteelDto> steelDtos = weighMapper.steelInventory(); + //辅材 + List<AssistGoodDto> assistGoodDtos = weighMapper.assistGoodInventory(); + + //模具 + List<MouldDto> mouldDtos = weighMapper.mouldInventory(); + HashMap<String, Object> map = new HashMap<>(); + map.put("materialStockDtos",materialStockDtos); + map.put("steelDtos",steelDtos); + map.put("assistGoodDtos",assistGoodDtos); + map.put("mouldDtos",mouldDtos); + return BasicResult.success(map); + } + + @Override + public List<SysSteel> steelType() { + return weighMapper.steelType(); + } + + @Override + public BasicResult materialWarehouseRecordList(Map<String, Object> values) { + Integer pageSize = Integer.valueOf(values.get("pageSize").toString()); + Integer pageNum = Integer.valueOf(values.get("pageNum").toString()); + PageHelper.startPage(pageNum,pageSize); + List<TSuMaterialWarehouseRecord> records = weighMapper.materialWarehouseRecordList(values); + PageInfo<TSuMaterialWarehouseRecord> recordPageInfo = new PageInfo<>(records); + return BasicResult.success(recordPageInfo); + } + + @Override + public BasicResult materialWarehouseRecordInsert(Map<String, Object> values) { + values.put("id",""); + weighMapper.materialWarehouseRecordInsert(values); + return BasicResult.success(); + } + + @Override + public BasicResult materialWarehouseRecordUpdate(Map<String, Object> values) { + weighMapper.materialWarehouseRecordUpdate(values); + return BasicResult.success(); + } + + @Override + public BasicResult materialWarehouseRecordDel(String id) { + weighMapper.materialWarehouseRecordDel(id); + return BasicResult.success(); + } + + @Override + public BasicResult headThingJsDateValue() { + //每小时数据值 + List<TDataValue> tDataValues = weighMapper.headThingJsDateValue(); + //烟尘 开关 + TDataSmock tDataSmock = weighMapper.headThingJsDateSmock(); + //环境最新一条 + TDataValue tDataValue = weighMapper.headThingJsDateValueByOne(); + //pm10 pm25 本月数据 + List<TDataValue> tDataValuesMonth = weighMapper.headThingJsDateValueMonth(); + HashMap<String, Object> map = new HashMap<>(); + map.put("tDataValues",tDataValues); + map.put("tDataSmock",tDataSmock); + map.put("tDataValue",tDataValue); + map.put("tDataValuesMonth",tDataValuesMonth); + return BasicResult.success(map); + } } diff --git a/hd/pipe/materialsManage/src/main/resources/mapping/MinXingPlantMapper.xml b/hd/pipe/materialsManage/src/main/resources/mapping/MinXingPlantMapper.xml index 89404d4..66cddb8 100644 --- a/hd/pipe/materialsManage/src/main/resources/mapping/MinXingPlantMapper.xml +++ b/hd/pipe/materialsManage/src/main/resources/mapping/MinXingPlantMapper.xml @@ -1,125 +1,110 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.thhy.materials.modules.biz.mixingstationstorage.mapper.MinXingPlantMapper"> - <resultMap id="BaseResultMap" type="com.thhy.materials.modules.biz.mixingstationstorage.entity.MinXingPlantVo"> - - <id column="mixing_plant_id" jdbcType="VARCHAR" property="mixingPlantId" /> - <result column="dict_id" jdbcType="VARCHAR" property="dictId" /> - <result column="stock_type" jdbcType="INTEGER" property="stockType" /> - <result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> - <result column="change_stock" jdbcType="DOUBLE" property="changeStock" /> - <result column="supplier_id" jdbcType="VARCHAR" property="supplierId" /> - <result column="is_use" jdbcType="INTEGER" property="isUse" /> - <result column="company_id" jdbcType="VARCHAR" property="companyId" /> - <result column="car_name" jdbcType="VARCHAR" property="carName" /> - <result column="pro_id" jdbcType="VARCHAR" property="proId" /> - <result column="create_user" jdbcType="VARCHAR" property="createUser" /> - <result column="by_id" jdbcType="INTEGER" property="byId" /> - </resultMap> <insert id="insert" > - insert into t_minxing_plant - <trim prefix="(" suffix=")" suffixOverrides=","> - <if test="mixingPlantId != null"> - mixing_plant_id, - </if> - <if test="dictId != null"> - dict_id, - </if> - <if test="stockType != null"> - stock_type, - </if> - <if test="createTime != null"> - create_time, - </if> - <if test="changeStock != null"> - change_stock, - </if> - <if test="supplierId != null"> - supplier_id, - </if> - <if test="isUse != null"> - is_use, - </if> - <if test="companyId != null"> - company_id, - </if> - <if test="carName != null"> - car_name, - </if> - <if test="proId != null"> - pro_id, - </if> - <if test="createUser != null"> - create_user, - </if> - <if test="byId != null"> - by_id, - </if> - </trim> - <trim prefix="values (" suffix=")" suffixOverrides=","> - <if test="mixingPlantId != null"> - #{mixingPlantId}, - </if> - <if test="dictId != null"> - #{dictId}, - </if> - <if test="stockType != null"> - #{stockType}, - </if> - <if test="createTime != null"> - #{createTime}, - </if> - <if test="changeStock != null"> - #{changeStock}, - </if> - <if test="supplierId != null"> - #{supplierId}, - </if> - <if test="isUse != null"> - #{isUse}, - </if> - <if test="companyId != null"> - #{companyId}, - </if> - <if test="carName != null"> - #{carName}, - </if> - <if test="proId != null"> - #{proId}, - </if> - <if test="createUser != null"> - #{createUser}, - </if> - <if test="byId != null"> - #{byId}, - </if> - </trim> + insert into t_material_stock_record + <trim prefix="(" suffix=")" suffixOverrides=","> + <if test="id != null"> + id, + </if> + <if test="createDate != null"> + create_date, + </if> + <if test="type != null"> + type, + </if> + <if test="opType != null"> + op_type, + </if> + <if test="dictId != null"> + material_name, + </if> + <if test="materialValue != null"> + material_value, + </if> + <if test="beforeStock != null"> + before_stock, + </if> + <if test="afterStock != null"> + after_stock, + </if> + <if test="companyId != null"> + company_id, + </if> + <if test="remark != null"> + remark, + </if> + <if test="createUser != null"> + create_user, + </if> + <if test="supplierName != null"> + supplier_name, + </if> + </trim> + <trim prefix="values (" suffix=")" suffixOverrides=","> + <if test="id != null"> + #{id}, + </if> + <if test="createDate != null"> + #{createDate}, + </if> + <if test="type != null"> + #{type}, + </if> + <if test="opType != null"> + #{opType}, + </if> + <if test="dictId != null"> + #{dictId}, + </if> + <if test="materialValue != null"> + #{materialValue}, + </if> + <if test="beforeStock != null"> + #{beforeStock}, + </if> + <if test="afterStock != null"> + #{afterStock}, + </if> + <if test="companyId != null"> + #{companyId}, + </if> + <if test="remark != null"> + #{remark}, + </if> + <if test="createUser != null"> + #{createUser}, + </if> + <if test="supplierName != null"> + #{supplierName}, + </if> + </trim> </insert> <select id="selectAllList" parameterType="com.thhy.materials.modules.biz.mixingstationstorage.dto.MinXingPlantDto" resultType="com.thhy.materials.modules.biz.mixingstationstorage.entity.MinXingPlantVo"> - SELECT - DATE_FORMAT(a.create_time, '%Y-%m-%d %H:%i:%S') createDate, - c.supplier_name supplierName, - b.dict_name dictName, - a.change_stock changeStock, - d.real_name username, - '吨' unit - FROM t_minxing_plant a - LEFT JOIN sys_dict b ON b.dict_id = a.dict_id - LEFT JOIN sys_supplier c ON c.id = a.supplier_id - LEFT JOIN sys_users d ON d.user_id = a.create_user - WHERE a.is_use = 1 and company_id = #{companyId} - <if test="dictId != null and dictId != ''"> - AND a.dict_id = #{dictId} - </if> - <if test="supplierId != null and supplierId != ''"> - AND a.supplier_id = #{supplierId} - </if> - <if test="startTime != null and startTime != '' and endTime != null and endTime != ''"> - AND a.create_time BETWEEN #{startTime} AND #{endTime} - </if> - order by a.create_time desc + SELECT + DATE_FORMAT(a.create_date, '%Y-%m-%d %H:%i:%S') createDate, + b.dict_name dictName, + a.material_value changeStock, + d.real_name username, + '吨' unit, + a.supplier_name supplierName + FROM t_material_stock_record a + LEFT JOIN sys_dict b ON b.dict_id = a.material_name + LEFT JOIN sys_users d ON d.user_id = a.create_user + where + a.op_type =1 and a.company_id = #{companyId} + <if test="dictId != null and dictId != ''"> + AND a.material_name = #{dictId} + </if> + <if test="supplierName != null and supplierName != ''"> + AND a.supplier_name regexp #{supplierName} + </if> + <if test="startTime != null and startTime != '' and endTime != null and endTime != ''"> + AND a.create_date BETWEEN #{startTime} AND #{endTime} + </if> + order by a.create_date desc </select> <!-- 库存管理 --> @@ -189,6 +174,9 @@ <if test="createUser != null"> create_user, </if> + <if test="supplierName != null"> + supplier_name, + </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="id != null"> @@ -224,6 +212,9 @@ <if test="createUser != null"> #{createUser}, </if> + <if test="supplierName != null"> + #{supplierName}, + </if> </trim> </insert> <select id="selectInventoryRecordList" parameterType="com.thhy.materials.modules.biz.mixingstationstorage.dto.TMaterialStockRecordDto" resultType="com.thhy.materials.modules.biz.mixingstationstorage.entity.TMaterialStockRecordVo"> diff --git a/hd/pipe/materialsManage/src/main/resources/mapping/SuMaterialWarehouseMapper.xml b/hd/pipe/materialsManage/src/main/resources/mapping/SuMaterialWarehouseMapper.xml index c85c199..93b3eff 100644 --- a/hd/pipe/materialsManage/src/main/resources/mapping/SuMaterialWarehouseMapper.xml +++ b/hd/pipe/materialsManage/src/main/resources/mapping/SuMaterialWarehouseMapper.xml @@ -66,7 +66,7 @@ #{materialName,jdbcType=VARCHAR}, </if> <if test="incomingQuantity != null"> - #{incomingQuantity,jdbcType=INTEGER}, + #{incomingQuantity,jdbcType=DOUBLE}, </if> <if test="status != null"> #{status,jdbcType=INTEGER}, @@ -111,7 +111,7 @@ material_name = #{materialName,jdbcType=VARCHAR}, </if> <if test="incomingQuantity != null"> - incoming_quantity = #{incomingQuantity,jdbcType=INTEGER}, + incoming_quantity = #{incomingQuantity,jdbcType=DOUBLE}, </if> <if test="status != null"> `status` = #{status,jdbcType=INTEGER}, diff --git a/hd/pipe/materialsManage/src/main/resources/mapping/SuSteelCageMaterialLabelMapper.xml b/hd/pipe/materialsManage/src/main/resources/mapping/SuSteelCageMaterialLabelMapper.xml new file mode 100644 index 0000000..61f22a1 --- /dev/null +++ b/hd/pipe/materialsManage/src/main/resources/mapping/SuSteelCageMaterialLabelMapper.xml @@ -0,0 +1,238 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.thhy.materials.modules.biz.suSteelCageMaterialLabel.mapper.SuSteelCageMaterialLabelMapper"> + + + <insert id="insertAndUpdate"> + insert into t_su_steel_cage_material_label + <trim prefix="(" suffix=")" suffixOverrides=","> + <if test="id != null"> + id, + </if> + <if test="region != null"> + region, + </if> + <if test="materialName != null"> + materialName, + </if> + <if test="manufacturer != null"> + manufacturer, + </if> + <if test="specifications != null"> + specifications, + </if> + <if test="heatNumber != null"> + heatNumber, + </if> + <if test="inNumber != null"> + inNumber, + </if> + <if test="reportTime != null"> + reportTime, + </if> + <if test="reportNum != null"> + reportNum, + </if> + <if test="status != null"> + status, + </if> + <if test="companyId != null"> + companyId, + </if> + <if test="isUse != null"> + isUse, + </if> + <if test="createTime != null"> + createTime, + </if> + <if test="createUser != null"> + createUser, + </if> + <if test="updateTime != null"> + updateTime, + </if> + <if test="updateUser != null"> + updateUser, + </if> + <if test="type != null"> + type, + </if> + </trim> + <trim prefix="values (" suffix=")" suffixOverrides=","> + <if test="id != null"> + <if test="id != null"> + #{id,jdbcType=VARCHAR}, + </if> + <if test="region != null"> + #{region,jdbcType=VARCHAR}, + </if> + <if test="materialName != null"> + #{materialName,jdbcType=VARCHAR}, + </if> + <if test="manufacturer != null"> + #{manufacturer,jdbcType=VARCHAR}, + </if> + <if test="specifications != null"> + #{specifications,jdbcType=VARCHAR}, + </if> + <if test="heatNumber != null"> + #{heatNumber,jdbcType=VARCHAR}, + </if> + <if test="inNumber != null"> + #{inNumber,jdbcType=VARCHAR}, + </if> + <if test="reportTime != null"> + #{reportTime,jdbcType=VARCHAR}, + </if> + <if test="reportNum != null"> + #{reportNum,jdbcType=VARCHAR}, + </if> + <if test="status != null"> + #{status,jdbcType=INTEGER}, + </if> + <if test="companyId != null"> + #{companyId,jdbcType=VARCHAR}, + </if> + <if test="isUse != null"> + #{isUse,jdbcType=INTEGER}, + </if> + <if test="createTime != null"> + #{createTime,jdbcType=TIMESTAMP}, + </if> + <if test="createUser != null"> + #{createUser,jdbcType=VARCHAR}, + </if> + <if test="updateTime != null"> + #{updateTime,jdbcType=TIMESTAMP}, + </if> + <if test="updateUser != null"> + #{updateUser,jdbcType=VARCHAR}, + </if> + <if test="type != null"> + #{type,jdbcType=INTEGER}, + </if> + </if> + + </trim> + on duplicate key update + <trim suffixOverrides=","> + <if test="region != null"> + region = #{region,jdbcType=VARCHAR}, + </if> + <if test="materialName != null"> + materialName = #{materialName,jdbcType=VARCHAR}, + </if> + <if test="manufacturer != null"> + manufacturer = #{manufacturer,jdbcType=VARCHAR}, + </if> + <if test="specifications != null"> + specifications = #{specifications,jdbcType=VARCHAR}, + </if> + <if test="heatNumber != null"> + heatNumber = #{heatNumber,jdbcType=VARCHAR}, + </if> + <if test="inNumber != null"> + inNumber = #{inNumber,jdbcType=VARCHAR}, + </if> + <if test="reportTime != null"> + reportTime = #{reportTime,jdbcType=VARCHAR}, + </if> + <if test="reportNum != null"> + reportNum = #{reportNum,jdbcType=VARCHAR}, + </if> + <if test="status != null"> + status = #{status,jdbcType=INTEGER}, + </if> + <if test="companyId != null"> + companyId = #{companyId,jdbcType=VARCHAR}, + </if> + <if test="isUse != null"> + isUse = #{isUse,jdbcType=INTEGER}, + </if> + <if test="createTime != null"> + createTime = #{createTime,jdbcType=TIMESTAMP}, + </if> + <if test="createUser != null"> + createUser = #{createUser,jdbcType=VARCHAR}, + </if> + <if test="updateTime != null"> + updateTime = #{updateTime,jdbcType=TIMESTAMP}, + </if> + <if test="updateUser != null"> + updateUser = #{updateUser,jdbcType=VARCHAR}, + </if> + <if test="type != null"> + type = #{type,jdbcType=INTEGER}, + </if> + </trim> + </insert> + + <delete id="delete"> + update t_su_steel_cage_material_label set isUse = 0 where id = #{id,jdbcType=VARCHAR} + </delete> + + <select id="selectPageList" resultType="com.thhy.materials.modules.biz.suSteelCageMaterialLabel.entity.SuSteelCageMaterialLabelEntity"> + SELECT + t.id, + t.region, + t.materialName, + t.manufacturer, + t.specifications, + t.heatNumber, + t.inNumber, + t.reportTime, + t.reportNum, + t.status, + t.companyId, + t.isUse, + t.createTime, + t.createUser, + t.updateTime, + t.updateUser, + t.type + FROM `t_su_steel_cage_material_label` t + where t.isUse = 1 and t.companyId = #{companyId} + <if test="region != null and region !=''"> + and t.region = #{region} + </if> + <if test="type != null and type != ''"> + and t.type = #{type} + </if> + <if test="startTime != null and endTime != null"> + and t.createTime between #{startTime} and #{endTime} + </if> + order by t.createTime desc + </select> + + <select id="selectInfo" resultType="com.thhy.materials.modules.biz.suSteelCageMaterialLabel.entity.SuSteelCageMaterialLabelEntity"> + SELECT + t.id, + t.region, + t.materialName, + t.manufacturer, + t.specifications, + t.heatNumber, + t.inNumber, + t.reportTime, + t.reportNum, + t.status, + t.companyId, + t.isUse, + t.createTime, + t.createUser, + t.updateTime, + t.updateUser, + t.type + FROM `t_su_steel_cage_material_label` t + where t.isUse = 1 + <if test="id != null and id !=''"> + and t.id = #{id} + </if> + <if test="region != null and region !=''"> + and t.region = #{region} + </if> + order by t.createTime desc + + </select> + +</mapper> \ No newline at end of file diff --git a/hd/pipe/materialsManage/src/main/resources/mapping/TMaterialReleaseMapper.xml b/hd/pipe/materialsManage/src/main/resources/mapping/TMaterialReleaseMapper.xml index 1c3c6d1..179b10e 100644 --- a/hd/pipe/materialsManage/src/main/resources/mapping/TMaterialReleaseMapper.xml +++ b/hd/pipe/materialsManage/src/main/resources/mapping/TMaterialReleaseMapper.xml @@ -147,10 +147,16 @@ where material_release_id=#{materialReleaseId} </update> <select id="pieceList" resultType="com.thhy.materials.modules.biz.concret.entity.dto.PieceDto"> - select by_id as byId from t_piece + select by_id as byId, + BldTim as bldTim, + types as types + from t_piece where 1=1 <if test="byId!=null and byId!='' "> and by_id=#{byId} + </if> + <if test="types!=null and types!=''"> + and types=#{types} </if> ORDER BY by_id desc </select> @@ -161,7 +167,7 @@ PlanAmnt as planamnt, FactAmnt as factamnt from t_raw_material - where Piece=#{byId} + where Piece=#{byId} and types=#{types} </select> <insert id="mixingInsert" > insert into t_mixing @@ -205,6 +211,9 @@ <if test="inspectDate != null"> inspect_date, </if> + <if test="types != null"> + types, + </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="mixingId != null"> @@ -246,6 +255,9 @@ <if test="inspectDate != null"> #{inspectDate,jdbcType=VARCHAR}, </if> + <if test="types != null"> + #{types}, + </if> </trim> </insert> <select id="mixingList" resultType="com.thhy.materials.modules.biz.concret.entity.TMixing"> @@ -279,9 +291,10 @@ report_number as reportNumber, stata as stata, silo_id as siloId, - percentage as percentage + percentage as percentage, + inspect_date as inspectDate from t_mixing where silo_id=#{siloId} - order by in_date desc limit 0,1 + and types=1 </select> <select id="siloList" resultType="com.thhy.materials.modules.biz.concret.entity.TSilo"> select @@ -321,12 +334,10 @@ </if> </trim> </insert> - <insert id="mixingConsumeInTwo" parameterType="com.thhy.materials.modules.biz.concret.entity.TMixingConsume"> + <insert id="mixingConsumeInTwo" > insert into t_mixing_consume <trim prefix="(" suffix=")" suffixOverrides=","> - <if test="mixingConsumeId != null"> mixing_consume_id, - </if> <if test="dictId != null"> dict_id, </if> @@ -357,11 +368,15 @@ <if test="star != null"> star, </if> + <if test="constructionUnit != null"> + construction_unit, + </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> - <if test="mixingConsumeId != null"> - #{mixingConsumeId,jdbcType=VARCHAR}, - </if> +<!-- <if test="mixingConsumeId != null">--> +<!-- #{mixingConsumeId,jdbcType=VARCHAR},--> +<!-- </if>--> + REPLACE(UUID(),'-',''), <if test="dictId != null"> #{dictId,jdbcType=VARCHAR}, </if> @@ -392,6 +407,9 @@ <if test="star != null"> #{star}, </if> + <if test="constructionUnit != null"> + #{constructionUnit}, + </if> </trim> </insert> <select id="starInt" resultType="java.lang.Integer"> @@ -413,12 +431,16 @@ <if test="signboardName!=null and signboardName!='' "> and tms.signboard_name like concat('%',#{signboardName},'%') </if> + <if test="mixingSignboardId !=null and mixingSignboardId !='' "> + and tms.mixing_signboard_id=#{mixingSignboardId} + </if> </select> <select id="mixingConsumes" resultType="com.thhy.materials.modules.biz.concret.entity.TMixingConsume"> select mc.mixing_consume_id as mixingConsumeId, - sd.dict_name as dictName, + -- sd.dict_name as dictName, + mc.dict_id as dictId, mc.spec as spec, mc.manufacturer as manufacturer, mc.wat_full as watFull, @@ -427,10 +449,150 @@ mc.save_stamp as saveStamp, mc.construction as construction, mc.mixing_signboard_id as mixingSignboardId, - mc.star as star + mc.star as star, + mc.create_time as createTime, + mc.construction_unit as constructionUnit from t_mixing_consume mc - left join sys_dict sd on mc.dict_id=sd.dict_id + -- left join sys_dict sd on mc.dict_id=sd.dict_id where mc.mixing_signboard_id=#{mixingSignboardId} and mc.star=#{star} +<!-- <if test="strTime!=null and strTime!='' and endTime !=null and endTime!=''">--> +<!-- and mc.create_time between #{strTime} and #{endTime}--> +<!-- </if>--> </select> - + <select id="mixingConsumePull" resultType="com.thhy.materials.modules.biz.concret.entity.TMixingSignboard"> + select + tms.mixing_signboard_id as mixingSignboardId, + tms.signboard_name as signboardName, + sp.pro_name as proName, + sp.construction_unit as constructionUnit + from t_mixing_signboard tms left join sys_project sp + on tms.pro_id=sp.pro_id + </select> + <select id="siloPull" resultType="com.thhy.materials.modules.biz.concret.entity.TSilo"> + select silo_id as siloId, +silo_name as siloName, +types + from t_silo + </select> + <update id="mixingUpdateType" parameterType="java.lang.String"> + update t_mixing set types=2 where silo_id=#{siloId} + </update> + <select id="siloMixingList" resultType="com.thhy.materials.modules.biz.concret.entity.TMixing"> + SELECT + tm.mixing_id as mixingId, + tm.material as material, + tm.spec as spec, + tm.producer as producer, + tm.stove as stove, + tm.in_num as inNum, + tm.in_date as inDate, + tm.inspect_state as inspectState, + tm.report_number as reportNumber, + tm.stata as stata, + tm.silo_id as siloId, + tm.percentage as percentage, + tm.inspect_date as inspectDate, + ts.silo_name as siloName, + ts.types as types +FROM + t_silo ts + LEFT JOIN t_mixing tm ON ts.silo_id=tm.silo_id + where tm.types=1 + <if test="types!=null and types!='' "> + and ts.types=#{types} + </if> + <if test="stata!=null and stata!='' "> + and tm.stata=#{stata} + </if> + <if test="strTime!=null and strTime!=null and endTime!=null and endTime!='' "> + and tm.in_date between #{strTime} and #{endTime} + </if> + </select> + <update id="mixingUpdate" > + update t_mixing + <set> + <if test="material != null"> + material = #{material,jdbcType=VARCHAR}, + </if> + <if test="spec != null"> + spec = #{spec,jdbcType=VARCHAR}, + </if> + <if test="producer != null"> + producer = #{producer,jdbcType=VARCHAR}, + </if> + <if test="stove != null"> + stove = #{stove,jdbcType=VARCHAR}, + </if> + <if test="inNum != null"> + in_num = #{inNum,jdbcType=VARCHAR}, + </if> + <if test="inDate != null"> + in_date = #{inDate,jdbcType=VARCHAR}, + </if> + <if test="inspectState != null"> + inspect_state = #{inspectState,jdbcType=INTEGER}, + </if> + <if test="reportNumber != null"> + report_number = #{reportNumber,jdbcType=VARCHAR}, + </if> + <if test="stata != null"> + stata = #{stata}, + </if> + <if test="siloId != null"> + silo_id = #{siloId}, + </if> + <if test="percentage != null"> + percentage = #{percentage}, + </if> + <if test="inspectDate != null"> + inspect_date = #{inspectDate}, + </if> + </set> + where mixing_id = #{mixingId,jdbcType=VARCHAR} + </update> + <delete id="mixingDel" parameterType="java.lang.String"> + delete from t_mixing where mixing_id=#{mixingId} + </delete> + <update id="mixingConsumeUpTwo" > + update t_mixing_consume + <set> + <if test="dictId != null"> + dict_id = #{dictId,jdbcType=VARCHAR}, + </if> + <if test="spec != null"> + spec = #{spec,jdbcType=VARCHAR}, + </if> + <if test="manufacturer != null"> + manufacturer = #{manufacturer,jdbcType=VARCHAR}, + </if> + <if test="watFull != null"> + wat_full = #{watFull,jdbcType=VARCHAR}, + </if> + <if test="planAmnt != null"> + plan_amnt = #{planAmnt,jdbcType=VARCHAR}, + </if> + <if test="factAmnt != null"> + fact_amnt = #{factAmnt,jdbcType=VARCHAR}, + </if> + <if test="saveStamp != null"> + save_stamp = #{saveStamp,jdbcType=VARCHAR}, + </if> + <if test="construction != null"> + construction = #{construction,jdbcType=VARCHAR}, + </if> + <if test="mixingSignboardId != null"> + mixing_signboard_id = #{mixingSignboardId,jdbcType=VARCHAR}, + </if> + <if test="star != null"> + star = #{star}, + </if> + </set> + where mixing_consume_id = #{mixingConsumeId,jdbcType=VARCHAR} + </update> + <delete id="mixingConsumeDel" > + delete from t_mixing_consume where mixing_consume_id=#{mixingConsumeId} and star=#{star} + </delete> + <delete id="mixingConsumeDelSign" > + delete from t_mixing_consume where mixing_signboard_id=#{mixingSignboardId} and star=#{star} + </delete> </mapper> \ No newline at end of file diff --git a/hd/pipe/materialsManage/src/main/resources/mapping/TSteelProduceMapper.xml b/hd/pipe/materialsManage/src/main/resources/mapping/TSteelProduceMapper.xml index aeef5b4..8ed1052 100644 --- a/hd/pipe/materialsManage/src/main/resources/mapping/TSteelProduceMapper.xml +++ b/hd/pipe/materialsManage/src/main/resources/mapping/TSteelProduceMapper.xml @@ -88,9 +88,13 @@ <if test="isModel!=null and isModel!='' "> and tsp.is_model=#{isModel} </if> - <if test="isModel!=null and isModel!='' "> + <if test="sizeId!=null and sizeId!='' "> and tsp.size_id=#{sizeId} </if> + <if test="platUserName!=null and platUserName!='' "> + and spu.real_name regexp #{platUserName} + </if> + order by tsp.produce_number desc </select> <select id="steelProduceInfo" parameterType="java.lang.String" resultType="com.thhy.materials.modules.biz.rebarprint.entity.dto.ProduceDto"> diff --git a/hd/pipe/materialsManage/src/main/resources/mapping/WeighMapper.xml b/hd/pipe/materialsManage/src/main/resources/mapping/WeighMapper.xml index 55cbeb7..382fe5d 100644 --- a/hd/pipe/materialsManage/src/main/resources/mapping/WeighMapper.xml +++ b/hd/pipe/materialsManage/src/main/resources/mapping/WeighMapper.xml @@ -711,4 +711,403 @@ types=2 where weighbridge_id=#{weighbridgeId} </update> + + <select id="materialStockInventory" resultType="com.thhy.materials.modules.biz.weigh.entity.dto.MaterialStockRecordDto"> + SELECT + s.dict_name AS materialName, + t.material_value AS materialValue +FROM + t_material_stock t + LEFT JOIN sys_dict s ON t.material_name = s.dict_id + </select> + <select id="steelInventory" resultType="com.thhy.materials.modules.biz.weigh.entity.dto.SteelDto"> + select + steel_name as steelName, + steel_model as steelModel, + stock as stock + from sys_steel + </select> + <select id="assistGoodInventory" resultType="com.thhy.materials.modules.biz.weigh.entity.dto.AssistGoodDto"> + select s.assist_name as assistName, + d.dict_name as assistType, + s.stock as stock + from sys_assist_good s left join sys_dict d on s.assist_type=d.dict_id + </select> + <select id="mouldInventory" resultType="com.thhy.materials.modules.biz.weigh.entity.dto.MouldDto"> + select + mould_num as mouldNum, + free as free, + current_cycle_time as currentCycleTime + from sys_mould + </select> + <select id="steelType" resultType="com.thhy.materials.modules.biz.concret.entity.SysSteel"> + select + steel_id as steelId, + steel_name as steelName, + steel_model as steelModel, + stock as stock + from + sys_steel + </select> + <insert id="steelRecordIn" > + insert into sys_steel_record + <trim prefix="(" suffix=")" suffixOverrides=","> + <if test="id != null"> + id, + </if> + <if test="steelId != null"> + steel_id, + </if> + <if test="stockType != null"> + stock_type, + </if> + <if test="createTime != null"> + create_time, + </if> + <if test="changeStock != null"> + change_stock, + </if> + <if test="supplierId != null"> + supplier_id, + </if> + <if test="factoryName != null"> + factory_name, + </if> + <if test="brand != null"> + brand, + </if> + <if test="lineCode != null"> + line_code, + </if> + <if test="proId != null"> + pro_id, + </if> + <if test="createUser != null"> + create_user, + </if> + <if test="companyId != null"> + company_id, + </if> + <if test="carName != null"> + car_name, + </if> + </trim> + <trim prefix="values (" suffix=")" suffixOverrides=","> + <if test="id != null"> + #{id,jdbcType=VARCHAR}, + </if> + <if test="steelId != null"> + #{steelId,jdbcType=VARCHAR}, + </if> + <if test="stockType != null"> + #{stockType,jdbcType=INTEGER}, + </if> + <if test="createTime != null"> + #{createTime,jdbcType=TIMESTAMP}, + </if> + <if test="changeStock != null"> + #{changeStock,jdbcType=DOUBLE}, + </if> + <if test="supplierId != null"> + #{supplierId,jdbcType=VARCHAR}, + </if> + <if test="factoryName != null"> + #{factoryName,jdbcType=VARCHAR}, + </if> + <if test="brand != null"> + #{brand,jdbcType=VARCHAR}, + </if> + <if test="lineCode != null"> + #{lineCode,jdbcType=VARCHAR}, + </if> + <if test="proId != null"> + #{proId,jdbcType=VARCHAR}, + </if> + <if test="createUser != null"> + #{createUser,jdbcType=VARCHAR}, + </if> + <if test="companyId != null"> + #{companyId,jdbcType=VARCHAR}, + </if> + <if test="carName != null"> + #{carName,jdbcType=VARCHAR}, + </if> + </trim> + </insert> + <update id="steelUp" > + update sys_steel set + stock=#{doubleValue} + where steel_id=#{steelId} + </update> + + <select id="materialWarehouseRecordList" resultType="com.thhy.materials.modules.biz.weigh.entity.TSuMaterialWarehouseRecord"> + select + id, + table_num as tableNum, + name_of_origin as nameOfOrigin, + material_name as materialName, + incoming_quantity as incomingQuantity, + in_time as inTime, + status as status, + inspection_date as inspectionDate, + report_number as reportNumber, + create_time as createTime, + `type` + from t_su_material_warehouse_record + where 1=1 + <if test="tableNum!=null and tableNum!='' "> + and table_num=#{tableNum} + </if> + <if test="type!=null and type!='' "> + and `type`=#{type} + </if> + <if test="strTime!=null and strTime!='' and endTime!=null and endTime!='' "> + and create_time between #{strTime} and #{endTime} + </if> + order by create_time desc + </select> + <insert id="materialWarehouseRecordInsert" > + insert into t_su_material_warehouse_record + <trim prefix="(" suffix=")" suffixOverrides=","> + <if test="id != null"> + id, + </if> + <if test="tableNum != null"> + table_num, + </if> + <if test="nameOfOrigin != null"> + name_of_origin, + </if> + <if test="materialName != null"> + material_name, + </if> + <if test="incomingQuantity != null"> + incoming_quantity, + </if> + <if test="inTime != null"> + in_time, + </if> + <if test="status != null"> + status, + </if> + <if test="inspectionDate != null"> + inspection_date, + </if> + <if test="reportNumber != null"> + report_number, + </if> + <if test="createTime != null"> + create_time, + </if> + <if test="createUser != null"> + create_user, + </if> + <if test="updateTime != null"> + update_time, + </if> + <if test="updateUser != null"> + update_user, + </if> + <if test="isUse != null"> + is_use, + </if> + <if test="companyId != null"> + company_id, + </if> + <if test="type != null"> + type, + </if> + </trim> + <trim prefix="values (" suffix=")" suffixOverrides=","> + <if test="id != null"> + #{id,jdbcType=VARCHAR}, + </if> + <if test="tableNum != null"> + #{tableNum,jdbcType=INTEGER}, + </if> + <if test="nameOfOrigin != null"> + #{nameOfOrigin,jdbcType=VARCHAR}, + </if> + <if test="materialName != null"> + #{materialName,jdbcType=VARCHAR}, + </if> + <if test="incomingQuantity != null"> + #{incomingQuantity,jdbcType=DOUBLE}, + </if> + <if test="inTime != null"> + #{inTime,jdbcType=TIMESTAMP}, + </if> + <if test="status != null"> + #{status,jdbcType=INTEGER}, + </if> + <if test="inspectionDate != null"> + #{inspectionDate,jdbcType=TIMESTAMP}, + </if> + <if test="reportNumber != null"> + #{reportNumber,jdbcType=VARCHAR}, + </if> + <if test="createTime != null"> + #{createTime,jdbcType=TIMESTAMP}, + </if> + <if test="createUser != null"> + #{createUser,jdbcType=VARCHAR}, + </if> + <if test="updateTime != null"> + #{updateTime,jdbcType=TIMESTAMP}, + </if> + <if test="updateUser != null"> + #{updateUser,jdbcType=VARCHAR}, + </if> + <if test="isUse != null"> + #{isUse,jdbcType=INTEGER}, + </if> + <if test="companyId != null"> + #{companyId,jdbcType=VARCHAR}, + </if> + <if test="type != null"> + #{type,jdbcType=INTEGER}, + </if> + </trim> + </insert> + <update id="materialWarehouseRecordUpdate" > + update t_su_material_warehouse_record + <set> + <if test="tableNum != null"> + table_num = #{tableNum,jdbcType=INTEGER}, + </if> + <if test="nameOfOrigin != null"> + name_of_origin = #{nameOfOrigin,jdbcType=VARCHAR}, + </if> + <if test="materialName != null"> + material_name = #{materialName,jdbcType=VARCHAR}, + </if> + <if test="incomingQuantity != null"> + incoming_quantity = #{incomingQuantity,jdbcType=DOUBLE}, + </if> + <if test="inTime != null"> + in_time = #{inTime,jdbcType=TIMESTAMP}, + </if> + <if test="status != null"> + status = #{status,jdbcType=INTEGER}, + </if> + <if test="inspectionDate != null"> + inspection_date = #{inspectionDate,jdbcType=TIMESTAMP}, + </if> + <if test="reportNumber != null"> + report_number = #{reportNumber,jdbcType=VARCHAR}, + </if> + <if test="createTime != null"> + create_time = #{createTime,jdbcType=TIMESTAMP}, + </if> + <if test="createUser != null"> + create_user = #{createUser,jdbcType=VARCHAR}, + </if> + <if test="updateTime != null"> + update_time = #{updateTime,jdbcType=TIMESTAMP}, + </if> + <if test="updateUser != null"> + update_user = #{updateUser,jdbcType=VARCHAR}, + </if> + <if test="isUse != null"> + is_use = #{isUse,jdbcType=INTEGER}, + </if> + <if test="companyId != null"> + company_id = #{companyId,jdbcType=VARCHAR}, + </if> + <if test="type != null"> + type = #{type,jdbcType=INTEGER}, + </if> + </set> + where id = #{id,jdbcType=VARCHAR} + </update> + <delete id="materialWarehouseRecordDel" parameterType="java.lang.String"> + delete from t_su_material_warehouse_record where id=#{id} + </delete> + <select id="headThingJsDateValue" resultType="com.thhy.materials.modules.biz.helmet.entity.TDataValue"> + SELECT + DATE_FORMAT( upload_time, "%Y-%m-%d %H:00:00" ) AS uploadTime, + TRUNCATE(SUM(pm10)/count(pm10),0) as pm10, + TRUNCATE(SUM(pm25)/count(pm25),0) as pm25, + TRUNCATE(SUM(tsp)/count(tsp),0) as tsp, + TRUNCATE(SUM(temperature)/count(temperature),1) as temperature, + TRUNCATE(SUM(humidity)/count(humidity),1) as humidity, + TRUNCATE(SUM(wind_speed)/count(wind_speed),1) as windSpeed +FROM + t_data_value +WHERE + year(upload_time)=year(NOW()) AND MONTH(upload_time)=MONTH(NOW()) and DAY(upload_time)=DAY(NOW()) +-- upload_time BETWEEN "2023-11-08 00:00:00" and "2023-11-08 23:59:59" +GROUP BY + DATE_FORMAT( upload_time, "%Y-%m-%d %H:00:00" ); + </select> + <select id="headThingJsDateSmock" resultType="com.thhy.materials.modules.biz.helmet.entity.TDataSmock"> + select + smoke_id as smokeId, + `time` as `time`, + I00 as i00, + I01 as i01, + I02 as i02, + I03 as i03, + I04 as i04, + I05 as i05, + I06 as i06, + I07 as i07, + I10 as i10, + I11 as i11, + Q00 as q00, + Q01 as q01, + Q02 as q02, + Q03 as q03, + Q04 as q04, + Q05 as q05, + VB0 as vb0, + VB10 as vb10, + VB11 as vb11, + VB12 as vb12 + from t_data_smock + order by `time` desc + limit 0,1 + </select> + <select id="headThingJsDateValueByOne" resultType="com.thhy.materials.modules.biz.helmet.entity.TDataValue"> + select + data_id as dataId, + device_id as deviceId, + device_name as deviceName, + account_number as accountNumber, + upload_time as uploadTime, + pm25 as pm25, + pm10 as pm10, + tsp as tsp, + temperature as temperature, + humidity as humidity, + data6 as data6, + wind_speed as windSpeed, + wind_direction as windDirection, + tvoc as tvoc, + no2 as no2, + co as co, + so2 as so2, + o3 as o3, + noise as noise + from t_data_value + order by upload_time desc + limit 0,1 + </select> + <select id="headThingJsDateValueMonth" resultType="com.thhy.materials.modules.biz.helmet.entity.TDataValue"> + SELECT + DATE_FORMAT( upload_time, "%Y-%m-%d" ) AS uploadTime, + TRUNCATE(SUM(pm10)/count(pm10),0) as pm10, + TRUNCATE(SUM(pm25)/count(pm25),0) as pm25, + TRUNCATE(SUM(tsp)/count(tsp),0) as tsp, + TRUNCATE(SUM(temperature)/count(temperature),1) as temperature, + TRUNCATE(SUM(humidity)/count(humidity),1) as humidity, + TRUNCATE(SUM(wind_speed)/count(wind_speed),1) as windSpeed +FROM + t_data_value +WHERE + year(upload_time)=year(NOW()) AND MONTH(upload_time)=MONTH(NOW()) + -- upload_time BETWEEN "2023-11-01 00:00:00" and "2023-11-30 23:59:59" +GROUP BY + DATE_FORMAT( upload_time, "%Y-%m-%d" ); + </select> </mapper> \ No newline at end of file diff --git a/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/mouldcheck/controller/ModCheckController.java b/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/mouldcheck/controller/ModCheckController.java index 3f7833c..2f65eb3 100644 --- a/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/mouldcheck/controller/ModCheckController.java +++ b/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/mouldcheck/controller/ModCheckController.java @@ -34,6 +34,12 @@ return BasicResult.success(); } + @RequestMapping("allNumType") + public BasicResult allNumType(){ + List<Integer> list = modCheckService.allNumType(); + return BasicResult.success(list); + } + @RequestMapping("addPipe") public BasicResult addPipe(@RequestBody ModCheckDto modCheckDto){ modCheckService.addPipe(modCheckDto); diff --git a/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/mouldcheck/entity/ModCheckDto.java b/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/mouldcheck/entity/ModCheckDto.java index 38b6f63..6eec115 100644 --- a/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/mouldcheck/entity/ModCheckDto.java +++ b/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/mouldcheck/entity/ModCheckDto.java @@ -24,4 +24,6 @@ private String proId; private String ringNum; + + private Integer numType; } diff --git a/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/mouldcheck/entity/RingCompleteCheck.java b/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/mouldcheck/entity/RingCompleteCheck.java index c4c2047..86b9909 100644 --- a/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/mouldcheck/entity/RingCompleteCheck.java +++ b/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/mouldcheck/entity/RingCompleteCheck.java @@ -13,4 +13,9 @@ private Integer isExist; + + private String pipeModNum; + + private String allModNum; + } diff --git a/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/mouldcheck/service/ModCheckService.java b/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/mouldcheck/service/ModCheckService.java index 4761faf..a86cd4b 100644 --- a/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/mouldcheck/service/ModCheckService.java +++ b/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/mouldcheck/service/ModCheckService.java @@ -20,4 +20,6 @@ void delete(ModCheckDto modCheckDto); Map<String,Object> getH5MouldInfo(String mouldId); + + List<Integer> allNumType(); } diff --git a/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/mouldcheck/service/impl/ModCheckServiceImpl.java b/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/mouldcheck/service/impl/ModCheckServiceImpl.java index ce9a32b..7ce7f75 100644 --- a/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/mouldcheck/service/impl/ModCheckServiceImpl.java +++ b/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/mouldcheck/service/impl/ModCheckServiceImpl.java @@ -17,6 +17,7 @@ import com.thhy.mobile.modules.biz.pipeinfo.entity.MaterialInfo; import com.thhy.mobile.modules.biz.pipeinfo.entity.PipeInfo; import com.thhy.mobile.modules.biz.pipeinfo.mapper.PipeInfoMapper; +import com.thhy.mobile.modules.biz.steelcheck.entity.SteelStockRecord; import com.thhy.mobile.modules.biz.steelproduce.entity.ProduceDto; import com.thhy.mobile.modules.biz.steelproduce.entity.SteelProduce; import com.thhy.mobile.modules.biz.steelproduce.mapper.SteelProduceMapper; @@ -141,6 +142,10 @@ if(compareResult){//匹配成功 //更改钢筋笼产品入模状态 steelProduceMapper.updateisModel(new ProduceDto(1,modCheckDto.getProduceNumber())); + //钢筋笼库存记录 + SteelStockRecord steelStockRecord = new SteelStockRecord(steelProduce,true); + steelStockRecord.setModCheckId(mouldCheck.getModCheckId()); + steelStockMapper.insertSteelStockRecord(steelStockRecord); //减掉钢筋笼库存 steelStockMapper.updateMinusStock(new SteelStock(steelProduce)); //更新模具循环次数 @@ -154,7 +159,7 @@ pipeInfo.setOutMod(PipeOutModType.IN.getValue()); //入模 pipeInfo.setPipeNum(UUIDUtils.createPipeNum(proNumber,countPipeInPro)); //pipeInfo.setRingNum(); - RingCompleteCheck completeCheck = pipeInfoMapper.queryRingComplete(pipeInfo); + RingCompleteCheck completeCheck = pipeInfoMapper.queryRingCompleteByMod(mould.getMouldNum(),pipeInfo.getProId()); if(completeCheck==null){ int maxRingNum = pipeInfoMapper.queryMaxRingNum(userInfo.getCompanyId()); pipeInfo.setRingNum(UUIDUtils.createRingNum(maxRingNum)); @@ -199,7 +204,7 @@ String proId = modCheckDto.getProId(); try { - if(ringNum.length()>5){ + if(ringNum.length()>4){ throw new BasicException(BasicStatus.RING_NOT_DIS); } Integer.parseInt(ringNum); @@ -207,14 +212,14 @@ throw new BasicException(BasicStatus.RING_NOT_DIS); } - String newRingNum = UUIDUtils.addZeroNoPlus(Integer.parseInt(ringNum),5); + String newRingNum = UUIDUtils.addZeroNoPlus(Integer.parseInt(ringNum),4); int count = pipeInfoMapper.countByRingNum(newRingNum); if(count>0){ throw new BasicException(BasicStatus.RING_NUM_IS_REPEAT); } - List<Mould> mouldList = pipeInfoMapper.queryMouldTypeByPro(proId); + List<Mould> mouldList = pipeInfoMapper.queryMouldByNumType(proId,modCheckDto.getNumType()); /*mouldList.forEach(ml->{ ml = mouldMapper.queryById(ml.getMouldId()); });*/ @@ -233,7 +238,7 @@ steelProduce.setReinforcementId("02d336f47ea0eff7ec70c64f"); //配筋写死值 for(Mould m : mouldList){ - m = mouldMapper.queryById(m.getMouldId()); + //m = mouldMapper.queryById(m.getMouldId()); String proNumber = steelProduceMapper.queryProNumByProject(proId); int maxSteelNum = pipeInfoMapper.queryMaxNumBySteelProduce(); steelProduce.setProduceNumber(UUIDUtils.createSteelNum(proNumber,maxSteelNum)); @@ -291,6 +296,8 @@ }*/ } + + @Override public List<MouldCheckListVo> findModCheckList(ModCheckDto modCheckDto) { SysUserInfo userInfo = UserInfoUtils.getInstance().getUserInfo(); @@ -339,4 +346,8 @@ return mouldMapper.getH5MouldInfo(mouldId); } + @Override + public List<Integer> allNumType() { + return pipeInfoMapper.queryAllNumType(); + } } diff --git a/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/controller/PipeScreenController.java b/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/controller/PipeScreenController.java index d00bea6..738edb4 100644 --- a/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/controller/PipeScreenController.java +++ b/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/controller/PipeScreenController.java @@ -3,9 +3,7 @@ import com.thhy.general.common.BasicResult; import com.thhy.general.config.SysUserInfo; import com.thhy.general.utils.UserInfoUtils; -import com.thhy.mobile.modules.biz.pipeinfo.entity.MaterialInfo; -import com.thhy.mobile.modules.biz.pipeinfo.entity.PipeListVo; -import com.thhy.mobile.modules.biz.pipeinfo.entity.ScreenPipeCompare; +import com.thhy.mobile.modules.biz.pipeinfo.entity.*; import com.thhy.mobile.modules.biz.pipeinfo.service.PipeInfoService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; @@ -76,4 +74,15 @@ return BasicResult.success(mapto); } + //thing.js 原料实际消耗数量列表 前10条数据 + @RequestMapping("/materialInfo") + public BasicResult materialInfo(){ + return BasicResult.success(pipeInfoService.materialInfo()); + } + //thing.js 原料消耗总量 + @RequestMapping("/materialNumInfo") + public BasicResult materialNumInfo(){ + List<MaterialThingNumDto> materialInfo = pipeInfoService.materialNumInfo(); + return BasicResult.success(materialInfo); + } } diff --git a/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/entity/MaterialThingDto.java b/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/entity/MaterialThingDto.java new file mode 100644 index 0000000..ceea258 --- /dev/null +++ b/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/entity/MaterialThingDto.java @@ -0,0 +1,32 @@ +package com.thhy.mobile.modules.biz.pipeinfo.entity; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class MaterialThingDto implements Serializable { + //盘次 + private Integer piece; + //河砂 + private String sand; + //小石子 + private String pebbles; + //水泥3 + private String cement3; + //粉煤灰2 + private String flyAsh2; + //水 + private String water; + //大石子 + private String dashizi; + //外剂1 + private String externalAgent1; + //粉煤灰1 + private String flyAsh1; + //水泥4 + private String cement4; + //水泥2 + private String cement2; + +} diff --git a/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/entity/MaterialThingNumDto.java b/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/entity/MaterialThingNumDto.java new file mode 100644 index 0000000..7af299c --- /dev/null +++ b/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/entity/MaterialThingNumDto.java @@ -0,0 +1,13 @@ +package com.thhy.mobile.modules.biz.pipeinfo.entity; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class MaterialThingNumDto implements Serializable { + //原料名称 + private String material; + //数量 + private String counts; +} diff --git a/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/entity/PipeListVo.java b/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/entity/PipeListVo.java index 918c54e..7935835 100644 --- a/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/entity/PipeListVo.java +++ b/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/entity/PipeListVo.java @@ -66,7 +66,7 @@ //入模人员 private String intoModUser; public String getCheckResultStr() { - return checkResult==1?"合格":checkResult==2?"不合格":"报废"; + return checkResult==1?"合格":checkResult==2?"不合格":checkResult==0?"未质检":"报废"; } private ModIdlThing modIdlThing; diff --git a/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/mapper/PipeInfoMapper.java b/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/mapper/PipeInfoMapper.java index ff68acb..4dca6a4 100644 --- a/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/mapper/PipeInfoMapper.java +++ b/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/mapper/PipeInfoMapper.java @@ -63,6 +63,8 @@ RingCompleteCheck queryRingComplete(PipeInfo pipeinfo); + RingCompleteCheck queryRingCompleteByMod(@Param("mouldNum") String mouldNum,@Param("proId") String proId); + int queryMaxRingNum(String companyId); void updateCheckResult(PipeInfo pipeInfo); @@ -150,6 +152,8 @@ List<Mould> queryMouldTypeByPro(String proId); + List<Mould> queryMouldByNumType(@Param("proId")String proId,@Param("numType")Integer numType); + int queryMaxNumBySteelProduce(); int countByRingNum(String ringNum); @@ -169,4 +173,12 @@ void updateOutWaterTime(PipeCultivated pipeCultivated); void updateInRepoTime(RepoRecord repoRecord); + + List<Integer> queryAllNumType(); + + List<MaterialThingDto> materialInfo(); + + List<MaterialThingNumDto> materialNumInfo(); + + List<MaterialThingDto> materialInfoTwo(); } diff --git a/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/service/PipeInfoService.java b/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/service/PipeInfoService.java index 9cc442a..b084723 100644 --- a/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/service/PipeInfoService.java +++ b/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/service/PipeInfoService.java @@ -59,4 +59,8 @@ Map<String,Object> updateDateInfo(PipeInfo pipeInfo); void updatePipeDate(PipeDateDto pipeDateDto); + + Map<String,Object> materialInfo(); + + List<MaterialThingNumDto> materialNumInfo(); } diff --git a/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/service/impl/PipeInfoServiceImpl.java b/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/service/impl/PipeInfoServiceImpl.java index 19d0ea5..2ad0f8b 100644 --- a/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/service/impl/PipeInfoServiceImpl.java +++ b/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/pipeinfo/service/impl/PipeInfoServiceImpl.java @@ -345,4 +345,20 @@ calendar.add(Calendar.MINUTE,amount); return calendar.getTime(); } + @Override + public Map<String, Object> materialInfo() { + List<MaterialThingDto> materialThingDtos1 = pipeInfoMapper.materialInfo(); + List<MaterialThingDto> materialThingDtos2 = pipeInfoMapper.materialInfoTwo(); + HashMap<String, Object> map = new HashMap<>(); + map.put("materialThingDtos1",materialThingDtos1); + map.put("materialThingDtos2",materialThingDtos2); + return map; + } + + @Override + public List<MaterialThingNumDto> materialNumInfo() { + List<MaterialThingNumDto> materialThingNumDtos = pipeInfoMapper.materialNumInfo(); + + return materialThingNumDtos; + } } diff --git a/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/steelcheck/entity/SteelStockRecord.java b/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/steelcheck/entity/SteelStockRecord.java new file mode 100644 index 0000000..1dca7a5 --- /dev/null +++ b/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/steelcheck/entity/SteelStockRecord.java @@ -0,0 +1,82 @@ +package com.thhy.mobile.modules.biz.steelcheck.entity; + +import com.thhy.general.annotations.Idkey; +import com.thhy.mobile.modules.biz.steelproduce.entity.SteelProduce; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +@Data +public class SteelStockRecord implements Serializable { + + @Idkey + private String recordId; + + private String steelRecordId; + + private String modCheckId; + + /** + * 块ID + */ + + + private String blockId; + + + + private Date createTime; + + /** + * 项目ID + */ + + + private String proId; + + /** + * 配筋ID + */ + + + private String reinforcementId; + + /** + * 尺寸 + */ + + + private String sizeId; + + /** + * 库存 + */ + + + private double stock; + + private int type; + + + public SteelStockRecord() { + } + + public SteelStockRecord(SteelProduce steelProduce) { + this.proId = steelProduce.getProId(); + this.sizeId = steelProduce.getSizeId(); + this.reinforcementId = steelProduce.getReinforcementId(); + this.blockId = steelProduce.getBlockNum(); + this.type = 1; + this.stock = 1; + } + + public SteelStockRecord(SteelProduce steelProduce,boolean plus) { + this.proId = steelProduce.getProId(); + this.sizeId = steelProduce.getSizeId(); + this.reinforcementId = steelProduce.getReinforcementId(); + this.blockId = steelProduce.getBlockNum(); + this.type = 2; + this.stock = 1; + } +} diff --git a/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/steelcheck/service/impl/SteelCheckServiceImpl.java b/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/steelcheck/service/impl/SteelCheckServiceImpl.java index 55212f0..3bebac9 100644 --- a/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/steelcheck/service/impl/SteelCheckServiceImpl.java +++ b/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/steelcheck/service/impl/SteelCheckServiceImpl.java @@ -7,10 +7,7 @@ import com.thhy.general.exception.BasicException; import com.thhy.general.utils.DeepCopyUtils; import com.thhy.general.utils.UserInfoUtils; -import com.thhy.mobile.modules.biz.steelcheck.entity.CheckFile; -import com.thhy.mobile.modules.biz.steelcheck.entity.SteelCheckDto; -import com.thhy.mobile.modules.biz.steelcheck.entity.SteelCheckListVo; -import com.thhy.mobile.modules.biz.steelcheck.entity.UpdateCheckResultDto; +import com.thhy.mobile.modules.biz.steelcheck.entity.*; import com.thhy.mobile.modules.biz.steelcheck.service.SteelCheckService; import com.thhy.mobile.modules.biz.steelcheckrecord.entity.SteelCheckRecord; import com.thhy.mobile.modules.biz.steelcheckrecord.mapper.SteelCheckRecordMapper; @@ -72,7 +69,10 @@ steelCheckRecord.setSteelProduceNum(produceNum); steelCheckRecord.setCreateUser(userInfo.getUserId()); recordMapper.insert(steelCheckRecord); - //增加钢筋笼库存 + //增加钢筋笼库存记录 + SteelStockRecord steelStockRecord = new SteelStockRecord(steelProduce); + steelStockRecord.setSteelRecordId(steelCheckRecord.getCheckId()); + steelStockMapper.insertSteelStockRecord(steelStockRecord); int stockRecord = steelStockMapper.countStockByPSRB(new SteelStock(steelProduce)); if(stockRecord>0){ //增加钢筋笼库存 @@ -137,7 +137,10 @@ } //更新住状态 steelProduceMapper.updateQualified(new SteelProduce(updateCheckResultDto.getSteelProduceNum(), steelCheckRecord.getCheckResult(),userInfo.getUserId())); + //合格状态————————>不合格 if (steelCheckRecord.getCheckResult()!=3) { + //减【钢筋笼】库存就记录删除标志 + steelStockMapper.updateSteelStockRecordByCheckId(2,steelCheckRecord.getCheckId()); //减【钢筋笼】库存 steelStockMapper.updateMinusStock(new SteelStock(steelProduce)); //加【钢筋】库存记录 @@ -150,6 +153,8 @@ } //合格状态————————>报废 if(qualified==1&&updateCheckResultDto.getCheckResult()==3){ + //减【钢筋笼】库存就记录删除标志 + steelStockMapper.updateSteelStockRecordByCheckId(2,steelCheckRecord.getCheckId()); //减【钢筋笼】库存 steelStockMapper.updateMinusStock(new SteelStock(steelProduce)); } @@ -192,6 +197,9 @@ //更新住状态 steelProduceMapper.updateQualified(new SteelProduce(updateCheckResultDto.getSteelProduceNum(), 1,userInfo.getUserId())); + //钢筋笼】库存就记录删除标志改为未删除 + steelStockMapper.updateSteelStockRecordByCheckId(1,steelCheckRecord.getCheckId()); + //加【钢筋笼】库存 steelStockMapper.updatePlusStock(new SteelStock(steelProduce)); //钢筋消耗的理论耗量 List<SteelConsume> steelConsumeList = steelStockMapper.queryByPSRB(new SteelStock(steelProduce)); diff --git a/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/steelstock/mapper/SteelStockMapper.java b/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/steelstock/mapper/SteelStockMapper.java index 2ec8a7c..ee21e0d 100644 --- a/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/steelstock/mapper/SteelStockMapper.java +++ b/hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/steelstock/mapper/SteelStockMapper.java @@ -1,8 +1,10 @@ package com.thhy.mobile.modules.biz.steelstock.mapper; +import com.thhy.mobile.modules.biz.steelcheck.entity.SteelStockRecord; import com.thhy.mobile.modules.biz.steelstock.entity.SteelConsume; import com.thhy.mobile.modules.biz.steelstock.entity.SteelStock; import com.thhy.mobile.modules.biz.steelstock.entity.SteelStockListVo; +import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Component; import java.io.Serializable; @@ -46,4 +48,8 @@ void updateMinusSteelStock(SteelConsume steelConsume); void updatePlusSteelStock(SteelConsume steelConsume); + + void insertSteelStockRecord(SteelStockRecord steelStockRecord); + + void updateSteelStockRecordByCheckId(@Param("isUse") int isUse,@Param("checkRecordId") String checkRecordId); } diff --git a/hd/pipe/mobile/src/main/resources/mapping/PipeInfoMapper.xml b/hd/pipe/mobile/src/main/resources/mapping/PipeInfoMapper.xml index 442cde4..93127b1 100644 --- a/hd/pipe/mobile/src/main/resources/mapping/PipeInfoMapper.xml +++ b/hd/pipe/mobile/src/main/resources/mapping/PipeInfoMapper.xml @@ -490,6 +490,25 @@ )c where c.isExist = 0 order by c.ringnum limit 1 </select> + <select id="queryRingCompleteByMod" resultType="com.thhy.mobile.modules.biz.mouldcheck.entity.RingCompleteCheck"> + select a.ringnum,a.pipeModNum,a.allModNum + from + ( + select tpi.ring_num as ringnum,GROUP_CONCAT(sm.mould_num order by sm.mould_num) as pipeModNum, + ( + select GROUP_CONCAT(sm1.mould_num order by sm1.mould_num) + from sys_mould sm1 + where SUBSTRING_INDEX(sm1.mould_num,'-',-1) = SUBSTRING_INDEX(#{mouldNum},'-',-1) and sm1.is_use = 1 and sm1.pro_id = #{proId} + group by sm1.is_use + ) as allModNum + from t_pipe_info tpi + left join sys_mould sm on sm.mould_id = tpi.mod_id + where SUBSTRING_INDEX(sm.mould_num,'-',-1) = SUBSTRING_INDEX(#{mouldNum},'-',-1) and sm.is_use = 1 and tpi.pro_id = #{proId} + GROUP BY tpi.ring_num + ) a + where a.pipeModNum != a.allModNum and a.pipeModNum not LIKE CONCAT('%',#{mouldNum},'%') + </select> + <select id="queryMaxRingNum" resultType="int"> select case when a.maxRingNum is null then 1 else a.maxRingNum end as maxRingNum from @@ -827,6 +846,32 @@ group by m.mould_type </select> + <select id="queryMouldByNumType" resultType="com.thhy.mobile.modules.biz.mouldcheck.entity.Mould"> + select + t.mould_id as mouldId, + t.come_factory_time as comeFactoryTime, + t.create_time as createTime, + t.create_user as createUser, + t.current_cycle_time as currentCycleTime, + t.is_use as isUse, + t.max_cycle_time as maxCycleTime, + t.mould_code as mouldCode, + t.mould_num as mouldNum, + t.mould_size as mouldSize, + t.mould_turn as mouldTurn, + t.mould_type as mouldType, + t.pro_id as proId, + t.product_date as productDate, + t.status as status, + t.supplier_id as supplierId, + t.update_time as updateTime, + t.update_user as updateUser, + t.grouting_holes as groutingHoles, + t.free + from sys_mould t + where t.pro_id = #{proId} and SUBSTRING_INDEX(t.mould_num,'-',-1) = #{numType} + </select> + <select id="queryMaxNumBySteelProduce" resultType="int"> select max(a.number) @@ -922,4 +967,56 @@ <update id="updateInRepoTime"> update t_repo_record set create_time = #{createTime} where record_id =#{recordId} </update> + + + <select id="queryAllNumType" resultType="integer"> + select DISTINCT a.numType from (select SUBSTRING_INDEX(m.mould_num,'-',-1) as numType from sys_mould m) a + </select> + + <select id="materialInfo" resultType="com.thhy.mobile.modules.biz.pipeinfo.entity.MaterialThingDto"> + select + Piece as piece, + MAX(CASE WHEN Material = '河砂' THEN FactAmnt END) AS sand, + MAX(CASE WHEN Material = '小石子' THEN FactAmnt END) AS pebbles, + MAX(CASE WHEN Material = '水泥3' THEN FactAmnt END) AS cement3, + MAX(CASE WHEN Material = '粉煤灰2' THEN FactAmnt END) AS flyAsh2, + MAX(CASE WHEN Material = '大石子' THEN FactAmnt END) AS dashizi, + MAX(CASE WHEN Material = '水' THEN FactAmnt END) AS water, + MAX(CASE WHEN Material = '外剂1' THEN FactAmnt END) AS externalAgent1, + MAX(CASE WHEN Material = '粉煤灰1' THEN FactAmnt END) AS flyAsh1, + MAX(CASE WHEN Material = '水泥4' THEN FactAmnt END) AS cement4, + MAX(CASE WHEN Material = '水泥2' THEN FactAmnt END) AS cement2 + from + t_raw_material where types=1 + GROUP BY Piece + ORDER BY Piece desc limit 0,10 + </select> + + <select id="materialInfoTwo" resultType="com.thhy.mobile.modules.biz.pipeinfo.entity.MaterialThingDto"> + select + Piece as piece, + MAX(CASE WHEN Material = '河砂' THEN FactAmnt END) AS sand, + MAX(CASE WHEN Material = '小石子' THEN FactAmnt END) AS pebbles, + MAX(CASE WHEN Material = '水泥3' THEN FactAmnt END) AS cement3, + MAX(CASE WHEN Material = '粉煤灰2' THEN FactAmnt END) AS flyAsh2, + MAX(CASE WHEN Material = '大石子' THEN FactAmnt END) AS dashizi, + MAX(CASE WHEN Material = '水' THEN FactAmnt END) AS water, + MAX(CASE WHEN Material = '外剂1' THEN FactAmnt END) AS externalAgent1, + MAX(CASE WHEN Material = '粉煤灰1' THEN FactAmnt END) AS flyAsh1, + MAX(CASE WHEN Material = '水泥4' THEN FactAmnt END) AS cement4, + MAX(CASE WHEN Material = '水泥2' THEN FactAmnt END) AS cement2 + from + t_raw_material where types=2 + GROUP BY Piece + ORDER BY Piece desc limit 0,10 + </select> + <select id="materialNumInfo" resultType="com.thhy.mobile.modules.biz.pipeinfo.entity.MaterialThingNumDto"> + SELECT + Material as material, + CAST( SUM( FactAmnt ) AS FLOAT ) AS counts +FROM + t_raw_material +GROUP BY + Material + </select> </mapper> diff --git a/hd/pipe/mobile/src/main/resources/mapping/SteelStockMapper.xml b/hd/pipe/mobile/src/main/resources/mapping/SteelStockMapper.xml index 679d0cb..adf1e93 100644 --- a/hd/pipe/mobile/src/main/resources/mapping/SteelStockMapper.xml +++ b/hd/pipe/mobile/src/main/resources/mapping/SteelStockMapper.xml @@ -239,4 +239,76 @@ update sys_steel set stock = (stock+#{needNum}) where steel_id = #{steelId} </update> + <insert id="insertSteelStockRecord"> + insert into t_steel_stock_record + <trim prefix="(" suffix=")" suffixOverrides=","> + <if test="recordId !=null and recordId !=''"> + record_id, + </if> + <if test="steelRecordId !=null and steelRecordId !=''"> + check_record_id, + </if> + <if test="modCheckId !=null and modCheckId !=''"> + mod_check_id, + </if> + <if test="proId !=null and proId !=''"> + pro_id, + </if> + <if test="sizeId !=null and sizeId !=''"> + size_id, + </if> + <if test="reinforcementId !=null and reinforcementId !=''"> + reinforcement_id, + </if> + <if test="blockId !=null and blockId !=''"> + block_id, + </if> + <if test="stock !=null and stock !=''"> + stock, + </if> + <if test="createTime !=null and createTime !=''"> + create_time, + </if> + <if test="type !=null"> + type, + </if> + </trim> + <trim prefix=" values (" suffix=")" suffixOverrides=","> + <if test="recordId !=null and recordId !=''"> + #{recordId}, + </if> + <if test="steelRecordId !=null and steelRecordId !=''"> + #{steelRecordId}, + </if> + <if test="modCheckId !=null and modCheckId !=''"> + #{modCheckId}, + </if> + <if test="proId !=null and proId !=''"> + #{proId}, + </if> + <if test="sizeId !=null and sizeId !=''"> + #{sizeId}, + </if> + <if test="reinforcementId !=null and reinforcementId !=''"> + #{reinforcementId}, + </if> + <if test="blockId !=null and blockId !=''"> + #{blockId}, + </if> + <if test="stock !=null and stock !=''"> + #{stock}, + </if> + <if test="createTime !=null and createTime !=''"> + #{createTime}, + </if> + <if test="type !=null"> + #{type}, + </if> + </trim> + </insert> + + <update id="updateSteelStockRecordByCheckId"> + update t_steel_stock_record set is_use = #{isUse} where check_record_id = #{checkRecordId} + </update> + </mapper> diff --git a/hd/pipe/screen/src/main/java/com/thhy/screen/config/StartListener.java b/hd/pipe/screen/src/main/java/com/thhy/screen/config/StartListener.java index bea7377..f6840ff 100644 --- a/hd/pipe/screen/src/main/java/com/thhy/screen/config/StartListener.java +++ b/hd/pipe/screen/src/main/java/com/thhy/screen/config/StartListener.java @@ -20,15 +20,19 @@ private BigScreenMapper screenMapper; @Override - public void run(ApplicationArguments args) throws Exception { - String result = AudioUtils.getGroups(); - if(StringUtils.isEmpty(result)){ - return; - } - JSONObject groupJSON = JSON.parseObject(result); - List<AudioGroup> groupList = JSON.parseArray(groupJSON.getString("Groups"),AudioGroup.class); - for(AudioGroup ag : groupList){ - screenMapper.insertAudioGroup(ag); - } + public void run(ApplicationArguments args){ + /*try { + String result = AudioUtils.getGroups(); + if(StringUtils.isEmpty(result)){ + return; + } + JSONObject groupJSON = JSON.parseObject(result); + List<AudioGroup> groupList = JSON.parseArray(groupJSON.getString("Groups"),AudioGroup.class); + for(AudioGroup ag : groupList){ + screenMapper.insertAudioGroup(ag); + } + } catch (Exception e) { + throw new RuntimeException(e); + }*/ } } diff --git a/hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/controller/AudioController.java b/hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/controller/AudioController.java index 86bbbf0..8bd5c5c 100644 --- a/hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/controller/AudioController.java +++ b/hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/controller/AudioController.java @@ -3,6 +3,7 @@ import com.thhy.general.common.BasicResult; import com.thhy.screen.modules.biz.audio.entity.AudioDto; import com.thhy.screen.modules.biz.audio.entity.AudioGroup; +import com.thhy.screen.modules.biz.audio.entity.GroupInfoVo; import com.thhy.screen.modules.biz.audio.service.AudioService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestBody; @@ -29,4 +30,16 @@ audioService.playMusic(AudioDto); return BasicResult.success(); } + + @RequestMapping("addFile") + public BasicResult addFile(@RequestBody AudioDto audioDto){ + audioService.addFile(audioDto); + return BasicResult.success(); + } + + @RequestMapping("groupInfo") + public BasicResult groupInfo(@RequestBody AudioDto audioDto){ + GroupInfoVo infoVo = audioService.groupInfo(audioDto); + return BasicResult.success(infoVo); + } } diff --git a/hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/entity/AudioDto.java b/hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/entity/AudioDto.java index 2209ef9..4c70f00 100644 --- a/hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/entity/AudioDto.java +++ b/hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/entity/AudioDto.java @@ -3,9 +3,14 @@ import lombok.Data; import java.io.Serializable; +import java.util.List; @Data public class AudioDto implements Serializable { private String groupIds; + + private List<AudioFile> fileList; + + private String groupId; } diff --git a/hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/entity/AudioFile.java b/hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/entity/AudioFile.java new file mode 100644 index 0000000..8ea7093 --- /dev/null +++ b/hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/entity/AudioFile.java @@ -0,0 +1,19 @@ +package com.thhy.screen.modules.biz.audio.entity; + +import com.thhy.general.annotations.Idkey; +import lombok.Data; + +import java.io.Serializable; + +@Data +public class AudioFile implements Serializable { + + @Idkey + private String id; + + private String groupId; + + private String audioFile; + + private Integer defaults; +} diff --git a/hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/entity/GroupInfoVo.java b/hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/entity/GroupInfoVo.java new file mode 100644 index 0000000..1d7b7b0 --- /dev/null +++ b/hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/entity/GroupInfoVo.java @@ -0,0 +1,16 @@ +package com.thhy.screen.modules.biz.audio.entity; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +@Data +public class GroupInfoVo implements Serializable { + + private String id; + + private String groupName; + + private List<AudioFile> fileList; +} diff --git a/hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/service/AudioService.java b/hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/service/AudioService.java index 7b14600..2c1edbd 100644 --- a/hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/service/AudioService.java +++ b/hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/service/AudioService.java @@ -2,6 +2,7 @@ import com.thhy.screen.modules.biz.audio.entity.AudioDto; import com.thhy.screen.modules.biz.audio.entity.AudioGroup; +import com.thhy.screen.modules.biz.audio.entity.GroupInfoVo; import java.util.List; @@ -10,4 +11,8 @@ List<AudioGroup> queryGroups(); void playMusic(AudioDto audioDto); + + void addFile(AudioDto audioDto); + + GroupInfoVo groupInfo(AudioDto audioDto); } diff --git a/hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/service/impl/AudioServiceImpl.java b/hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/service/impl/AudioServiceImpl.java index e25d27e..627b029 100644 --- a/hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/service/impl/AudioServiceImpl.java +++ b/hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/audio/service/impl/AudioServiceImpl.java @@ -1,10 +1,13 @@ package com.thhy.screen.modules.biz.audio.service.impl; import com.thhy.screen.modules.biz.audio.entity.AudioDto; +import com.thhy.screen.modules.biz.audio.entity.AudioFile; import com.thhy.screen.modules.biz.audio.entity.AudioGroup; +import com.thhy.screen.modules.biz.audio.entity.GroupInfoVo; import com.thhy.screen.modules.biz.audio.service.AudioService; import com.thhy.screen.modules.biz.bigscreen.mapper.BigScreenMapper; import com.thhy.screen.utils.AudioUtils; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -26,6 +29,23 @@ String groupIds = audioDto.getGroupIds(); String[] groupIdArray = new String[]{groupIds}; AudioUtils.playMusic(groupIdArray); - return; + } + + @Override + public void addFile(AudioDto audioDto) { + List<AudioFile> fileList = audioDto.getFileList(); + screenMapper.deleteAudioFile(audioDto.getGroupId()); + for(AudioFile audioFile : fileList){ + audioFile.setGroupId(audioDto.getGroupId()); + screenMapper.insertAudioFile(audioFile); + } + } + + @Override + public GroupInfoVo groupInfo(AudioDto audioDto) { + GroupInfoVo infoVo = screenMapper.queryGroupInfo(audioDto.getGroupId()); + List<AudioFile> fileList = screenMapper.queryFileByGroup(audioDto.getGroupId()); + infoVo.setFileList(fileList); + return infoVo; } } diff --git a/hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/bigscreen/controller/ExecProListener.java b/hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/bigscreen/controller/ExecProListener.java index e95479a..3051240 100644 --- a/hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/bigscreen/controller/ExecProListener.java +++ b/hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/bigscreen/controller/ExecProListener.java @@ -118,21 +118,7 @@ map1.put("mod",ProListenType.PIPEPLANACTUAL); map1.put("pipePlanActual",yearCountList); mapList.add(map1); - Map<String,Object> map2 = new HashMap<>(); - List<PipeMonthPlanActual> pipeMonthPlanActuals = bigScreenMapper.pipeMonthPlanActual(companyId); - map2.put("mod",ProListenType.PIPEMONTHPLANACTUAL); - map2.put("pipeMonthPlanActual",pipeMonthPlanActuals); - mapList.add(map2); - Map<String,Object> map3 = new HashMap<>(); - List<MaterialWeekAndMonth> materialWeekAndMonths = bigScreenMapper.materialWeekMonth(companyId); - map3.put("mod",ProListenType.MATERIALWEEKANDMONTHS); - map3.put("materialWeekAndMonths",materialWeekAndMonths); - mapList.add(map3); return mapList; - }else if(dataType.equals(ProListenType.MATERIALWEEKANDMONTHS)){ - //原料消耗 周月 - List<MaterialWeekAndMonth> materialWeekAndMonths = bigScreenMapper.materialWeekMonth(companyId); - map.put("materialWeekAndMonths",materialWeekAndMonths); }else if (dataType.equals(ProListenType.PIPEPLANACTUAL)){ //年度生产计划和实际完成 List<PipeYearCount> yearCountList = bigScreenMapper.queryAllProject(companyId); @@ -141,10 +127,6 @@ yc.setPipePlanActual(pipePlanActual); }); map.put("pipePlanActual",yearCountList); - }else if (dataType.equals(ProListenType.PIPEMONTHPLANACTUAL)){ - //月度生产计划和实际完成 - List<PipeMonthPlanActual> pipeMonthPlanActuals = bigScreenMapper.pipeMonthPlanActual(companyId); - map.put("pipeMonthPlanActual",pipeMonthPlanActuals); }else if (dataType.equals(ProListenType.WATERCULINFO)){ //水养池 List<WaterCulInfo> culInfoList = bigScreenMapper.WaterCulInfo(companyId); @@ -167,6 +149,14 @@ mapList.add(map1); mapList.add(map2); return mapList; + }else if (dataType.equals(ProListenType.STEELUSE)){ + //钢筋消耗 + List<HashMap<String,Object>> steelUseList = bigScreenMapper.querySteelMake(); + map.put("steelUse",steelUseList); + }else if (dataType.equals(ProListenType.RESTINFO)){ + //缓存区 + List<HashMap<String,Object>> restInfo = bigScreenMapper.queryRestInfo(); + map.put("restInfo",restInfo); } mapList.add(map); return mapList; diff --git a/hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/bigscreen/mapper/BigScreenMapper.java b/hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/bigscreen/mapper/BigScreenMapper.java index 0a88200..99fdccf 100644 --- a/hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/bigscreen/mapper/BigScreenMapper.java +++ b/hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/bigscreen/mapper/BigScreenMapper.java @@ -1,6 +1,8 @@ package com.thhy.screen.modules.biz.bigscreen.mapper; +import com.thhy.screen.modules.biz.audio.entity.AudioFile; import com.thhy.screen.modules.biz.audio.entity.AudioGroup; +import com.thhy.screen.modules.biz.audio.entity.GroupInfoVo; import com.thhy.screen.modules.biz.bigscreen.entity.*; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Component; @@ -34,4 +36,18 @@ void insertAudioGroup(AudioGroup audioGroup); List<AudioGroup> queryGroups(); + + List<HashMap<String,Object>> querySteelMake(); + + List<HashMap<String,Object>> queryRestInfo(); + + void insertAudioFile(AudioFile audioFile); + + void updateAudioFile(AudioFile audioFile); + + void deleteAudioFile(String groupId); + + GroupInfoVo queryGroupInfo(String id); + + List<AudioFile> queryFileByGroup(String groupId); } diff --git a/hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/bigscreen/service/impl/ProduceListenServiceImpl.java b/hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/bigscreen/service/impl/ProduceListenServiceImpl.java index 22d4968..4f0710d 100644 --- a/hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/bigscreen/service/impl/ProduceListenServiceImpl.java +++ b/hd/pipe/screen/src/main/java/com/thhy/screen/modules/biz/bigscreen/service/impl/ProduceListenServiceImpl.java @@ -45,11 +45,17 @@ map.put("pipePlanActual",yearCountList); //月度生产计划和实际完成 - List<PipeMonthPlanActual> pipeMonthPlanActuals = bigScreenMapper.pipeMonthPlanActual(companyId); - map.put("pipeMonthPlanActual",pipeMonthPlanActuals); + //List<PipeMonthPlanActual> pipeMonthPlanActuals = bigScreenMapper.pipeMonthPlanActual(companyId); + //map.put("pipeMonthPlanActual",pipeMonthPlanActuals); //原料消耗 周月 - List<MaterialWeekAndMonth> materialWeekAndMonths = bigScreenMapper.materialWeekMonth(companyId); - map.put("materialWeekAndMonths",materialWeekAndMonths); + //List<MaterialWeekAndMonth> materialWeekAndMonths = bigScreenMapper.materialWeekMonth(companyId); + //map.put("materialWeekAndMonths",materialWeekAndMonths); + //钢筋消耗 + List<HashMap<String,Object>> steelUseList = bigScreenMapper.querySteelMake(); + map.put("steelUse",steelUseList); + //缓存区 + List<HashMap<String,Object>> restInfo = bigScreenMapper.queryRestInfo(); + map.put("restInfo",restInfo); //水养池 List<WaterCulInfo> culInfoList = bigScreenMapper.WaterCulInfo(companyId); map.put("waterCulInfo",culInfoList); diff --git a/hd/pipe/screen/src/main/java/com/thhy/screen/utils/AudioUtils.java b/hd/pipe/screen/src/main/java/com/thhy/screen/utils/AudioUtils.java index 9d5d23a..e14b357 100644 --- a/hd/pipe/screen/src/main/java/com/thhy/screen/utils/AudioUtils.java +++ b/hd/pipe/screen/src/main/java/com/thhy/screen/utils/AudioUtils.java @@ -11,7 +11,8 @@ public static void main(String[] args) { //getGroups(); - + //playMusic(); + getItemList(); } public static void login(){ @@ -20,6 +21,12 @@ public static String getGroups(){ String result = HttpUtils.post("GetGroups",new JSONObject()); + System.out.println(result); + return result; + } + + public static String getItemList(){ + String result = HttpUtils.post("GetItemList",new JSONObject()); System.out.println(result); return result; } @@ -38,4 +45,15 @@ System.out.println(result); return result; } + + public static String playMusic(){ + JSONObject jsonObject = new JSONObject(); + String[] ms = new String[]{"https://szpipe.thhy-tj.com/jingbao.mp3"}; + + jsonObject.put("Files",ms); + jsonObject.put("TextCode",1); + String result = HttpUtils.post("PlayMp3",jsonObject); + System.out.println(result); + return result; + } } diff --git a/hd/pipe/screen/src/main/java/com/thhy/screen/utils/HttpUtils.java b/hd/pipe/screen/src/main/java/com/thhy/screen/utils/HttpUtils.java index 3534bcb..3212066 100644 --- a/hd/pipe/screen/src/main/java/com/thhy/screen/utils/HttpUtils.java +++ b/hd/pipe/screen/src/main/java/com/thhy/screen/utils/HttpUtils.java @@ -12,7 +12,7 @@ public class HttpUtils { - private static String BaseHost = "http://150.158.37.69:8080/api/"; + private static String BaseHost = "http://58.210.64.90:9199/api/"; private static String token = ""; diff --git a/hd/pipe/screen/src/main/resources/mapping/BigScreenMapper.xml b/hd/pipe/screen/src/main/resources/mapping/BigScreenMapper.xml index f5a063c..51b8d7e 100644 --- a/hd/pipe/screen/src/main/resources/mapping/BigScreenMapper.xml +++ b/hd/pipe/screen/src/main/resources/mapping/BigScreenMapper.xml @@ -208,7 +208,7 @@ </select> <insert id="insertAudioGroup"> - INSERT INTO + INSERT INTO t_audio_group <trim suffix=")" prefix="(" suffixOverrides=","> <if test="id != null and id !=null"> id, @@ -234,8 +234,104 @@ </insert> <select id="queryGroups" resultType="com.thhy.screen.modules.biz.audio.entity.AudioGroup"> - select id,group_id as groupId,group_name as groupName from t_audio_groups + select id,group_id as groupId,group_name as groupName from t_audio_group </select> + <!--钢筋总消耗,周消耗,月消耗--> + <select id="querySteelMake" resultType="hashmap"> + select steel.steel_id,CONCAT(steel.steel_name,'-',steel_model) as steelName, + case when a.totalStock is NULL then 0 else a.totalStock end as totalStock, + case when b.weekStock is NULL then 0 else b.weekStock end as weekStock, + case when c.monthStock is NULL then 0 else c.monthStock end as monthStock + from sys_steel steel + left join + ( + select ssr.steel_id,sum(ssr.change_stock) as totalStock from sys_steel_record ssr + where ssr.stock_type = 2 + group by ssr.steel_id + ) a on steel.steel_id = a.steel_id + left join + ( + select ssr.steel_id,sum(ssr.change_stock) as weekStock from sys_steel_record ssr + where ssr.stock_type = 2 and YEAR(SYSDATE()) = YEAR(ssr.create_time) and WEEK(sysdate(),1) = WEEK(ssr.create_time,1) + group by ssr.steel_id + ) b on steel.steel_id = b.steel_id + + left join + ( + select ssr.steel_id,sum(ssr.change_stock) as monthStock from sys_steel_record ssr + where ssr.stock_type = 2 and YEAR(SYSDATE()) = YEAR(ssr.create_time) and MONTH(SYSDATE()) = MONTH(ssr.create_time) + group by ssr.steel_id + ) c on steel.steel_id = c.steel_id + </select> + + <!--获取静养区--> + <select id="queryRestInfo" resultType="hashmap"> + select sd.device_id as deviceId,sd.device_name as deviceName,(select tem from t_rest_data trd where trd.device_id = sd.device_id order by check_time desc limit 1) as tem + from sys_device sd where sd.produce_order = '静养' + </select> + + <insert id="insertAudioFile"> + insert into t_audio_group_file + <trim prefix="(" suffix=")" suffixOverrides=","> + <if test="id !=null and id !=''"> + id, + </if> + <if test="groupId !=null and groupId !=''"> + group_id, + </if> + <if test="audioFile !=null and audioFile !=''"> + audio_file, + </if> + <if test="defaults !=null"> + `defaults`, + </if> + </trim> + <trim prefix=" values (" suffix=")" suffixOverrides=","> + <if test="id !=null and id !=''"> + #{id}, + </if> + <if test="groupId !=null and groupId !=''"> + #{groupId}, + </if> + <if test="audioFile !=null and audioFile !=''"> + #{audioFile}, + </if> + <if test="defaults !=null"> + #{defaults}, + </if> + </trim> + </insert> + + <update id="updateAudioFile"> + UPDATE t_audio_group_file + <set> + <trim suffixOverrides=","> + <if test="groupId !=null and groupId !=''"> + group_id = #{groupId}, + </if> + <if test="audioFile !=null and audioFile !=''"> + audio_file = #{groupFile}, + </if> + <if test="defaults !=null"> + `defaults` = #{defaults}, + </if> + </trim> + </set> + where id = #{id} + </update> + + <delete id="deleteAudioFile"> + delete from t_audio_group_file where group_id = #{groupId} + </delete> + + <select id="queryGroupInfo" resultType="com.thhy.screen.modules.biz.audio.entity.GroupInfoVo"> + select id,group_name as groupName + from t_audio_group where id = #{id} + </select> + + <select id="queryFileByGroup" resultType="com.thhy.screen.modules.biz.audio.entity.AudioFile"> + select id,group_id as groupId,audio_file as audioFile,`defaults` from t_audio_group_file where group_id = #{groupId} + </select> </mapper> \ No newline at end of file diff --git a/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/hiddenDanger/entity/HiddenDangerEntity.java b/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/hiddenDanger/entity/HiddenDangerEntity.java index 286940c..c15a7c2 100644 --- a/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/hiddenDanger/entity/HiddenDangerEntity.java +++ b/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/hiddenDanger/entity/HiddenDangerEntity.java @@ -27,6 +27,7 @@ */ @Excel(sort = 2,title = "隐患地点") private String dangerLocation; + private String dictId; /** * 隐患标题 @@ -116,4 +117,7 @@ } return name; } + + private String auditUser; + private Date auditTime; } diff --git a/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/hiddenDanger/service/impl/HiddenDangerServiceImpl.java b/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/hiddenDanger/service/impl/HiddenDangerServiceImpl.java index cc10f59..fcfa191 100644 --- a/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/hiddenDanger/service/impl/HiddenDangerServiceImpl.java +++ b/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/hiddenDanger/service/impl/HiddenDangerServiceImpl.java @@ -10,15 +10,17 @@ import com.thhy.secure.modules.biz.hiddenDanger.entity.HiddenDangerEntity; import com.thhy.secure.modules.biz.hiddenDanger.mapper.HiddenDangerMapper; import com.thhy.secure.modules.biz.hiddenDanger.service.HiddenDangerService; +import com.thhy.secure.modules.biz.integralAccount.entity.IntegralAccountEntity; +import com.thhy.secure.modules.biz.integralAccount.entity.IntegralDetailEntity; +import com.thhy.secure.modules.biz.integralAccount.mapper.IntegralDetailMapper; +import com.thhy.secure.modules.biz.regionInspection.mapper.RegionInspectionRecordMapper; +import org.checkerframework.checker.units.qual.A; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.servlet.http.HttpServletResponse; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.Map; +import java.util.*; /** * @Author QiuYuHao @@ -31,6 +33,11 @@ @Autowired private HiddenDangerMapper hiddenDangerMapper; + @Autowired + private IntegralDetailMapper integralDetailMapper; + + @Autowired + private RegionInspectionRecordMapper regionInspectionRecordMapper; private static final Object Lock = new Object(); @Override @Transactional(rollbackFor = Exception.class) @@ -58,6 +65,9 @@ SysUserInfo sysUserInfo = UserInfoUtils.getInstance().getUserInfo(); String userId = sysUserInfo.getUserId(); hiddenDangerEntity.setUpdateUser(userId); + if (hiddenDangerEntity.getDictId() != null){ + hiddenDangerEntity.setDangerLocation(hiddenDangerEntity.getDictId()); + } hiddenDangerEntity.setUpdateTime(new Date()); synchronized (Lock){ hiddenDangerMapper.update(hiddenDangerEntity); @@ -95,10 +105,14 @@ } PageHelper.startPage(pageNum,pageSize); List<HiddenDangerEntity> hiddenDangerEntities = new ArrayList<>(); - if(type == 1){ + if(type == 1){//审核列表 //小程序 待审核排前面 待审核按时间正序 审核成功的倒叙 hiddenDangerEntities = hiddenDangerMapper.selectAppList(map); - }else { + }else if(type == 2){//隐患举报详情列表 + map.put("createUser",sysUserInfo.getUserId()); + //小程序 待审核排前面 待审核按时间正序 审核成功的倒叙 + hiddenDangerEntities = hiddenDangerMapper.selectPageList(map); + } else { //web 按时间倒序 hiddenDangerEntities = hiddenDangerMapper.selectPageList(map); } @@ -153,9 +167,55 @@ } @Override + @Transactional(rollbackFor = Exception.class) public BasicResult examine(HiddenDangerEntity hiddenDangerEntity) { + SysUserInfo sysUserInfo = UserInfoUtils.getInstance().getUserInfo(); + String platUserId = regionInspectionRecordMapper.selectPlatUserId(hiddenDangerEntity.getCreateUser()); + Map platUser = regionInspectionRecordMapper.getPlatUser(platUserId); + int user_type = (int) platUser.get("user_type"); + Map account = new HashMap(); + account.put("userId",platUserId); + //查询账户 + IntegralAccountEntity queryAccount = integralDetailMapper.selectByOne(account); + Double accumulateIntegral = 0.0; + Double totalIntegral = 0.0; + if (queryAccount != null){ + accumulateIntegral = queryAccount.getAccumulateIntegral();//累计积分 + totalIntegral = queryAccount.getTotalIntegral();//当前余额 + } hiddenDangerEntity.setAuditStatus(1);//1审核通过 - hiddenDangerMapper.update(hiddenDangerEntity); + hiddenDangerEntity.setDangerLocation(null); + hiddenDangerEntity.setAuditTime(new Date()); + hiddenDangerEntity.setAuditUser(sysUserInfo.getUserId()); + synchronized (Lock){ + hiddenDangerMapper.update(hiddenDangerEntity); + IntegralAccountEntity integralAccountEntity = IntegralAccountEntity + .builder() + .userId(platUserId) + .id(UUIDUtils.create()) + .accumulateIntegral(accumulateIntegral+hiddenDangerEntity.getIntegral()) + .totalIntegral(totalIntegral+hiddenDangerEntity.getIntegral()) + .userType(user_type) + .build(); + + IntegralDetailEntity integralDetailEntity = IntegralDetailEntity + .builder() + .id(UUIDUtils.create()) + .balanc(totalIntegral+hiddenDangerEntity.getIntegral()) + .integralSource("隐患审核") + .integralWater(hiddenDangerEntity.getIntegral()) + .createTime(new Date()) + .createUser(sysUserInfo.getUserId()) + .userType(user_type) + .userId(platUserId) + .type(1) + .remark("隐患审核") + .companyId(sysUserInfo.getCompanyId()) + .build(); + + integralDetailMapper.insertAndUpdateAccount(integralAccountEntity); + integralDetailMapper.insertDetailAndUpdate(integralDetailEntity); + } return BasicResult.success(); } } diff --git a/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/integralAccount/controller/IntegraDetailController.java b/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/integralAccount/controller/IntegraDetailController.java new file mode 100644 index 0000000..67242a1 --- /dev/null +++ b/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/integralAccount/controller/IntegraDetailController.java @@ -0,0 +1,84 @@ +package com.thhy.secure.modules.biz.integralAccount.controller; + +import com.thhy.general.common.BasicResult; +import com.thhy.general.config.SysUserInfo; +import com.thhy.general.utils.ExcelUtils; +import com.thhy.general.utils.UserInfoUtils; +import com.thhy.secure.modules.biz.integralAccount.entity.IntegralAccountEntity; +import com.thhy.secure.modules.biz.integralAccount.entity.IntegralDetailEntity; +import com.thhy.secure.modules.biz.integralAccount.service.IntegralDetailService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + +/** + * @Author QiuYuHao + * @CreateDate 2023-11-27 17:34:01 + * 积分流水控制层 + */ +@RestController +@RequestMapping("integralAccount") +public class IntegraDetailController { + + @Autowired + private IntegralDetailService integralDetailService; + /** + * 积分超市新增和修改 + * @param integralDetailEntity + */ + @PostMapping("insertAndUpdate") + BasicResult insertAndUpdate(@RequestBody IntegralDetailEntity integralDetailEntity){ + return integralDetailService.insertAndUpdate(integralDetailEntity); + } + + /** + * 积分超市 + * @param map + * @return + */ + @PostMapping("selectPageList") + BasicResult selectPageList(@RequestBody Map map){ + return integralDetailService.selectPageList(map); + } + + /** + * 积分超市删除 + * @param id + */ + @GetMapping("delete") + BasicResult delete(@RequestParam String id){ + return integralDetailService.delete(id); + } + + + /** + * 安全积分列表 + */ + @PostMapping("selectSafeIntegralPageList") + BasicResult selectSafeIntegralPageList(@RequestBody Map map){ + return integralDetailService.selectSafeIntegralPageList(map); + } + + /** + * 安全积分明细 + * @param map + * @return + */ + @PostMapping("selectSafeIntegralInfo") + BasicResult selectSafeIntegralInfo(@RequestBody Map map){ + return integralDetailService.selectSafeIntegralInfo(map); + } + + @PostMapping("exportList") + public void exportList(@RequestBody Map map, HttpServletResponse rsp) { + this.integralDetailService.exportList(map,rsp); + } + + @PostMapping("exportSafeIntegralInfo") + public void exportSafeIntegralInfo(@RequestBody Map map, HttpServletResponse rsp) { + this.integralDetailService.exportSafeIntegralInfo(map,rsp); + } +} diff --git a/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/integralAccount/entity/IntegralAccountEntity.java b/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/integralAccount/entity/IntegralAccountEntity.java new file mode 100644 index 0000000..cca96e8 --- /dev/null +++ b/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/integralAccount/entity/IntegralAccountEntity.java @@ -0,0 +1,34 @@ +package com.thhy.secure.modules.biz.integralAccount.entity; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Date; +import java.util.List; + +/** + * @Author QiuYuHao + * @CreateDate 2023-11-27 17:34:53 + * 积分账户实体 + */ +@Builder +@Data +@AllArgsConstructor +@NoArgsConstructor +public class IntegralAccountEntity { + + private String id; + private String userId; + private Double totalIntegral;//当前余额 + private Double accumulateIntegral;//累计积分 + private Double totalConsumption;//总消耗 + private Date createTime; + private String createUser; + private Date updateTime; + private String updateUser; + private Integer userType; + private String realName; + private List<IntegralDetailEntity> integralDetailList; +} diff --git a/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/integralAccount/entity/IntegralDetailDto.java b/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/integralAccount/entity/IntegralDetailDto.java new file mode 100644 index 0000000..616456c --- /dev/null +++ b/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/integralAccount/entity/IntegralDetailDto.java @@ -0,0 +1,54 @@ +package com.thhy.secure.modules.biz.integralAccount.entity; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.thhy.general.annotations.Excel; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Date; + +/** + * @Author QiuYuHao + * @CreateDate 2023-11-28 11:06:19 + */ +@Builder +@Data +@AllArgsConstructor +@NoArgsConstructor +public class IntegralDetailDto { + + private String id; + private Integer type;//1、获取 2、消耗 + + private String createUser; + private String companyId; + private String userId; + private Integer userType; + private Double changeIntegral;//变量在积分超市 修改前的变量 + + + @Excel(sort = 1,title = "时间") + private String createDate; + + private Date createTime; + @Excel(sort = 2,title = "积分分值") + private Double integralWater;//当前可改积分流水 + + @Excel(sort = 3,title = "余额") + private Double balanc;//当前余额 + + @Excel(sort = 4,title = "类型") + private String typeName;//1、获取 2、消耗 + private String integralSource;//积分怎么来的 + private String userTypeName; + + private String realName;//真实姓名 + + + @Excel(sort = 5,title = "说明") + private String remark;//说明 + + +} diff --git a/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/integralAccount/entity/IntegralDetailEntity.java b/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/integralAccount/entity/IntegralDetailEntity.java new file mode 100644 index 0000000..4f9834e --- /dev/null +++ b/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/integralAccount/entity/IntegralDetailEntity.java @@ -0,0 +1,47 @@ +package com.thhy.secure.modules.biz.integralAccount.entity; + +import com.thhy.general.annotations.Excel; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Date; + +/** + * @Author QiuYuHao + * @CreateDate 2023-11-27 17:38:37 + * 积分流水实体 + */ +@Builder +@Data +@AllArgsConstructor +@NoArgsConstructor +public class IntegralDetailEntity { + + private String id; + private Integer type;//1、获取 2、消耗 + private String typeName;//1、获取 2、消耗 + + private String integralSource;//积分怎么来的 + private String createUser; + private String companyId; + private String userId; + private Integer userType; + private Double balanc;//当前余额 + private Double changeIntegral;//变量在积分超市 修改前的变量 + + + private Date createTime; + @Excel(sort = 1,title = "时间") + private String createDate; + @Excel(sort = 2,title = "人员类别") + private String userTypeName; + @Excel(sort = 3,title = "人员姓名") + private String realName;//真实姓名 + @Excel(sort = 4,title = "积分") + private Double integralWater;//当前可改积分流水 + + @Excel(sort = 5,title = "说明") + private String remark;//说明 +} diff --git a/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/integralAccount/mapper/IntegralDetailMapper.java b/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/integralAccount/mapper/IntegralDetailMapper.java new file mode 100644 index 0000000..25c3fb4 --- /dev/null +++ b/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/integralAccount/mapper/IntegralDetailMapper.java @@ -0,0 +1,60 @@ +package com.thhy.secure.modules.biz.integralAccount.mapper; + +import com.thhy.secure.modules.biz.integralAccount.entity.IntegralAccountEntity; +import com.thhy.secure.modules.biz.integralAccount.entity.IntegralDetailDto; +import com.thhy.secure.modules.biz.integralAccount.entity.IntegralDetailEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; +import java.util.Map; + +/** + * @Author QiuYuHao 积分明细 + * @CreateDate 2023-11-27 17:42:43 + */ +@Mapper +public interface IntegralDetailMapper { + + /** + * 积分超市新增和修改 + * @param integralDetailEntity + */ + void insertDetailAndUpdate(IntegralDetailEntity integralDetailEntity); + /** + * 积分账户 + */ + void insertAndUpdateAccount(IntegralAccountEntity integralAccountEntity); + + /** + * 积分超市 + * @param map + * @return + */ + List<IntegralDetailEntity> selectPageList(Map map); + List<IntegralDetailDto> selectPageInfoList(Map map); + + /** + * 积分超市删除 + * @param id + */ + void delete(String id); + + + /** + * 安全积分列表 + */ + List<IntegralAccountEntity> selectSafeIntegralPageList(Map map); + + /** + * 查询账户积分 + * @param id + * @return + */ + IntegralAccountEntity selectByOne(Map m); + /** + * 安全积分明细 + * @param map + * @return + */ + List<IntegralDetailDto> selectSafeIntegralInfo(Map map); +} diff --git a/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/integralAccount/service/IntegralDetailService.java b/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/integralAccount/service/IntegralDetailService.java new file mode 100644 index 0000000..6715819 --- /dev/null +++ b/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/integralAccount/service/IntegralDetailService.java @@ -0,0 +1,55 @@ +package com.thhy.secure.modules.biz.integralAccount.service; + +import com.thhy.general.common.BasicResult; +import com.thhy.secure.modules.biz.integralAccount.entity.IntegralDetailEntity; + +import javax.servlet.http.HttpServletResponse; +import java.util.Map; + +/** + * @Author QiuYuHao + * @CreateDate 2023-11-27 18:32:15 + * 积分超市 + */ + +public interface IntegralDetailService { + + + /** + * 积分超市新增和修改 + * @param integralDetailEntity + */ + BasicResult insertAndUpdate(IntegralDetailEntity integralDetailEntity); + + /** + * 积分超市 + * @param map + * @return + */ + BasicResult selectPageList(Map map); + /** + * 积分超市 + * @param map + * @param rsp + */ + void exportList(Map map, HttpServletResponse rsp); + /** + * 积分超市删除 + * @param id + */ + BasicResult delete(String id); + + + /** + * 安全积分列表 + */ + BasicResult selectSafeIntegralPageList(Map map); + + /** + * 安全积分明细 + * @param map + * @return + */ + BasicResult selectSafeIntegralInfo(Map map); + void exportSafeIntegralInfo(Map map, HttpServletResponse rsp); +} diff --git a/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/integralAccount/service/impl/IntegralDetailServiceImpl.java b/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/integralAccount/service/impl/IntegralDetailServiceImpl.java new file mode 100644 index 0000000..9e9c823 --- /dev/null +++ b/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/integralAccount/service/impl/IntegralDetailServiceImpl.java @@ -0,0 +1,222 @@ +package com.thhy.secure.modules.biz.integralAccount.service.impl; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.thhy.general.common.BasicResult; +import com.thhy.general.config.SysUserInfo; +import com.thhy.general.utils.ExcelUtils; +import com.thhy.general.utils.UUIDUtils; +import com.thhy.general.utils.UserInfoUtils; +import com.thhy.secure.modules.biz.integralAccount.entity.IntegralAccountEntity; +import com.thhy.secure.modules.biz.integralAccount.entity.IntegralDetailDto; +import com.thhy.secure.modules.biz.integralAccount.entity.IntegralDetailEntity; +import com.thhy.secure.modules.biz.integralAccount.mapper.IntegralDetailMapper; +import com.thhy.secure.modules.biz.integralAccount.service.IntegralDetailService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.servlet.http.HttpServletResponse; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @Author QiuYuHao + * @CreateDate 2023-11-27 18:33:40 + * 积分超市实现 + */ +@Service +public class IntegralDetailServiceImpl implements IntegralDetailService +{ + + @Autowired + private IntegralDetailMapper integralDetailMapper; + + private static final Object Lock= new Object(); + /** + * 积分超市新增和修改 + * @param integralDetailEntity + */ + @Override + @Transactional(rollbackFor = Exception.class) + public BasicResult insertAndUpdate(IntegralDetailEntity integralDetailEntity){ + String id = integralDetailEntity.getId(); + SysUserInfo sysUserInfo = UserInfoUtils.getInstance().getUserInfo(); + String sysUserId = sysUserInfo.getUserId(); + String companyId = sysUserInfo.getCompanyId(); + //扣积分逻辑 + synchronized (Lock){ + IntegralAccountEntity integralAccountEntity = IntegralAccountEntity + .builder() + .userId(integralDetailEntity.getUserId()) + .updateUser(sysUserId) + .updateTime(new Date()) + .id(UUIDUtils.create()) + .build(); + Map map = new HashMap(); + map.put("userId",integralDetailEntity.getUserId()); + //查询账户 + IntegralAccountEntity queryAccount = integralDetailMapper.selectByOne(map); + if(queryAccount == null || queryAccount.getTotalIntegral()<integralDetailEntity.getIntegralWater()){//无账户 + return BasicResult.faild("500","积分不足,无法扣除积分",null); + } + //有账户 + Double totalConsumption = queryAccount.getTotalConsumption();//总消耗 + Double accumulateIntegral = queryAccount.getAccumulateIntegral();//累计积分 + Double totalIntegral = queryAccount.getTotalIntegral();//当前余额 + + integralAccountEntity.setTotalIntegral(totalIntegral-integralDetailEntity.getIntegralWater()); + integralAccountEntity.setAccumulateIntegral(accumulateIntegral); + integralAccountEntity.setTotalConsumption(totalConsumption+integralDetailEntity.getIntegralWater()); + //修改账户 + integralDetailMapper.insertAndUpdateAccount(integralAccountEntity); + if(id == null){ + integralDetailEntity.setCompanyId(companyId); + integralDetailEntity.setId(UUIDUtils.create()); + integralDetailEntity.setCreateTime(new Date()); + integralDetailEntity.setCreateUser(sysUserId); + } + integralDetailEntity.setBalanc(totalIntegral-integralDetailEntity.getIntegralWater());//拿到当前余额 + + integralDetailEntity.setType(2); + integralDetailEntity.setIntegralSource("积分超市"); + //添加或修改明细 + integralDetailMapper.insertDetailAndUpdate(integralDetailEntity); + } + return BasicResult.success(); + } + + /** + * 积分超市 + * @param map + * @return + */ + @Override + public BasicResult selectPageList(Map map){ + SysUserInfo sysUserInfo = UserInfoUtils.getInstance().getUserInfo(); + String companyId = sysUserInfo.getCompanyId(); + int pageNum = (int) map.get("pageNum"); + int pageSize = (int) map.get("pageSize"); + PageHelper.startPage(pageNum,pageSize); + map.put("companyId",companyId); + List<IntegralDetailEntity> integralDetailEntities = integralDetailMapper.selectPageList(map); + return BasicResult.success(new PageInfo<>(integralDetailEntities)); + } + + + /** + * 积分超市删除 + * @param id + */ + @Override + @Transactional(rollbackFor = Exception.class) + public BasicResult delete(String id){ + Map map =new HashMap(); + map.put("id",id); + IntegralDetailDto integralDetailEntity = integralDetailMapper.selectSafeIntegralInfo(map).get(0); + Double integralWater = integralDetailEntity.getIntegralWater();//获取消耗积分 + Map account = new HashMap(); + account.put("userId",integralDetailEntity.getUserId()); + //查询账户 + IntegralAccountEntity queryAccount = integralDetailMapper.selectByOne(account); + + Double totalConsumption = queryAccount.getTotalConsumption();//总消耗 + Double accumulateIntegral = queryAccount.getAccumulateIntegral();//累计积分 + Double totalIntegral = queryAccount.getTotalIntegral();//当前余额 + synchronized (Lock){ + IntegralAccountEntity integralAccountEntity = IntegralAccountEntity + .builder() + .userId(integralDetailEntity.getUserId()) + .totalConsumption(totalConsumption - integralWater) + .accumulateIntegral(accumulateIntegral + integralWater) + .totalIntegral(totalIntegral + integralWater) + .build(); + integralDetailMapper.insertAndUpdateAccount(integralAccountEntity); + integralDetailMapper.delete(id); + } + return BasicResult.success(); + } + + + /** + * 安全积分列表 + */ + @Override + public BasicResult selectSafeIntegralPageList(Map map){ + SysUserInfo sysUserInfo = UserInfoUtils.getInstance().getUserInfo(); + String companyId = sysUserInfo.getCompanyId(); + int pageNum = (int) map.get("pageNum"); + int pageSize = (int) map.get("pageSize"); + PageHelper.startPage(pageNum,pageSize); + map.put("companyId",companyId); + List<IntegralAccountEntity> integralAccountEntities = integralDetailMapper.selectSafeIntegralPageList(map); + return BasicResult.success(new PageInfo<>(integralAccountEntities)); + } + + /** + * 安全积分明细 + * @param map + * @return + */ + @Override + public BasicResult selectSafeIntegralInfo(Map map){ + SysUserInfo sysUserInfo = UserInfoUtils.getInstance().getUserInfo(); + String companyId = sysUserInfo.getCompanyId(); + IntegralAccountEntity integralAccountEntity = integralDetailMapper.selectByOne(map); + map.put("integral",integralAccountEntity.getTotalIntegral()); + int pageNum = (int) map.get("pageNum"); + int pageSize = (int) map.get("pageSize"); + PageHelper.startPage(pageNum,pageSize); + map.put("companyId",companyId); + List<IntegralDetailDto> integralDetailEntities = integralDetailMapper.selectSafeIntegralInfo(map); + map.put("data",new PageInfo<>(integralDetailEntities)); + return BasicResult.success(map); + } + + @Override + public void exportList(Map map, HttpServletResponse rsp) { + SysUserInfo sysUserInfo = UserInfoUtils.getInstance().getUserInfo(); + String companyId = sysUserInfo.getCompanyId(); + map.put("companyId",companyId); + List<IntegralDetailEntity> integralDetailEntities = integralDetailMapper.selectPageList(map); + + integralDetailEntities.forEach(obj->{ + if(obj.getUserType() ==1){ + obj.setUserTypeName("管服人员"); + } + if(obj.getUserType() ==2){ + obj.setUserTypeName("劳务人员"); + } + }); + ExcelUtils.downExcel(integralDetailEntities,IntegralDetailEntity.class,rsp,"班组列表"); + } + + @Override + public void exportSafeIntegralInfo(Map map, HttpServletResponse rsp) { + SysUserInfo sysUserInfo = UserInfoUtils.getInstance().getUserInfo(); + String companyId = sysUserInfo.getCompanyId(); + + IntegralAccountEntity integralAccountEntity = integralDetailMapper.selectByOne(map); + map.put("integral",integralAccountEntity.getTotalIntegral()); + map.put("companyId",companyId); + List<IntegralDetailDto> integralDetailEntities = integralDetailMapper.selectSafeIntegralInfo(map); + integralDetailEntities.forEach(obj->{ + if(obj.getUserType() ==1){ + obj.setUserTypeName("管服人员"); + } + if(obj.getUserType() ==2){ + obj.setUserTypeName("劳务人员"); + } + if(obj.getType() == 1){ + obj.setTypeName("获取"); + } + if(obj.getType() == 2){ + obj.setTypeName("消耗"); + } + }); + ExcelUtils.downExcel(integralDetailEntities,IntegralDetailDto.class,rsp,"班组列表"); + } + +} diff --git a/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionInspection/controller/RegionInspectionRecordController.java b/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionInspection/controller/RegionInspectionRecordController.java index 9c48252..df32012 100644 --- a/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionInspection/controller/RegionInspectionRecordController.java +++ b/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionInspection/controller/RegionInspectionRecordController.java @@ -85,8 +85,7 @@ @PostMapping("selectAppInfo") BasicResult selectAppInfo(@RequestBody Map map){ String regionInspectionId = map.get("regionInspectionId").toString(); - String userId = map.get("userId").toString(); - return regionInspectionRecordService.selectAppInfo(regionInspectionId,userId); + return regionInspectionRecordService.selectAppInfo(regionInspectionId,null); } /** diff --git a/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionInspection/entity/RegionInspectionHazardInformEntity.java b/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionInspection/entity/RegionInspectionHazardInformEntity.java index 0d40b10..ad88884 100644 --- a/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionInspection/entity/RegionInspectionHazardInformEntity.java +++ b/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionInspection/entity/RegionInspectionHazardInformEntity.java @@ -42,4 +42,8 @@ * 一个区域对应一个结果记录 */ RegionInspectionRecordEntity recordEntity; + + private String result;//巡检结果 + private List<RegionInspectionRecordImgEntity> imgList; + private Integer status;//该区域的巡检状态 } diff --git a/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionInspection/entity/RegionInspectionRecordEntity.java b/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionInspection/entity/RegionInspectionRecordEntity.java index aa3a6b5..5ef8cea 100644 --- a/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionInspection/entity/RegionInspectionRecordEntity.java +++ b/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionInspection/entity/RegionInspectionRecordEntity.java @@ -51,5 +51,5 @@ private String imgPaths; - List<RegionInspectionRecordImgEntity> imgList; + private List<RegionInspectionRecordImgEntity> imgList; } diff --git a/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionInspection/mapper/RegionInspectionRecordMapper.java b/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionInspection/mapper/RegionInspectionRecordMapper.java index b9be0e3..824202b 100644 --- a/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionInspection/mapper/RegionInspectionRecordMapper.java +++ b/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionInspection/mapper/RegionInspectionRecordMapper.java @@ -24,6 +24,7 @@ void delete(String id); //根据任务id删除记录 void deleteByRegionInspectionId(String regionInspectionId); + //任务打卡web端查询列表 或者 判断主任务完成未完成的标准 List<RegionInspectionRecordEntity> selectPageList(Map map); Integer selectCount(Map map); @@ -40,7 +41,14 @@ @Param("regionHazardInformId")String regionHazardInformId); void insertIMG(RegionInspectionRecordImgEntity regionInspectionRecordImgEntity); + void deleteIMG(String regionInspectionRecordId); + + List<RegionInspectionRecordImgEntity> selectImgByRecordId(String regionInspectionRecordId); + //小程序巡检打卡列表 List<Map> selectAppList(Map map); + + String selectPlatUserId(String userId); + Map getPlatUser(String platUserId); } diff --git a/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionInspection/service/impl/RegionInspectionRecordServiceImpl.java b/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionInspection/service/impl/RegionInspectionRecordServiceImpl.java index b12d1b6..7484f6e 100644 --- a/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionInspection/service/impl/RegionInspectionRecordServiceImpl.java +++ b/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionInspection/service/impl/RegionInspectionRecordServiceImpl.java @@ -44,17 +44,18 @@ public BasicResult insertAndUpdate(RegionInspectionRecordEntity regionInspectionEntity) { SysUserInfo sysUserInfo = UserInfoUtils.getInstance().getUserInfo(); String userId = sysUserInfo.getUserId(); + String platUserId = regionInspectionRecordMapper.selectPlatUserId(userId); //修改逻辑 if (StringUtils.isNotBlank(regionInspectionEntity.getId())){ regionInspectionEntity.setUpdateUser(userId); regionInspectionEntity.setInspectionTime(new Date()); regionInspectionEntity.setUpdateTime(new Date()); } + regionInspectionRecordMapper.deleteIMG(regionInspectionEntity.getId()); synchronized (this){ //修改打卡记录 regionInspectionEntity.setCreateUser(userId); regionInspectionRecordMapper.insert(regionInspectionEntity); - //添加记录相对应的图片 if (!regionInspectionEntity.getImgList().isEmpty()){ regionInspectionEntity.getImgList().forEach(obj->{ @@ -158,23 +159,35 @@ @Override public BasicResult selectAppInfo(String regionInspectionId, String userId) { - RegionInspectionEntity obj = regionInspectionRecordMapper.selectInfo(regionInspectionId, userId); + SysUserInfo sysUserInfo = UserInfoUtils.getInstance().getUserInfo(); + userId = sysUserInfo.getUserId(); + String platUserId = regionInspectionRecordMapper.selectPlatUserId(userId); + RegionInspectionEntity obj = regionInspectionRecordMapper.selectInfo(regionInspectionId, platUserId); List<RegionInspectionHazardInformEntity> regionList = new ArrayList<>(); - if (obj.getRegionIds()!=null){ + if (obj!=null && obj.getRegionIds()!=null){ String[] regionIds = obj.getRegionIds().intern().split(","); String[] regions = obj.getRegions().intern().split(","); //区域对象数组 for (int i = 0; i < regionIds.length; i++) { RegionInspectionRecordEntity recordEntity = regionInspectionRecordMapper.regionInfo( regionInspectionId, - userId, + platUserId, regionIds[i]); + List<RegionInspectionRecordImgEntity> imgEntityList=null; + if (recordEntity!=null){ + imgEntityList = regionInspectionRecordMapper.selectImgByRecordId(recordEntity.getId()); + recordEntity.setImgList(imgEntityList); + } RegionInspectionHazardInformEntity regionEntity = RegionInspectionHazardInformEntity .builder() .regionInspectionId(obj.getId()) .regionHazardInformId(regionIds[i]) .region(regions[i]) - .recordEntity(recordEntity).build(); + .recordEntity(recordEntity) + .imgList(imgEntityList) + .result(recordEntity.getResult()) + .status(recordEntity.getStatus()) + .build(); regionList.add(regionEntity); } } @@ -196,7 +209,8 @@ SysUserInfo sysUserInfo = UserInfoUtils.getInstance().getUserInfo(); String companyId = sysUserInfo.getCompanyId(); String userId = sysUserInfo.getUserId(); - map.put("userId",userId); + String platUserId = regionInspectionRecordMapper.selectPlatUserId(userId); + map.put("userId",platUserId); map.put("companyId",companyId); int pageNum = (int) map.get("pageNum"); int pageSize = (int) map.get("pageSize"); diff --git a/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionInspection/service/impl/RegionInspectionServiceImpl.java b/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionInspection/service/impl/RegionInspectionServiceImpl.java index 9cd46f2..78c8956 100644 --- a/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionInspection/service/impl/RegionInspectionServiceImpl.java +++ b/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionInspection/service/impl/RegionInspectionServiceImpl.java @@ -79,10 +79,11 @@ regionInspectionMapper.insertInspectionHazardInform(region); } - //添加任务的时候添加打卡记录 新增的是待打卡状态 - if (StringUtils.isBlank(regionInspectionEntity.getId())){ - for (String addUserId : userIds) { - for (String regionId : regionIds) { + //添加或修改任务的时候添加打卡记录 是待打卡状态 + for (String addUserId : userIds) { + for (String regionId : regionIds) { + RegionInspectionRecordEntity checkIsNull = regionInspectionRecordMapper.regionInfo(regionInspectionEntity.getId(), addUserId, regionId); + if (checkIsNull==null){ RegionInspectionRecordEntity regionInspectionRecordEntity = RegionInspectionRecordEntity .builder() @@ -97,6 +98,7 @@ } } + //添加/修改区域巡检 regionInspectionEntity.setId(regionInspectId); regionInspectionEntity.setCreateUser(userId); diff --git a/hd/pipe/secure/src/main/resources/mapping/HiddenDangerMapper.xml b/hd/pipe/secure/src/main/resources/mapping/HiddenDangerMapper.xml index 07cd957..5725ca3 100644 --- a/hd/pipe/secure/src/main/resources/mapping/HiddenDangerMapper.xml +++ b/hd/pipe/secure/src/main/resources/mapping/HiddenDangerMapper.xml @@ -89,10 +89,10 @@ <update id="update"> update t_hidden_danger <set> - <if test="dangerLocation != null"> + <if test="dangerLocation != null and dangerLocation !=''"> dangerLocation = #{dangerLocation,jdbcType=VARCHAR}, </if> - <if test="title != null"> + <if test="title != null and title !=''"> title = #{title,jdbcType=VARCHAR}, </if> <if test="createTime != null"> @@ -122,7 +122,12 @@ <if test="level != null"> `level` = #{level,jdbcType=INTEGER}, </if> - + <if test="auditUser != null"> + auditUser = #{auditUser,jdbcType=VARCHAR}, + </if> + <if test="auditTime != null"> + auditTime = #{auditTime,jdbcType=TIMESTAMP}, + </if> </set> where id=#{id,jdbcType=VARCHAR} </update> @@ -137,7 +142,8 @@ <select id="selectInfo" resultType="com.thhy.secure.modules.biz.hiddenDanger.entity.HiddenDangerEntity"> select t.id, - t.dangerLocation, + sd.dict_name dangerLocation, + sd.dict_id dictId, t.title, t.createTime, t.auditStatus, @@ -148,10 +154,16 @@ t.companyId, t.level, t.integral, - su.real_name reporter + su.real_name reporter, + t.integral, + t.level, + su2.real_name auditUser, + t.auditTime from t_hidden_danger t LEFT JOIN sys_users su ON su.user_id = t.createUser LEFT JOIN sys_users su1 ON su1.user_id = t.updateUser + LEFT JOIN sys_users su2 ON su2.user_id = t.auditUser + LEFT JOIN sys_dict sd on sd.dict_id = t.dangerLocation where t.id=#{id} </select> @@ -159,7 +171,8 @@ <select id="selectPageList" resultType="com.thhy.secure.modules.biz.hiddenDanger.entity.HiddenDangerEntity"> SELECT t.id, - t.dangerLocation, + sd.dict_name dangerLocation, + sd.dict_id dictId, t.title, t.createTime, t.auditStatus, @@ -170,15 +183,22 @@ t.companyId, t.level, t.integral, + su2.real_name auditUser, + t.auditTime, su.real_name reporter from t_hidden_danger t LEFT JOIN sys_users su ON su.user_id = t.createUser LEFT JOIN sys_users su1 ON su1.user_id = t.updateUser + LEFT JOIN sys_users su2 ON su2.user_id = t.auditUser + LEFT JOIN sys_dict sd on sd.dict_id = t.dangerLocation WHERE t.isUse = 1 and t.companyId = #{companyId} <if test="startTime!= null and endTime!=null and startTime != '' and endTime !=''"> and t.createTime BETWEEN #{startTime} and #{endTime} + </if> + <if test="createUser!= null and createUser != ''"> + and t.createUser =#{createUser} </if> order by t.createTime desc </select> @@ -187,7 +207,8 @@ <select id="selectAppList" resultType="com.thhy.secure.modules.biz.hiddenDanger.entity.HiddenDangerEntity"> SELECT t.id, - t.dangerLocation, + sd.dict_name dangerLocation, + sd.dict_id dictId, t.title, t.createTime, t.auditStatus, @@ -198,16 +219,23 @@ t.companyId, t.level, t.integral, + su2.real_name auditUser, + t.auditTime, su.real_name reporter from t_hidden_danger t LEFT JOIN sys_users su ON su.user_id = t.createUser LEFT JOIN sys_users su1 ON su1.user_id = t.updateUser + LEFT JOIN sys_users su2 ON su2.user_id = t.auditUser + LEFT JOIN sys_dict sd on sd.dict_id = t.dangerLocation WHERE t.isUse = 1 and t.companyId = #{companyId} <if test="startTime!= null and endTime!=null and startTime != '' and endTime !=''"> and t.createTime BETWEEN #{startTime} and #{endTime} </if> + <if test="createUser!= null and createUser != ''"> + and t.createUser =#{createUser} + </if> ORDER BY t.auditStatus, case when t.auditStatus = 0 then t.createTime END, diff --git a/hd/pipe/secure/src/main/resources/mapping/IntegralDetailMapper.xml b/hd/pipe/secure/src/main/resources/mapping/IntegralDetailMapper.xml new file mode 100644 index 0000000..6409c6a --- /dev/null +++ b/hd/pipe/secure/src/main/resources/mapping/IntegralDetailMapper.xml @@ -0,0 +1,325 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.thhy.secure.modules.biz.integralAccount.mapper.IntegralDetailMapper"> + + <insert id="insertDetailAndUpdate"> + insert into t_integral_detail + <trim prefix="(" suffix=")" suffixOverrides=","> + <if test="id != null"> + id, + </if> + <if test="type != null"> + type, + </if> + <if test="integralSource != null"> + integralSource, + </if> + <if test="integralWater != null"> + integralWater, + </if> + <if test="balanc != null"> + balanc, + </if> + <if test="createTime != null"> + createTime, + </if> + <if test="createUser != null"> + createUser, + </if> + <if test="companyId != null"> + companyId, + </if> + <if test="userId != null"> + userId, + </if> + <if test="userType != null"> + userType, + </if> + <if test="remark != null"> + remark, + </if> + </trim> + <trim prefix="values (" suffix=")" suffixOverrides=","> + <if test="id != null"> + #{id,jdbcType=VARCHAR}, + </if> + <if test="type != null"> + #{type,jdbcType=INTEGER}, + </if> + <if test="integralSource != null"> + #{integralSource,jdbcType=VARCHAR}, + </if> + <if test="integralWater != null"> + #{integralWater,jdbcType=DOUBLE}, + </if> + <if test="balanc != null"> + #{balanc,jdbcType=DOUBLE}, + </if> + <if test="createTime != null"> + #{createTime,jdbcType=TIMESTAMP}, + </if> + <if test="createUser != null"> + #{createUser,jdbcType=VARCHAR}, + </if> + <if test="companyId != null"> + #{companyId,jdbcType=VARCHAR}, + </if> + <if test="userId != null"> + #{userId,jdbcType=VARCHAR}, + </if> + <if test="userType != null"> + #{userType,jdbcType=VARCHAR}, + </if> + <if test="remark != null"> + #{remark,jdbcType=VARCHAR}, + </if> + + </trim> + on duplicate key update + <trim suffixOverrides=","> + <if test="type != null"> + type = #{type,jdbcType=INTEGER}, + </if> + <if test="integralSource != null"> + integralSource = #{integralSource,jdbcType=VARCHAR}, + </if> + <if test="integralWater != null"> + integralWater = #{integralWater,jdbcType=DOUBLE}, + </if> + <if test="balanc != null"> + balanc = #{balanc,jdbcType=DOUBLE}, + </if> + <if test="createTime != null"> + createTime = #{createTime,jdbcType=TIMESTAMP}, + </if> + <if test="createUser != null"> + createUser = #{createUser,jdbcType=VARCHAR}, + </if> + <if test="companyId != null"> + companyId = #{companyId,jdbcType=VARCHAR}, + </if> + <if test="userId != null"> + userId = #{userId,jdbcType=VARCHAR}, + </if> + <if test="userType != null"> + userType = #{userType,jdbcType=VARCHAR}, + </if> + <if test="remark != null"> + remark = #{remark,jdbcType=VARCHAR}, + </if> + </trim> + + </insert> + + <insert id="insertAndUpdateAccount"> + insert into t_integral_account + <trim prefix="(" suffix=")" suffixOverrides=","> + <if test="id != null"> + id, + </if> + <if test="userId != null"> + userId, + </if> + <if test="totalIntegral != null"> + totalIntegral, + </if> + <if test="accumulateIntegral != null"> + accumulateIntegral, + </if> + <if test="totalConsumption != null"> + totalConsumption, + </if> + <if test="createTime != null"> + createTime, + </if> + <if test="createUser != null"> + createUser, + </if> + <if test="updateTime != null"> + updateTime, + </if> + <if test="updateUser != null"> + updateUser, + </if> + <if test="userType != null"> + userType, + </if> + </trim> + <trim prefix="values (" suffix=")" suffixOverrides="," > + <if test="id != null"> + #{id,jdbcType=VARCHAR}, + </if> + <if test="userId != null"> + #{userId,jdbcType=VARCHAR}, + </if> + <if test="totalIntegral != null"> + #{totalIntegral,jdbcType=DOUBLE}, + </if> + <if test="accumulateIntegral != null"> + #{accumulateIntegral,jdbcType=DOUBLE}, + </if> + <if test="totalConsumption != null"> + #{totalConsumption,jdbcType=DOUBLE}, + </if> + <if test="createTime != null"> + #{createTime,jdbcType=TIMESTAMP}, + </if> + <if test="createUser != null"> + #{createUser,jdbcType=VARCHAR}, + </if> + <if test="updateTime != null"> + #{updateTime,jdbcType=TIMESTAMP}, + </if> + <if test="updateUser != null"> + #{updateUser,jdbcType=VARCHAR}, + </if> + <if test="userType != null"> + #{userType,jdbcType=INTEGER}, + </if> + + </trim> + on duplicate key update + <trim suffixOverrides=","> + <if test="totalIntegral != null"> + totalIntegral = #{totalIntegral,jdbcType=DOUBLE}, + </if> + <if test="accumulateIntegral != null"> + accumulateIntegral = #{accumulateIntegral,jdbcType=DOUBLE}, + </if> + <if test="totalConsumption != null"> + totalConsumption = #{totalConsumption,jdbcType=DOUBLE}, + </if> + <if test="createTime != null"> + createTime=#{createTime,jdbcType=TIMESTAMP}, + </if> + <if test="createUser != null"> + createUser = #{createUser,jdbcType=VARCHAR}, + </if> + <if test="updateTime != null"> + updateTime = #{updateTime,jdbcType=TIMESTAMP}, + </if> + <if test="updateUser != null"> + updateUser = #{updateUser,jdbcType=VARCHAR}, + </if> + <if test="userType != null"> + userType = #{userType,jdbcType=INTEGER}, + </if> + </trim> + </insert> + <delete id="delete"> + update t_integral_detail set isUse = 0 where id = #{id,jdbcType=VARCHAR} + </delete> + + + <!-- 积分超市 --> + <select id="selectPageInfoList" resultType="com.thhy.secure.modules.biz.integralAccount.entity.IntegralDetailDto"> + SELECT + t.*, + spu.real_name realName, + spu.user_type userTypeName + FROM t_integral_detail t + LEFT JOIN sys_plat_user spu on spu.user_id = t.userId + WHERE t.isUse = 1 and t.type = 2 and t.companyId = #{companyId} + <if test="userId != null and userId !=''"> + AND spu.user_id =#{userId} + </if> + <if test="startTime != null and startTime != '' and endTime !=null and endTime !=''"> + AND t.createTime BETWEEN #{startTime} and #{endTime} + </if> + <if test="userType != null and userType != ''"> + AND t.userType = #{userType} + </if> + order by t.createTime desc + </select> + <!-- 积分超市 --> + <select id="selectPageList" resultType="com.thhy.secure.modules.biz.integralAccount.entity.IntegralDetailEntity"> + SELECT + t.*, + spu.real_name realName, + spu.user_type userTypeName, + DATE_FORMAT(t.createTime, '%Y-%m-%d %H:%m:%s') createDate + FROM t_integral_detail t + LEFT JOIN sys_plat_user spu on spu.user_id = t.userId + WHERE t.isUse = 1 and t.type = 2 and t.companyId = #{companyId} + <if test="userId != null and userId !=''"> + AND spu.user_id =#{userId} + </if> + <if test="startTime != null and startTime != '' and endTime !=null and endTime !=''"> + AND t.createTime BETWEEN #{startTime} and #{endTime} + </if> + <if test="userType != null and userType != ''"> + AND t.userType = #{userType} + </if> + order by t.createTime desc + </select> + + <select id="selectSafeIntegralPageList" resultType="com.thhy.secure.modules.biz.integralAccount.entity.IntegralAccountEntity"> + SELECT + t.id, + spu.real_name realName, + t.accumulateIntegral, + t.totalIntegral, + t.totalConsumption, + t.userType, + t.createTime, + t.userId + FROM t_integral_account t + LEFT JOIN sys_plat_user spu on spu.user_id = t.userId + WHERE 1=1 + <if test="userType != null and userType !=''"> + and t.userType = #{userType} + </if> + <if test="userId != null and userId !=''"> + AND spu.user_id =#{userId} + </if> + <if test="startIntegral != null and startIntegral != '' and endIntegra !=null and endIntegra !=''"> + AND t.accumulateIntegral BETWEEN #{startIntegral} and #{endIntegra} + </if> + order by t.accumulateIntegral desc + </select> + + <select id="selectSafeIntegralInfo" resultType="com.thhy.secure.modules.biz.integralAccount.entity.IntegralDetailDto"> + SELECT + t.*, + DATE_FORMAT(t.createTime, '%Y-%m-%d %H:%m:%s') createDate + FROM t_integral_detail t + WHERE t.isUse = 1 + <if test="companyId != null and companyId !=''"> + and t.companyId = #{companyId} + </if> + <if test="userId != null and userId !=''"> + and t.userId = #{userId} + </if> + <if test="id != null and id !=''"> + and t.id = #{id} + </if> + <if test="type != null and type !=''"> + AND t.type = #{type} + </if> + <if test="startTime != null and startTime != '' and endTime !=null and endTime !=''"> + AND t.createTime BETWEEN #{startTime} and #{endTime} + </if> + order by t.createTime desc + </select> + <select id="selectByOne" resultType="com.thhy.secure.modules.biz.integralAccount.entity.IntegralAccountEntity"> + SELECT + t.id, + t.userId, + spu.real_name realName, + t.accumulateIntegral, + t.totalIntegral, + t.totalConsumption, + t.userType + FROM t_integral_account t + LEFT JOIN sys_plat_user spu on spu.user_id = t.userId + WHERE 1=1 + <if test="id != null and id != ''"> + AND t.id = #{id,jdbcType=VARCHAR} + </if> + <if test="userId != null and userId != ''"> + AND t.userId = #{userId} + </if> + + </select> + +</mapper> \ No newline at end of file diff --git a/hd/pipe/secure/src/main/resources/mapping/RegionInspectionRecordMapper.xml b/hd/pipe/secure/src/main/resources/mapping/RegionInspectionRecordMapper.xml index 0bae3bf..8040942 100644 --- a/hd/pipe/secure/src/main/resources/mapping/RegionInspectionRecordMapper.xml +++ b/hd/pipe/secure/src/main/resources/mapping/RegionInspectionRecordMapper.xml @@ -3,7 +3,7 @@ <mapper namespace="com.thhy.secure.modules.biz.regionInspection.mapper.RegionInspectionRecordMapper"> <insert id="insertIMG"> - insert into t_region_inspection_record + insert into t_region_inspection_record_img <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null"> id, @@ -153,16 +153,23 @@ <delete id="delete"> delete from t_region_inspection_record where id=#{id,jdbcType=VARCHAR} </delete> + <delete id="deleteIMG"> + delete from t_region_inspection_record_img where regionInspectionRecordId=#{regionInspectionRecordId,jdbcType=VARCHAR} + </delete> <delete id="deleteByRegionInspectionId"> delete from t_region_inspection_record where regionInspectionId=#{regionInspectionId,jdbcType=VARCHAR} </delete> + <select id="selectImgByRecordId" resultType="com.thhy.secure.modules.biz.regionInspection.entity.RegionInspectionRecordImgEntity"> + select * from t_region_inspection_record_img where regionInspectionRecordId = #{regionInspectionRecordId} + </select> <select id="selectPageList" resultType="com.thhy.secure.modules.biz.regionInspection.entity.RegionInspectionRecordEntity"> SELECT a.userId, a.regionInspectionId, a.inspectionTime, a.task, + a.standard, a.region, a.realName, IF(a.completeRegionNum = a.needRegionNum,"已完成","待巡检") statusName, @@ -173,6 +180,7 @@ t.regionInspectionId, MIN(t.inspectionTime) inspectionTime, tri.task task, + tri.standard standard, GROUP_CONCAT(DISTINCT trhi.region) region, spu.real_name realName, SUM(t.`status`)/(SELECT count(regionInspectionId) FROM t_region_inspection_hazard_inform WHERE regionInspectionId = t.regionInspectionId) completeRegionNum, @@ -193,9 +201,13 @@ <if test="regionInspectionId !=null and regionInspectionId !=''"> and t.regionInspectionId = #{regionInspectionId} </if> + <if test="userId !=null and userId !=''"> + and t.userId = #{userId} + </if> <if test="startTime != null and endTime != null and startTime !='' and endTime != ''"> and t.inspectionTime BETWEEN str_to_date(#{startTime}, "%Y-%m-%d %H:%i:%s") and str_to_date(#{endTime}, "%Y-%m-%d %H:%i:%s") </if> + GROUP BY t.regionInspectionId,t.userId )a WHERE 1=1 @@ -270,6 +282,7 @@ <select id="regionInfo" resultType="com.thhy.secure.modules.biz.regionInspection.entity.RegionInspectionRecordEntity"> SELECT + t.id, t.userId, t.regionInspectionId, t.regionHazardInformId, @@ -278,7 +291,8 @@ t.result result, GROUP_CONCAT(timg.imgPath) imgPaths, t.location, - spu.real_name realName + spu.real_name realName, + t.status FROM t_region_inspection_record t LEFT JOIN t_region_inspection_record_img timg on t.id = timg.regionInspectionRecordId LEFT JOIN t_region_hazard_inform rhi on rhi.id = t.regionHazardInformId @@ -288,27 +302,52 @@ </select> <select id="selectAppList" resultType="java.util.Map"> + select * from ( SELECT - a.id, - MIN( b.inspectionTime ) inspectionTime, - a.`status`, - a.task, - GROUP_CONCAT(DISTINCT d.region) region - FROM - t_region_inspection a - LEFT JOIN t_region_inspection_record b ON b.regionInspectionId = a.id - LEFT JOIN t_region_inspection_hazard_inform c ON c.regionInspectionId = a.id - LEFT JOIN t_region_hazard_inform d ON c.regionHazardInformId = d.id - LEFT JOIN t_region_inspection_user e on e.regionInspectionId = a.id - WHERE a.companyId = #{companyId} and e.userId = #{userId} - <if test="status != null and status != ''"> - and a.status = #{status} + tri.id, + t.userId , + t.regionInspectionId, + MIN(t.inspectionTime) inspectionTime, + tri.task task, + GROUP_CONCAT(DISTINCT trhi.region) region, + spu.real_name realName, + if( + SUM(t.`status`)/(SELECT count(regionInspectionId) FROM t_region_inspection_hazard_inform WHERE + regionInspectionId = t.regionInspectionId) + = + (SELECT count(regionInspectionId) FROM t_region_inspection_hazard_inform WHERE regionInspectionId = + t.regionInspectionId) + ,1,0) status + from + t_region_inspection_record t + LEFT JOIN t_region_inspection tri on tri.id = t.regionInspectionId + LEFT JOIN t_region_inspection_hazard_inform trihi on trihi.regionInspectionId = t.regionInspectionId + LEFT JOIN t_region_hazard_inform trhi on trhi.id = trihi.regionHazardInformId + LEFT JOIN sys_plat_user spu on spu.user_id = t.userId + WHERE 1=1 + <if test="userId != null and userId != ''"> + and t.userId = #{userId} </if> <if test="startTime != null and endTime != null and startTime !='' and endTime != ''"> - and t.inspectionTime BETWEEN str_to_date(#{startTime}, "%Y-%m-%d %H:%i:%s") and str_to_date(#{endTime}, "%Y-%m-%d %H:%i:%s") + and t.inspectionTime BETWEEN str_to_date(#{startTime}, "%Y-%m-%d %H:%i:%s") and str_to_date(#{endTime}, + "%Y-%m-%d %H:%i:%s") </if> - GROUP BY - a.id + GROUP BY t.regionInspectionId,t.userId + ) entity where 1=1 + <if test="status != null and status != ''"> + and entity.status = #{status} + </if> + + </select> + + <select id="selectPlatUserId" resultType="java.lang.String"> + SELECT + plat_id platId + FROM sys_users + WHERE user_id= #{userId,jdbcType=VARCHAR} + </select> + <select id="getPlatUser" resultType="java.util.Map"> + SELECT * FROM sys_plat_user where user_id = #{userId} </select> </mapper> \ No newline at end of file diff --git a/web/src/api/modules/ductpiecePLM.js b/web/src/api/modules/ductpiecePLM.js index 68f9630..043145c 100644 --- a/web/src/api/modules/ductpiecePLM.js +++ b/web/src/api/modules/ductpiecePLM.js @@ -49,6 +49,9 @@ // 新增管片信息 insertPipeData: (params) => axios.post('/m/modcheck/addPipe', params), + //获取所有模具套号 + getTotalModelNums: (params) => + axios.post('/m/modcheck/allNumType', params), // 修改环号信息 updataRingNumData: (params) => axios.post('m/pipeInfo/updateRingNum', params), diff --git a/web/src/api/modules/materials.js b/web/src/api/modules/materials.js index fcf8f95..e21807a 100644 --- a/web/src/api/modules/materials.js +++ b/web/src/api/modules/materials.js @@ -152,6 +152,21 @@ detailStockInfos: params => axios.get('/materials/suMaterialWarehouse/selectInfo', {params}), + /** + * 钢筋笼材料标识牌 + */ + //钢筋笼材料标识牌列表 + searchSignBoardLists: (params) => + axios.post('/materials/suSteelCageMaterialLabel/selectPageList', params), + //钢筋笼材料标识牌添加/修改 + addSignBoardInfos: (params) => + axios.post('/materials/suSteelCageMaterialLabel/insertAndUpdate', params), + // 删除钢筋笼材料标识牌信息 + deleteSignBoardInfos: params => + axios.get('/materials/suSteelCageMaterialLabel/delete', {params}), + // 钢筋笼材料标识牌信息 + detailSignBoardInfos: params => + axios.get('/materials/suSteelCageMaterialLabel/selectInfo', {params}), /* 预埋件管理 */ @@ -220,5 +235,31 @@ checkGetLists: params => // 修改回显 axios.post('/materials/embedmentCorrection/inventoryList', params), }, + /* 配合比屏管理 */ + mixRatioSrcreen: { + getLists: params => + axios.post('/materials/materialRelease/mixingConsumeList', params), + insert: params => + axios.post('/materials/materialRelease/mixingConsumeIn', params), + update: params => + axios.post('/materials/materialRelease/mixingConsumeUp', params), + delete: params => + axios.post('/materials/materialRelease/mixingConsumeDel', params), + getScreenNames: params => + axios.get('/materials/materialRelease/mixingConsumePull', { params }), + }, + /* 拌合站屏管理 */ + mixingSrcreen: { + getLists: params => + axios.post('/materials/materialRelease/siloMixingList', params), + insert: params => + axios.post('/materials/materialRelease/mixingInsert', params), + update: params => + axios.post('/materials/materialRelease/mixingUpdate', params), + delete: params => + axios.post('/materials/materialRelease/mixingDel', params), + getScreenNames: params => + axios.get('/materials/materialRelease/siloPull', { params }), + }, } diff --git a/web/src/api/modules/mixing.js b/web/src/api/modules/mixing.js index c017b66..d91fa20 100644 --- a/web/src/api/modules/mixing.js +++ b/web/src/api/modules/mixing.js @@ -6,5 +6,8 @@ // H5搅拌站大屏展示数据信息 showHmixings: params => axios.get('/materials/suMaterialWarehouse/selectNewOneByTableNum', {params}), - + getMixing: params => + axios.get('/materials/materialRelease/siloList', {params}), + getMixRatio: params => + axios.post('/materials/materialRelease/mixingConsumeList', params), } \ No newline at end of file diff --git a/web/src/api/modules/safety.js b/web/src/api/modules/safety.js index ad2c24f..28e61c6 100644 --- a/web/src/api/modules/safety.js +++ b/web/src/api/modules/safety.js @@ -323,4 +323,60 @@ responseType: 'blob', data: params }), + + /** + * 安全积分超市模块 + */ + //查询安全积分超市列表 + searchMarketLists: (params) => + axios.post('/secure/integralAccount/selectPageList', params), + //添加或修改安全积分超市 + addUpdateMarketInfo: (params) => + axios.post('/secure/integralAccount/insertAndUpdate', params), + //删除安全积分超市 + deleteMarketInfo: (params) => + axios.get('/secure/integralAccount/delete',{params}), + //安全积分超市导出 + exportMarketFiles:params=> + axios({ + method: 'post', + url: '/secure/integralAccount/exportList', + responseType: 'blob', + data: params + }), + + /** + * 积分明细模块 + */ + //查询积分明细列表 + searchIntegralLists: (params) => + axios.post('/secure/integralAccount/selectSafeIntegralPageList', params), + //查询个人明细列表 + searchPersonLists: (params) => + axios.post('/secure/integralAccount/selectSafeIntegralInfo', params), + //积分明细导出 + exportIntegralFiles:params=> + axios({ + method: 'post', + url: '/secure/integralAccount/exportSafeIntegralInfo', + responseType: 'blob', + data: params + }), + + /** + * 广播文件上传模块 + */ + //查询广播文件列表 + searchBoardLists: (params) => + axios.post('/secure/integralAccount/selectSafeIntegralPageList', params), + //查询所有区域 + getAreaLists: (params) => + axios.post('/screen/audio/groups', params), + //上传文件添加/修改 + addAreaInfos: (params) => + axios.post('/screen/audio/addFile', params), + //上传文件详情 + detailsAreaInfos: (params) => + axios.post('/screen/audio/groupInfo', params), + } \ No newline at end of file diff --git a/web/src/assets/mixing/container_10.png b/web/src/assets/mixing/container_10.png new file mode 100644 index 0000000..15291b0 --- /dev/null +++ b/web/src/assets/mixing/container_10.png Binary files differ diff --git a/web/src/assets/mixing/container_100.png b/web/src/assets/mixing/container_100.png new file mode 100644 index 0000000..5b73dda --- /dev/null +++ b/web/src/assets/mixing/container_100.png Binary files differ diff --git a/web/src/assets/mixing/container_20.png b/web/src/assets/mixing/container_20.png new file mode 100644 index 0000000..2bbe0dc --- /dev/null +++ b/web/src/assets/mixing/container_20.png Binary files differ diff --git a/web/src/assets/mixing/container_40.png b/web/src/assets/mixing/container_40.png new file mode 100644 index 0000000..d2f52d3 --- /dev/null +++ b/web/src/assets/mixing/container_40.png Binary files differ diff --git a/web/src/assets/mixing/container_60.png b/web/src/assets/mixing/container_60.png new file mode 100644 index 0000000..5ced4a7 --- /dev/null +++ b/web/src/assets/mixing/container_60.png Binary files differ diff --git a/web/src/assets/mixing/container_80.png b/web/src/assets/mixing/container_80.png new file mode 100644 index 0000000..38348d1 --- /dev/null +++ b/web/src/assets/mixing/container_80.png Binary files differ diff --git a/web/src/assets/mixing/container_90.png b/web/src/assets/mixing/container_90.png new file mode 100644 index 0000000..47ee2ac --- /dev/null +++ b/web/src/assets/mixing/container_90.png Binary files differ diff --git a/web/src/assets/mixing/header.png b/web/src/assets/mixing/header.png new file mode 100644 index 0000000..be0a727 --- /dev/null +++ b/web/src/assets/mixing/header.png Binary files differ diff --git a/web/src/assets/mixing/list_bg.png b/web/src/assets/mixing/list_bg.png new file mode 100644 index 0000000..462f5e3 --- /dev/null +++ b/web/src/assets/mixing/list_bg.png Binary files differ diff --git a/web/src/assets/mixing/list_l_bg.png b/web/src/assets/mixing/list_l_bg.png new file mode 100644 index 0000000..d8c7dc5 --- /dev/null +++ b/web/src/assets/mixing/list_l_bg.png Binary files differ diff --git a/web/src/assets/mixing/list_r_bg.png b/web/src/assets/mixing/list_r_bg.png new file mode 100644 index 0000000..63add79 --- /dev/null +++ b/web/src/assets/mixing/list_r_bg.png Binary files differ diff --git a/web/src/assets/mixing/mixing_bg1.png b/web/src/assets/mixing/mixing_bg1.png new file mode 100644 index 0000000..a9bf675 --- /dev/null +++ b/web/src/assets/mixing/mixing_bg1.png Binary files differ diff --git a/web/src/assets/mixing/mixing_bg3.png b/web/src/assets/mixing/mixing_bg3.png new file mode 100644 index 0000000..2df17a7 --- /dev/null +++ b/web/src/assets/mixing/mixing_bg3.png Binary files differ diff --git a/web/src/assets/mixing/name_bg.png b/web/src/assets/mixing/name_bg.png new file mode 100644 index 0000000..cf1da41 --- /dev/null +++ b/web/src/assets/mixing/name_bg.png Binary files differ diff --git a/web/src/assets/work_shop.png b/web/src/assets/work_shop.png new file mode 100644 index 0000000..b5104a2 --- /dev/null +++ b/web/src/assets/work_shop.png Binary files differ diff --git a/web/src/components/uploadImage.vue b/web/src/components/uploadImage.vue index b37dbec..870d7ec 100644 --- a/web/src/components/uploadImage.vue +++ b/web/src/components/uploadImage.vue @@ -1,5 +1,5 @@ <template> - <div class="upload_index" style="height:132px"> + <div class="upload_index" style="height:132px;width:100%"> <transition-group name="el-zoom-in-center" class="upload_index"> <div v-for="(item) in fileList" :key="item.id" class="file_lists_style" @mouseenter="showClose(item)" @mouseleave="setClose"> <div :class="{close_icon:close == item.id, close_icons:close != item.id}"> @@ -19,7 +19,8 @@ <el-upload :key="5762" ref="upload" - class="upload_images" + class="upload_images" + :class="{'noshow':disabled===true}" :action="action" :http-request="requestUpload" :show-file-list="false" @@ -208,6 +209,9 @@ position: relative; border: 2px dashed #39B5FE; } + .noshow{ + display: none; + } .avatar_uploader_icon{ font-size: 28px; diff --git a/web/src/router/index.js b/web/src/router/index.js index 0488d44..d1faa3e 100644 --- a/web/src/router/index.js +++ b/web/src/router/index.js @@ -15,6 +15,22 @@ } }, { + path: '/mixing/*', + name: 'mixing', + meta: { + title: '拌和站大屏' + }, + component: () => import('../views/MixingInfo/mixing.vue'), + }, + { + path: '/mixratio/*', + name: 'mixratio', + meta: { + title: '配和站大屏' + }, + component: () => import('../views/MixingInfo/mixRatio.vue'), + }, + { path: `/mixingInfo/num=1`, name: 'mixingInfo', meta: { @@ -111,6 +127,198 @@ component: () => import('../views/MixingInfo/messageInfo.vue'), }, { + path: `/workShop/num=1`, + name: 'workShop', + meta: { + title: '钢筋材料标识牌1' + }, + component: () => import('../views/MixingInfo/workShop.vue'), + }, + { + path: `/workShop/num=2`, + name: 'workShop', + meta: { + title: '钢筋材料标识牌2' + }, + component: () => import('../views/MixingInfo/workShop.vue'), + }, + { + path: `/workShop/num=3`, + name: 'workShop', + meta: { + title: '钢筋材料标识牌3' + }, + component: () => import('../views/MixingInfo/workShop.vue'), + }, + { + path: `/workShop/num=4`, + name: 'workShop', + meta: { + title: '钢筋材料标识牌4' + }, + component: () => import('../views/MixingInfo/workShop.vue'), + }, + { + path: `/workShop/num=5`, + name: 'workShop', + meta: { + title: '钢筋材料标识牌5' + }, + component: () => import('../views/MixingInfo/workShop.vue'), + }, + { + path: `/workShop/num=6`, + name: 'workShop', + meta: { + title: '钢筋材料标识牌6' + }, + component: () => import('../views/MixingInfo/workShop.vue'), + }, + { + path: `/workShop/num=7`, + name: 'workShop', + meta: { + title: '钢筋材料标识牌7' + }, + component: () => import('../views/MixingInfo/workShop.vue'), + }, + { + path: `/workShop/num=8`, + name: 'workShop', + meta: { + title: '钢筋材料标识牌8' + }, + component: () => import('../views/MixingInfo/workShop.vue'), + }, + { + path: `/workShop/num=9`, + name: 'workShop', + meta: { + title: '钢筋材料标识牌9' + }, + component: () => import('../views/MixingInfo/workShop.vue'), + }, + { + path: `/workShop/num=10`, + name: 'workShop', + meta: { + title: '钢筋材料标识牌10' + }, + component: () => import('../views/MixingInfo/workShop.vue'), + }, + { + path: `/workShop/num=11`, + name: 'workShop', + meta: { + title: '钢筋材料标识牌11' + }, + component: () => import('../views/MixingInfo/workShop.vue'), + }, + { + path: `/workShop/num=12`, + name: 'workShop', + meta: { + title: '钢筋材料标识牌12' + }, + component: () => import('../views/MixingInfo/workShop.vue'), + }, + { + path: `/workShop/num=13`, + name: 'workShop', + meta: { + title: '钢筋材料标识牌13' + }, + component: () => import('../views/MixingInfo/workShop.vue'), + }, + { + path: `/workShop/num=14`, + name: 'workShop', + meta: { + title: '钢筋材料标识牌14' + }, + component: () => import('../views/MixingInfo/workShop.vue'), + }, + { + path: `/workShop/num=15`, + name: 'workShop', + meta: { + title: '钢筋材料标识牌15' + }, + component: () => import('../views/MixingInfo/workShop.vue'), + }, + { + path: `/workShop/num=16`, + name: 'workShop', + meta: { + title: '钢筋材料标识牌16' + }, + component: () => import('../views/MixingInfo/workShop.vue'), + }, + { + path: `/workShop/num=17`, + name: 'workShop', + meta: { + title: '钢筋材料标识牌17' + }, + component: () => import('../views/MixingInfo/workShop.vue'), + }, + { + path: `/workShop/num=18`, + name: 'workShop', + meta: { + title: '钢筋材料标识牌18' + }, + component: () => import('../views/MixingInfo/workShop.vue'), + }, + { + path: `/workShop/num=19`, + name: 'workShop', + meta: { + title: '钢筋材料标识牌19' + }, + component: () => import('../views/MixingInfo/workShop.vue'), + }, + { + path: `/workShop/num=20`, + name: 'workShop', + meta: { + title: '钢筋材料标识牌20' + }, + component: () => import('../views/MixingInfo/workShop.vue'), + }, + { + path: `/workShop/num=21`, + name: 'workShop', + meta: { + title: '钢筋材料标识牌21' + }, + component: () => import('../views/MixingInfo/workShop.vue'), + }, + { + path: `/workShop/num=22`, + name: 'workShop', + meta: { + title: '钢筋材料标识牌22' + }, + component: () => import('../views/MixingInfo/workShop.vue'), + }, + { + path: `/workShop/num=23`, + name: 'workShop', + meta: { + title: '钢筋材料标识牌23' + }, + component: () => import('../views/MixingInfo/workShop.vue'), + }, + { + path: `/workShop/num=24`, + name: 'workShop', + meta: { + title: '钢筋材料标识牌24' + }, + component: () => import('../views/MixingInfo/workShop.vue'), + }, + { path: '/ScanBear', name: 'ScanBear', meta: { diff --git a/web/src/views/Basics/ConsigneeIndex.vue b/web/src/views/Basics/ConsigneeIndex.vue index 34eacfd..7fa24a0 100644 --- a/web/src/views/Basics/ConsigneeIndex.vue +++ b/web/src/views/Basics/ConsigneeIndex.vue @@ -13,12 +13,12 @@ </el-select> </div> <div class="header_item"> - <span class="header_label">标段:</span> - <el-select v-model="segmentId" :size="size" clearable placeholder="请选择标段"> + <span class="header_label">单位工程:</span> + <el-select v-model="segmentId" :size="size" clearable placeholder="请选择单位工程"> <el-option v-for="item in sectionData" :key="item.segmentId" - :label="item.segmentName" + :label="item.unitProjectName" :value="item.segmentId"> </el-option> </el-select> @@ -87,12 +87,12 @@ </el-option> </el-select> </el-form-item> - <el-form-item label="标段:" prop="segmentId"> - <el-select v-model="formConsignee.segmentId" :size="size" clearable placeholder="请选择标段"> + <el-form-item label="单位工程:" prop="segmentId"> + <el-select v-model="formConsignee.segmentId" :size="size" clearable placeholder="请选择单位工程"> <el-option v-for="item in sectionData" :key="item.segmentId" - :label="item.segmentName" + :label="item.unitProjectName" :value="item.segmentId"> </el-option> </el-select> diff --git a/web/src/views/DuctpiecePLM/DuctProduct/ProductAnalyse.vue b/web/src/views/DuctpiecePLM/DuctProduct/ProductAnalyse.vue index 1c86c71..5101815 100644 --- a/web/src/views/DuctpiecePLM/DuctProduct/ProductAnalyse.vue +++ b/web/src/views/DuctpiecePLM/DuctProduct/ProductAnalyse.vue @@ -131,8 +131,8 @@ }, grid: { top: "15%", - right: "3%", - left: "2%", + right: "4%", + left: "4%", bottom: "11%", }, xAxis: [ @@ -156,7 +156,7 @@ yAxis: [ { type: "value", - max: 100, + // max: 100, splitNumber: 10, axisLabel: { formatter: "{value}", diff --git a/web/src/views/DuctpiecePLM/DuctProduct/ProductIndex.vue b/web/src/views/DuctpiecePLM/DuctProduct/ProductIndex.vue index fc388bb..f994b8f 100644 --- a/web/src/views/DuctpiecePLM/DuctProduct/ProductIndex.vue +++ b/web/src/views/DuctpiecePLM/DuctProduct/ProductIndex.vue @@ -37,6 +37,7 @@ <div class="header_item"> <span class="header_label">质量标注:</span> <el-select v-model="checkResult" clearable placeholder="请选择质量标注"> + <el-option label="未质检" :value="0"></el-option> <el-option label="合格" :value="1"></el-option> <el-option label="不合格" :value="2"></el-option> <el-option label="报废" :value="3"></el-option> @@ -401,6 +402,21 @@ placeholder="请输入环号" ></el-input> </el-form-item> + <el-form-item label="模具套号:" prop="numType" v-if="asyncTitle"> + <el-select + v-model="formInsert.numType" + clearable + placeholder="请选择模具套号" + > + <el-option + v-for="item in modelNumber" + :key="item" + :label="item" + :value="item" + > + </el-option> + </el-select> + </el-form-item> </el-form> <div slot="footer"> <el-button @click="asyncInsert = false">取 消</el-button> @@ -550,6 +566,7 @@ checkResult: "", // 质量标注 reinforcement: "", // 配筋 reinforcementData: [], // 配筋信息 + modelNumber:[],//模具套号 groutingHoles: "", // 注浆孔 groutingHolesData: [], // 注浆孔信息 blockNum: "", // 块号 @@ -589,6 +606,13 @@ { required: true, message: "请选择配筋", + trigger: ["blur", "change"], + }, + ], + numType: [ + { + required: true, + message: "请选择模具套号", trigger: ["blur", "change"], }, ], @@ -659,6 +683,7 @@ this.getAllProjects(); this.getAllGroupData(); this.searchDuctpiecePLMList(true); + this.getModelNums() }, methods: { // 根据项目获取钢筋笼 模具信息 @@ -674,6 +699,16 @@ this.steelData = []; } }, + //获取所有模具套号 + getModelNums(){ + this.$api.DuctpiecePLM.getTotalModelNums().then(res=>{ + if(res.statusMsg ==='ok'){ + this.modelNumber = res.data + }else{ + this.$message.warning(res.statusMsg) + } + }) + }, // 获取全部班组 async getAllGroupData() { const { data } = await this.$api.DuctpiecePLM.getAllGroupData(); diff --git a/web/src/views/DuctpiecePLM/DuctpieceIndex.vue b/web/src/views/DuctpiecePLM/DuctpieceIndex.vue index ca0b0ed..15c75ab 100644 --- a/web/src/views/DuctpiecePLM/DuctpieceIndex.vue +++ b/web/src/views/DuctpiecePLM/DuctpieceIndex.vue @@ -37,6 +37,7 @@ <div class="header_item"> <span class="header_label">质量标注:</span> <el-select v-model="checkResult" clearable placeholder="请选择质量标注"> + <el-option label="未质检" :value="0"></el-option> <el-option label="合格" :value="1"></el-option> <el-option label="不合格" :value="2"></el-option> <el-option label="报废" :value="3"></el-option> diff --git a/web/src/views/DuctpiecePLM/ProductTerminal/components/ReinsPrint.vue b/web/src/views/DuctpiecePLM/ProductTerminal/components/ReinsPrint.vue index d41604e..1fe85ce 100644 --- a/web/src/views/DuctpiecePLM/ProductTerminal/components/ReinsPrint.vue +++ b/web/src/views/DuctpiecePLM/ProductTerminal/components/ReinsPrint.vue @@ -22,6 +22,7 @@ <div class="main_item_header"> <div class="main_item_title">项目名称:</div> <div class="main_item_datas">{{item.proName}}</div> + <el-button class="table_btn" style="margin-right:15px" size="mini" v-if="showButton('print')" @click="printProp(item)">打印</el-button> </div> <div class="main_item_contents"> <div class="main_item_left"> @@ -73,7 +74,7 @@ @current-change="changePageNum" @size-change="changePageSize" :current-page="pageNum" - :page-sizes="[9, 18, 45, 90]" + :page-sizes="[10, 20, 50, 100]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"> @@ -126,6 +127,17 @@ that.searchButtonInfo(true) }, methods: { + //打印按钮 + printProp(item){ + this.gopPrints(item.produceNumber) + }, + //执行去打印 + gopPrints(numbers){ + const link = document.createElement('a'); + link.id = `link`; + link.href = `printpipe://1,${numbers},1` + link.click() + }, //改变项目 changeProjects(){ this.searchButtonInfo(true) @@ -220,14 +232,14 @@ .main_items{ // width: 100%; // max-width: calc(100%/3 - 25px); - width: 512px; - height: 300px; + width: 645px; + height: 378px; border-top-left-radius: 6px; border-top-right-radius: 6px; border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; background-color: #031A46; - margin: 30px 20px 5px 5px; + margin: 30px 50px 5px 5px; box-shadow:0px 12px 5px 0px #0C4F79; .main_item_header{ diff --git a/web/src/views/DuctpiecePLM/ReinManage/ReinsProduct.vue b/web/src/views/DuctpiecePLM/ReinManage/ReinsProduct.vue index 95b1a51..d1696ec 100644 --- a/web/src/views/DuctpiecePLM/ReinManage/ReinsProduct.vue +++ b/web/src/views/DuctpiecePLM/ReinManage/ReinsProduct.vue @@ -34,6 +34,7 @@ <div class="header_item"> <span class="header_label">质量标注:</span> <el-select v-model="search.isQualified" placeholder="请选择质量标注" clearable> + <el-option label="未质检" :value="0"></el-option> <el-option label="合格" value="1"></el-option> <el-option label="不合格" value="2"></el-option> <el-option label="报废" value="3"></el-option> @@ -120,7 +121,7 @@ <el-table-column prop="qualityTime" label="质检时间" align="center" width="150"></el-table-column> <el-table-column prop="isQualified" label="质量标注" align="center"> <template #default="{row}"> - <div :class="{'isStand':row.isQualified===2&&row.isModel ===1}">{{row.isQualified===1?'合格':row.isQualified===2?'不合格':row.isQualified===3?'报废':''}}</div> + <div :class="{'isStand':row.isQualified===2&&row.isModel ===1}">{{row.isQualified===1?'合格':row.isQualified===0?'未质检':row.isQualified===2?'不合格':row.isQualified===3?'报废':''}}</div> </template> </el-table-column> <el-table-column prop="isModel" label="是否入模" align="center"> diff --git a/web/src/views/DuctpiecePLM/ReinManage/components/ProductsData.vue b/web/src/views/DuctpiecePLM/ReinManage/components/ProductsData.vue index 0c9482d..bb62572 100644 --- a/web/src/views/DuctpiecePLM/ReinManage/components/ProductsData.vue +++ b/web/src/views/DuctpiecePLM/ReinManage/components/ProductsData.vue @@ -90,8 +90,8 @@ }, grid: { top: "15%", - right: "3%", - left: "2%", + right: "4%", + left: "3%", bottom: "11%", }, xAxis: [ @@ -115,7 +115,7 @@ yAxis: [ { type: "value", - max: 100, + // max: 100, splitNumber: 10, axisLabel: { formatter: "{value}", diff --git a/web/src/views/DuctpiecePLM/ReinManage/components/ReinsInvent.vue b/web/src/views/DuctpiecePLM/ReinManage/components/ReinsInvent.vue index ac992e6..a3c6a59 100644 --- a/web/src/views/DuctpiecePLM/ReinManage/components/ReinsInvent.vue +++ b/web/src/views/DuctpiecePLM/ReinManage/components/ReinsInvent.vue @@ -138,8 +138,11 @@ this.$api.Reinforce.searchProjectSize({proId:val,pageNum: 1, pageSize:100000000}).then(res=>{ if(res.statusMsg === 'ok'){ - if(this.search.proId ===""){ + if(val ===""){ this.optionsSize = [] + this.$set(this.search,'sizeId','') + this.$set(this.search,'reinforcementId','') + this.$set(this.search,'blockId','') }else{ this.optionsSize = res.data.list } diff --git a/web/src/views/DuctpiecePLM/ReinManage/components/RingsNumber.vue b/web/src/views/DuctpiecePLM/ReinManage/components/RingsNumber.vue index 334d8a5..5ca201b 100644 --- a/web/src/views/DuctpiecePLM/ReinManage/components/RingsNumber.vue +++ b/web/src/views/DuctpiecePLM/ReinManage/components/RingsNumber.vue @@ -147,8 +147,9 @@ this.$api.Reinforce.searchProjectSize({proId:val,pageNum: 1, pageSize:100000000}).then(res=>{ if(res.statusMsg === 'ok'){ - if(this.search.proId ===""){ + if(val ===""){ this.optionsSize = [] + this.$set(this.search,'sizeId','') }else{ this.optionsSize = res.data.list } diff --git a/web/src/views/GoodManage/BearSignboard.vue b/web/src/views/GoodManage/BearSignboard.vue new file mode 100644 index 0000000..45988f6 --- /dev/null +++ b/web/src/views/GoodManage/BearSignboard.vue @@ -0,0 +1,373 @@ +<template> + <div class="main"> + <div class="main_header"> + <div class="header_item"> + <span class="header_label">区域:</span> + <el-select v-model="search.region" placeholder="请选择区域" clearable> + <el-option + v-for="item in 24" + :key="item" + :label="item" + :value="item"> + </el-option> + </el-select> + </div> + <div class="header_item"> + <span class="header_label">录入方式:</span> + <el-select v-model="search.type" placeholder="请选择录入方式" clearable> + <el-option + v-for="item in optionsIncome" + :key="item.value" + :label="item.label" + :value="item.value"> + </el-option> + </el-select> + </div> + <div class="header_item"> + <span class="header_label">创建时间:</span> + <el-date-picker + v-model="search.time" + type="daterange" + value-format="yyyy-MM-dd HH:mm:ss" + :default-time="['00:00:00','23:59:59']" + range-separator="-" + start-placeholder="起始时间" + end-placeholder="结束时间"> + </el-date-picker> + </div> + <div class="header_item"> + <el-button icon="el-icon-search" v-if="showButton('search')" @click="searchButtonInfo(true)">查询</el-button> + <el-button class="search_btn" icon="el-icon-plus" v-if="showButton('insert')" @click="insertProp">新增</el-button> + </div> + </div> + <div class="main_content"> + <el-table + v-loading="loading" + :data="dataList" + height="100%"> + <el-table-column align="center" label="序号" width="60"> + <template #default="scope"> + <span>{{(pageNum - 1) * pageSize + scope.$index + 1}}</span> + </template> + </el-table-column> + <el-table-column prop="region" label="区域" align="center" width="120"></el-table-column> + <el-table-column prop="createTime" label="创建时间" align="center" width="150"></el-table-column> + <el-table-column prop="materialName" label="材料名称" align="center" width="120"></el-table-column> + <el-table-column prop="manufacturer" label="生产厂家" align="center" width="120"></el-table-column> + <el-table-column prop="specifications" label="规格型号" align="center" width="150"></el-table-column> + <el-table-column prop="heatNumber" label="炉(批)号" align="center" width="150" show-overflow-tooltip></el-table-column> + <el-table-column prop="inNumber" label="进场数量" align="center" width="120" show-overflow-tooltip></el-table-column> + <el-table-column prop="reportTime" label="报检日期" align="center" width="150" show-overflow-tooltip></el-table-column> + <el-table-column prop="reportNum" label="报告编号" align="center" width="150" show-overflow-tooltip></el-table-column> + <el-table-column prop="status" label="检验状态" align="center" width="150"> + <template #default="{row}"> + {{optionsCheckstatus&&optionsCheckstatus[row.status-1].label}} + </template> + </el-table-column> + <el-table-column prop="type" label="录入方式" align="center"> + <template #default="{row}"> + {{optionsIncome&&optionsIncome[row.type].label}} + </template> + </el-table-column> + <el-table-column label="操作" align="center" width="200"> + <template #default="{ row }"> + <el-button class="table_btn" size="mini" v-if="showButton('update')" @click="updateProp(row)">修改</el-button> + <el-button class="delete_btn" size="mini" v-if="showButton('delete')" @click="deleteInfo(row)">删除</el-button> + </template> + </el-table-column> + </el-table> + </div> + <div class="main_footer"> + <el-pagination + background + @current-change="changePageNum" + @size-change="changePageSize" + :current-page="pageNum" + :page-sizes="[10, 20, 50, 100]" + :page-size="pageSize" + layout="total, sizes, prev, pager, next, jumper" + :total="total"> + </el-pagination> + </div> + <el-dialog + class="prop_dialog" + :title="asyncTitle ? '添加' : '修改'" + :close-on-click-modal="false" + :visible.sync="asyncVisible" + width="35%"> + <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="auto" class="rule_form"> + <el-form-item label="区域:" prop="region"> + <el-select v-model="ruleForm.region" placeholder="请选择区域"> + <el-option + v-for="item in 24" + :key="item" + :label="item" + :value="item"> + </el-option> + </el-select> + </el-form-item> + <el-form-item label="材料名称:" prop="materialName"> + <el-input v-model="ruleForm.materialName" :size="size" clearable placeholder="请输入材料名称"></el-input> + </el-form-item> + <el-form-item label="生产厂家:" prop="manufacturer"> + <el-input v-model="ruleForm.manufacturer" :size="size" clearable placeholder="请输入生产厂家"></el-input> + </el-form-item> + <el-form-item label="规格型号:" prop="specifications"> + <el-input v-model="ruleForm.specifications" :size="size" clearable placeholder="请输入规格型号"></el-input> + </el-form-item> + <el-form-item label="炉(批)号:" prop="heatNumber"> + <el-input v-model="ruleForm.heatNumber" :size="size" type="textarea" :rows="5" clearable placeholder="请输入炉(批)号"></el-input> + </el-form-item> + <el-form-item label="进场数量:" prop="inNumber"> + <el-input v-model="ruleForm.inNumber" :size="size" type="textarea" :rows="5" clearable placeholder="请输入进场数量"></el-input> + </el-form-item> + <el-form-item label="报检日期:" prop="reportTime"> + <el-input v-model="ruleForm.reportTime" :size="size" type="textarea" :rows="5" clearable placeholder="请输入报检日期"></el-input> + </el-form-item> + <el-form-item label="报告编号:" prop="reportNum"> + <el-input v-model="ruleForm.reportNum" :size="size" type="textarea" :rows="5" clearable placeholder="请输入报告编号"></el-input> + </el-form-item> + <el-form-item label="检验状态:" prop="status"> + <el-select v-model="ruleForm.status" placeholder="请选择检验状态"> + <el-option + v-for="item in optionsCheckstatus" + :key="item.value" + :label="item.label" + :value="item.value"> + </el-option> + </el-select> + </el-form-item> + </el-form> + <div slot="footer"> + <el-button @click="asyncVisible = false">取 消</el-button> + <el-button class="submit_btn" @click="asyncTitle ? submitInsert() : submitUpdate()">提 交</el-button> + </div> + </el-dialog> + </div> +</template> + +<script> +import { buttonPinia } from '../../pinia/index'; +import { throttle, changeSize } from '../../plugins/public'; // 导入节流、动态切换组件尺寸方法 + export default { + data() { + return { + size: changeSize(), // 组件尺寸 + pageNum: 1, + pageSize: 10, + search:{},//查询条件 + total: 0, + loading: false, + dataList: [], //钢筋材料管理信息列表 + asyncTitle: true, // 对话框title 新增:true 修改:false + asyncVisible: false, // 添加 修改对话框 + ruleForm: { + }, // 按钮表单 + rules: { + reportNum: [{ + required: true, + message: '请输入报告编号', + trigger: 'blur' + }], + status: [{ + required: true, + message: '请选择检验状态', + trigger: 'change' + }], + region: [{ + required: true, + message: '请选择区域', + trigger: 'change' + }], + reportTime: [{ + required: true, + message: '请输入检验日期', + trigger: 'blur' + }], + inNumber: [{ + required: true, + message: '请输入进场数量', + trigger: 'blur' + }], + manufacturer: [{ + required: true, + message: '请输入生产厂家', + trigger: 'blur' + }], + specifications: [{ + required: true, + message: '请输入规格型号', + trigger: 'blur' + }], + heatNumber: [{ + required: true, + message: '请输入炉(批)号', + trigger: 'blur' + }], + materialName: [{ + required: true, + message: '请输入材料名称', + trigger: 'blur' + }], + }, + optionsIncome:[ + { + label:'自动', + value:"0" + }, + { + label:'手动', + value:'1' + } + ], + optionsCheckstatus:[ + { + label:'合格', + value:1 + }, + { + label:'待检', + value:2 + } + ], + } + }, + watch: { + asyncVisible(bol) { + if(!bol) { + this.ruleForm = {}; + this.$refs.ruleForm.resetFields(); + } + } + }, + mounted() { + const that = this; + // 根据窗口大小动态修改组件尺寸 + window.onresize = () => { + that.size = changeSize(); + } + that.searchButtonInfo(true); + }, + methods: { + // 查询按钮列表信息 + searchButtonInfo(bol) { + if(bol) { + this.pageNum = 1; + } + let params = Object.assign({},this.search,{ + pageNum: this.pageNum, + pageSize: this.pageSize + }) + params.startTime=this.search.time&&this.search.time[0], + params.endTime=this.search.time&&this.search.time[1] + delete params.time + this.loading = true; + this.$api.Materials.searchSignBoardLists(params).then((res) => { + if(res.statusMsg === 'ok') { + this.total = res.data.total; + this.dataList = res.data.list; + } + this.loading = false; + }) + }, + // 新增按钮信息 + insertProp() { + this.asyncTitle = true; + this.asyncVisible = true; + }, + // 修改按钮信息 + updateProp(row) { + this.asyncTitle = false; + this.asyncVisible = true; + this.$api.Materials.detailSignBoardInfos({id: row.id}).then(res=>{ + if(res.statusMsg === 'ok'){ + this.ruleForm = res.data + let projectArr = [] + res.data.supplierPros.forEach(item=>{ + projectArr.push(item.proId) + }) + this.$set(this.ruleForm,'proIds',projectArr) + }else{ + this.$message.warning(res.statusMsg) + } + }) + }, + // 删除按钮信息 + deleteInfo(row) { + this.$confirm("该操作将删除该信息,是否继续删除?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning" + }) + .then(() => { + this.$api.Materials.deleteSignBoardInfos({id: row.id}) + .then(res => { + if(res.statusMsg === 'ok') { + this.searchButtonInfo(true); + this.$message.success("删除成功!"); + } else { + this.$message.warning(res.statusMsg); + } + }) + }) + .catch(() => { + this.$message.warning("您已取消"); + }) + }, + // 提交添加按钮信息 + submitInsert: throttle(function() { + this.$refs.ruleForm.validate((valid) => { + if(valid) { + const params = Object.assign({}, this.ruleForm); + params.type = 1 + this.$api.Materials.addSignBoardInfos(params).then((res) => { + if(res.statusMsg === 'ok') { + this.asyncVisible = false; + this.searchButtonInfo(true); + this.$message.success('添加成功!'); + } else { + this.$message.warning(res.statusMsg); + } + }) + } + }) + }, 3000), + // 提交修改按钮信息 + submitUpdate: throttle(function() { + this.$refs.ruleForm.validate((valid) => { + if(valid) { + const params = Object.assign({}, this.ruleForm); + this.$api.Materials.addSignBoardInfos(params).then((res) => { + if(res.statusMsg === 'ok') { + this.asyncVisible = false; + this.searchButtonInfo(true); + this.$message.success('修改成功!'); + } else { + this.$message.warning(res.statusMsg); + } + }) + } + }) + }, 3000), + // 判断按钮权限信息 + showButton(str) { + const pinia = buttonPinia(); + return pinia.$state.buttonInfo.includes(str); + }, + // 切换页数 + changePageNum(page) { + this.pageNum = page; + this.searchButtonInfo(); + }, + // 切换每页条数 + changePageSize(size) { + this.pageSize = size; + this.searchButtonInfo(); + } + } + } +</script> + +<style lang="sass" scoped> +@import '../../style/layout-main.scss'; +</style> \ No newline at end of file diff --git a/web/src/views/GoodManage/CostStatistics/RawCost.vue b/web/src/views/GoodManage/CostStatistics/RawCost.vue index 005def8..ca4da7d 100644 --- a/web/src/views/GoodManage/CostStatistics/RawCost.vue +++ b/web/src/views/GoodManage/CostStatistics/RawCost.vue @@ -391,12 +391,14 @@ } } .main_middle_matter{ - padding-top: 15px; + // padding-top: 15px; width: 100%; display: flex; - justify-content: space-between; + flex-wrap: wrap; + // justify-content: space-between; .middle_items{ + margin: 15px 10px 0px 0px; padding: 0.6% 2.4%; background: url('../../../assets/stir_img.png') no-repeat; background-size: 100% 100%; diff --git a/web/src/views/GoodManage/MixRatioScreen.vue b/web/src/views/GoodManage/MixRatioScreen.vue new file mode 100644 index 0000000..177c8f3 --- /dev/null +++ b/web/src/views/GoodManage/MixRatioScreen.vue @@ -0,0 +1,573 @@ +<!-- 物资管理 ==> 配合比屏管理--> +<template> + <div class="main"> + <div class="main_header"> + <div class="header_item"> + <span class="header_label">配和比屏:</span> + <el-select size="mini" v-model="queryInfo.mixingSignboardId" placeholder="请选择配和比屏" clearable> + <el-option v-for="item in selects.screenNames" :key="item.value" :label="item.label" + :value="item.value"></el-option> + </el-select> + </div> + <!-- <div class="header_item"> + <span class="header_label">录入方式:</span> + <el-select size="mini" v-model="queryInfo.stata" placeholder="请选择录入方式"> + <el-option v-for="item in selects.stata" :key="item.value" :label="item.label" :value="item.value"></el-option> + </el-select> + </div> --> + <div class="header_item"> + <span class="header_label">创建时间:</span> + <el-date-picker type="daterange" v-model="times" value-format="yyyy-MM-dd" start-placeholder="起始时间" + end-placeholder="结束时间" @change="changeTime" clear></el-date-picker> + </div> + <div class="header_item"> + <el-button icon="el-icon-search" v-permission="'search'" @click="queryReset">查询</el-button> + <el-button icon="el-icon-plus" v-permission="'insert'" @click="addRow">新增</el-button> + </div> + </div> + + <div class="main_content"> + <div class="main_content_wrap"> + <div class="table" v-for="(item, index) in tableData" :key="index"> + + <div class="row table_head"> + <div class="table_head_item"> + <span class="text title">{{ item.signboardName }}</span> + <span class="text">创建时间: {{ item.createTime }}</span> + <!-- <span class="text">录入方式: {{ item.inType }}</span> --> + </div> + <div class="table_head_item"> + <el-button v-permission="'update'" @click="updateRow(index)">修改</el-button> + <el-button v-permission="'delete'" @click="deleteRow(index)">删除</el-button> + </div> + </div> + + <div class="row"> + <div class="name">工程名称</div> + <div class="value">{{ item.proName }}</div> + </div> + + <div class="row"> + <div class="name">施工单位</div> + <div class="value">{{ item.constructionUnit }}</div> + </div> + + <div class="row aline"> + <div> + <div class="name">施工日期</div> + <div class="value">{{ item.saveStamp }}</div> + </div> + <div> + <div class="name">施工部位</div> + <div class="value">{{ item.construction }}</div> + </div> + </div> + + <div class="row" v-for="sub in item.dataLists" :key="sub.name"> + <div class="column"> + <div class="name">{{ sub.name }}</div> + <div class="column-item" v-for="(sub, index) in sub.value" :key="index">{{ sub }}</div> + </div> + </div> + + </div> + </div> + </div> + + <!-- dialog --> + <el-dialog class="prop_dialog" width="80%" v-if="isRenderDialog" :title="dialogTitle" :visible.sync="asyncVisible" + @close="closeDialog"> + <el-form ref="ruleForm" class="rule_form" :model="ruleForm" :rules="rules"> + <el-form-item label="拌和站屏:" prop="mixingSignboardId"> + <el-select size="mini" v-model="ruleForm.mixingSignboardId" :disabled="isUpdate" placeholder="请选择拌和站屏" + @change="changeSelectForm($event)"> + <el-option v-for="item in selects.screenNames" :key="item.value" :label="item.label" + :value="item.value"></el-option> + </el-select> + </el-form-item> + <el-form-item label="工程名称:" prop="proName"> + <el-input v-model="ruleForm.proName" size="mini" placeholder="请输入工程名称" clearable disabled></el-input> + </el-form-item> + <el-form-item label="施工单位:" prop="constructionUnit"> + <el-input v-model="ruleForm.constructionUnit" size="mini" placeholder="请输入施工单位" clearable></el-input> + </el-form-item> + <el-row> + <el-col :span="12"> + <el-form-item label="施工日期:" prop="saveStamp"> + <el-date-picker v-model="ruleForm.saveStamp" size="mini" value-format="yyyy-MM-dd" placeholder="请输入施工日期" + clearable></el-date-picker> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="施工部位:" prop="construction"> + <el-input v-model="ruleForm.construction" size="mini" placeholder="请输入施工部位" clearable></el-input> + </el-form-item> + </el-col> + </el-row> + + <el-button style="margin: 0 0 20px 130px;" @click="addFormCol">添加材料</el-button> + + <div style="display: flex;"> + <div style="margin-right: 10px;" v-for="(item, index) in ruleForm.infos " :key="index"> + <el-form-item :label="index === 0 ? '材料名称' : ''" :prop="`infos.${index}.dictId`"> + <!-- <el-select v-model="item.dictId" size="mini" placeholder="请选择材料名称"> + <el-option v-for="item in selects.materials" :key="item.value" :label="item.label" + :value="item.value"></el-option> + </el-select> --> + <el-input v-model="item.dictId" size="mini" placeholder="请输入" clearable></el-input> + </el-form-item> + <el-form-item :label="index === 0 ? '规格型号' : ''" :prop="`infos.${index}.spec`"> + <el-input v-model="item.spec" size="mini" placeholder="请输入" clearable></el-input> + </el-form-item> + <el-form-item :label="index === 0 ? '生产厂家' : ''" :prop="`infos.${index}.manufacturer`"> + <el-input v-model="item.manufacturer" size="mini" placeholder="请输入" clearable></el-input> + </el-form-item> + <el-form-item :label="index === 0 ? '材料含水率(%)' : ''" :prop="`infos.${index}.watFull`"> + <el-input v-model="item.watFull" size="mini" placeholder="请输入" clearable></el-input> + </el-form-item> + <el-form-item :label="index === 0 ? '理论用量(kg/m³)' : ''" :prop="`infos.${index}.planAmnt`"> + <el-input v-model="item.planAmnt" size="mini" placeholder="请输入" clearable></el-input> + </el-form-item> + <el-form-item :label="index === 0 ? '实际用量(kg/m³)' : ''" :prop="`infos.${index}.factAmnt`"> + <el-input v-model="item.factAmnt" size="mini" placeholder="请输入" clearable></el-input> + </el-form-item> + </div> + </div> + + </el-form> + <div slot="footer"> + <el-button @click="asyncVisible = false">取 消</el-button> + <el-button class="submit_btn" @click="onSubmit('ruleForm')">提 交</el-button> + </div> + </el-dialog> + + </div> +</template> +<script> +export default { + data() { + return { + loading: false, + isRenderDialog: false, + asyncVisible: false, + submitMode: '', // add update + times: [], // 时间范围 + selects: { + screenNames: [], // 配合比屏 + // materials: [] // 材料名称[先改成输入,,字典表材料不匹配] + }, // 下拉框状态选择汇总 + tableData: [{ + inType: '', // 录入方式 + mixingSignboardId: '', // 屏id + createTime: '', // 创建时间 + signboardName: '', // 标识排 + proName: '', // 工程名称 + constructionUnit: '', // 施工单位 + saveStamp: '', // 施工日期 + construction: '', // 施工部位 + mixingConsumeId: '', // 每个材料id + dataLists: [ + {name: '材料名称', type: 'dictId', value: []}, // 材料名称 + {name: '规格型号', type: 'spec', value: []}, // 规格型号 + {name: '生产厂家', type: 'manufacturer', value: []}, // 生产厂家 + {name: '材料含水率(%)', type: 'watFull', value: []}, // 含水率 + {name: '理论用量(kg/m³)', type: 'planAmnt', value: []}, // 理论用量 + {name: '实际用量(kg/m³)', type: 'factAmnt', value: []}, // 实际用量 + ], + dataListFlat: [] // 修改时赋值使用 + }], + ruleForm: { + mixingSignboardId: '', // 屏名称id + proName: '', // 工程名称 [拌和站屏下拉框联动] + constructionUnit: '', // 施工单位 + saveStamp: '', // 施工日期 + construction: '', // 施工部位 + infos: [{ + dictId: '', + spec: '', + manufacturer: '', + watFull: '', + planAmnt: '', + factAmnt: '', + }] + }, + queryInfo: { + pageNum: 1, + pageSize: 9999, + // stata: '', // 录入方式 + mixingSignboardId: '', // 拌和站屏名称 + strTime: '', + endTime: '', + }, + } + }, + computed: { + dialogTitle() { + return this.submitMode === 'update' ? '修改' : '添加' + }, + isUpdate() { + return this.submitMode === 'update' + }, + }, + created() { + this.$http = this.$api.Materials.mixRatioSrcreen + this.rawRuleFormInfos = {...this.ruleForm.infos[0]} // 原始的infos.添加材料使用 + this.selects.stata = [ // 录入方式 + {value: 1, label: '自动'}, + {value: 2, label: '手动'}, + ] + this.selects.stataMap = { + 1: '自动', + 2: '手动', + } + this.rules = { + mixingSignboardId: [{required: true, message: '请选择拌和站屏', trigger: 'change'}], + proName: [{required: true, message: '请输入工程名称', trigger: 'change'}], + constructionUnit: [{required: true, message: '请输入工程名称', trigger: 'blur'}], + saveStamp: [{required: true, message: '请输入施工日期', trigger: 'blur'}], + construction: [{required: true, message: '请输入施工部位', trigger: 'blur'}], + infos: [{ + dictId: [{required: true, message: '请输入', trigger: 'blur'}], + spec: [{required: true, message: '请输入', trigger: 'blur'}], + manufacturer: [{required: true, message: '请输入', trigger: 'blur'}], + watFull: [{required: true, message: '请输入', trigger: 'blur'}], + planAmnt: [{required: true, message: '请输入', trigger: 'blur'}], + factAmnt: [{required: true, message: '请输入', trigger: 'blur'}], + }] + } + this.getLists() + this.getScreenNames() + }, + methods: { + // 获取table列表数据 + getLists() { + this.$http.getLists(this.queryInfo).then(res => { + this.tableData = [{ + inType: '', // 录入方式 + mixingSignboardId: '', // 屏id + createTime: '', // 创建时间 + signboardName: '', // 标识排 + proName: '', // 工程名称 + constructionUnit: '', // 施工单位 + saveStamp: '', // 施工日期 + construction: '', // 施工部位 + mixingConsumeId: '', // 每个材料id + dataLists: [ + {name: '材料名称', type: 'dictId', value: []}, // 材料名称 + {name: '规格型号', type: 'spec', value: []}, // 规格型号 + {name: '生产厂家', type: 'manufacturer', value: []}, // 生产厂家 + {name: '材料含水率(%)', type: 'watFull', value: []}, // 含水率 + {name: '理论用量(kg/m³)', type: 'planAmnt', value: []}, // 理论用量 + {name: '实际用量(kg/m³)', type: 'factAmnt', value: []}, // 实际用量 + ], + dataListFlat: [] // 修改时赋值使用 + }] + if (res.statusMsg === 'ok' && res.data) { + const {list} = res.data + if (list && list.length) { + let temps = JSON.parse(JSON.stringify(this.tableData[0])) + list.forEach((item, index) => { + if (!this.tableData[index]) { + this.tableData.push(JSON.parse(JSON.stringify(temps))) + } + + let {tmixingConsumes, signboardName, proName} = item + let curTableData = this.tableData[index] + curTableData.signboardName = signboardName + curTableData.proName = proName + + if (tmixingConsumes && tmixingConsumes.length) { + if (!curTableData.mixingSignboardId) { + curTableData.constructionUnit = tmixingConsumes[0].constructionUnit + curTableData.createTime = tmixingConsumes[0].createTime + curTableData.mixingSignboardId = tmixingConsumes[0].mixingSignboardId + curTableData.saveStamp = tmixingConsumes[0].saveStamp + curTableData.construction = tmixingConsumes[0].construction + } + + tmixingConsumes.forEach(item => { + curTableData.dataLists.forEach(val => { + item[val.type] && val.value.push(item[val.type]) + }) + curTableData.dataListFlat.push({ + constructionUnit: item.constructionUnit, + mixingConsumeId: item.mixingConsumeId, + dictId: item.dictId, + spec: item.spec, + manufacturer: item.manufacturer, + watFull: item.watFull, + planAmnt: item.planAmnt, + factAmnt: item.factAmnt, + star: item.star + }) + }) + } + }) + } + } + }) + }, + //获取字典表材料名称 + // async getDicFilteredData() { + // let params = {pageNum: 1, pageSize: 100000000} + // let {data} = await this.$api.Dictionary.searchDictionary(params) + // data.list.forEach(item => { + // if (item.dictType === 'pipe_materials') { + // this.selects.materials.push({ + // label: item.dictName, + // value: item.dictId, + // }) + // } + // }) + // }, + // 获取配比屏名称 + async getScreenNames() { + const params = {pageNum: 1, pageSize: 9999} + let {data} = await this.$http.getScreenNames(params) + let temps = [] + data.forEach(item => { + temps.push({ + label: item.signboardName, + value: item.mixingSignboardId, + proName: item.proName, + }) + }) + this.selects.screenNames.push(...temps) + }, + // 查询按钮列表信息 + queryReset() { + this.getLists() + }, + resetForm(formName) { + this.$refs[formName].resetFields() + + let ruleFormItem = this.ruleForm.infos[0] + let rulesItem = this.rules.infos[0] + this.ruleForm.infos = [{...ruleFormItem}] + this.rules.infos = [{...rulesItem}] + }, + showDialog() { + // eslint-disable-next-line no-async-promise-executor + return new Promise(async resolve => { + if (!this.isRenderDialog) { + this.isRenderDialog = true + } + // if (!this.selects.materials.length) { + // await this.getDicFilteredData() + // } + this.asyncVisible = true + this.$nextTick(() => { + resolve() + }) + }) + }, + closeDialog() { + this.asyncVisible = false + this.resetForm('ruleForm') + }, + addRow() { + this.submitMode = 'add' + this.showDialog() + }, + updateRow(i) { + this.submitMode = 'update' + this.showDialog().then(() => { + const {mixingSignboardId, proName, constructionUnit, saveStamp, construction, dataListFlat} = this.tableData[i] + this.ruleForm = Object.assign(this.ruleForm, { + mixingSignboardId, + proName, + constructionUnit, + saveStamp, + construction, + infos: JSON.parse(JSON.stringify(dataListFlat)) + }) + this.changeSelectForm(mixingSignboardId) + }) + }, + deleteRow(i) { + this.$confirm("该操作将删除该信息,是否继续删除?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning" + }).then(() => { + let star = '' + let mixingConsumeIds = [] + this.tableData[i].dataListFlat.forEach((item, index) => { + if (index === 0) { + star = item.star + '' + } + mixingConsumeIds.push(item.mixingConsumeId) + }) + this.$http.delete({star, mixingConsumeIds}).then(res => { + if (res.statusMsg === 'ok') { + this.getLists() + this.$message.success("删除成功!") + } else { + this.$message.warning(res.statusMsg) + } + }) + }) + }, + addFormCol() { + let ruleFormItem = this.rawRuleFormInfos + let rulesItem = this.rules.infos[0] + + this.ruleForm.infos.push({...ruleFormItem}) + this.rules.infos.push({...rulesItem}) + }, + onSubmit(formName) { + this.$refs[formName].validate((valid) => { + if (!valid) return false + const {mixingSignboardId, proName, constructionUnit, saveStamp, construction, infos} = this.ruleForm + + let newInfos = JSON.parse(JSON.stringify(infos)) + newInfos.forEach(item => { + item.saveStamp = saveStamp + item.construction = construction + item.constructionUnit = constructionUnit + }) + const params = { + mixingSignboardId, + proName, + mixingConsume: newInfos + } + if (this.isUpdate) { + // 更新 + this.$http.update(params).then((res) => { + if (res.statusMsg === 'ok') { + this.closeDialog() + this.getLists() + this.$message.success('更新成功!') + } else { + this.$message.warning(res.statusMsg) + } + }) + } else { + // 添加 + this.$http.insert(params).then((res) => { + if (res.statusMsg === 'ok') { + this.closeDialog() + this.getLists() + this.$message.success('添加成功!') + } else { + this.$message.warning(res.statusMsg) + } + }) + } + }) + }, + changeTime(times) { + times = times || ['', ''] + this.queryInfo.strTime = times[0] + this.queryInfo.endTime = times[1] + }, + changeSelectForm(val) { + let item = this.selects.screenNames.find(obj => obj.value === val) + this.ruleForm.proName = item.proName + } + } +} +</script> + +<style lang="scss" scoped> +@import '@/style/layout-main.scss'; + +.main_content_wrap { + height: 100%; + overflow: auto; + + .table { + display: flex; + flex-direction: column; + font-size: 16px; + margin-bottom: 26px; + color: #fff; + + .row.table_head { + display: flex; + justify-content: space-between; + text-align: left; + color: #BEE2F0; + background: rgba(1, 142, 196, .35); + + .table_head_item { + margin: 0 20px; + + .title { + color: #39B5FE; + font-weight: bold; + } + + .text { + margin-right: 40px; + } + } + } + + .row { + flex: 1; + width: 100%; + min-height: 40px; + margin: 0 -1px -1px 0; + text-align: center; + line-height: 40px; + border: 1px solid #01B3EF; + + .name { + display: flex; + justify-content: center; + align-items: center; + float: left; + width: 160px; + margin: -1px -1px -1px 0; + color: #BEE2F0; + border: 1px solid #01B3EF; + background: rgba(1, 142, 196, .75); + box-sizing: unset; + } + + .value { + display: flex; + justify-content: center; + align-items: center; + height: 100%; + overflow: hidden; + } + + .column { + display: flex; + height: 100%; + + .column-item { + display: flex; + justify-content: center; + align-items: center; + flex: 1; + padding: 0 4px; + line-height: 24px; + margin: -1px -1px -1px 0; + border: 1px solid #01B3EF; + word-break: break-all; + } + } + } + + .row.aline { + display: flex; + + > div { + flex: 1; + } + } + } +} + + +.rule_form { + overflow-x: hidden; + + ::v-deep .el-form-item__label { + min-width: 130px; + } +} +</style> \ No newline at end of file diff --git a/web/src/views/GoodManage/MixingScreen.vue b/web/src/views/GoodManage/MixingScreen.vue new file mode 100644 index 0000000..38ccb70 --- /dev/null +++ b/web/src/views/GoodManage/MixingScreen.vue @@ -0,0 +1,526 @@ +<!-- 物资管理 ==> 拌和站屏管理--> +<template> + <div class="main"> + <div class="main_header"> + <div class="header_item"> + <span class="header_label">拌和站屏:</span> + <el-select size="mini" v-model="queryInfo.types" placeholder="请选择拌和站屏" clearable> + <el-option v-for="item in selects.screenNames" :key="item.value" :label="item.label" + :value="item.value2"></el-option> + </el-select> + </div> + <div class="header_item"> + <span class="header_label">录入方式:</span> + <el-select size="mini" v-model="queryInfo.stata" placeholder="请选择录入方式" clearable> + <el-option v-for="item in queryInfoInmodes" :key="item.value" :label="item.label" + :value="item.value"></el-option> + </el-select> + </div> + <div class="header_item"> + <span class="header_label">创建时间:</span> + <el-date-picker type="daterange" v-model="times" value-format="yyyy-MM-dd" start-placeholder="起始时间" + end-placeholder="结束时间" @change="changeTime" clearable></el-date-picker> + </div> + <div class="header_item"> + <el-button v-permission="'search'" @click="queryReset">查询</el-button> + <el-button v-permission="'insert'" @click="addRow">新增</el-button> + </div> + </div> + <div class="main_content"> + <div class="main_content_wrap"> + <div class="main_content_item" v-for="(list, index) in dataLists" :key="index"> + <el-row> + <el-col :span="24 / list.length" v-for="(item, index) in list" :key="index"> + <div class="head"> + <span class="left_title">{{ item.siloName }}</span> + <span v-if="index + 1 === list.length" class="right_title">录入方式: <span style="color:#39B5FE">{{ + queryInfoInmodeMap[item.stata] }}</span></span> + </div> + <div class="list"> + <div class="item"> + <span class="name">屏幕编号:</span> + <span class="value">{{ item.types }}</span> + </div> + <div class="item"> + <span class="name">规格型号:</span> + <span class="value">{{ item.spec }}</span> + </div> + <div class="item"> + <span class="name">产地名称:</span> + <span class="value">{{ item.producer }}</span> + </div> + <div class="item"> + <span class="name">炉(批)号:</span> + <span class="value">{{ item.stove }}</span> + </div> + <div class="item"> + <span class="name">进场数量:</span> + <span class="value">{{ item.inNum }}</span> + </div> + <div class="item"> + <span class="name">进场日期:</span> + <span class="value">{{ item.inDate }}</span> + </div> + <div class="item"> + <span class="name">检验日期:</span> + <span class="value">{{ item.inspectDate }}</span> + </div> + <div class="item"> + <span class="name">检验状态:</span> + <span :class="['value', 'style' + item.inspectState]">{{ ruleFormStatuMap[item.inspectState] }}</span> + </div> + <div class="item"> + <span class="name">报告编号:</span> + <span class="value">{{ item.reportNumber }}</span> + </div> + </div> + </el-col> + </el-row> + <el-row class="foot"> + <el-button size="mini" v-permission="'delete'" @click="deleteRow(index)">删除</el-button> + <el-button size="mini" v-permission="'update'" @click="updateRow(index)">修改</el-button> + </el-row> + </div> + </div> + </div> + <!-- dialog --> + <el-dialog class="prop_dialog" v-if="isRenderDialog" :title="dialogTitle" :visible.sync="asyncVisible" + @close="closeDialog"> + <el-form ref="ruleForm" class="rule_form" :model="ruleForm" :rules="rules" label-width="auto"> + <el-form-item label="拌和站屏:" prop="name"> + <el-select size="mini" v-model="ruleForm.name" :disabled="isUpdate" placeholder="请选择拌和站屏" + @change="changeSelectForm($event)"> + <el-option v-for="item in selects.screenNames" :key="item.value" :label="item.label" + :value="item.value"></el-option> + </el-select> + </el-form-item> + <el-row :gutter="100"> + <el-col :class="'elCol elCol' + index" :span="12" v-for="(item, index) in ruleForm.infos" :key="index"> + <el-form-item label="屏幕编号:" :prop="`infos.${index}.num`"> + <el-input v-model="item.num" size="mini" disabled></el-input> + </el-form-item> + <el-form-item label="规格型号:" :prop="`infos.${index}.spec`"> + <el-input v-model="item.spec" size="mini" placeholder="请输入规格型号" clearable></el-input> + </el-form-item> + <el-form-item label="产地名称:" :prop="`infos.${index}.producer`"> + <el-input v-model="item.producer" size="mini" placeholder="请输入产地名称" clearable></el-input> + </el-form-item> + <el-form-item label="炉(批)号:" :prop="`infos.${index}.stove`"> + <el-input v-model="item.stove" size="mini" placeholder="请输入炉(批)号" clearable></el-input> + </el-form-item> + <el-form-item label="进场数量:" :prop="`infos.${index}.inNum`"> + <el-input v-model="item.inNum" size="mini" placeholder="请输入进场数量" clearable></el-input> + </el-form-item> + <el-form-item label="进场日期:" :prop="`infos.${index}.inDate`"> + <el-date-picker v-model="item.inDate" size="mini" value-format="yyyy-MM-dd" placeholder="请选择检验日期" + clearable></el-date-picker> + </el-form-item> + <el-form-item label="检验日期:" :prop="`infos.${index}.inspectDate`"> + <el-date-picker v-model="item.inspectDate" size="mini" value-format="yyyy-MM-dd" placeholder="请选择检验日期" + clearable></el-date-picker> + </el-form-item> + <el-form-item label="检验状态:" :prop="`infos.${index}.inspectState`"> + <el-select v-model="item.inspectState" size="mini" placeholder="请选择检验状态" clearable> + <el-option v-for="item in ruleFormStatus" :key="item.value" :label="item.label" + :value="item.value"></el-option> + </el-select> + </el-form-item> + <el-form-item label="报告编号:" :prop="`infos.${index}.reportNumber`"> + <el-input v-model="item.reportNumber" size="mini" placeholder="请输入报告编号" clearable></el-input> + </el-form-item> + </el-col> + </el-row> + </el-form> + <div slot="footer"> + <el-button @click="asyncVisible = false">取 消</el-button> + <el-button class="submit_btn" @click="onSubmit('ruleForm')">提 交</el-button> + </div> + </el-dialog> + + </div> +</template> +<script> +export default { + data() { + return { + loading: false, + isRenderDialog: false, + asyncVisible: false, + submitMode: '', // add update + dataLists: [], // [[],[],[]] + selects: { + screenNames: [], // 拌和站屏 + screenNameIds: {}, // 拌和站屏id map + }, // 下拉框状态选择汇总 + ruleForm: { + name: '', // 下拉框屏名称 + mixingIds: '', // 修改id [] + infos: [{ + material: '', // 原料名称 + siloId: '', // 屏幕编号id + num: '', // 屏幕编号 + spec: '', + producer: '', + stove: '', + inNum: '', + inDate: '', + inspectDate: '', + inspectState: '', + reportNumber: '', + }, { + material: '', + siloId: '', // 屏幕id + num: '', // 屏幕编号 + spec: '', + producer: '', + stove: '', + inNum: '', + inDate: '', + inspectDate: '', + inspectState: '', + reportNumber: '', + }] + }, + times: [], // 时间范围 + total: '', + queryInfo: { + pageNum: 1, + pageSize: 9999, + stata: '', // 录入方式 + types: '', // 拌和站屏 + strTime: '', + endTime: '', + }, + } + }, + computed: { + dialogTitle() { + return this.submitMode === 'update' ? '修改' : '添加' + }, + isUpdate() { + return this.submitMode === 'update' + }, + }, + beforeCreate() { + this.rules = { + name: [{required: true, message: '请选择拌和站屏', trigger: 'change'}], + infos: [{ + num: [{required: true, message: '请输入', trigger: 'blur'}], + spec: [{required: true, message: '请输入', trigger: 'blur'}], + producer: [{required: true, message: '请输入', trigger: 'blur'}], + stove: [{required: true, message: '请输入', trigger: 'blur'}], + inNum: [{required: true, message: '请输入', trigger: 'blur'}], + inDate: [{required: true, message: '请输入', trigger: 'blur'}], + inspectDate: [{required: true, message: '请输入', trigger: 'blur'}], + inspectState: [{required: true, message: '请选择', trigger: 'blur'}], + reportNumber: [{required: true, message: '请输入', trigger: 'blur'}], + }, { + spec: [{required: true, message: '请输入', trigger: 'blur'}], + producer: [{required: true, message: '请输入', trigger: 'blur'}], + stove: [{required: true, message: '请输入', trigger: 'blur'}], + inNum: [{required: true, message: '请输入', trigger: 'blur'}], + inDate: [{required: true, message: '请输入', trigger: 'blur'}], + inspectDate: [{required: true, message: '请输入', trigger: 'blur'}], + inspectState: [{required: true, message: '请选择', trigger: 'blur'}], + reportNumber: [{required: true, message: '请输入', trigger: 'blur'}], + }] + } + + this.queryInfoInmodes = [ + {value: 1, label: '自动'}, + {value: 2, label: '手动'}, + ] + this.queryInfoInmodeMap = { + 1: '自动', + 2: '手动', + } + this.ruleFormStatus = [ + {value: 1, label: '合格'}, + {value: 2, label: '不合格'}, + {value: 3, label: '待检测'}, + ] + this.ruleFormStatuMap = { + 1: '合格', + 2: '不合格', + 3: '待检测', + } + this.$http = this.$api.Materials.mixingSrcreen + }, + created() { + this.getLists() + this.getScreenNames() + }, + methods: { + // 获取table列表数据 [types相同的放一个数组] + getLists() { + let params = this.queryInfo + this.loading = true + this.$http.getLists(params).then(res => { + if (res.statusMsg === 'ok' && res.data) { + let tempMap = {} + res.data.forEach(item => { + if (!tempMap[item.types]) { + tempMap[item.types] = [] + } + tempMap[item.types].push({...item}) + }) + this.dataLists = Object.values(tempMap) + } + this.loading = false + }) + }, + // 获取配比屏名称 + async getScreenNames() { + const params = {pageNum: 1, pageSize: 9999} + let {data} = await this.$http.getScreenNames(params) + + let tempIds = {} + let tempTypes = {} + data.forEach(item => { + if (!tempIds[item.siloId]) { + tempIds[item.siloId] = {...item} + } + + if (!tempTypes[item.types]) { + tempTypes[item.types] = [] + } + tempTypes[item.types].push({...item}) + }) + + let temps = [] + Object.values(tempTypes).forEach(list => { + let value = '' + let label = '' + let type = '' + list.forEach((item, index) => { + value += item.siloId + ((index + 1) === list.length ? '' : ';') + label += item.siloName + ((index + 1) === list.length ? '' : ';') + type = item.types + }) + temps.push({ + label: label, + value: value, + value2: type, + }) + }) + + this.selects.screenNames.push(...temps) + this.selects.screenNameIds = tempIds + }, + // 查询按钮列表信息 + queryReset() { + this.getLists() + }, + resetForm(formName) { + this.$refs[formName].resetFields() + }, + showDialog() { + return new Promise(resolve => { + if (!this.isRenderDialog) { + this.isRenderDialog = true + } + + this.asyncVisible = true + + this.$nextTick(() => { + resolve() + }) + }) + }, + closeDialog() { + this.asyncVisible = false + this.resetForm('ruleForm') + }, + addRow() { + this.submitMode = 'add' + this.showDialog() + }, + updateRow(i) { + this.submitMode = 'update' + this.showDialog().then(() => { + let mixingIds = [] + let nameIds = '' + this.dataLists[i].forEach((item, index) => { + nameIds += item.siloId + ((index + 1) === this.dataLists[i].length ? '' : ';') + mixingIds.push(item.siloId) + this.ruleForm.infos[index] = Object.assign(this.ruleForm.infos[index], this.dataLists[i][index]) + }) + this.ruleForm.name = nameIds + this.ruleForm.mixingIds = mixingIds + this.changeSelectForm(nameIds) + }) + }, + deleteRow(i) { + this.$confirm("该操作将删除该信息,是否继续删除?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning" + }).then(() => { + let mixingIds = [] + this.dataLists[i].forEach(item => { + mixingIds.push(item.mixingId) + }) + this.$http.delete({mixingIds: mixingIds}).then(res => { + if (res.statusMsg === 'ok') { + this.getLists() + this.$message.success("删除成功!") + } else { + this.$message.warning(res.statusMsg) + } + }) + }) + }, + onSubmit(formName) { + this.$refs[formName].validate((valid) => { + if (!valid) return false + const params = {mixingList: this.ruleForm.infos} + if (this.isUpdate) { + // 更新 + this.$http.update(params).then((res) => { + if (res.statusMsg === 'ok') { + this.closeDialog() + this.getLists() + this.$message.success('更新成功!') + } else { + this.$message.warning(res.statusMsg) + } + }) + } else { + // 添加 + this.$http.insert(params).then((res) => { + if (res.statusMsg === 'ok') { + this.closeDialog() + this.getLists() + this.$message.success('添加成功!') + } else { + this.$message.warning(res.statusMsg) + } + }) + } + }) + }, + changeSelectForm(value) { + let ids = value && value.split(';') + ids.forEach((item, index) => { + this.ruleForm.infos[index].siloId = item + this.ruleForm.infos[index].material = this.selects.screenNameIds[item].siloName + this.ruleForm.infos[index].num = this.selects.screenNameIds[item].types + }) + }, + changeTime(times) { + times = times || ['', ''] + this.queryInfo.strTime = times[0] + this.queryInfo.endTime = times[1] + }, + } +} +</script> + +<style lang="scss" scoped> +@import '@/style/layout-main.scss'; + +.main_content_wrap { + height: 100%; + overflow: auto; +} + +.main_content_item { + overflow: hidden; + float: left; + width: 48%; + margin: 1%; + font-size: 15px; + color: #ddd; + border: 1px solid #39B5FE; + border-radius: 5px; + + .el-row { + border: 1px solid #39B5FE; + margin: -1px; + + .el-col { + height: 100%; + margin: 0 0 0 -1px; + border-left: 1px solid #39B5FE; + } + } + + .head { + height: 40px; + margin: -1px; + line-height: 40px; + text-indent: 30px; + background: rgba(30, 95, 147, .6); + border: 1px solid #39B5FE; + + .left_title { + float: left; + } + + .right_title { + float: right; + margin-right: 10px; + } + } + + .list { + padding: 0 10px 20px 10px; + + .item { + display: flex; + flex: 1; + margin-top: 20px; + + .name { + margin-right: 8px; + text-indent: 6px; + white-space: nowrap; + } + + .value { + color: #39B5FE; + + &.style1 { + font-size: 20px; + line-height: 20px; + color: #16F849; + } + + &.style2 { + font-size: 20px; + line-height: 20px; + color: red; + } + + &.style3 { + font-size: 20px; + line-height: 20px; + color: #FF6600; + } + } + + } + } + + .foot { + height: 40px; + line-height: 40px; + text-align: center; + + .el-button { + padding: 6px 20px + } + } + + + +} + +.rule_form { + overflow-x: hidden; + + .elCol0 { + border-right: 1px solid #39B5FE; + } +} +</style> \ No newline at end of file diff --git a/web/src/views/GoodManage/StockManage.vue b/web/src/views/GoodManage/StockManage.vue index eb58d90..d30a0f9 100644 --- a/web/src/views/GoodManage/StockManage.vue +++ b/web/src/views/GoodManage/StockManage.vue @@ -112,7 +112,7 @@ <el-input v-model="ruleForm.nameOfOrigin" :size="size" clearable placeholder="请输入产地名称"></el-input> </el-form-item> <el-form-item label="进场数量:" prop="incomingQuantity"> - <el-input v-model="ruleForm.incomingQuantity" :size="size" type="number" clearable placeholder="请输入进场数量"></el-input> + <el-input v-model="ruleForm.incomingQuantity" :size="size" clearable placeholder="请输入进场数量"></el-input> </el-form-item> <el-form-item label="进场日期:" prop="inTime"> <el-date-picker @@ -145,7 +145,7 @@ </el-select> </el-form-item> <el-form-item label="报告编号:" prop="reportNumber"> - <el-input v-model="ruleForm.reportNumber" :size="size" clearable placeholder="请输入报告编号"></el-input> + <el-input v-model="ruleForm.reportNumber" :size="size" type="textarea" :rows="5" clearable placeholder="请输入报告编号"></el-input> </el-form-item> </el-form> <div slot="footer"> diff --git a/web/src/views/GoodManage/components/MixingIncome.vue b/web/src/views/GoodManage/components/MixingIncome.vue index 0e4d9db..390d44a 100644 --- a/web/src/views/GoodManage/components/MixingIncome.vue +++ b/web/src/views/GoodManage/components/MixingIncome.vue @@ -14,14 +14,15 @@ </div> <div class="header_item"> <span class="header_label">供应商:</span> - <el-select v-model="search.supplierId" placeholder="请选择供应商" clearable> + <!-- <el-select v-model="search.supplierId" placeholder="请选择供应商" clearable> <el-option v-for="item in optionsSupplierType" :key="item.id" :label="item.supplierName" :value="item.id"> </el-option> - </el-select> + </el-select> --> + <el-input v-model="search.supplierName" clearable placeholder="请输入供应商"></el-input> </div> <div class="header_item"> <span class="header_label">入库时间:</span> @@ -118,15 +119,16 @@ <el-form-item label="入库重量:" prop="changeStock"> <el-input v-model="ruleForm.changeStock" :size="size" type="number" clearable placeholder="请输入入库重量"></el-input> </el-form-item> - <el-form-item label="供应商:" prop="supplierId"> - <el-select v-model="ruleForm.supplierId" placeholder="请选择供应商"> + <el-form-item label="供应商:" prop="supplierName"> + <!-- <el-select v-model="ruleForm.supplierId" placeholder="请选择供应商"> <el-option v-for="item in optionsSupplierType" :key="item.id" :label="item.supplierName" :value="item.id"> </el-option> - </el-select> + </el-select> --> + <el-input v-model="ruleForm.supplierName" :size="size" clearable placeholder="请输入供应商"></el-input> </el-form-item> </el-form> <div slot="footer"> @@ -170,10 +172,10 @@ message: '请输入入库重量', trigger: 'blur' }], - supplierId: [{ + supplierName: [{ required: true, - message: '请选择供应商', - trigger: 'change' + message: '请输入供应商', + trigger: 'blur' }], factoryName: [{ required: true, diff --git a/web/src/views/LayoutIndex/components/LayoutAside.vue b/web/src/views/LayoutIndex/components/LayoutAside.vue index ae8893a..097dbf4 100644 --- a/web/src/views/LayoutIndex/components/LayoutAside.vue +++ b/web/src/views/LayoutIndex/components/LayoutAside.vue @@ -34,7 +34,7 @@ <template v-else> <el-menu-item :index="item.path" :key="item.name"> - <span slot="title">{{ item.meta.title }}</span> + <span slot="title" >{{ item.meta.title }}</span> </el-menu-item> </template> diff --git a/web/src/views/MixingInfo/components/List.vue b/web/src/views/MixingInfo/components/List.vue new file mode 100644 index 0000000..56b5896 --- /dev/null +++ b/web/src/views/MixingInfo/components/List.vue @@ -0,0 +1,91 @@ +<template> + <div class="list"> + <div class="item" v-for="item in fieldMap" :key="item.name"> + <span class="name">{{ item.name }}:</span> + <template v-if="item.formatter"> + <span class="value" :class="item.class(data)">{{ item.formatter(data) }}</span> + </template> + <template v-else> + <span class="value">{{ data && data[item.type] || '' }}</span> + </template> + + </div> + </div> +</template> +<script> +export default { + data() { + return {} + }, + props: { + data: { + type: Object, + default: () => { } + } + }, + beforeCreate() { + // 字段映射表 + this.fieldMap = [ + {name: '规格型号', type: 'spec'}, + {name: '产地名称', type: 'producer'}, + {name: '炉(批)号', type: 'stove'}, + {name: '进场数量', type: 'inNum'}, + {name: '进场日期', type: 'inDate'}, + {name: '检验日期', type: 'inspectDate'}, + { + name: '检验状态', class(row) { + let state = row && row.inspectState + return {1: 'style1', 2: 'style2', 3: 'style3'}[state] || '' + }, formatter(row) { + let state = row && row.inspectState || '' + return {1: '合格', 2: '不合格', 3: '待检测'}[state] || '' + } + }, + {name: '报告编号', type: 'reportNumber'}, + ] + }, +} +</script> + +<style lang="scss" scoped> +.list { + display: flex; + flex-direction: column; + height: 100%; + + .item { + display: flex; + flex: 1; + margin-top: 4px; + + .name { + margin-right: 4px; + text-indent: 6px; + white-space: nowrap; + } + + .value { + color: #03F1FF; + + &.style1 { + font-size: 1.5rem; + line-height: 1.2rem; + color: #16F849; + } + + &.style2 { + font-size: 1.5rem; + line-height: 1.2rem; + color: red; + } + + &.style3 { + font-size: 1.5rem; + line-height: 1.2rem; + color: #FF6600; + } + } + + } +} +</style> diff --git a/web/src/views/MixingInfo/messageInfo.vue b/web/src/views/MixingInfo/messageInfo.vue index 922db19..61ed868 100644 --- a/web/src/views/MixingInfo/messageInfo.vue +++ b/web/src/views/MixingInfo/messageInfo.vue @@ -1,36 +1,42 @@ <template> <div class="mixing_index"> <div class="mixing_header"> - <div class="mixing_main"> - <div class="mixing_left"> - <div class="mixing_left_num"><span>{{mixingList&&mixingList.tableNum}}</span></div> - <div class="mixing_left_name">{{mixingList&&mixingList.materialName}}</div> + <span>中铁十四局通甬站前I标管片场拌和站</span> + </div> + <div class="mixing_main"> + <div class="mixing_left"> + <div class="mixing_left_num"> + <div class="">{{ mixingList && mixingList.tableNum }}</div> </div> - <div class="mixing_right"> - <div class="mixing_rows"> - <div class="mixing_rows_titles">产地名称:</div> - <div class="mixing_rows_datas">{{mixingList&&mixingList.nameOfOrigin}}</div> - </div> - <div class="mixing_rows"> - <div class="mixing_rows_titles">进场数量:</div> - <div class="mixing_rows_datas">{{mixingList&&mixingList.incomingQuantity}} t</div> - </div> - <div class="mixing_rows"> - <div class="mixing_rows_titles">进场日期:</div> - <div class="mixing_rows_datas">{{mixingList&&mixingList.inTime}}</div> - </div> - <div class="mixing_rows"> - <div class="mixing_rows_titles">检验日期:</div> - <div class="mixing_rows_datas">{{mixingList&&mixingList.inspectionDate}}</div> - </div> - <div class="mixing_rows"> - <div class="mixing_rows_titles">检验状态:</div> - <div class="mixing_rows_datas" :class="{'standardStyle':mixingList.status===1,'notStandardStyle':mixingList.status!==1}">{{mixingList&&mixingList.status===1?'合格':mixingList&&mixingList.status===2?'待检':''}}</div> - </div> - <div class="mixing_rows"> - <div class="mixing_rows_titles">报告编号:</div> - <div class="mixing_rows_datas">{{mixingList&&mixingList.reportNumber}}</div> - </div> + <div class="mixing_left_name">{{ mixingList && mixingList.materialName }}</div> + </div> + <div class="mixing_right"> + <div class="mixing_rows"> + <div class="mixing_rows_titles">产地名称:</div> + <div class="mixing_rows_datas">{{ mixingList && mixingList.nameOfOrigin }}</div> + </div> + <div class="mixing_rows"> + <div class="mixing_rows_titles">进场数量:</div> + <div class="mixing_rows_datas">{{ mixingList && mixingList.incomingQuantity }} t</div> + </div> + <div class="mixing_rows"> + <div class="mixing_rows_titles">进场日期:</div> + <div class="mixing_rows_datas">{{ mixingList && mixingList.inTime }}</div> + </div> + <div class="mixing_rows"> + <div class="mixing_rows_titles">检验日期:</div> + <div class="mixing_rows_datas">{{ mixingList && mixingList.inspectionDate }}</div> + </div> + <div class="mixing_rows"> + <div class="mixing_rows_titles">检验状态:</div> + <div class="mixing_rows_datas" + :class="{ 'standardStyle': mixingList.status === 1, 'notStandardStyle': mixingList.status !== 1 }"> + {{ mixingList && mixingList.status === 1 ? '合格' : mixingList && mixingList.status === 2 ? '待检' : '' + }}</div> + </div> + <div class="mixing_rows"> + <div class="mixing_rows_titles">报告编号:</div> + <div class="mixing_rows_datas">{{ mixingList && mixingList.reportNumber }}</div> </div> </div> </div> @@ -38,35 +44,45 @@ </template> <script> export default { - data(){ - return{ - timer:null,//定时器 - mixingList:null,//展示数据 + data() { + return { + timer: null,//定时器 + mixingList: [],//展示数据 } }, - created(){ + created() { this.searchMixingInfos() }, - mounted(){ + mounted() { const that = this; // that.searchMixingInfos() - that.timer = setInterval(()=>{ + that.timer = setInterval(() => { that.searchMixingInfos() - },300000) + }, 60000 * 10) + + let width = document.getElementsByClassName('mixing_index')[0].clientWidth + let $html = document.getElementsByTagName('html')[0] + let fontsize = width / 1920 * 11 + $html.style.fontSize = `${fontsize}px` + window.onresize = () => { + let width = document.getElementsByClassName('mixing_index')[0].clientWidth + let fontsize = width / 1920 * 11 + $html.style.fontSize = `${fontsize}px` + } }, beforeDestroy() { clearInterval(this.timer); this.timer = null; }, - methods:{ - searchMixingInfos(){ - let params={ - tableNum:window.location.href.split('/')[5].split('=')[1] + methods: { + searchMixingInfos() { + let params = { + tableNum: window.location.href.split('/')[5].split('=')[1] } - this.$api.Infos.showHmixings(params).then(res=>{ - if(res.statusMsg==='ok'){ - this.mixingList = res.data===null?[]:res.data - }else{ + this.$api.Infos.showHmixings(params).then(res => { + if (res.statusMsg === 'ok') { + this.mixingList = res.data === null ? [] : res.data + } else { this.$message.warning('请检查网络或联系管理员!!!') } }) @@ -75,98 +91,129 @@ } </script> <style scoped lang="scss"> -.mixing_index{ +.mixing_index { + display: flex; + flex-direction: column; width: 100%; height: 100%; - background-color: #041A3F; - padding: 5px; + padding: 0.4rem; + background: url("../../assets/mixing/mixing_bg3.png") no-repeat; + background-size: 100% 100%; + background-position: center center; - .mixing_header{ + + .mixing_header { + width: 100%; + height: 3.2rem; + position: relative; + padding: 4rem; + display: flex; + justify-content: center; + align-items: center; + + span { + position: absolute; + font-size: 5rem; + font-weight: bold; + letter-spacing: 2px; + text-shadow: 0px 3px 3px rgba(25, 63, 95, 0.05); + background: -webkit-linear-gradient(90deg, #2AC0FF 0%, #FFFFFF 70%); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + } + } + + .mixing_main { + overflow: hidden; + flex: 1; width: 100%; height: 100%; - padding: 108px 50px 40px; - background: url("../../assets/mixing/mixing_bg.png") no-repeat; - background-size: 100% 100%; - background-position: center center; + padding: 6rem; + display: flex; - .mixing_main{ - width: 100%; - height: 100%; - padding: 20px 15px; + .mixing_left { display: flex; - .mixing_left{ - width: 45%; - margin-right: 15px; - display: flex; - flex-direction: column; - align-items: center; - justify-content: space-between; + flex-direction: column; + flex: 1; + margin-right: 3rem; + display: flex; + flex-direction: column; + align-items: center; + justify-content: space-between; - .mixing_left_num{ - width: 100%; - height: 78%; - padding: 10px; - background: url("../../assets/mixing/mixing_left_bg.png") no-repeat; - background-size: 100% 100%; - span{ - height: 100%; - padding: 10px 0; - display: flex; - justify-content: center; - align-items: center; - color: rgba(254, 252, 94, 1); - font-size: 44rem; - font-weight: bold; - background-color: rgba(37, 129, 255, 0.29); - } - } - .mixing_left_name{ - width: 100%; - height: 20%; - margin-top: 15px; + .mixing_left_num { + position: relative; + overflow: hidden; + padding: 1rem; + flex: 3.2; + width: 100%; + background: url("../../assets/mixing/mixing_left_bg.png") no-repeat; + background-size: 100% 100%; + + > div { display: flex; justify-content: center; align-items: center; - text-shadow: 5px 7px 0px rgba(0,66,255,0.2), 16px 23px 16px rgba(14,19,48,0.15); - background: linear-gradient(to bottom,#FFFFFF 0%,rgba(140, 186, 255, 0.88) 100%); - background-clip: text; - -webkit-background-clip: text; - text-fill-color: transparent; - -webkit-text-fill-color: transparent; - color: #FFFFFF; - font-size: 9rem; - font-weight: 500; + width: 100%; + height: 100%; + color: rgba(254, 252, 94, 1); + font-size: 44rem; + font-weight: bold; + background-color: rgba(37, 129, 255, 0.29); } } - .mixing_right{ - width:55%; - background: linear-gradient(to right,#0D3776 0%,#041A40 100%); + + .mixing_left_name { + flex: 1; + width: 100%; display: flex; - flex-direction: column; - justify-content: space-around; - .mixing_rows{ - padding: 10px 20px; - display: flex; - .mixing_rows_titles{ - flex: none; - color: #FFFFFF; - font-weight: 400; - font-size: 5rem; - } - .mixing_rows_datas{ - flex: none; - color: #FFFFFF; - font-weight: 400; - font-size: 5rem; - } - .standardStyle{ - color:#15EF48; - font-size:8rem; - } - .notStandardStyle{ - color:rgba(255, 102, 0, 1); - font-size:8rem; - } + justify-content: center; + align-items: center; + text-shadow: 5px 7px 0px rgba(0, 66, 255, 0.2), 16px 23px 16px rgba(14, 19, 48, 0.15); + background: linear-gradient(to bottom, #FFFFFF 0%, rgba(140, 186, 255, 0.88) 100%); + background-clip: text; + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + color: #FFFFFF; + font-size: 9rem; + font-weight: 500; + } + } + + .mixing_right { + flex: 1.2; + background: linear-gradient(to right, #0D3776 0%, #041A40 100%); + display: flex; + flex-direction: column; + justify-content: space-between; + padding: 2rem 4rem; + + .mixing_rows { + overflow: hidden; + display: flex; + + .mixing_rows_titles { + flex: none; + color: #FFFFFF; + font-weight: 400; + font-size: 5rem; + } + + .mixing_rows_datas { + flex: none; + color: #FFFFFF; + font-weight: 400; + font-size: 5rem; + } + + .standardStyle { + color: #15EF48; + font-size: 8rem; + } + + .notStandardStyle { + color: rgba(255, 102, 0, 1); + font-size: 8rem; } } } diff --git a/web/src/views/MixingInfo/mixRatio.vue b/web/src/views/MixingInfo/mixRatio.vue new file mode 100644 index 0000000..c69ce94 --- /dev/null +++ b/web/src/views/MixingInfo/mixRatio.vue @@ -0,0 +1,253 @@ +<template> + <div class="wrap"> + <div class="header"> + <div class="header_name">中铁十四局通甬站前I标管片场拌和站</div> + </div> + <div class="table"> + <div class="row title">{{ info.signboardName }}</div> + + <div class="row"> + <div class="name">工程名称</div> + <div class="value">{{ info.proName }}</div> + </div> + + <div class="row"> + <div class="name">施工单位</div> + <div class="value">{{ info.constructionUnit }}</div> + </div> + + <div class="row line"> + <div> + <div class="name">施工日期</div> + <div class="value">{{ info.saveStamp }}</div> + </div> + <div> + <div class="name">施工部位</div> + <div class="value">{{ info.construction }}</div> + </div> + </div> + + <div class="row" v-for="item in dataLists" :key="item.name"> + <div class="name">{{ item.name }}</div> + <div class="column"> + <div class="column-item" v-for="(sub, index) in item.value" :key="index">{{ sub }}</div> + </div> + </div> + + </div> + </div> +</template> + +<script> +const interval = function (fn, Vue) { + let timer = setInterval( + (() => { + fn() + return fn + })(), + 1000 * 60 * 10 + ) + if (Vue) { + Vue.$once('hook:beforeDestroy', function () { + timer && clearInterval(timer) + }) + } +} +export default { + name: 'Page2', + data() { + return { + info: { + signboardName: '', // 标识排 + proName: '', // 工程名称 + constructionUnit: '', // 施工单位 + saveStamp: '', // 施工日期 + construction: '', // 施工部位 + }, + dataLists: [ + {name: '材料名称', type: 'dictName', value: []}, // 材料名称 + {name: '规格型号', type: 'spec', value: []}, // 规格型号 + {name: '生产厂家', type: 'manufacturer', value: []}, // 生产厂家 + {name: '材料含水率(%)', type: 'watFull', value: []}, // 含水率 + {name: '理论用量(kg/m³)', type: 'planAmnt', value: []}, // 理论用量 + {name: '实际用量(kg/m³)', type: 'factAmnt', value: []}, // 实际用量 + ] + } + }, + beforeCreate() { + this.$http = this.$api.Infos + }, + beforeRouteEnter(to, form, next) { + const {path} = to + + const type = path.slice(-1) + + next(vm => { + vm.type = type + interval(vm.getLists, vm) + }) + }, + mounted() { + let width = document.getElementsByClassName('wrap')[0].clientWidth + let $html = document.getElementsByTagName('html')[0] + let fontsize = width / 1920 * 35.2 + $html.style.fontSize = `${fontsize}px` + window.onresize = () => { + let width = document.getElementById('app').clientWidth + let fontsize = width / 1920 * 35.2 + $html.style.fontSize = `${fontsize}px` + } + }, + beforeDestroy() { + let $html = document.getElementsByTagName('html')[0] + $html.style.fontSize = '' + }, + methods: { + getLists() { + const params = { + pageNum: this.type, // 传 1 2对应两个页面 + pageSize: 1, + } + this.$api.Infos.getMixRatio(params).then(res => { + if (res.statusMsg === 'ok' && res.data) { + const {list} = res.data + if (list && list.length) { + const item = list[0] + const {tmixingConsumes} = item + + this.info.signboardName = item.signboardName + this.info.proName = item.proName + + if (tmixingConsumes && tmixingConsumes.length) { + this.info.constructionUnit = tmixingConsumes[0].constructionUnit + this.info.saveStamp = tmixingConsumes[0].saveStamp + this.info.construction = tmixingConsumes[0].construction + this.dataLists = [ + {name: '材料名称', type: 'dictName', value: []}, // 材料名称 + {name: '规格型号', type: 'spec', value: []}, // 规格型号 + {name: '生产厂家', type: 'manufacturer', value: []}, // 生产厂家 + {name: '材料含水率(%)', type: 'watFull', value: []}, // 含水率 + {name: '理论用量(kg/m³)', type: 'planAmnt', value: []}, // 理论用量 + {name: '实际用量(kg/m³)', type: 'factAmnt', value: []}, // 实际用量 + ] + tmixingConsumes.forEach(item => { + this.dataLists.forEach(val => { + item[val.type] && val.value.push(item[val.type]) + }) + }) + } + } + } else { + this.$message.warning('请检查网络或联系管理员!!!') + } + }) + + }, + } +} +</script> +<style lang="scss" scoped> +.wrap { + position: absolute; + width: 100%; + height: 100%; + font-size: 1rem; + background: #040A3F; + overflow: hidden; +} + +.header { + position: absolute; + top: 0; + width: 100%; + height: 3rem; + text-align: center; + color: #fff; + background: url('../../assets/mixing/header.png') no-repeat center center; + background-size: 100% auto; + + .header_name { + font-size: 1.4rem; + font-weight: bold; + line-height: 3.2rem; + letter-spacing: 2px; + text-shadow: 0px 3px 3px rgba(25, 63, 95, 0.05); + background: -webkit-linear-gradient(90deg, #2AC0FF 0%, #FFFFFF 70%); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + } +} + +.table { + display: flex; + flex-direction: column; + position: absolute; + top: 4rem; + bottom: 2rem; + left: 2rem; + right: 2rem; + font-size: 0.74rem; + color: #fff; + + .title { + display: flex; + justify-content: center; + align-items: center; + color: #BEE2F0; + background: rgba(1, 142, 196, .35); + } + + .row { + flex: 1; + width: 100%; + margin: 0 -1px -1px 0; + text-align: center; + line-height: 1.1rem; + border: 1px solid #01B3EF; + + .name { + display: flex; + justify-content: center; + align-items: center; + float: left; + width: 8rem; + height: 100%; + margin: -1px -1px -1px 0; + color: #BEE2F0; + border: 1px solid #01B3EF; + background: rgba(1, 142, 196, .75); + box-sizing: unset; + } + + .value { + display: flex; + justify-content: center; + align-items: center; + height: 100%; + overflow: hidden; + } + + .column { + display: flex; + height: 100%; + + .column-item { + display: flex; + justify-content: center; + align-items: center; + flex: 1; + margin: -1px -1px -1px 0; + border: 1px solid #01B3EF; + } + } + } + + .row.line { + display: flex; + + > div { + flex: 1; + } + } +} +</style> \ No newline at end of file diff --git a/web/src/views/MixingInfo/mixing.vue b/web/src/views/MixingInfo/mixing.vue new file mode 100644 index 0000000..b6801dd --- /dev/null +++ b/web/src/views/MixingInfo/mixing.vue @@ -0,0 +1,317 @@ +<template> + <div class="wrap"> + <div class="header"> + <div class="header_name">中铁十四局通甬站前I标管片场拌和站</div> + </div> + <div class="container"> + <div class="con_name"> + <div class="line left"></div> + <div class="name"> + <p class="p">{{ infoL.siloName }}</p> + <p class="p">{{ infoR.siloName }}</p> + </div> + <div class="line right"></div> + </div> + <div class="con_main"> + <div class="con_main_item con_main_l"> + <div class="placeholder"></div> + <div class="list_wrap"> + <list :data="infoL.mixing"></list> + </div> + </div> + <div class="con_main_item con_main_c"> + <div :class="`image ${infoL.percentImgName || ''}`"> + <p>{{ infoL.siloName }}</p> + </div> + <div :class="`image ${infoR.percentImgName || ''}`"> + <p>{{ infoR.siloName }}</p> + </div> + </div> + <div class="con_main_item con_main_r"> + <div class="placeholder"></div> + <div class="list_wrap"> + <list :data="infoR.mixing"></list> + </div> + </div> + </div> + </div> + </div> +</template> + +<script> +import List from './components/List' +const interval = function (fn, Vue) { + let timer = setInterval( + (() => { + fn() + return fn + })(), + 1000 * 60 * 10 + ) + if (Vue) { + Vue.$once('hook:beforeDestroy', function () { + timer && clearInterval(timer) + }) + } +} +export default { + name: 'mixing', + data() { + return { + type: '', + infoL: {}, + infoR: {}, + percents: { + 0: 'container_10', + 10: 'container_10', + 20: 'container_20', + 40: 'container_40', + 60: 'container_60', + 80: 'container_80', + 90: 'container_90', + 100: 'container_100', + } + }; + }, + components: { + List + }, + beforeCreate() { + this.$http = this.$api.Infos + }, + beforeRouteEnter(to, form, next) { + const {path} = to + + const type = path.slice(-1) + + next(vm => { + vm.type = type + interval(vm.getLists, vm) + }) + }, + mounted() { + let width = document.getElementsByClassName('wrap')[0].clientWidth + let $html = document.getElementsByTagName('html')[0] + let fontsize = width / 1920 * 35.2 + $html.style.fontSize = `${fontsize}px` + window.onresize = () => { + let width = document.getElementById('app').clientWidth + let fontsize = width / 1920 * 35.2 + $html.style.fontSize = `${fontsize}px` + } + }, + beforeDestroy() { + let $html = document.getElementsByTagName('html')[0] + $html.style.fontSize = '' + }, + methods: { + getLists() { + const percentArr = Object.keys(this.percents) + this.$api.Infos.getMixing({types: this.type}).then(res => { + if (res.statusMsg === 'ok' && res.data && res.data.length) { + res.data.forEach((item, index) => { + if (item && item.mixing && item.mixing.percentage) { + let targetVal = +item.mixing.percentage + for (let index = 0; index < percentArr.length - 1; index++) { + const val = percentArr[index] + const valNext = percentArr[index + 1] + if (val <= targetVal && targetVal <= valNext) { + item.percentImgName = this.percents[val] + break + } + } + } else { + item.percentImgName = this.percents[0] + } + index === 0 && (this.infoL = item) + index === 1 && (this.infoR = item) + }) + } else { + this.$message.warning('请检查网络或联系管理员!!!') + } + }) + + + + }, + } +} +</script> +<style lang="scss" scoped> +li { + list-style: none; +} + +.wrap { + position: absolute; + width: 100%; + height: 100%; + font-size: 1rem; + background: #040A3F; + overflow: hidden; +} + +.header { + position: absolute; + width: 100%; + height: 3rem; + text-align: center; + font-family: 'Microsoft YaHei'; + color: #fff; + background: url('../../assets/mixing/header.png') no-repeat center center; + background-size: 100% auto; + + .header_name { + font-size: 1.4rem; + font-weight: bold; + line-height: 3.2rem; + letter-spacing: 2px; + text-shadow: 0px 3px 3px rgba(25, 63, 95, 0.05); + background: -webkit-linear-gradient(90deg, #2AC0FF 0%, #FFFFFF 70%); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + } +} + +.container { + overflow: hidden; + flex: 1; + display: flex; + flex-direction: column; + position: absolute; + left: 20px; + right: 20px; + top: 3.6rem; + bottom: 20px; + color: #fff; + + .con_name { + display: flex; + align-items: center; + height: 2.2rem; + + .name { + width: 20rem; + display: flex; + justify-content: space-evenly; + + .p { + height: 2rem; + padding: 0 2rem; + line-height: 2rem; + font-size: 1.2rem; + font-weight: bold; + white-space: nowrap; + background: url(../../assets/mixing/name_bg.png) no-repeat; + background-size: 100% 100%; + } + } + + .line { + overflow: hidden; + flex: 1; + height: 14px; + + &.left { + background: -webkit-linear-gradient(right, rgba(18, 99, 162, 1) 0, rgba(18, 99, 162, 0) 100%); + } + + &.right { + background: -webkit-linear-gradient(left, rgba(18, 99, 162, 1) 0, rgba(18, 99, 162, 0) 100%); + } + } + } + + .con_main { + overflow: hidden; + margin-top: 10px; + flex: 1; + display: flex; + + .con_main_item { + padding: 15px 15px 0 15px; + position: relative; + flex: 1; + + &.con_main_l, + &.con_main_r { + background: url(../../assets/mixing/list_bg.png) no-repeat; + background-size: 100% 100%; + } + + &.con_main_l .placeholder { + width: 100%; + height: 8%; + background: url(../../assets/mixing/list_l_bg.png) no-repeat; + background-size: 100% 100%; + } + + &.con_main_r .placeholder { + width: 100%; + height: 8%; + background: url(../../assets/mixing/list_r_bg.png) no-repeat; + background-size: 100% 100%; + } + + &.con_main_c .image { + position: relative; + float: left; + width: 50%; + height: 100%; + text-align: center; + + > p { + position: absolute; + left: 50%; + top: 18%; + font-size: 0.7rem; + white-space: nowrap; + transform: translate(-50%, -50%); + } + + &.container_10 { + background: url(../../assets/mixing/container_10.png) center 30% no-repeat; + background-size: auto 70%; + } + + &.container_20 { + background: url(../../assets/mixing/container_20.png) center 30% no-repeat; + background-size: auto 70%; + } + + &.container_40 { + background: url(../../assets/mixing/container_40.png) center 30% no-repeat; + background-size: auto 70%; + } + + &.container_60 { + background: url(../../assets/mixing/container_60.png) center 30% no-repeat; + background-size: auto 70%; + } + + &.container_80 { + background: url(../../assets/mixing/container_80.png) center 30% no-repeat; + background-size: auto 70%; + } + + &.container_90 { + background: url(../../assets/mixing/container_90.png) center 30% no-repeat; + background-size: auto 70%; + } + + &.container_100 { + background: url(../../assets/mixing/container_100.png) center 30% no-repeat; + background-size: auto 70%; + } + } + + .list_wrap { + position: absolute; + top: 12%; + bottom: 0; + } + + } + } +} +</style> \ No newline at end of file diff --git a/web/src/views/MixingInfo/workShop.vue b/web/src/views/MixingInfo/workShop.vue new file mode 100644 index 0000000..7dabef9 --- /dev/null +++ b/web/src/views/MixingInfo/workShop.vue @@ -0,0 +1,187 @@ +<template> + <div class="work_index"> + <div class="work_headers"> + <div class="header_title">材料标识牌</div> + <div class="header_area"> + <div class="header_area_text">区域:</div> + <div class="header_area_data">{{workList&&workList.region}}号</div> + </div> + </div> + <div class="work_main"> + <div class="work_rows"> + <div class="work_items"> + <div class="work_items_text">材料名称</div> + <div class="work_items_data" style="border-right: 3px solid #001982;">{{workList&&workList.materialName}}</div> + </div> + <div class="work_items"> + <div class="work_items_text">生产厂家</div> + <div class="work_items_data" >{{workList&&workList.manufacturer}}</div> + </div> + </div> + <div class="work_rows"> + <div class="work_items"> + <div class="work_items_text">规格型号</div> + <div class="work_items_data" style="border-right: 3px solid #001982;">{{workList&&workList.specifications}}</div> + </div> + <div class="work_items"> + <div class="work_items_text">炉(批)号</div> + <div class="work_items_data" style="font-size:1.5rem">{{workList&&workList.heatNumber}}</div> + </div> + </div> + <div class="work_rows"> + <div class="work_items"> + <div class="work_items_text">进场数量</div> + <div class="work_items_data" style="border-right: 3px solid #001982;">{{workList&&workList.inNumber}}</div> + </div> + <div class="work_items"> + <div class="work_items_text">报检日期</div> + <div class="work_items_data" style="font-size:1.5rem">{{workList&&workList.reportTime}}</div> + </div> + </div> + <div class="work_rows"> + <div class="work_items"> + <div class="work_items_text">报告编号</div> + <div class="work_items_data" style="border-right: 3px solid #001982;font-size:1.5rem">{{workList&&workList.reportNum}}</div> + </div> + <div class="work_items"> + <div class="work_items_text">检验状态</div> + <div class="work_items_data" >{{workList&&workList.status===1?'合格':workList&&workList.status===2?'待检':''}}</div> + </div> + </div> + </div> + </div> +</template> +<script> +export default { + data(){ + return{ + timer:null,//定时器 + workList:null,//展示数据 + } + }, + created(){ + this.searchWorkInfos() + }, + mounted(){ + const that = this; + that.timer = setInterval(()=>{ + that.searchWorkInfos() + },60000 * 10) + }, + beforeDestroy() { + clearInterval(this.timer); + this.timer = null; + }, + methods:{ + searchWorkInfos(){ + let params={ + region:window.location.href.split('/')[5].split('=')[1] + } + this.$api.Materials.detailSignBoardInfos(params).then(res=>{ + if(res.statusMsg==='ok'){ + this.workList = res.data===null?[]:res.data + }else{ + this.$message.warning('请检查网络或联系管理员!!!') + } + }) + }, + } +} +</script> +<style scoped lang="scss"> +.work_index{ + width: 100%; + height: 100%; + background: url("../../assets/work_shop.png") no-repeat; + background-size: 100% 100%; + overflow: auto; + + .work_headers{ + height: 206px; + padding-top: 100px; + display: flex; + align-items: center; + justify-content: center; + position: relative; + + .header_title{ + font-size: 4rem; + font-weight: 600; + background: linear-gradient(to bottom,#24A5ED,#1976CE,#145DBE,#071C94); + background-clip: text; + -webkit-background-clip: text; + color: transparent; + } + .header_area{ + display: flex; + position: absolute; + right: 100px; + + .header_area_text{ + font-size: 3.2rem; + font-weight: 600; + background: linear-gradient(to bottom,#24A5ED,#1976CE,#145DBE,#071C94); + background-clip: text; + -webkit-background-clip: text; + color: transparent; + } + .header_area_data{ + font-size: 3.2rem; + font-weight: 600; + background: linear-gradient(to bottom,#24A5ED,#1976CE,#145DBE,#071C94); + background-clip: text; + -webkit-background-clip: text; + color: transparent; + } + } + } + .work_main{ + // height: calc(100% - 200px); + border: 3px solid #001982; + margin: 20px 50px; + display: flex; + flex-direction: column; + justify-content: space-between; + .work_rows{ + width: 100%; + line-height: 60px; + display: flex; + + .work_items{ + width: 50%; + display: flex; + + .work_items_text{ + font-size: 3rem; + font-weight: 500; + padding: 30px; + display: flex; + justify-content: center; + align-items: center; + flex: none; + width: 240px; + border-bottom: 1px solid #001982; + border-right: 1px solid #001982; + background: linear-gradient(to bottom,#AEDEF9,#1E87D9,#1D87D9,#2265C0,#145DBE,#082296); + background-clip: text; + -webkit-background-clip: text; + color: transparent; + } + .work_items_data{ + color: #11299F; + padding: 10px; + font-size: 2rem; + display: flex; + justify-content: center; + align-items: center; + flex: 1; + width: calc(50% - 200px); + border-bottom: 1px solid #001982; + word-break: break-all; + // word-wrap: break-word; + } + } + } + } +} +</style> \ No newline at end of file diff --git a/web/src/views/ProjectManage/AmountManage.vue b/web/src/views/ProjectManage/AmountManage.vue index 5c3e1aa..30478d6 100644 --- a/web/src/views/ProjectManage/AmountManage.vue +++ b/web/src/views/ProjectManage/AmountManage.vue @@ -2,9 +2,9 @@ <div class="main"> <div class="main_tabs"> <el-tabs v-model="activeName" @tab-click="handleClick"> - <el-tab-pane label="预埋件理论耗量" name="first"> + <!-- <el-tab-pane label="预埋件理论耗量" name="first"> <fitt-consump ref="Fitts"></fitt-consump> - </el-tab-pane> + </el-tab-pane> --> <el-tab-pane label="钢筋笼理论耗量" name="second"> <rebar-consump ref="Rebars"></rebar-consump> </el-tab-pane> @@ -16,37 +16,40 @@ </div> </template> <script> -import FittConsump from './components/FittConsump.vue'//预埋件理论耗量 +// import FittConsump from './components/FittConsump.vue'//预埋件理论耗量 import RebarConsump from './components/RebarConsump.vue'//钢筋笼理论耗量 import RawConsump from './components/RawConsump.vue'//混凝土方量及混凝土原材料 export default { components:{ - FittConsump, + // FittConsump, RebarConsump, RawConsump }, data(){ return{ - activeName:'first' + activeName:'second' } }, mounted(){ - this.$refs.Fitts.searchButtonInfo(true); + this.$refs.Rebars.getAllProjectData(true); + this.$refs.Rebars.getInits(); }, methods:{ //切换界面 handleClick(tab){ switch(tab.name){ - case 'second': - this.$refs.Rebars.getInits(); - this.$refs.Rebars.getAllProjectData(); - break; + // case 'second': + // this.$refs.Rebars.getInits(); + // this.$refs.Rebars.getAllProjectData(); + // break; case 'third': this.$refs.Raws.getAllProjects(); this.$refs.Raws.searchButtonInfo(true); break; default: - this.$refs.Fitts.searchButtonInfo(true); + // this.$refs.Fitts.searchButtonInfo(true); + this.$refs.Rebars.getInits(); + this.$refs.Rebars.getAllProjectData(); } }, } diff --git a/web/src/views/ProjectManage/SectionManage.vue b/web/src/views/ProjectManage/SectionManage.vue index 4cbfa56..d7eba6d 100644 --- a/web/src/views/ProjectManage/SectionManage.vue +++ b/web/src/views/ProjectManage/SectionManage.vue @@ -3,8 +3,8 @@ <div class="main"> <div class="main_header"> <div class="header_item"> - <span class="header_label">标段名称:</span> - <el-input v-model="queryInfo.segmentName" clearable placeholder="请输入标段名称"></el-input> + <span class="header_label">单位工程名称:</span> + <el-input v-model="queryInfo.unitProjectName" clearable placeholder="请输入单位工程名称"></el-input> </div> <div class="header_item"> <span class="header_label">项目名称:</span> @@ -125,7 +125,7 @@ queryInfo: { pageNum: 1, pageSize: 10, - segmentName: '', + unitProjectName: '', proId: '', }, dataList: [], diff --git a/web/src/views/ProjectManage/components/RawConsump.vue b/web/src/views/ProjectManage/components/RawConsump.vue index 5e0dff6..49742e1 100644 --- a/web/src/views/ProjectManage/components/RawConsump.vue +++ b/web/src/views/ProjectManage/components/RawConsump.vue @@ -247,15 +247,13 @@ this.$api.Reinforce.searchProjectSize({proId:val,pageNum: 1, pageSize:100000000}).then(res=>{ if(res.statusMsg === 'ok'){ - if(this.search.proId ===""){ + if(val ===""){ this.optionsSize = [] this.search.size = "" this.search.reinforcement = "" - }else if(this.ruleForm.proId ===""){ - this.optionsSize = [] - this.ruleForm.size = "" - this.ruleForm.reinforcement = "" - this.ruleForm.blockNum = "" + this.$set(this.ruleForm,'size','') + this.$set(this.ruleForm,'reinforcement','') + this.$set(this.ruleForm,'blockNum','') }else{ this.optionsSize = res.data.list } diff --git a/web/src/views/ReincageManage/ReincageProduct.vue b/web/src/views/ReincageManage/ReincageProduct.vue index af51c62..48feb3d 100644 --- a/web/src/views/ReincageManage/ReincageProduct.vue +++ b/web/src/views/ReincageManage/ReincageProduct.vue @@ -34,6 +34,7 @@ <div class="header_item"> <span class="header_label">质量标注:</span> <el-select v-model="search.isQualified" placeholder="请选择质量标注" clearable> + <el-option label="未质检" value="0"></el-option> <el-option label="合格" value="1"></el-option> <el-option label="不合格" value="2"></el-option> <el-option label="报废" value="3"></el-option> @@ -120,7 +121,7 @@ <el-table-column prop="qualityTime" label="质检时间" align="center" width="150"></el-table-column> <el-table-column prop="isQualified" label="质量标注" align="center"> <template #default="{row}"> - <div :class="{'isStand':row.isQualified===2&&row.isModel ===1}">{{row.isQualified===1?'合格':row.isQualified===2?'不合格':row.isQualified===3?'报废':''}}</div> + <div :class="{'isStand':row.isQualified===2&&row.isModel ===1}">{{row.isQualified===1?'合格':row.isQualified===0?'未质检':row.isQualified===2?'不合格':row.isQualified===3?'报废':''}}</div> </template> </el-table-column> <el-table-column prop="isModel" label="是否入模" align="center"> diff --git a/web/src/views/SecureManage/BroadcastSystem.vue b/web/src/views/SecureManage/BroadcastSystem.vue new file mode 100644 index 0000000..4f44b86 --- /dev/null +++ b/web/src/views/SecureManage/BroadcastSystem.vue @@ -0,0 +1,351 @@ +<template> + <div class="main"> + <div class="main_header"> + <div class="header_item"> + <span class="header_label">区域名称:</span> + <el-select v-model="search.groupId" placeholder="请选择区域名称" clearable> + <el-option + v-for="item in optionAreaList" + :key="item.id" + :label="item.groupName" + :value="item.id"> + </el-option> + </el-select> + </div> + <div class="header_item"> + <el-button icon="el-icon-search" v-if="showButton('search')" @click="searchButtonInfo(true)">查询</el-button> + <!-- <el-button class="search_btn" icon="el-icon-plus" v-if="showButton('insert')" @click="insertProp">新增</el-button> --> + </div> + </div> + <div class="main_content"> + <el-table + v-loading="loading" + :data="dataList" + height="100%"> + <el-table-column align="center" label="序号" width="60"> + <template #default="scope"> + <span>{{(pageNum - 1) * pageSize + scope.$index + 1}}</span> + </template> + </el-table-column> + <el-table-column prop="groupName" label="区域名称" align="center"></el-table-column> + <!-- <el-table-column prop="dictName" label="上传文件" align="center"></el-table-column> --> + <el-table-column label="操作" align="center" width="200"> + <template #default="{ row }"> + <el-button class="table_btn" size="mini" v-if="showButton('update')" @click="updateProp(row)">修改</el-button> + <!-- <el-button class="delete_btn" size="mini" v-if="showButton('delete')" @click="deleteInfo(row)">删除</el-button> --> + </template> + </el-table-column> + </el-table> + </div> + <!-- <div class="main_footer"> + <el-pagination + background + @current-change="changePageNum" + @size-change="changePageSize" + :current-page="pageNum" + :page-sizes="[10, 20, 50, 100]" + :page-size="pageSize" + layout="total, sizes, prev, pager, next, jumper" + :total="total"> + </el-pagination> + </div> --> + <el-dialog + class="prop_dialog" + :title="asyncTitle ? '新增' : '修改'" + :close-on-click-modal="false" + :visible.sync="asyncVisible" + width="55%"> + <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="auto" class="rule_form"> + <el-form-item label="区域名称:" prop="groupId"> + <el-select v-model="ruleForm.groupId" placeholder="请选择区域名称"> + <el-option + v-for="item in optionAreaList" + :key="item.id" + :label="item.groupName" + :value="item.id"> + </el-option> + </el-select> + </el-form-item> + <el-form-item label="上传文件:" > + <div class="upload_index"> + <div class="upload_text"> + <el-upload + class="upload-demo" + action="" + :multiple="false" + :http-request="httpRequest" + :show-file-list="false" + :file-list="fileList"> + <el-button type="text" :size="size">上传文件</el-button> + </el-upload> + </div> + <div class="upload_tables"> + <el-table + v-loading="loadingUpload" + :data="fileList" + height="100%"> + <el-table-column prop="name" label="文件" align="center"></el-table-column> + <el-table-column label="操作" align="center"> + <template #default="{ row }"> + <el-button class="delete_btn" size="mini" v-if="showButton('delete')" @click="deleteFiles(row)">删除</el-button> + </template> + </el-table-column> + <el-table-column label="是否默认播放" align="center"> + <template #default="{ row }"> + <el-radio v-model="row.defaults" :label="1">是</el-radio> + <el-radio v-model="row.defaults" :label="2">否</el-radio> + </template> + </el-table-column> + </el-table> + </div> + </div> + </el-form-item> + </el-form> + <div slot="footer"> + <el-button @click="asyncVisible = false">取 消</el-button> + <el-button class="submit_btn" @click="asyncTitle ? submitInsert() : submitUpdate()">提 交</el-button> + </div> + </el-dialog> + </div> +</template> + +<script> +import { buttonPinia } from '../../pinia/index'; +import { throttle, changeSize } from '../../plugins/public'; // 导入节流、动态切换组件尺寸方法 + export default { + data() { + return { + size: changeSize(), // 组件尺寸 + pageNum: 1, + pageSize: 10, + search:{},//查询条件 + total: 0, + loading: false, + loadingUpload:false, + dataList: [], //广播文件上传信息列表 + asyncTitle: true, // 对话框title 新增:true 修改:false + asyncVisible: false, // 添加 修改对话框 + ruleForm: { + }, // 按钮表单 + rules: { + groupId: [{ + required: true, + message: '请选择区域', + trigger: 'blur' + }], + }, + optionAreaList:[],//所有区域 + fileList:[ + ],//上传文件 + } + }, + watch: { + asyncVisible(bol) { + if(!bol) { + this.ruleForm = {}; + this.$refs.ruleForm.resetFields(); + } + } + }, + mounted() { + const that = this; + // 根据窗口大小动态修改组件尺寸 + window.onresize = () => { + that.size = changeSize(); + } + that.searchButtonInfo(true); + that.getAllTypes() + }, + methods: { + //获取所有区域 + getAllTypes(){ + let params = { + } + this.$api.Safety.getAreaLists(params).then(res=>{ + if(res.statusMsg === 'ok'){ + this.optionAreaList = res.data + }else{ + this.$message.warning(res.statusMsg) + } + }) + }, + //删除上传的文件 + deleteFiles(row){ + this.fileList.splice(this.fileList.findIndex(item => item.ids == row.ids),1); + this.$message.success("删除成功!") + }, + // 自定义上传事件 + httpRequest({file}) { + this.functionLoading(); + this.loadingUpload = true + if(file.type !=="video/mp4"){ + this.$message.warning("请上传MP4格式的文件!!!") + this.loadingView.close(); + return false + } + const formData = new FormData(); + formData.set('file', file); + this.$api.System.uploadFileRequest(formData).then((res) => { + if(res.success) { + this.$message.success('上传成功!'); + this.$nextTick(() => { + this.fileList.push({ + ids: this.fileList.length + 1, + name:file.name, + defaults:2, + audioFile:res.data + }) + }) + } else { + this.$message.warning(res.statusMsg); + } + this.loadingUpload = false + this.loadingView.close(); + }).catch(() => { + this.loadingUpload = false + this.loadingView.close(); + this.$message.error('请检查网络连接后重新上传!'); + }) + }, + // 等待方法 + functionLoading() { + this.loadingView = this.$loading({ + lock: true, + text: '请稍后...', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }); + }, + // 查询按钮列表信息 + searchButtonInfo(bol) { + if(bol) { + this.pageNum = 1; + } + let params = Object.assign({},this.search,{ + // pageNum: this.pageNum, + // pageSize: this.pageSize + }) + this.loading = true; + this.$api.Safety.getAreaLists(params).then((res) => { + if(res.statusMsg === 'ok') { + // this.total = res.data.total; + this.dataList = res.data; + } + this.loading = false; + }) + }, + // 新增按钮信息 + insertProp() { + this.asyncTitle = true; + this.asyncVisible = true; + }, + // 修改按钮信息 + updateProp(row) { + this.asyncTitle = false; + this.asyncVisible = true; + this.$api.Safety.detailsAreaInfos({groupId: row.id}).then(res=>{ + if(res.statusMsg === 'ok'){ + this.$set(this.ruleForm,'groupId',res.data.id) + this.fileList = res.data.fileList + let projectArr = [] + res.data.supplierPros.forEach(item=>{ + projectArr.push(item.proId) + }) + this.$set(this.ruleForm,'proIds',projectArr) + }else{ + this.$message.warning(res.statusMsg) + } + }) + }, + // 删除按钮信息 + deleteInfo(row) { + this.$confirm("该操作将删除该信息,是否继续删除?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning" + }) + .then(() => { + this.$api.Safety.deleteSupplier({supplierId: row.id}) + .then(res => { + if(res.statusMsg === 'ok') { + this.searchButtonInfo(true); + this.$message.success("删除成功!"); + } else { + this.$message.warning(res.statusMsg); + } + }) + }) + .catch(() => { + this.$message.warning("您已取消"); + }) + }, + // 提交添加按钮信息 + submitInsert: throttle(function() { + this.$refs.ruleForm.validate((valid) => { + if(valid) { + const params = Object.assign({}, this.ruleForm); + params.fileList = this.fileList + this.$api.Safety.addAreaInfos(params).then((res) => { + if(res.statusMsg === 'ok') { + this.asyncVisible = false; + this.searchButtonInfo(true); + this.$message.success('添加成功!'); + } else { + this.$message.warning(res.statusMsg); + } + }) + } + }) + }, 3000), + // 提交修改按钮信息 + submitUpdate: throttle(function() { + this.$refs.ruleForm.validate((valid) => { + if(valid) { + const params = Object.assign({}, this.ruleForm); + params.fileList = this.fileList + this.$api.Safety.addAreaInfos(params).then((res) => { + if(res.statusMsg === 'ok') { + this.asyncVisible = false; + this.searchButtonInfo(true); + this.$message.success('修改成功!'); + } else { + this.$message.warning(res.statusMsg); + } + }) + } + }) + }, 3000), + // 判断按钮权限信息 + showButton(str) { + const pinia = buttonPinia(); + return pinia.$state.buttonInfo.includes(str); + }, + // 切换页数 + changePageNum(page) { + this.pageNum = page; + this.searchButtonInfo(); + }, + // 切换每页条数 + changePageSize(size) { + this.pageSize = size; + this.searchButtonInfo(); + } + } + } +</script> + +<style lang="scss" scoped> +@import '../../style/layout-main.scss'; +.upload_index{ + width: 100%; + display: flex; + flex-direction: column; + .upload_text{ + display: flex; + justify-content: flex-end; + } + .upload_tables{ + height: 200px; + } +} +</style> \ No newline at end of file diff --git a/web/src/views/SecureManage/NipCheck/NipTips.vue b/web/src/views/SecureManage/NipCheck/NipTips.vue index 34aead1..07d4fc9 100644 --- a/web/src/views/SecureManage/NipCheck/NipTips.vue +++ b/web/src/views/SecureManage/NipCheck/NipTips.vue @@ -38,7 +38,7 @@ <el-table-column label="操作" align="center" width="250"> <template #default="{ row }"> <el-button class="table_btn" size="mini" v-if="showButton('update')" @click="updateProp(row)">修改</el-button> - <el-button class="delete_btn" size="mini" v-if="showButton('delete')" @click="deleteInfo(row)">删除</el-button> + <!-- <el-button class="delete_btn" size="mini" v-if="showButton('delete')" @click="deleteInfo(row)">删除</el-button> --> <el-button class="table_btn" size="mini" v-if="showButton('update')&&row.auditStatus!==1" @click="checkHidden(row)">审核</el-button> </template> </el-table-column> @@ -74,7 +74,14 @@ </el-date-picker> </el-form-item> <el-form-item label="隐患地点:" prop="dangerLocation"> - <el-input v-model="ruleForm.dangerLocation" :size="size" clearable placeholder="请输入隐患地点" :disabled="disabled"></el-input> + <el-select v-model="ruleForm.dangerLocation" placeholder="请选择隐患地点" clearable :disabled="disabled"> + <el-option + v-for="item in positonOptions" + :key="item.dictId" + :label="item.dictName" + :value="item.dictId"> + </el-option> + </el-select> </el-form-item> <el-form-item label="隐患标题" prop="title"> <el-input v-model="ruleForm.title" :size="size" type="textarea" :rows="5" clearable placeholder="请输入隐患标题" :disabled="disabled"></el-input> @@ -128,7 +135,9 @@ total: 0, disabled:false, loading: false, + userId:null,//创建人 dataList: [], //举报隐患信息列表 + positonOptions:[],//隐患地点 imageList:[], asyncTitle: true, // 对话框title 新增:true 修改:false asyncVisible: false, // 添加 修改对话框 @@ -152,7 +161,7 @@ dangerLocation: [{ required: true, message: '请输入隐患地点', - trigger: 'blur' + trigger: 'change' }], title: [{ required: true, @@ -183,6 +192,7 @@ optionsType:[],//设备类型 optionsDevice:[],//设备名称 optionsUser:[],//负责人 + dictId:null, } }, watch: { @@ -200,8 +210,23 @@ that.size = changeSize(); } that.searchButtonInfo(true); + that.searchPositionInfos() }, methods: { + //获取隐患地点 + searchPositionInfos(){ + let params = { + pageNum: 1, + pageSize: 100000000 + } + this.$api.Dictionary.searchDictionary(params).then(res=>{ + if(res.statusMsg === 'ok'){ + this.positonOptions = res.data.list.filter(item =>item.dictType === 'danger_region') + }else{ + this.$message.warning(res.statusMsg) + } + }) + }, // 查询按钮列表信息 searchButtonInfo(bol) { if(bol) { @@ -231,6 +256,7 @@ }, // 审核按钮 checkHidden(row) { + this.userId = row.createUser this.asyncTitle = true; this.imageList = [] this.asyncVisible = true; @@ -284,6 +310,7 @@ this.$api.Safety.detailsHiddenInfo({id: row.id}).then(res=>{ if(res.statusMsg === 'ok'){ this.ruleForm = res.data + this.dictId = res.data.dictId res.data.imgEntities.map(item=>{ this.imageList.push({ id: this.imageList.length + 1, @@ -329,6 +356,7 @@ arrTitle.push({imgPath:item.name}) }) params.imgEntities = arrTitle + params.createUser = this.userId this.$api.Safety.checkHiddenInfo(params).then((res) => { if(res.statusMsg === 'ok') { this.asyncVisible = false; @@ -351,6 +379,7 @@ arrTitle.push({imgPath:item.name}) }) params.imgEntities = arrTitle + params.dictId = this.dictId this.$api.Safety.updateHiddenInfo(params).then((res) => { if(res.statusMsg === 'ok') { this.asyncVisible = false; diff --git a/web/src/views/SecureManage/NipCheck/components/ScoreDetails.vue b/web/src/views/SecureManage/NipCheck/components/ScoreDetails.vue index 0a2e352..f3acbfa 100644 --- a/web/src/views/SecureManage/NipCheck/components/ScoreDetails.vue +++ b/web/src/views/SecureManage/NipCheck/components/ScoreDetails.vue @@ -2,36 +2,36 @@ <div class="main" style="height:89%"> <div class="main_header"> <div class="header_item"> - <span class="header_label">类型:</span> - <el-select v-model="search.type" clearable placeholder="请选择类型"> - <el-option - v-for="item in typeLists" - :key="item.value" - :label="item.label" - :value="item.value"> - </el-option> - </el-select> - </div> - <div class="header_item"> - <span class="header_label">时间范围:</span> - <el-date-picker - v-model="search.time" - type="daterange" - value-format="yyyy-MM-dd HH:mm:ss" - :default-time="['00:00:00','23:59:59']" - range-separator="-" - start-placeholder="起始时间" - end-placeholder="结束时间"> - </el-date-picker> - </div> + <span class="header_label">人员类型:</span> + <el-select v-model="search.userType" clearable placeholder="请选择人员类型" @change="changeType"> + <el-option + v-for="item in optionsType" + :key="item.value" + :label="item.label" + :value="item.value"> + </el-option> + </el-select> + </div> + <div class="header_item"> + <span class="header_label">人员姓名:</span> + <el-select v-model="search.userId" filterable clearable placeholder="请选择人员名称"> + <el-option + v-for="item in optionsUser" + :key="item.userId" + :label="item.realName" + :value="item.userId"> + </el-option> + </el-select> + </div> + <div class="header_item"> + <span class="header_label">累计积分范围:</span> + <el-input v-model="search.startIntegral" clearable placeholder="请输入"></el-input> + <el-input v-model="search.endIntegra" style="margin-left:15px" clearable placeholder="请输入"></el-input> + </div> <div class="header_item"> <el-button icon="el-icon-search" v-if="showButton('search')" @click="searchButtonInfo(true)">查询</el-button> - <el-button class="search_btn" icon="el-icon-plus" v-if="showButton('export')" @click="exportFiles">导出Excel</el-button> + <!-- <el-button class="search_btn" icon="el-icon-plus" v-if="showButton('export')" @click="exportFiles">导出Excel</el-button> --> </div> - </div> - <div class="score_index"> - <div class="score_titles">积分:</div> - <div class="score_datas"><span>65</span>分</div> </div> <div class="main_content"> <el-table @@ -44,10 +44,20 @@ </template> </el-table-column> <el-table-column prop="createTime" label="时间" align="center" width="150"></el-table-column> - <el-table-column prop="dangerLocation" label="积分分值" align="center" ></el-table-column> - <el-table-column prop="dangerLocation" label="余额" align="center" ></el-table-column> - <el-table-column prop="dangerLocation" label="类型" align="center" ></el-table-column> - <el-table-column prop="title" label="说明" align="center" show-overflow-tooltip></el-table-column> + <el-table-column prop="realName" label="人员姓名" align="center" ></el-table-column> + <el-table-column prop="accumulateIntegral" label="累计积分" align="center" ></el-table-column> + <el-table-column prop="totalIntegral" label="当前积分" align="center" ></el-table-column> + <el-table-column prop="totalConsumption" label="总消耗" align="center" ></el-table-column> + <el-table-column prop="userType" label="人员类型" align="center" > + <template #default="{row}"> + <div>{{optionsType[row.userType-1]&&optionsType[row.userType - 1].label}}</div> + </template> + </el-table-column> + <el-table-column label="操作" align="center"> + <template #default="{ row }"> + <el-button class="table_btn" size="mini" v-if="showButton('update')" @click="updateProp(row)">个人积分明细</el-button> + </template> + </el-table-column> </el-table> </div> <div class="main_footer"> @@ -62,27 +72,124 @@ :total="total"> </el-pagination> </div> + <!-- 个人积分超市明细 --> + <el-dialog + class="prop_dialog" + title="个人积分明细" + :close-on-click-modal="false" + :visible.sync="asyncVisible" + width="65%"> + <div> + <div class="main_header"> + <div class="header_item"> + <span class="header_label">类型:</span> + <el-select v-model="searchForm.type" clearable placeholder="请选择类型"> + <el-option + v-for="item in optionsFormType" + :key="item.value" + :label="item.label" + :value="item.value"> + </el-option> + </el-select> + </div> + <div class="header_item"> + <span class="header_label">时间范围:</span> + <el-date-picker + v-model="searchForm.time" + type="daterange" + value-format="yyyy-MM-dd HH:mm:ss" + :default-time="['00:00:00','23:59:59']" + range-separator="-" + start-placeholder="起始时间" + end-placeholder="结束时间"> + </el-date-picker> + </div> + <div class="header_item"> + <el-button icon="el-icon-search" v-if="showButton('search')" @click="searchFormButtonInfo(true,userIds)">查询</el-button> + <el-button class="search_btn" icon="el-icon-plus" v-if="showButton('export')" @click="exportFiles(userIds)">导出Excel</el-button> + </div> + </div> + <div class="score_index"> + <div class="score_titles">积分:</div> + <div class="score_datas"><span>{{ruleNumber}}</span>分</div> + </div> + <div class="main_content" style="height:350px"> + <el-table + v-loading="loading" + :data="dataFormList" + height="100%"> + <el-table-column align="center" label="序号" width="60"> + <template #default="scope"> + <span>{{(pageNum - 1) * pageSize + scope.$index + 1}}</span> + </template> + </el-table-column> + <el-table-column prop="createTime" label="时间" align="center" width="150"></el-table-column> + <el-table-column prop="integralWater" label="积分分值" align="center" > + <template #default="{row}"> + <div>{{row.type===1?'+'+row.integralWater:row.type===2?'-'+row.integralWater:''}}</div> + </template> + </el-table-column> + <el-table-column prop="balanc" label="余额" align="center" ></el-table-column> + <el-table-column prop="type" label="类型" align="center" > + <template #default="{row}"> + <div>{{optionsFormType[row.type-1]&&optionsFormType[row.type - 1].label}}</div> + </template> + </el-table-column> + <el-table-column prop="remark" label="说明" align="center" show-overflow-tooltip></el-table-column> + </el-table> + </div> + <div class="main_footer"> + <el-pagination + background + @current-change="changeFormPageNum" + @size-change="changeFormPageSize" + :current-page="pageFormNum" + :page-sizes="[10, 20, 50, 100]" + :page-size="pageFormSize" + layout="total, sizes, prev, pager, next, jumper" + :total="totalForm"> + </el-pagination> + </div> + </div> + </el-dialog> </div> </template> <script> import { buttonPinia } from '../../../../pinia/index'; -import { changeSize } from '../../../../plugins/public'; // 导入节流、动态切换组件尺寸方法 +import { changeSize,downFiles } from '../../../../plugins/public'; // 导入节流、动态切换组件尺寸方法 export default { data() { return { size: changeSize(), // 组件尺寸 pageNum: 1, pageSize: 10, + pageFormNum:1, + pageFormSize:10, + ruleNumber:null,//总积分数 + userIds:null,//人员id + totalForm:0, search:{},//查询条件 + optionsUser:[],//人员 + searchForm:{},//弹框中的查询条件 total: 0, disabled:false, loading: false, dataList: [], //积分明细信息列表 + dataFormList:[],//弹框中的列表 imageList:[], - asyncTitle: true, // 对话框title 新增:true 修改:false asyncVisible: false, // 添加 修改对话框 - typeLists:[ + optionsType:[ + { + label:'管理人员', + value:1 + }, + { + label:'劳务人员', + value:2 + }, + ], + optionsFormType:[ { label:'获取', value:1 @@ -91,7 +198,7 @@ label:'消耗', value:2 } - ] + ], } }, watch: { @@ -110,6 +217,17 @@ } }, methods: { + //通过修改人员类型获取对应的人员名称 + changeType(val){ + this.$set(this.search,'userId','') + this.$api.Engineer.getPersonsList({userType:val}).then(res=>{ + if(res.statusMsg === 'ok'){ + this.optionsUser = res.data + }else{ + this.$message.warning(res.statusMsg) + } + }) + }, // 查询按钮列表信息 searchButtonInfo(bol) { if(bol) { @@ -123,7 +241,7 @@ params.endTime = this.search.time&&this.search.time[1] delete params.time this.loading = true; - this.$api.Safety.searchHiddenLists(params).then((res) => { + this.$api.Safety.searchIntegralLists(params).then((res) => { if(res.statusMsg === 'ok') { this.total = res.data.total; this.dataList = res.data.list; @@ -131,8 +249,60 @@ this.loading = false; }) }, + //查询弹框中的列表 + searchFormButtonInfo(bol,userId){ + if(bol) { + this.pageFormNum = 1; + } + let params = Object.assign({},this.searchForm,{ + pageNum: this.pageFormNum, + pageSize: this.pageFormSize, + userId:userId + }) + params.startTime = this.searchForm.time&&this.searchForm.time[0] + params.endTime = this.searchForm.time&&this.searchForm.time[1] + delete params.time + this.loading = true; + this.$api.Safety.searchPersonLists(params).then((res) => { + if(res.statusMsg === 'ok') { + this.totalForm = res.data.data.total; + this.ruleNumber = res.data.integral + this.dataFormList = res.data.data.list; + } + this.loading = false; + }) + }, //导出excel - exportFiles(){}, + exportFiles(userId){ + let params = {} + params.startTime = this.search.time&&this.search.time[0] + params.endTime = this.search.time&&this.search.time[1] + params.userId = userId + delete params.time + this.functionLoading(); + this.$api.Safety.exportIntegralFiles(params).then(res => { + downFiles(res, '积分明细信息', 'xls') + this.loadingView.close() + }) + .catch(() => { + this.loadingView.close(); + }) + }, + // 转圈圈 + functionLoading() { + this.loadingView = this.$loading({ + lock: true, + text: '请稍后...', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }); + }, + //个人积分明细弹框 + updateProp(row){ + this.userIds = row.userId + this.asyncVisible = true; + this.searchFormButtonInfo(true,row.userId) + }, // 判断按钮权限信息 showButton(str) { const pinia = buttonPinia(); @@ -147,7 +317,17 @@ changePageSize(size) { this.pageSize = size; this.searchButtonInfo(); - } + }, + //切换弹框页数 + changeFormPageNum(page){ + this.pageFormNum = page; + this.searchFormButtonInfo(); + }, + // 切换弹框每页条数 + changeFormPageSize(size) { + this.pageFormSize = size; + this.searchFormButtonInfo(); + }, } } </script> diff --git a/web/src/views/SecureManage/NipCheck/components/ScoreMarket.vue b/web/src/views/SecureManage/NipCheck/components/ScoreMarket.vue index 16d20ed..84648eb 100644 --- a/web/src/views/SecureManage/NipCheck/components/ScoreMarket.vue +++ b/web/src/views/SecureManage/NipCheck/components/ScoreMarket.vue @@ -1,6 +1,28 @@ <template> <div class="main" style="height:89%"> <div class="main_header"> + <div class="header_item"> + <span class="header_label">人员类型:</span> + <el-select v-model="search.userType" clearable placeholder="请选择人员类型" @change="changeType"> + <el-option + v-for="item in optionsType" + :key="item.value" + :label="item.label" + :value="item.value"> + </el-option> + </el-select> + </div> + <div class="header_item"> + <span class="header_label">人员姓名:</span> + <el-select v-model="search.userId" filterable clearable placeholder="请选择人员名称"> + <el-option + v-for="item in optionsUser" + :key="item.userId" + :label="item.realName" + :value="item.userId"> + </el-option> + </el-select> + </div> <div class="header_item"> <span class="header_label">时间范围:</span> <el-date-picker @@ -15,6 +37,7 @@ </div> <div class="header_item"> <el-button icon="el-icon-search" v-if="showButton('search')" @click="searchButtonInfo(true)">查询</el-button> + <el-button class="search_btn" icon="el-icon-plus" v-if="showButton('insert')" @click="insertProp">新增</el-button> <el-button class="search_btn" icon="el-icon-plus" v-if="showButton('export')" @click="exportFiles">导出Excel</el-button> </div> </div> @@ -29,8 +52,24 @@ </template> </el-table-column> <el-table-column prop="createTime" label="时间" align="center" width="150"></el-table-column> - <el-table-column prop="dangerLocation" label="积分分值" align="center" ></el-table-column> - <el-table-column prop="title" label="说明" align="center" show-overflow-tooltip></el-table-column> + <el-table-column prop="userType" label="人员类型" align="center" > + <template #default="{row}"> + <div>{{optionsType[row.userType-1]&&optionsType[row.userType - 1].label}}</div> + </template> + </el-table-column> + <el-table-column prop="realName" label="人员姓名" align="center" ></el-table-column> + <el-table-column prop="integralWater" label="积分分值" align="center" > + <template #default="{row}"> + -{{row.integralWater}} + </template> + </el-table-column> + <el-table-column prop="remark" label="说明" align="center" show-overflow-tooltip></el-table-column> + <el-table-column label="操作" align="center"> + <template #default="{ row }"> + <!-- <el-button class="table_btn" size="mini" v-if="showButton('update')" @click="updateProp(row)">修改</el-button> --> + <el-button class="delete_btn" size="mini" v-if="showButton('delete')" @click="deleteInfo(row)">删除</el-button> + </template> + </el-table-column> </el-table> </div> <div class="main_footer"> @@ -45,12 +84,51 @@ :total="total"> </el-pagination> </div> + <el-dialog + class="prop_dialog" + :title="asyncTitle ? '新增' : '修改'" + :close-on-click-modal="false" + :visible.sync="asyncVisible" + width="35%"> + <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="auto" class="rule_form"> + <el-form-item label="类型:" prop="userType"> + <el-select v-model="ruleForm.userType" clearable placeholder="请选择人员类型" @change="changeType"> + <el-option + v-for="item in optionsType" + :key="item.value" + :label="item.label" + :value="item.value"> + </el-option> + </el-select> + </el-form-item> + <el-form-item label="人员姓名:" prop="userId"> + <el-select v-model="ruleForm.userId" filterable clearable placeholder="请选择人员名称"> + <el-option + v-for="item in optionsUser" + :key="item.userId" + :label="item.realName" + :value="item.userId"> + </el-option> + </el-select> + </el-form-item> + <el-form-item label="扣除积分:" prop="integralWater"> + <el-input v-model="ruleForm.integralWater" :size="size" type="number" clearable placeholder="请输入扣除积分"></el-input> + </el-form-item> + <el-form-item label="说明:" prop="remark"> + <el-input v-model="ruleForm.remark" type="textarea" :rows="5" :size="size" clearable placeholder="请输入说明"></el-input> + </el-form-item> + </el-form> + <div slot="footer"> + <el-button @click="asyncVisible = false">取 消</el-button> + <el-button class="submit_btn" @click="asyncTitle ? submitInsert() : submitUpdate()">提 交</el-button> + </div> + </el-dialog> </div> </template> <script> import { buttonPinia } from '../../../../pinia/index'; -import { changeSize } from '../../../../plugins/public'; // 导入节流、动态切换组件尺寸方法 +import { changeSize,throttle,downFiles } from '../../../../plugins/public'; // 导入节流、动态切换组件尺寸方法 export default { data() { return { @@ -61,10 +139,44 @@ total: 0, disabled:false, loading: false, - dataList: [], //举报隐患信息列表 + dataList: [], //安全积分超市 + optionsUser:[],//所有人员 imageList:[], asyncTitle: true, // 对话框title 新增:true 修改:false asyncVisible: false, // 添加 修改对话框 + ruleForm: {}, // 按钮表单 + rules: { + userType: [{ + required: true, + message: '请选择人员类型', + trigger: 'change' + }], + userId: [{ + required: true, + message: '请选择人员姓名', + trigger: 'change' + }], + integralWater: [{ + required: true, + message: '请输入扣除积分', + trigger: 'blur' + }], + remark: [{ + required: true, + message: '请输入说明', + trigger: 'blur' + }], + }, + optionsType:[ + { + label:'管理人员', + value:1 + }, + { + label:'劳务人员', + value:2 + }, + ] } }, watch: { @@ -83,6 +195,85 @@ } }, methods: { + //通过修改人员类型获取对应的人员名称 + changeType(val){ + this.$set(this.search,'userId','') + this.$set(this.ruleForm,'userId','') + this.$api.Engineer.getPersonsList({userType:val}).then(res=>{ + if(res.statusMsg === 'ok'){ + this.optionsUser = res.data + }else{ + this.$message.warning(res.statusMsg) + } + }) + }, + // 新增按钮信息 + insertProp() { + this.asyncTitle = true; + this.asyncVisible = true; + }, + // 修改按钮信息 + updateProp(row) { + this.asyncTitle = false; + this.asyncVisible = true; + this.ruleForm = row + }, + // 删除按钮信息 + deleteInfo(row) { + this.$confirm("该操作将删除该信息,是否继续删除?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning" + }) + .then(() => { + this.$api.Safety.deleteMarketInfo({id: row.id}) + .then(res => { + if(res.statusMsg === 'ok') { + this.searchButtonInfo(true); + this.$message.success("删除成功!"); + } else { + this.$message.warning(res.statusMsg); + } + }) + }) + .catch(() => { + this.$message.warning("您已取消"); + }) + }, + // 提交添加按钮信息 + submitInsert: throttle(function() { + this.$refs.ruleForm.validate((valid) => { + if(valid) { + const params = Object.assign({}, this.ruleForm); + this.$api.Safety.addUpdateMarketInfo(params).then((res) => { + if(res.statusMsg === 'ok') { + this.asyncVisible = false; + this.searchButtonInfo(true); + this.$message.success('添加成功!'); + } else { + this.$message.warning(res.statusMsg); + } + }) + } + }) + }, 3000), + // 提交修改按钮信息 + submitUpdate: throttle(function() { + this.$refs.ruleForm.validate((valid) => { + if(valid) { + const params = Object.assign({}, this.ruleForm); + this.$api.Safety.addUpdateMarketInfo(params).then((res) => { + if(res.statusMsg === 'ok') { + this.asyncVisible = false; + this.searchButtonInfo(true); + this.$message.success('修改成功!'); + } else { + this.$message.warning(res.statusMsg); + } + }) + } + }) + }, 3000), // 查询按钮列表信息 searchButtonInfo(bol) { if(bol) { @@ -96,7 +287,7 @@ params.endTime = this.search.time&&this.search.time[1] delete params.time this.loading = true; - this.$api.Safety.searchHiddenLists(params).then((res) => { + this.$api.Safety.searchMarketLists(params).then((res) => { if(res.statusMsg === 'ok') { this.total = res.data.total; this.dataList = res.data.list; @@ -105,7 +296,29 @@ }) }, //导出excel - exportFiles(){}, + exportFiles(){ + let params = {} + params.startTime = this.search.time&&this.search.time[0] + params.endTime = this.search.time&&this.search.time[1] + delete params.time + this.functionLoading(); + this.$api.Safety.exportMarketFiles(params).then(res => { + downFiles(res, '安全积分超市信息', 'xls') + this.loadingView.close() + }) + .catch(() => { + this.loadingView.close(); + }) + }, + // 转圈圈 + functionLoading() { + this.loadingView = this.$loading({ + lock: true, + text: '请稍后...', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }); + }, // 判断按钮权限信息 showButton(str) { const pinia = buttonPinia(); diff --git a/web/src/views/SecureManage/RiskGrad/AreaPolling.vue b/web/src/views/SecureManage/RiskGrad/AreaPolling.vue index 3a0ed7f..61cee9b 100644 --- a/web/src/views/SecureManage/RiskGrad/AreaPolling.vue +++ b/web/src/views/SecureManage/RiskGrad/AreaPolling.vue @@ -7,7 +7,9 @@ <el-tab-pane label="任务打卡" name="second"></el-tab-pane> </el-tabs> </div> - <component :is="cpns[activeName]"></component> + <div class="content"> + <component :is="cpns[activeName]"></component> + </div> </div> </template> <script> @@ -32,4 +34,13 @@ <style lang="scss" scoped> @import '@/style/layout-main.scss'; + +.main { + display: flex; + + .content { + overflow: hidden; + flex: 1; + } +} </style> \ No newline at end of file diff --git a/web/src/views/SecureManage/RiskGrad/components/PollingTask.vue b/web/src/views/SecureManage/RiskGrad/components/PollingTask.vue index e02fce3..0f171c6 100644 --- a/web/src/views/SecureManage/RiskGrad/components/PollingTask.vue +++ b/web/src/views/SecureManage/RiskGrad/components/PollingTask.vue @@ -1,6 +1,6 @@ <!-- 安全管理 ==> 风险分级管控 => 区域巡检(巡检任务)--> <template> - <div> + <div class="wrap"> <div class="main_header"> <div class="header_item"> <span class="header_label">巡检任务:</span> @@ -385,6 +385,17 @@ <style lang="scss" scoped> @import '@/style/layout-main.scss'; +.wrap { + display: flex; + flex-direction: column; + height: 100%; + + .main_content { + overflow: hidden; + flex: 1; + } +} + .divider { position: relative; margin-bottom: 30px; diff --git a/web/src/views/SecureManage/RiskGrad/components/TaskPunchcard.vue b/web/src/views/SecureManage/RiskGrad/components/TaskPunchcard.vue index 28afc51..50c2238 100644 --- a/web/src/views/SecureManage/RiskGrad/components/TaskPunchcard.vue +++ b/web/src/views/SecureManage/RiskGrad/components/TaskPunchcard.vue @@ -1,6 +1,6 @@ <!-- 安全管理 ==> 风险分级管控 => 区域巡检(任务打卡)--> <template> - <div> + <div class="wrap"> <div class="main_header"> <div class="header_item"> <span class="header_label">巡检人:</span> @@ -8,7 +8,7 @@ </div> <div class="header_item"> <span class="header_label">巡检状态:</span> - <el-select size="mini" v-model="queryInfo.status"> + <el-select size="mini" v-model="queryInfo.status" clearable> <el-option v-for="item in queryStatus" :key="item.value" :label="item.label" :value="item.value" placeholder="请选择巡检状态"></el-option> </el-select> @@ -72,8 +72,6 @@ <el-image class="image" v-for="(item, index) in regionInfos.img" :key="index" :src="item" fit="contain" :preview-src-list="regionInfos.img"></el-image> </el-form-item> - - <el-form-item label="获取当前位置:">{{ regionInfos.location }}</el-form-item> </el-form> </el-dialog> </div> @@ -120,7 +118,6 @@ region: '', // 巡检区域 res: '', // 巡检结果 img: '', // 上传的图片 - location: '', // 位置 } } }, @@ -230,13 +227,12 @@ this.regionInfos.time = res.data.inspectionTime this.regionInfos.region = res.data.region this.regionInfos.res = res.data.result - this.regionInfos.location = res.data.location this.regionInfos.img = [] if (res.data.imgPaths) { let arr = [] res.data.imgPaths.split(',').forEach(item => { - arr.push(process.env.VUE_APP_BASE_URL + '/' + item) + arr.push('https://szpipe.thhy-tj.com/' + item) // 是生产地址 }) this.regionInfos.img.push(...arr) } @@ -265,6 +261,17 @@ <style lang="scss" scoped> @import '@/style/layout-main.scss'; +.wrap { + display: flex; + flex-direction: column; + height: 100%; + + .main_content { + overflow: hidden; + flex: 1; + } +} + .rule_form { color: #fff; diff --git a/xcx/pages/labourHome/index.vue b/xcx/pages/labourHome/index.vue index e2a4ece..4b4daba 100644 --- a/xcx/pages/labourHome/index.vue +++ b/xcx/pages/labourHome/index.vue @@ -222,7 +222,7 @@ } } .home_footer_menu{ - height: 35vh; + height: 42vh; position: absolute; bottom: 30rpx; left: 10rpx; diff --git a/xcx/pages/loginIndex/index.vue b/xcx/pages/loginIndex/index.vue index 2f25e41..a194043 100644 --- a/xcx/pages/loginIndex/index.vue +++ b/xcx/pages/loginIndex/index.vue @@ -40,7 +40,8 @@ </template> </u-input> </u-form-item> - <u-text type="primary" text="立即注册" @click="navGotoRegister()"></u-text> + <!-- <u-text type="primary" text="立即注册" @click="navGotoRegister()"></u-text> --> + <u-text type="primary" text="管理员电话:13800138008"></u-text> <view class="login_content_button"> <u-button type="primary" @@ -92,69 +93,72 @@ }, onShow() { const that = this; - uni.clearStorage(); - uni.clearStorageSync(); - wx.getSetting({ - complete: (info) => { - if(!info.authSetting['scope.userInfo']) { - uni.showModal({ - title: '提示', - content: '是否授权获取您的信息,该信息仅用于确认身份信息', - success: function (res) { - if (res.confirm) { - wx.login({ - success(res) { - uni.$u.toast('授权成功!'); - that.$api.system.getUserInfo(res.code).then((res) => { - if(res.success) { - uni.setStorageSync('openId', res.data.openid); - that.$api.system.changeWChartUser({ - openId: res.data.openid - }).then((reslut) => { - console.log(reslut); - that.switchUserInfo(reslut.data.regstatus, reslut.data.reginfo); - }) - } else { - uni.$u.toast(res.statusMsg); - } - }) - }, - fail: (err) => { - console.log(err,'---'); - } - }) - } else if (res.cancel) { - wx.exitMiniProgram({ - success: (res) => { - console.log(res,'--'); - } - }) - } - } - }); - } else { - wx.login({ - success(res) { - that.$api.system.getUserInfo(res.code).then((res) => { - if(res.success) { - uni.setStorageSync('openId', res.data.openid); - that.$api.system.changeWChartUser({ - openId: res.data.openid - }).then((reslut) => { - that.switchUserInfo(reslut.data.regstatus, reslut.data.reginfo); - }) - } else { - uni.$u.toast(res.statusMsg); - } - }) - }, - fail: (err) => { - console.log(err,'---'); - } - }) - } - } - }) + // uni.clearStorage(); + // uni.clearStorageSync(); + // wx.getSetting({ + // complete: (info) => { + // if(!info.authSetting['scope.userInfo']) { + // uni.showModal({ + // title: '提示', + // content: '是否授权获取您的信息,该信息仅用于确认身份信息', + // success: function (res) { + // if (res.confirm) { + // wx.login({ + // success(res) { + // uni.$u.toast('授权成功!'); + // that.$api.system.getUserInfo(res.code).then((res) => { + // if(res.success) { + // uni.setStorageSync('openId', res.data.openid); + // that.$api.system.changeWChartUser({ + // openId: res.data.openid + // }).then((reslut) => { + // console.log(reslut); + // that.switchUserInfo(reslut.data.regstatus, reslut.data.reginfo); + // }) + // } else { + // uni.$u.toast(res.statusMsg); + // } + // }) + // }, + // fail: (err) => { + // console.log(err,'---'); + // } + // }) + // } else if (res.cancel) { + // wx.exitMiniProgram({ + // success: (res) => { + // console.log(res,'--'); + // } + // }) + // } + // } + // }); + // } else { + // wx.login({ + // success(res) { + // that.$api.system.getUserInfo(res.code).then((res) => { + // if(res.success) { + // uni.setStorageSync('openId', res.data.openid); + // that.$api.system.changeWChartUser({ + // openId: res.data.openid + // }).then((reslut) => { + // that.switchUserInfo(reslut.data.regstatus, reslut.data.reginfo); + // // uni.navigateTo({ + // // url: '../../robePages/safeManage/addHidden' + // // }) + // }) + // } else { + // uni.$u.toast(res.statusMsg); + // } + // }) + // }, + // fail: (err) => { + // console.log(err,'---'); + // } + // }) + // } + // } + // }) }, onReady() { this.$refs.form.setRules(this.rulesLogin); diff --git a/xcx/robePages/safeManage/addHidden.vue b/xcx/robePages/safeManage/addHidden.vue index edcf63d..0d331b7 100644 --- a/xcx/robePages/safeManage/addHidden.vue +++ b/xcx/robePages/safeManage/addHidden.vue @@ -25,10 +25,13 @@ <u-form-item label="隐患地点" prop="dangerLocation" + @click="changePosition()" borderBottom> <u-input v-model="formCheck.dangerLocation" placeholder="请输入隐患地点" + disabled + disabledColor="#FFFFFF" border="none"> </u-input> </u-form-item> @@ -39,17 +42,18 @@ borderBottom> <u--textarea v-model="formCheck.title" placeholder="请输入隐患标题" height="100"></u--textarea> </u-form-item> + <!-- <div>{{value}}</div> --> </view> </u-form> <view class="submit_bnt"> <u-button type="primary" color="#1976FF" text="提交" @click="submitInsertForm()"></u-button> </view> <u-picker - :show="showUser" - :columns="userColumns" - keyName="realName" - @cancel="showUser = false" - @confirm="selectCompany"> + :show="positionUser" + :columns="positionColumns" + keyName="dictName" + @cancel="positionUser = false" + @confirm="selectPosition"> </u-picker> </view> </template> @@ -60,10 +64,12 @@ export default{ data(){ return{ - showUser: false,//整改人弹框显隐 + value:null, + positionUser: false,//隐患地点弹框显隐 + positionColumns: [],//所有隐患地点 formCheck:{ imageList:[],//上传图片 - userId:'',//整改人 + positionId:'',//隐患地点 }, rulesCkeck: { dangerLocation: [{ @@ -79,9 +85,51 @@ } } }, - onLoad(option) { + onShow() { + let phone = uni.getStorageSync('telphone'); + if(!phone){ + uni.navigateTo({ + url: '../../pages/loginIndex/index' + }) + } + }, + onLoad(query) { + const q = decodeURIComponent(query.q) + this.value = q + console.log(q,'*****') + this.getPositionData() }, methods:{ + // 获取隐患地点信息 + getPositionData() { + let arrUser = [] + this.$api.reboSystem.getDatnmSafeType({dictType: 'danger_region',pageNum: 1,pageSize: 1000000000}).then(res=>{ + console.log(res,'******') + if(res.statusMsg === 'ok'){ + res.data.list.map(item=>{ + arrUser.push({ + dictName:item.dictName, + positionId:item.dictId + }) + }) + }else{ + uni.$u.toast(res.statusMsg); + } + }) + this.positionColumns = [arrUser] + }, + // 打开隐患地点选择 + changePosition() { + this.positionUser = true; + this.$set(this.formCheck, 'positionId', ''); + this.$set(this.formCheck, 'dangerLocation',''); + }, + // 确认选择隐患地点 + selectPosition({ value }) { + this.$set(this.formCheck, 'positionId', value[0].positionId); + this.$set(this.formCheck, 'dangerLocation', value[0].dictName); + this.positionUser = false; + }, //提交按钮 submitInsertForm: throttle(function() { this.$refs.form.validate().then((valid) => { @@ -92,7 +140,8 @@ imgPath:item.data, } }); - delete params.userId + params.dangerLocation = this.formCheck.positionId + delete params.positionId delete params.imageList; this.$api.reboSystem.addHiddenInfo(params).then((res) => { if(res.success) { diff --git a/xcx/robePages/safeManage/approveHidden.vue b/xcx/robePages/safeManage/approveHidden.vue index ed7a181..c773cc1 100644 --- a/xcx/robePages/safeManage/approveHidden.vue +++ b/xcx/robePages/safeManage/approveHidden.vue @@ -52,6 +52,7 @@ v-model="formCheck.level" placeholder="请选择隐患等级" disabledColor="#FFFFFF" + disabled border="none"> </u-input> <u-icon @@ -92,6 +93,7 @@ data(){ return{ hiddenBtn:0,//是否展示提交按钮 0:展示 + createUser:null,//创建人 checkShow:false,//展示隐患等级和积分值是否可修改 showLever: false,//隐患等级弹框显隐 leverColumns: [ @@ -132,6 +134,7 @@ }, onLoad(option) { this.hiddenBtn = option.status + this.createUser = option.createUser if(option.status==='0'){//0为审批页面、其他为详情页面 this.checkShow = false this.getDetailsInfo(option.id,0) @@ -175,6 +178,7 @@ const params = Object.assign({},this.hiddenDetails); params.level = this.formCheck.levelId params.integral = this.formCheck.integral + params.createUser = this.createUser this.$api.reboSystem.checkHiddenInfo(params).then((res) => { if(res.success) { uni.$u.toast("提交成功!"); diff --git a/xcx/robePages/safeManage/checkHidden.vue b/xcx/robePages/safeManage/checkHidden.vue index 82084ea..749ec7e 100644 --- a/xcx/robePages/safeManage/checkHidden.vue +++ b/xcx/robePages/safeManage/checkHidden.vue @@ -113,7 +113,7 @@ //跳转隐患审批或详情页面 goDetailsPage(val){ uni.navigateTo({ - url: `./approveHidden?id=${val.id}&status=${val.auditStatus}` + url: `./approveHidden?id=${val.id}&status=${val.auditStatus}&createUser=${val.createUser}` }) }, //查询列表 diff --git a/xcx/robePages/safeManage/detailsHidden.vue b/xcx/robePages/safeManage/detailsHidden.vue index 1ab93f3..7ebe76b 100644 --- a/xcx/robePages/safeManage/detailsHidden.vue +++ b/xcx/robePages/safeManage/detailsHidden.vue @@ -20,6 +20,18 @@ <view class="hidden_text">隐患标题</view> <view class="hidden_datas">{{hiddenDetails.title}}</view> </view> + <view class="check_details_card"> + <view class="hidden_text">隐患等级</view> + <view class="hidden_datas">{{hiddenDetails.levelName}}</view> + </view> + <view class="check_details_card"> + <view class="hidden_text">积分</view> + <view class="hidden_datas">{{hiddenDetails.integral===null?'':hiddenDetails.integral}}</view> + </view> + <view class="check_details_card"> + <view class="hidden_text">审核状态</view> + <view class="hidden_datas" :class="{'goThrough':hiddenDetails.auditStatus===1,'notGoThrough':hiddenDetails.auditStatus===0}">{{hiddenDetails.auditStatusName}}</view> + </view> </view> </view> </template> @@ -59,7 +71,7 @@ padding: 15px; .check_details_matter{ - height: calc(100vh - 112px); + height: calc(100vh - 80px); background-color: #FFFFFF; border-radius: 6px; @@ -80,6 +92,12 @@ flex: 1; margin-left: 15px; } + .goThrough{ + color: lawngreen; + } + .notGoThrough{ + color: red; + } } .check_details_contents{ height: calc(100% - 460px); diff --git a/xcx/robePages/safeManage/hiddenReport.vue b/xcx/robePages/safeManage/hiddenReport.vue index 7d8cfb1..25903b4 100644 --- a/xcx/robePages/safeManage/hiddenReport.vue +++ b/xcx/robePages/safeManage/hiddenReport.vue @@ -119,7 +119,7 @@ endTime:this.search.endTime?this.search.endTime+' 23:59:59':'', pageNum: this.pageNum, pageSize:this.pageSize, - type:1 + type:2 }) this.$api.reboSystem.searchHiddenLists(params).then(res=>{ if(res.statusMsg === 'ok'){ @@ -155,7 +155,7 @@ let params =Object.assign({},this.search,{ pageNum: this.pageNum, pageSize:this.pageSize, - type:1 + type:2 }) this.$api.reboSystem.searchHiddenLists(params).then(res=>{ if(res.statusMsg === 'ok'){ -- Gitblit v1.9.3