hmc 1 год назад
Родитель
Сommit
d63dcbdb2c
19 измененных файлов с 366 добавлено и 223 удалено
  1. 121 75
      zkqy-admin/src/main/java/com/zkqy/web/controller/homepagestatistics/StatisticsController.java
  2. 6 0
      zkqy-custom-business/src/main/java/com/zkqy/business/mapper/DetailsOfTheRefuelingPlanSpinningMapper.java
  3. 7 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/IDetailsOfTheRefuelingPlanService.java
  4. 8 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/IDetailsOfTheRefuelingPlanSpinningService.java
  5. 11 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/DetailsOfTheRefuelingPlanServiceImpl.java
  6. 5 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/DetailsOfTheRefuelingPlanSpinningServiceImpl.java
  7. 4 1
      zkqy-custom-business/src/main/resources/mapper/business/DetailsOfTheRefuelingPlanMapper.xml
  8. 4 1
      zkqy-custom-business/src/main/resources/mapper/business/DetailsOfTheRefuelingPlanSpinningMapper.xml
  9. 1 1
      zkqy-custom-business/src/main/resources/mapper/business/MaterialInventoryMapper.xml
  10. 19 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/mapper/BpmExecuteProcessMapper.java
  11. 3 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/runbpm/PreExecutionToolClass.java
  12. 15 1
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/IBpmExecuteProcessService.java
  13. 20 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/impl/BpmExecuteProcessServiceImpl.java
  14. 22 0
      zkqy-process-execution/src/main/resources/mapper/bpm/dispersed/BpmExecuteProcessMapper.xml
  15. 23 88
      zkqy-system/src/main/resources/mapper/system/SysLogininforMapper.xml
  16. 4 4
      zkqy-ui/src/api/homePage/index.js
  17. 6 1
      zkqy-ui/src/views/index.vue
  18. 87 12
      zkqy-ui/src/views/orderMange/planTable/index.vue
  19. 0 39
      zkqy-ui/src/views/orderMange/planTable/show/fangsi.vue

+ 121 - 75
zkqy-admin/src/main/java/com/zkqy/web/controller/homepagestatistics/StatisticsController.java

@@ -1,16 +1,16 @@
 package com.zkqy.web.controller.homepagestatistics;
 
+import com.zkqy.business.domain.DetailsOfTheRefuelingPlan;
 import com.zkqy.business.entity.DragForm;
 import com.zkqy.business.entity.DragTable;
 import com.zkqy.business.entity.DragTableGroup;
 import com.zkqy.business.entity.vo.CommonTableOperationVO;
-import com.zkqy.business.service.impl.DragFormServiceImpl;
-import com.zkqy.business.service.impl.DragTableGroupServiceImpl;
-import com.zkqy.business.service.impl.DragTableServiceImpl;
-import com.zkqy.business.service.impl.MysqlTableOperationServiceImpl;
+import com.zkqy.business.service.impl.*;
 import com.zkqy.common.constant.DataSourceType;
 import com.zkqy.common.core.domain.AjaxResult;
 import com.zkqy.common.utils.SecurityUtils;
+import com.zkqy.execution.produce.dispersed.entity.BpmExecuteProcess;
+import com.zkqy.execution.produce.dispersed.service.impl.BpmExecuteProcessServiceImpl;
 import com.zkqy.execution.produce.dispersed.service.impl.BpmProcessServiceImpl;
 import com.zkqy.system.domain.SysLogininfor;
 import com.zkqy.system.service.ISysOperLogService;
@@ -26,12 +26,15 @@ import java.util.List;
 import java.util.Map;
 import java.util.stream.Collectors;
 
+/**
+ * 化纤数据统计
+ */
 @RestController
 @RequestMapping("/statistics/info")
 public class StatisticsController {
 
-     @Autowired
-     BpmProcessServiceImpl bpmProcessService;
+    @Autowired
+    BpmExecuteProcessServiceImpl bpmExecuteProcessService;
 
     @Autowired
     private ISysOperLogService operLogService;
@@ -40,29 +43,49 @@ public class StatisticsController {
     private SysLogininforServiceImpl logininforService;
 
     @Autowired
-    DragTableServiceImpl dragTableService;
+    DetailsOfTheRefuelingPlanServiceImpl detailsOfTheRefuelingPlanService;
+
+    @Autowired
+    DetailsOfTheRefuelingPlanSpinningServiceImpl detailsOfTheRefuelingPlanSpinningService;
 
     @Autowired
-    DragFormServiceImpl dragFormService;
+    MaterialInventoryServiceImpl   materialInventoryService;
 
     @Autowired
-    MysqlTableOperationServiceImpl mysqlTableOperationService;
+    InboundRecordsServiceImpl inboundRecordsService;
 
     @Autowired
-    DragTableGroupServiceImpl dragTableGroupService;
+    OutboundRecordsServiceImpl outboundRecordsService;
 
     /**
-     * 流程信息统计
+     * 任务数量统计 √
      * @return
      */
     @GetMapping("/getProcessInformation")
      public AjaxResult getProcessInformation(){
-          List<Map> bpmProcesses = bpmProcessService.selectBpmProcessStatistics();
-          return AjaxResult.success(bpmProcesses);
+        if(SecurityUtils.getUsername().equals("huaxian")){
+            //查询加弹计划
+            int i1 = detailsOfTheRefuelingPlanService.selectDetailsOfTheRefuelingPlanListCount();
+            int i2 = detailsOfTheRefuelingPlanSpinningService.selectDetailsOfTheRefuelingPlanSpinningListCount();
+            HashMap<String, String> map1 = new HashMap<>();
+            map1.put("name", "计划任务");
+            map1.put("value",String.valueOf((i1+i2)));
+            int i = bpmExecuteProcessService.selectBpmExecuteProcessListCount();
+            HashMap<String, String> map2 = new HashMap<>();
+            map2.put("审批任务",String.valueOf(i));
+            map2.put("name", "审批任务");
+            map2.put("value",String.valueOf(i));
+            List<Map> listMap=new ArrayList<>();
+            listMap.add(map1);
+            listMap.add(map2);
+            return AjaxResult.success(listMap);
+            //纺丝+翻框+络筒
+        }
+        return AjaxResult.success(0);
      }
 
     /**
-     * 操作日志信息统计
+     * 操作日志信息统计 (这个没办法做成共同的,因为,操作记录在主表当中)
      * Operation information statistics
      */
     @GetMapping("/getOperationInformationStatistics")
@@ -73,87 +96,110 @@ public class StatisticsController {
     }
 
     /**
-     * 操作日志信息统计
+     * 生产任务、 完成任务数量
      * Operation information statistics
      */
-    @GetMapping("/getLoginInformationStatistics")
-    public AjaxResult getLoginInformationStatistics(){
-        SysLogininfor sysLogininfor=new SysLogininfor();
-        sysLogininfor.setTenantId( SecurityUtils.getLoginUser().getTenantId());
-        sysLogininfor.setWhichApplication("1");
-        List<Map> loginInformationStatistics = logininforService.getLoginInformationStatistics(sysLogininfor);
-
-        SysLogininfor sysLogininfor2=new SysLogininfor();
-        sysLogininfor2.setTenantId( SecurityUtils.getLoginUser().getTenantId());
-        sysLogininfor2.setWhichApplication("2");
-        List<Map> loginInformationStatistics1 = logininforService.getLoginInformationStatistics(sysLogininfor2);
+    @GetMapping("/getProductionTaskCompletionQuantity")
+    public AjaxResult getProductionTaskCompletionQuantity(){
+        BpmExecuteProcess bpmExecuteProcess=new BpmExecuteProcess();
+        bpmExecuteProcess.setTaskProcessType("0");
+        //所有生产的,生产流程
+        List<Map> mapList1= bpmExecuteProcessService.selectBpmExecuteProcessListProductionCount(bpmExecuteProcess);
         List<Map> list = new ArrayList<>();
         HashMap hashMap1=new HashMap();
-        hashMap1.put("name","客户端");
+        hashMap1.put("name","生产任务");
         hashMap1.put("type","line");
         hashMap1.put("smooth","true");
-        hashMap1.put("data",loginInformationStatistics.stream().map((item->item.get("dailyLoginCount"))).collect(Collectors.toList()));
-        hashMap1.put("date",loginInformationStatistics.stream().map((item->item.get("loginDate"))).collect(Collectors.toList()));
+        hashMap1.put("data",mapList1.stream().map((item->item.get("count"))).collect(Collectors.toList()));
+        hashMap1.put("date",mapList1.stream().map((item->item.get("month"))).collect(Collectors.toList()));
         list.add(hashMap1);
+        BpmExecuteProcess bpmExecuteProcess2=new BpmExecuteProcess();
+        bpmExecuteProcess2.setTaskProcessType("0");
+        bpmExecuteProcess2.setTaskProcessState(3L);
+        //所有生产的,生产流程
+        List<Map> mapList2 = bpmExecuteProcessService.selectBpmExecuteProcessListProductionCount(bpmExecuteProcess2);
         HashMap hashMap2=new HashMap();
-        hashMap2.put("name","工具端");
+        hashMap2.put("name","完成任务");
         hashMap2.put("type","line");
         hashMap2.put("smooth","true");
-        hashMap2.put("data",loginInformationStatistics1.stream().map((item->item.get("dailyLoginCount"))).collect(Collectors.toList()));
-        hashMap2.put("date",loginInformationStatistics.stream().map((item->item.get("loginDate"))).collect(Collectors.toList()));
+        hashMap2.put("data",mapList2.stream().map((item->item.get("count"))).collect(Collectors.toList()));
+        hashMap2.put("date",mapList2.stream().map((item->item.get("month"))).collect(Collectors.toList()));
         list.add(hashMap2);
-        return AjaxResult.success(list);
+        return  AjaxResult.success(list);
     }
 
-
     /**
-     * 数据建模统计
+     * 原材料
      * DataModelingStatistics
      */
-    @GetMapping("/getDataModelingStatistics")
-    public AjaxResult getDataModelingStatistics(){
-        String databaseType = SecurityUtils.getDatabaseType();
-        if (databaseType.equals(DataSourceType.MYSQL.getDataSourceName())) {
-            CommonTableOperationVO vo =new CommonTableOperationVO();
-            vo.setDatabaseName(SecurityUtils.getDatabaseName());
-            return   AjaxResult.success(mysqlTableOperationService.selectTableList(vo).size());
+    @GetMapping("/getRawMaterial")
+    public AjaxResult getRawMaterial(){
+        if(SecurityUtils.getUsername().equals("huaxian")){
+            //总库存数量
+            int i1 = materialInventoryService.selectMaterialInventoryListSum();
+            //出库数量
+            int i2 = inboundRecordsService.selectInboundRecordsByQtCodeNumberCount();
+            //入库数量
+            int i3 = outboundRecordsService.selectOutboundRecordsCount();
+            List<Map> list=new ArrayList<>();
+            HashMap dragFormsMap=new HashMap();
+            dragFormsMap.put("name","总库存数量");
+            dragFormsMap.put("value",i1);
+            list.add(dragFormsMap);
+
+            HashMap dragTableSMap=new HashMap();
+            dragTableSMap.put("name","出库数量");
+            dragTableSMap.put("value",i2);
+            list.add(dragTableSMap);
+
+            HashMap dragTableGroupsSMap=new HashMap();
+            dragTableGroupsSMap.put("name","入库数量");
+            dragTableGroupsSMap.put("value",i3);
+            list.add(dragTableGroupsSMap);
+            return AjaxResult.success(list);
+        }else {
+            List<Map> list=new ArrayList<>();
+            HashMap dragFormsMap=new HashMap();
+            dragFormsMap.put("name","总库存数量");
+            dragFormsMap.put("value",0);
+            list.add(dragFormsMap);
+
+            HashMap dragTableSMap=new HashMap();
+            dragTableSMap.put("name","出库数量");
+            dragTableSMap.put("value",0);
+            list.add(dragTableSMap);
+
+            HashMap dragTableGroupsSMap=new HashMap();
+            dragTableGroupsSMap.put("name","入库数量");
+            dragTableGroupsSMap.put("value",0);
+            list.add(dragTableGroupsSMap);
+            return AjaxResult.success(list);
         }
-        return AjaxResult.success(0);
+
+
+
+
     }
 
+
     /**
-     * 表单表格统计
-     * DataModelingStatistics
+     * 最近12个月的客户端的登录情况
      */
-    @GetMapping("/getTabularStatistics")
-    public AjaxResult getTabularStatistics(){
-        //表单
-        DragForm  dragForm =new DragForm();
-        int dragFormsCount = dragFormService.selectDragFormListCount(dragForm);
-        //表格
-        DragTable dragTable =new DragTable();
-        int dragTablesCount = dragTableService.selectDragTableListCount(dragTable);
-        //三级联动
-        DragTableGroup dragTableGroup =new DragTableGroup();
-        int dragTableGroupsCount = dragTableGroupService.selectDragTableGroupListCount(dragTableGroup);
-
-        List<Map> list=new ArrayList<>();
-        HashMap dragFormsMap=new HashMap();
-        dragFormsMap.put("name","表单");
-        dragFormsMap.put("value",dragFormsCount);
-        list.add(dragFormsMap);
-
-        HashMap dragTableSMap=new HashMap();
-        dragTableSMap.put("name","表格");
-        dragTableSMap.put("value",dragTablesCount);
-        list.add(dragTableSMap);
-
-        HashMap dragTableGroupsSMap=new HashMap();
-        dragTableGroupsSMap.put("name","三级联动");
-        dragTableGroupsSMap.put("value",dragTableGroupsCount);
-        list.add(dragTableGroupsSMap);
-
-        return AjaxResult.success(list);
+    @GetMapping("/getLoginInformationStatistics")
+    public AjaxResult getLoginInfo(){
+        SysLogininfor logininfor=new SysLogininfor();
+        logininfor.setTenantId(SecurityUtils.getTenantId());
+        logininfor.setWhichApplication("1");
+        List<Map> loginInformationStatistics = logininforService.getLoginInformationStatistics(logininfor);
+        List<String> dates1=new ArrayList<>();
+        List<String> dates2=new ArrayList<>();
+        loginInformationStatistics.stream().forEach(item->{
+            dates1.add(item.get("month").toString());
+            dates2.add(item.get("loginCount").toString());
+        });
+        HashMap<String,Object> data=new HashMap<>();
+        data.put("name",dates1);
+        data.put("value",dates2);
+        return AjaxResult.success(data);
     }
-
 }

+ 6 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/mapper/DetailsOfTheRefuelingPlanSpinningMapper.java

@@ -69,4 +69,10 @@ public interface DetailsOfTheRefuelingPlanSpinningMapper
      * @return 结果
      */
     public int deleteDetailsOfTheRefuelingPlanSpinningByIds(Long[] ids);
+
+    /**
+     * 查询纺丝加弹、翻框计划数量
+     * @return
+     */
+    int selectDetailsOfTheRefuelingPlanSpinningListCount();
 }

+ 7 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/IDetailsOfTheRefuelingPlanService.java

@@ -27,6 +27,13 @@ public interface IDetailsOfTheRefuelingPlanService
      */
     public List<DetailsOfTheRefuelingPlan> selectDetailsOfTheRefuelingPlanList(DetailsOfTheRefuelingPlan detailsOfTheRefuelingPlan);
 
+    /**
+     * 查询加弹计划详细信息列表条数
+     *
+     * @return 加弹计划详细信息集合
+     */
+    public int selectDetailsOfTheRefuelingPlanListCount();
+
     /**
      * 新增加弹计划详细信息
      * 

+ 8 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/IDetailsOfTheRefuelingPlanSpinningService.java

@@ -29,6 +29,14 @@ public interface IDetailsOfTheRefuelingPlanSpinningService
      */
     public List<DetailsOfTheRefuelingPlanSpinningRVo> selectDetailsOfTheRefuelingPlanSpinningList(DetailsOfTheRefuelingPlanSpinningVo detailsOfTheRefuelingPlanSpinning);
 
+    /**
+     * 查询加弹计划详细信息列表
+     *
+     * @return 加弹计划详细信息集合
+     */
+    public int selectDetailsOfTheRefuelingPlanSpinningListCount();
+
+
     /**
      * 信息列表
      * @param detailsOfTheRefuelingPlanSpinning

+ 11 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/DetailsOfTheRefuelingPlanServiceImpl.java

@@ -59,6 +59,17 @@ public class DetailsOfTheRefuelingPlanServiceImpl implements IDetailsOfTheRefuel
         return detailsOfTheRefuelingPlanMapper.selectDetailsOfTheRefuelingPlanList(detailsOfTheRefuelingPlan);
     }
 
+    /**
+     * 查询加弹计划信息条数
+     *
+     * @return 加弹计划详细信息
+     */
+    @Override
+    public int selectDetailsOfTheRefuelingPlanListCount()
+    {
+        return detailsOfTheRefuelingPlanMapper.selectDetailsOfTheRefuelingPlanListCount();
+    }
+
     /**
      * 新增加弹计划详细信息
      * 

+ 5 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/DetailsOfTheRefuelingPlanSpinningServiceImpl.java

@@ -123,6 +123,11 @@ public class DetailsOfTheRefuelingPlanSpinningServiceImpl implements IDetailsOfT
         return list;
     }
 
+    @Override
+    public int selectDetailsOfTheRefuelingPlanSpinningListCount() {
+       return detailsOfTheRefuelingPlanSpinningMapper.selectDetailsOfTheRefuelingPlanSpinningListCount();
+    }
+
 
     @Override
     public List<DetailsOfTheRefuelingPlanSpinning> selectDetailsOfTheRefuelingPlanSpinningListInfo(DetailsOfTheRefuelingPlanSpinningVo detailsOfTheRefuelingPlanSpinning) {

+ 4 - 1
zkqy-custom-business/src/main/resources/mapper/business/DetailsOfTheRefuelingPlanMapper.xml

@@ -66,7 +66,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectDetailsOfTheRefuelingPlanVo"/>
         where id = #{id}
     </select>
-        
+    <select id="selectDetailsOfTheRefuelingPlanListCount" resultType="java.lang.Integer">
+        select count(`id`) from {DBNAME}.details_of_the_refueling_plan
+    </select>
+
     <insert id="insertDetailsOfTheRefuelingPlan" parameterType="com.zkqy.business.domain.DetailsOfTheRefuelingPlan">
         insert into {DBNAME}.details_of_the_refueling_plan
         <trim prefix="(" suffix=")" suffixOverrides=",">

+ 4 - 1
zkqy-custom-business/src/main/resources/mapper/business/DetailsOfTheRefuelingPlanSpinningMapper.xml

@@ -57,7 +57,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectDetailsOfTheRefuelingPlanSpinningVo"/>
         where id = #{id}
     </select>
-        
+    <select id="selectDetailsOfTheRefuelingPlanSpinningListCount" resultType="java.lang.Integer">
+        select count(id) from {DBNAME}.details_of_the_refueling_plan_spinning where plan_status !=2
+    </select>
+
     <insert id="insertDetailsOfTheRefuelingPlanSpinning" parameterType="com.zkqy.business.domain.DetailsOfTheRefuelingPlanSpinning" useGeneratedKeys="true" keyProperty="id">
         insert into {DBNAME}.details_of_the_refueling_plan_spinning
         <trim prefix="(" suffix=")" suffixOverrides=",">

+ 1 - 1
zkqy-custom-business/src/main/resources/mapper/business/MaterialInventoryMapper.xml

@@ -232,7 +232,7 @@
         where material_code = #{materialCode}
     </select>
     <select id="selectMaterialInventoryListSum" resultType="java.lang.Integer">
-        select sum(quantity) from {NAMEDB}.material_inventory
+        select sum(quantity) from {DBNAME}.material_inventory
     </select>
 
 </mapper>

+ 19 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/mapper/BpmExecuteProcessMapper.java

@@ -5,6 +5,7 @@ import com.zkqy.execution.produce.dispersed.entity.BpmExecuteProcess;
 import com.zkqy.execution.produce.dispersed.entity.CommonEntity;
 import com.zkqy.execution.produce.dispersed.entity.DragFormGroup;
 import io.lettuce.core.dynamic.annotation.Param;
+import org.apache.ibatis.annotations.Mapper;
 
 import java.util.List;
 import java.util.Map;
@@ -15,6 +16,7 @@ import java.util.Map;
  * @author hzh
  * @date 2023-11-01
  */
+@Mapper
 public interface BpmExecuteProcessMapper {
     /**
      * 查询流程执行任务
@@ -32,6 +34,23 @@ public interface BpmExecuteProcessMapper {
      */
     public List<BpmExecuteProcess> selectBpmExecuteProcessList(BpmExecuteProcess bpmExecuteProcess);
 
+
+    /**
+     * 查询流程执行任务列表数量(这个查询的是审批流的数量)
+     *
+     * @param bpmExecuteProcess 流程执行任务
+     * @return 流程执行任务集合
+     */
+    public int selectBpmExecuteProcessListCount(BpmExecuteProcess bpmExecuteProcess);
+
+
+    /**
+     * 查询流程执行任务列表数量(这个查询的是审批流的数量)
+     * @return 流程执行任务集合
+     */
+    public List<Map> selectBpmExecuteProcessListProductionCount(BpmExecuteProcess executeProcess);
+
+
     /**
      * 查询流程执行任务log
      *

+ 3 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/runbpm/PreExecutionToolClass.java

@@ -180,6 +180,9 @@ public class PreExecutionToolClass<R> {
         runBpmExecuteProcess.setDelFlag("0");
         // *****替换当前执行流程的任务唯一标识
         intoProduction.setTaskProcessKey(runBpmExecuteProcess.getTaskKey());
+        runBpmExecuteProcess.setCreateById(SecurityUtils.getUserId());
+        runBpmExecuteProcess.setCreateTime(new Date());
+        runBpmExecuteProcess.setCreateBy(SecurityUtils.getUsername());
         // 执行新增方法
         runBpmExecuteProcessMapper.insertBpmExecuteProcess(runBpmExecuteProcess);
         // 新增计划表中绑定任务key编码

+ 15 - 1
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/IBpmExecuteProcessService.java

@@ -31,6 +31,13 @@ public interface IBpmExecuteProcessService {
      */
     List<CommonEntity> selectBpmExecuteProcessList(BpmExecuteProcess bpmExecuteProcess) throws Exception;
 
+
+    /**
+     * 查询待执行的审批任务有多少条
+     * @return
+     */
+    public int  selectBpmExecuteProcessListCount();
+
     /**
      * 查询当前用户提交的审批流程记录
      *
@@ -39,6 +46,13 @@ public interface IBpmExecuteProcessService {
      */
     List<CommonEntity> selectBpmExecuteProcessApproveLogList(BpmExecuteProcess bpmExecuteProcess) throws Exception;
 
+    /**
+     * 近12个月的生产任务统计
+     *
+     * @return 流程执行任务集合
+     */
+    public List<Map> selectBpmExecuteProcessListProductionCount(BpmExecuteProcess bpmExecuteProcess);
+
     /**
      * 查询流程执行记录log列表
      *
@@ -105,7 +119,7 @@ public interface IBpmExecuteProcessService {
     /**
      * 通过formKeys查询表单信息
      *
-     * @param objectMap
+     * @param
      * @return
      */
     List<CommonEntity> getFromInfoByFormKeys(String[] formKeys);

+ 20 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/impl/BpmExecuteProcessServiceImpl.java

@@ -153,6 +153,20 @@ public class BpmExecuteProcessServiceImpl implements IBpmExecuteProcessService {
         return null;
     }
 
+
+    /**
+     * 查询流程执行任务列表 审批流
+     *
+     * @return 流程执行任务
+     */
+    @Override
+    public int  selectBpmExecuteProcessListCount(){
+        // 得到当前执行管道的列表关联信息d
+        BpmExecuteProcess bpmExecuteProcess=new BpmExecuteProcess();
+        return runBpmExecuteProcessMapper.selectBpmExecuteProcessListCount(bpmExecuteProcess);
+    }
+
+
     @Override
     public List<CommonEntity> selectBpmExecuteProcessApproveLogList(BpmExecuteProcess bpmExecuteProcess) {
         Map<String, Object> objectMap = new HashMap<>();  // 查询执行管道的参数
@@ -167,6 +181,12 @@ public class BpmExecuteProcessServiceImpl implements IBpmExecuteProcessService {
         return commonEntities;
     }
 
+    @Override
+    public List<Map> selectBpmExecuteProcessListProductionCount(BpmExecuteProcess bpmExecuteProcess){
+        List<Map> maps = runBpmExecuteProcessMapper.selectBpmExecuteProcessListProductionCount(bpmExecuteProcess);
+        return maps;
+    }
+
     @Override
     public List<CommonEntity> selectBpmExecuteProcessListLog(BpmExecuteProcess bpmExecuteProcess) {
         SysDictData dictData = new SysDictData();

+ 22 - 0
zkqy-process-execution/src/main/resources/mapper/bpm/dispersed/BpmExecuteProcessMapper.xml

@@ -637,6 +637,28 @@
         </if>
         order by ben.create_time desc
     </select>
+    <select id="selectBpmExecuteProcessListCount" resultType="java.lang.Integer">
+        select count(id)
+        from {DBNAME}.bpm_execute_process where task_process_state =0 and task_process_type=1
+    </select>
+    <select id="selectBpmExecuteProcessListProductionCount" resultType="map" parameterType="com.zkqy.execution.produce.dispersed.entity.BpmExecuteProcess">
+        SELECT
+            DATE_FORMAT(date_sub(CURDATE(), INTERVAL m.month MONTH), '%Y-%m') AS month,
+    COALESCE(COUNT(bpm_execute_process.create_time), 0) AS count
+        FROM
+            (SELECT 0 AS month UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9 UNION ALL SELECT 10 UNION ALL SELECT 11) AS m
+            LEFT JOIN
+            {DBNAME}.bpm_execute_process ON DATE_FORMAT(bpm_execute_process.create_time, '%Y-%m') = DATE_FORMAT(date_sub(CURDATE(), INTERVAL m.month MONTH), '%Y-%m')
+            AND  {DBNAME}.bpm_execute_process.task_process_type = #{taskProcessType}
+                <if test="taskProcessState != null  and taskProcessState != ''">
+                    and    task_process_state=#{taskProcessState}
+                </if>
+
+        GROUP BY
+            DATE_FORMAT(date_sub(CURDATE(), INTERVAL m.month MONTH), '%Y-%m')
+        ORDER BY
+            DATE_FORMAT(date_sub(CURDATE(), INTERVAL m.month MONTH), '%Y-%m') DESC;
+    </select>
 
     <update id="updateProcessStateByKey">
         update {DBNAME}.bpm_execute_process

+ 23 - 88
zkqy-system/src/main/resources/mapper/system/SysLogininforMapper.xml

@@ -49,95 +49,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
     <select id="getLoginInformationStatistics" resultType="map">
         SELECT
-        d.date AS login_date,
-        COUNT( l.info_id ) AS daily_login_count
-        FROM
-        (
-        SELECT
-        CURDATE() - INTERVAL seq DAY AS date
-        FROM
-        (
-        SELECT
-        @ROW := @ROW + 1 AS seq
-        FROM
-        (
-        SELECT
-        0 UNION ALL
-        SELECT
-        1 UNION ALL
-        SELECT
-        3 UNION ALL
-        SELECT
-        4 UNION ALL
-        SELECT
-        5 UNION ALL
-        SELECT
-        6 UNION ALL
-        SELECT
-        6 UNION ALL
-        SELECT
-        7 UNION ALL
-        SELECT
-        8 UNION ALL
-        SELECT
-        9
-        ) t1,
-        (
-        SELECT
-        0 UNION ALL
-        SELECT
-        1 UNION ALL
-        SELECT
-        3 UNION ALL
-        SELECT
-        4 UNION ALL
-        SELECT
-        5 UNION ALL
-        SELECT
-        6 UNION ALL
-        SELECT
-        6 UNION ALL
-        SELECT
-        7 UNION ALL
-        SELECT
-        8 UNION ALL
-        SELECT
-        9
-        ) t2,
-        (
-        SELECT
-        0 UNION ALL
-        SELECT
-        1 UNION ALL
-        SELECT
-        3 UNION ALL
-        SELECT
-        4 UNION ALL
-        SELECT
-        5 UNION ALL
-        SELECT
-        6 UNION ALL
-        SELECT
-        6 UNION ALL
-        SELECT
-        7 UNION ALL
-        SELECT
-        8 UNION ALL
-        SELECT
-        9
-        ) t3,
-        ( SELECT @ROW := 0 ) r
-        ) v
-        WHERE
-           <![CDATA[seq <= 30 ]]>
-        ) d
-        LEFT JOIN sys_logininfor l ON DATE( l.login_time ) = d.date
-        AND l.tenant_id =#{tenantId}
-        AND l.which_application =#{whichApplication}
-        GROUP BY
-        d.date
+            m.month,
+            COALESCE(t.login_count, 0) AS login_count
+        FROM (
+                 SELECT DATE_FORMAT(DATE_SUB(CURDATE(), INTERVAL n MONTH), '%Y-%m') AS month
+                 FROM (
+                     SELECT 0 n UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL
+                     SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9 UNION ALL SELECT 10 UNION ALL SELECT 11
+                     ) t
+             ) m
+                 LEFT JOIN (
+            SELECT
+                DATE_FORMAT(login_time, '%Y-%m') AS month,
+        COUNT(*) AS login_count
+            FROM
+               sys_logininfor
+            WHERE
+                tenant_id=#{tenantId} AND
+                which_application =#{whichApplication} AND
+                login_time >= CURDATE() - INTERVAL 1 YEAR
+            GROUP BY
+                month
+        ) t ON m.month = t.month
         ORDER BY
-        d.date;
+            m.month DESC;
     </select>
 
     <delete id="deleteLogininforByIds" parameterType="Long">

+ 4 - 4
zkqy-ui/src/api/homePage/index.js

@@ -11,7 +11,7 @@ export function getTask() {
 //管道统计
 export function getPipeline() {
    return request({
-     url: '/statistics/info/getLoginInformationStatistics',
+     url: '/statistics/info/getProductionTaskCompletionQuantity',
      method: 'get',
    })
 }
@@ -27,7 +27,7 @@ export function getOperation() {
 //原材料统计
 export function getMaterial() {
     return request({
-      url: '/statistics/info/getTabularStatistics',
+      url: '/statistics/info/getRawMaterial',
       method: 'get',
     })
 }
@@ -35,7 +35,7 @@ export function getMaterial() {
 //用户登录统计
 export function getLogin() {
     return request({
-      url: '/statistics/info/getDataModelingStatistics',
+      url: '/statistics/info/getLoginInformationStatistics',
       method: 'get',
     })
-}
+}

+ 6 - 1
zkqy-ui/src/views/index.vue

@@ -280,14 +280,19 @@ export default {
       //用户登录统计
       getLogin().then((response) => {
         if (response.code == 200) {
+          // data.put("name",dates1);
+          // data.put("value",dates2);
           let modelData = response.data;
           //  console.log(modelData);
           this.chartObj.myChart4?.setOption({
             series: [
               {
-                data: [modelData],
+                data: modelData.value,
               },
             ],
+            xAxis: {
+              data: modelData.name,
+            },
           });
         } else {
           console.log(response);

+ 87 - 12
zkqy-ui/src/views/orderMange/planTable/index.vue

@@ -45,6 +45,7 @@
                 <el-dropdown-menu slot="dropdown">
                   <el-dropdown-item @click.native.prevent="handleAddPlan(scope.row)">新增计划</el-dropdown-item>
                   <el-dropdown-item @click.native.prevent="handleEditPlan(scope.row)">修改计划</el-dropdown-item>
+                  <el-dropdown-item @click.native.prevent="handleStopProductionLine(scope.row)">机台状态</el-dropdown-item>
                 </el-dropdown-menu>
               </el-dropdown>
             </template>
@@ -440,13 +441,13 @@
           </el-form>
           <!--表格-->
           <el-table :data="tableData2" @row-click.self="handleRowClick">
-            <el-table-column prop="salesmanId" label="业务员" header-align="center" align="center" width="100px">
-              <template v-slot:default="scope">
-                <el-select  :ref="'salesmanSelect'+scope.$index"  v-model="scope.row.salesmanId" placeholder="请选择业务员" @change="selectedSalesmanItem(scope.row,scope.row.salesmanId,scope.$index)">
-                  <el-option v-for="salesmanItem in salesmanInfo" :key="salesmanItem.saleNo" :label="salesmanItem.salesman" :value="salesmanItem.saleNo" ></el-option>
-                </el-select>
-              </template>
-            </el-table-column>
+<!--            <el-table-column prop="salesmanId" label="业务员" header-align="center" align="center" width="100px">-->
+<!--              <template v-slot:default="scope">-->
+<!--                <el-select  :ref="'salesmanSelect'+scope.$index"  v-model="scope.row.salesmanId" placeholder="请选择业务员" @change="selectedSalesmanItem(scope.row,scope.row.salesmanId,scope.$index)">-->
+<!--                  <el-option v-for="salesmanItem in salesmanInfo" :key="salesmanItem.saleNo" :label="salesmanItem.salesman" :value="salesmanItem.saleNo" ></el-option>-->
+<!--                </el-select>-->
+<!--              </template>-->
+<!--            </el-table-column>-->
             <el-table-column prop="productId" label="产品" header-align="center" align="center" width="150px">
               <template v-slot:default="scope">
                 <el-select  :ref="'productSelected'+scope.$index" v-model="scope.row.productId" placeholder="请选择待排产产品" @change="selectedChangeDate(scope.row,scope.row.productId)">
@@ -543,7 +544,21 @@
            </span>
         </el-dialog>
       </el-tab-pane>
-
+      <!--停机弹窗-->
+      <el-dialog title="修改机台状态"  :visible.sync="modifyMachineStatus" width="500px">
+                  <el-form :model="modifyMachineStatusFrom"  ref="modifyMachineStatusFrom" label-width="100px" class="demo-ruleForm">
+                    <el-form-item label="机台状态" prop="type">
+                      <el-checkbox-group v-model="modifyMachineStatusFrom.type">
+                        <el-checkbox label="1" name="type">A面停机</el-checkbox>
+                        <el-checkbox label="2" name="type">B面停机</el-checkbox>
+                      </el-checkbox-group>
+                    </el-form-item>
+                    <el-form-item>
+                      <el-button type="primary" @click="confirmStopProductionLine">确定</el-button>
+                      <el-button>取消</el-button>
+                    </el-form-item>
+                  </el-form>
+      </el-dialog>
     </el-tabs>
 
   </div>
@@ -561,6 +576,10 @@ import {
 export default {
   data() {
     return {
+      modifyMachineStatusFrom:{
+        type: [],
+      },
+      modifyMachineStatus:false,
       //选中的是那个车间
       selectedWorkshop:"南车间",
       tableData:[],
@@ -619,6 +638,64 @@ export default {
     this.getProductsInfo();
   },
   methods: {
+    handleStopProductionLine(row){
+      this.modifyMachineStatus=true;
+      console.log("停机");
+      this.machineId=row.machineId;
+    },
+    confirmStopProductionLine(rwo){
+      if (this.modifyMachineStatusFrom.includes(1)) {
+          console.log('数组中包含数字 1');
+         //新增一条数据,
+         let aStopInfo=   {
+              currentColorCode: '',
+              currentSpecification: '',
+              currentLotNumber: '',
+              currentSpindleCount: '',
+              number: '',
+              productType:'A面',
+              startTime: '',
+              plannedEndTime:'',
+              planStatus:2,
+              productId:'',
+              machineId:this.machineId,
+              salesmanId:'',
+              timestampRandomCode:Date.now()+this.machineId,
+         }
+         let aStoptableList=[];
+        aStoptableList.push(aStopInfo)
+        //时间戳
+        let data={
+          //机台号
+          machineId: this.machineId,
+          timestampRandomCode:Date.now()+this.machineId,
+          //计划信息
+          detailsOfTheRefuelingPlans: aStoptableList
+        }
+        //添加计划信息
+        addMaterielInfo(data).then(response => {
+          if (response.code == 200) {
+            this.$message({
+              message: '添加成功',
+              type: 'success'
+            });
+            this.getAmmunitionPlanInfo();
+            //最后把弹窗关掉
+            this.nanInsertDialogTableVisible=false
+            //更改订单投产信息的批号,
+          } else {
+            this.$message({
+              message: '添加失败',
+              type: 'error'
+            });
+            //最后把弹窗关掉
+            this.nanInsertDialogTableVisible=false
+          }
+        });
+      } else if(this.modifyMachineStatusFrom.includes(2)) {
+         console.log('数组中不包含数字 2');
+      }
+    },
     // 查询排产信息
     getAmmunitionPlanInfo() {
       ammunitionPlanInfo(this.queryParams).then((response) => {
@@ -663,7 +740,6 @@ export default {
         let nextRow2 = this.tableData[rowIndex + 1] //下一行数据
         // 当上一行的数据等于当前行数据时,当前行单元格隐藏
 
-        console.log(row.listOfPendingProduction)
         if(row.listOfPendingProduction==null||row.listOfPendingProduction==undefined|| row.listOfPendingProduction==""){
           return;
         }
@@ -962,13 +1038,12 @@ export default {
           item.productId=parseInt(item.productId)
         })
         this.tableData2=response.data;
-        console.log( this.tableData2)
+        // console.log( this.tableData2)
         // 在数据加载完成后,手动触发每个行的第一个下拉框的 change 事件
         this.$nextTick(() => {
           // 获取第一个业务员选择框(假设表格只有一行)
           for (let i = 0; i < this.tableData2.length; i++) {
             const firstSalesmanSelect = this.$refs['salesmanSelect'+i];
-            // console.log(firstSalesmanSelect,11111111)
             // 触发 change 事件
             if (firstSalesmanSelect) {
               firstSalesmanSelect.$emit('change', {
@@ -996,7 +1071,7 @@ export default {
     },
     //更新状态
     updateStatus(ind, row){
-      console.log(row);
+      // console.log(row);
       updatePlanOne(row).then(response=>{
         if (response.code == 200) {
           this.$message({

+ 0 - 39
zkqy-ui/src/views/orderMange/planTable/show/fangsi.vue

@@ -14,44 +14,12 @@
             <el-table-column prop="plannedEndTime" label="下机时间" header-align="center" width="90px" align="center"></el-table-column>
           </el-table-column>
           <el-table-column prop="plannedProduction" label="待生产产品列表" header-align="center" align="center"  >
-<!--            <template v-slot:default="scope">-->
-<!--              <div v-if="scope.row.plannedProduction && scope.row.plannedProduction.length > 0">-->
-<!--                <div v-for="(chunk, chunkIndex) in splitList(scope.row.plannedProduction, 5)" :key="`chunk-${chunkIndex}`">-->
-<!--                  <span v-for="(item, index) in chunk" :key="`item-${chunkIndex}-${index}`">-->
-<!--                    {{ item }}, &lt;!&ndash; 替换为实际显示每个产品的代码 &ndash;&gt;-->
-<!--                  </span>-->
-<!--                </div>-->
-<!--              </div>-->
-<!--              <div v-else>-->
 
-<!--              </div>-->
-<!--            </template>-->
           </el-table-column>
-<!--          <el-table-column   fixed="right" label="操作" header-align="center" align="center" width="150px" >-->
-<!--            <template v-slot:default="scope">-->
-<!--              <el-dropdown>-->
-<!--                <el-button type="primary">-->
-<!--                  操作-->
-<!--                  <i class="el-icon-arrow-down el-icon&#45;&#45;right"></i>-->
-<!--                </el-button>-->
-<!--                <el-dropdown-menu slot="dropdown">-->
-<!--                  <el-dropdown-item @click.native.prevent="handleAddPlan(scope.row)">新增计划</el-dropdown-item>-->
-<!--                  <el-dropdown-item @click.native.prevent="handleEditPlan(scope.row)">修改计划</el-dropdown-item>-->
-<!--                </el-dropdown-menu>-->
-<!--              </el-dropdown>-->
-<!--            </template>-->
-<!--          </el-table-column>-->
         </el-table>
         <!--新增计划弹窗-->
         <el-dialog title="新增计划"  :visible.sync="nanInsertDialogTableVisible" width="1200px">
           <el-table :data="tableData2" @row-click.self="handleRowClick">
-<!--            <el-table-column prop="salesmanId" label="业务员" header-align="center" align="center" width="100px">-->
-<!--              <template v-slot:default="scope">-->
-<!--                <el-select  v-model="scope.row.salesmanId" placeholder="请选择业务员" @change="selectedSalesmanItem(scope.row,scope.row.salesmanId)">-->
-<!--                  <el-option v-for="salesmanItem in salesmanInfo" :key="salesmanItem.saleNo" :label="salesmanItem.salesman" :value="salesmanItem.saleNo" ></el-option>-->
-<!--                </el-select>-->
-<!--              </template>-->
-<!--            </el-table-column>-->
             <el-table-column prop="productId" label="产品" header-align="center" align="center" width="150px">
                 <template v-slot:default="scope">
                      <el-select  v-model="scope.row.productId" placeholder="请选择待排产产品" @change="selectedChangeDate(scope.row,scope.row.productId)">
@@ -147,13 +115,6 @@
           </el-form>
           <!--表格-->
           <el-table :data="tableData2" @row-click.self="handleRowClick">
-<!--            <el-table-column prop="salesmanId" label="业务员" header-align="center" align="center" width="100px">-->
-<!--              <template v-slot:default="scope">-->
-<!--                <el-select  :ref="'salesmanSelect'+scope.$index"  v-model="scope.row.salesmanId" placeholder="请选择业务员" @change="selectedSalesmanItem(scope.row,scope.row.salesmanId,scope.$index)">-->
-<!--                  <el-option v-for="salesmanItem in salesmanInfo" :key="salesmanItem.saleNo" :label="salesmanItem.salesman" :value="salesmanItem.saleNo" ></el-option>-->
-<!--                </el-select>-->
-<!--              </template>-->
-<!--            </el-table-column>-->
             <el-table-column prop="productId" label="产品" header-align="center" align="center" width="150px">
               <template v-slot:default="scope">
                 <el-select  :ref="'productSelected'+scope.$index" v-model="scope.row.productId" placeholder="请选择待排产产品" @change="selectedChangeDate(scope.row,scope.row.productId)">