Browse Source

首页三层部门指标排行优化v1.0

sl 1 year ago
parent
commit
e181e48873

+ 7 - 1
module_kzks/src/main/java/org/jeecg/modules/Index/controller/IndexController.java

@@ -188,9 +188,15 @@ public class IndexController {
     }
 
 
-    @ApiOperation("部门指标排行---首页三层接口")
+    @ApiOperation("部门指标排行---首页三层接口formap")
     @GetMapping("/getCompletRateByDate")
     public Result<IndexKpiDataDepart> getCompletRateByDate(IndexKpiParamDto indexKpiParamDto){
+        return Result.ok(indexKpiService.getCompletRateByDate2(indexKpiParamDto));
+    }
+
+    @ApiOperation("部门指标排行---首页三层接口2forlist")
+    @GetMapping("/getCompletRateByDate2")
+    public Result<IndexKpiDataDepart> getCompletRateByDate2(IndexKpiParamDto indexKpiParamDto){
         return Result.ok(indexKpiService.getCompletRateByDate(indexKpiParamDto));
     }
 

+ 1 - 0
module_kzks/src/main/java/org/jeecg/modules/Index/service/IndexKpiService.java

@@ -20,6 +20,7 @@ import java.util.List;
 public interface IndexKpiService {
     /**部门指标排行*/
     public IndexKpiDataDepart getCompletRateByDate(IndexKpiParamDto indexKpiParamDto);
+    public IndexKpiDataDepart getCompletRateByDate2(IndexKpiParamDto indexKpiParamDto);
 
     public List<IndexKpiCompletByDate> testSort();
 

+ 215 - 0
module_kzks/src/main/java/org/jeecg/modules/Index/service/impl/IndexKpiServiceImpl.java

@@ -295,6 +295,221 @@ public class IndexKpiServiceImpl implements IndexKpiService {
     }
 
 
+    /**
+     * 接口调用的类  用来获取所有部门的指标、合同额、已收款、完成度,并按完成度排行
+     * getCompletRateByDate for优化
+     *
+     * @return IndexKpiDataDepart
+     */
+    public IndexKpiDataDepart getCompletRateByDate2(IndexKpiParamDto indexKpiParamDto){
+        //初始化
+        IndexKpiDataDepart indexKpiDataDepart = new IndexKpiDataDepart();
+        List<IndexKpiCompletByDate> kpiDataZrbmList = new ArrayList<>();//责任部门排行
+        List<IndexKpiCompletByDate> kpiDataJycsList = new ArrayList<>();//下达部门排行
+        indexKpiDataDepart.setZrbmCharts(kpiDataZrbmList);//初始化放入空列表
+        indexKpiDataDepart.setJycsCharts(kpiDataJycsList);
+        //查询所有部门 将所有部门的指标和完成度赋为空,合同额和已收款赋为0
+        List<String> departList = indexKpiMapper.getDepartName();
+        System.out.println(departList);
+        //此处是否需要去重???
+        if(departList.isEmpty()) return indexKpiDataDepart;
+        for(String depart:departList){
+            IndexKpiCompletByDate indexKpiCompletByDate = new IndexKpiCompletByDate();
+            indexKpiCompletByDate.setDepart(depart);
+            indexKpiCompletByDate.setDepartKpi(null);
+            indexKpiCompletByDate.setContractAmount(new BigDecimal(0));
+            indexKpiCompletByDate.setReceived(new BigDecimal(0));
+            indexKpiCompletByDate.setKpiCompletRate(null);
+            IndexKpiCompletByDate indexKpiCompletByDate2 = new IndexKpiCompletByDate();
+            indexKpiCompletByDate2.setDepart(depart);
+            indexKpiCompletByDate2.setDepartKpi(null);
+            indexKpiCompletByDate2.setContractAmount(new BigDecimal(0));
+            indexKpiCompletByDate2.setReceived(new BigDecimal(0));
+            indexKpiCompletByDate2.setKpiCompletRate(null);
+            kpiDataZrbmList.add(indexKpiCompletByDate);
+            kpiDataJycsList.add(indexKpiCompletByDate2);
+        }
+//        System.out.println(kpiDataZrbmList);
+//        System.out.println(kpiDataJycsList);
+        // TODO:  初始化结束
+
+        //目前是算某个月的指标,不涉及范围
+        //年/月
+        String timeType = indexKpiParamDto.getTime();
+        //日期
+        String dateString = indexKpiParamDto.getBeginDate();
+        /*
+        //起始时间
+        String startString = indexKpiParamDto.getBeginDate();
+        //结束时间
+        String endString = indexKpiParamDto.getEndDate();
+        */
+        //获取当前时间的年月
+        LocalDate currentDate = LocalDate.now();
+        // 获取当前年份
+        int currentDateYear = currentDate.getYear();
+        // 获取当前年月
+        String currentYm = String.format("%d-%d", currentDateYear, currentDate.getMonthValue());
+        //用来存放要看的年末或月末的年月日期  上一年末或上一月末的日期
+        String dateYm = "";
+        String dateLastYm = "";
+        boolean isCurrentDate = true;//是否是当年或当月,当年或当月要从项目成本表中获取数据
+        try{
+            if(timeType.equals("year")){
+                isCurrentDate = dateString.equals(String.valueOf(currentDateYear));
+                dateYm = String.format("%s-%d", currentDateYear, 12);
+                dateLastYm = String.format("%d-%d", Integer.parseInt(dateString)-1, 12);
+            }else if(timeType.equals("month")){
+                isCurrentDate = dateString.equals(currentYm);
+                dateYm = dateString;
+                dateLastYm = getLastMonthString(currentYm);
+            }
+        }catch (ParseException e){
+            System.out.println("部门指标排行传送的日期字符串错误!!!");
+            return indexKpiDataDepart;
+        }
+
+        boolean finalIsCurrentDate = isCurrentDate;
+        String finalDateYm = dateYm;
+        String finalDateLastYm = dateLastYm;
+
+        //得到各数据列表,处理各个列表 转成map
+        //获取部门指标数据  kpi
+        CompletableFuture<Map<String, IndexKpiCompletByDate>> getKpiMapFuture = CompletableFuture.supplyAsync(() -> {
+            Map<String, IndexKpiCompletByDate> kpiMap = new TreeMap<>();//用来保存部门指标表中的部门和指标,根据部门查找对应数据
+            List<IndexKpiCompletByDate> kpiList;
+            if(timeType.equals("year")){
+                kpiList =  indexKpiMapper.getKpiYear(Integer.parseInt(dateString));
+            }else{
+                kpiList = indexKpiMapper.getKpiMonth(dateString);
+            }
+            for(IndexKpiCompletByDate kpiData:kpiList){
+                kpiMap.put(kpiData.getDepart(), kpiData);
+            }
+            return kpiMap;
+        });
+        //获取选择年月的数据  合同额、已收款
+        CompletableFuture<Map<String, IndexKpiCompletByDate>> getHtereceivedZrbmMapFuture = CompletableFuture.supplyAsync(() -> {
+            Map<String, IndexKpiCompletByDate> htereceivedZrbmMap = new TreeMap<>();//用来保存部门该月合计的合同额、已收款以及责任部门
+            List<IndexKpiCompletByDate> htereceivedZrbmList;
+            //如果选择的日期是当年当月,则从项目成本表里取数据,否则从每月月底项目进度考核表中取
+            if(finalIsCurrentDate){
+                htereceivedZrbmList = indexKpiMapper.getHteReceivedZrbmCost();
+            }else{
+                htereceivedZrbmList = indexKpiMapper.getHteReceivedZrbmYm(finalDateYm);
+            }
+            for(IndexKpiCompletByDate htereceivedZrbm:htereceivedZrbmList){
+                htereceivedZrbmMap.put(htereceivedZrbm.getDepart(), htereceivedZrbm);
+            }
+            return htereceivedZrbmMap;
+        });
+        //获取选择年月上月的数据  合同额、已收款
+        CompletableFuture<Map<String, IndexKpiCompletByDate>> getHtereceivedZrbmLastMapFuture = CompletableFuture.supplyAsync(() -> {
+            Map<String, IndexKpiCompletByDate> htereceivedZrbmLastMap = new TreeMap<>();//用来保存部门上月合计的合同额、已收款以及责任部门
+            List<IndexKpiCompletByDate> htereceivedZrbmLastList = indexKpiMapper.getHteReceivedZrbmYm(finalDateLastYm);
+            for(IndexKpiCompletByDate htereceivedZrbmLast:htereceivedZrbmLastList){
+                htereceivedZrbmLastMap.put(htereceivedZrbmLast.getDepart(), htereceivedZrbmLast);
+            }
+            return htereceivedZrbmLastMap;
+        });
+        //获取选择年月的数据  合同额、已收款
+        CompletableFuture<Map<String, IndexKpiCompletByDate>> getHtereceivedJycsMapFuture = CompletableFuture.supplyAsync(() -> {
+            Map<String, IndexKpiCompletByDate> htereceivedJycsMap = new TreeMap<>();//用来保存部门该月合计的合同额、已收款以及下达部门
+            List<IndexKpiCompletByDate> htereceivedJycsList;
+            //如果选择的日期是当年当月,则从项目成本表里取数据,否则从每月月底项目进度考核表中取
+            if(finalIsCurrentDate){
+                htereceivedJycsList = indexKpiMapper.getHteReceivedJycsCost();
+            }else{
+                htereceivedJycsList = indexKpiMapper.getHteReceivedJycsYm(finalDateYm);
+            }
+
+            for(IndexKpiCompletByDate htereceivedJycs:htereceivedJycsList){
+                htereceivedJycsMap.put(htereceivedJycs.getDepart(), htereceivedJycs);
+            }
+            return htereceivedJycsMap;
+        });
+        //获取选择年月上月的数据  合同额、已收款
+        CompletableFuture<Map<String, IndexKpiCompletByDate>> getHtereceivedJycsLastMapFuture = CompletableFuture.supplyAsync(() -> {
+            Map<String, IndexKpiCompletByDate> htereceivedJycsLastMap = new TreeMap<>();//用来保存部门上月合计的合同额、已收款以及下达部门
+            List<IndexKpiCompletByDate> htereceivedJycsLastList = indexKpiMapper.getHteReceivedJycsYm(finalDateLastYm);
+            for(IndexKpiCompletByDate htereceivedJycsLast:htereceivedJycsLastList){
+                htereceivedJycsLastMap.put(htereceivedJycsLast.getDepart(), htereceivedJycsLast);
+            }
+            return htereceivedJycsLastMap;
+        });
+        CompletableFuture<Void> future1 = CompletableFuture.allOf(getKpiMapFuture, getHtereceivedZrbmMapFuture, getHtereceivedZrbmLastMapFuture, getHtereceivedJycsMapFuture, getHtereceivedJycsLastMapFuture);
+        future1.join();
+        Map<String, IndexKpiCompletByDate> kpiMap = getKpiMapFuture.join();
+        Map<String, IndexKpiCompletByDate> htereceivedZrbmMap = getHtereceivedZrbmMapFuture.join();
+        Map<String, IndexKpiCompletByDate> htereceivedZrbmLastMap = getHtereceivedZrbmLastMapFuture.join();
+        Map<String, IndexKpiCompletByDate> htereceivedJycsMap = getHtereceivedJycsMapFuture.join();
+        Map<String, IndexKpiCompletByDate> htereceivedJycsLastMap = getHtereceivedJycsLastMapFuture.join();
+
+        CompletableFuture<Void> setKpiDataZrbmList = CompletableFuture.runAsync(() -> {
+            //责任部门列表填充kpi
+            for(IndexKpiCompletByDate kpiDataZrbm:kpiDataZrbmList){
+                //根据部门输入部门指标
+                kpiDataZrbm.setDepartKpi(kpiMap.getOrDefault(kpiDataZrbm.getDepart(), kpiDataZrbm).getDepartKpi());
+            }
+            //责任部门列表填充合同额、已收款、完成度
+            for(IndexKpiCompletByDate kpiDataZrbm2:kpiDataZrbmList){
+                //根据部门找到今年的合同额和已收款
+                IndexKpiCompletByDate htereceivedZrbm = htereceivedZrbmMap.getOrDefault(kpiDataZrbm2.getDepart(), kpiDataZrbm2);
+                IndexKpiCompletByDate htereceivedZrbmLast = htereceivedZrbmLastMap.getOrDefault(kpiDataZrbm2.getDepart(), kpiDataZrbm2);
+                kpiDataZrbm2.setContractAmount(htereceivedZrbm.getContractAmount().subtract(htereceivedZrbmLast.getContractAmount()));//合同额
+                kpiDataZrbm2.setReceived(htereceivedZrbm.getReceived().subtract(htereceivedZrbmLast.getReceived()));//已收款
+
+                //计算完成度  合同额(是计算的某个月或某个年的合同额 增量)/ 指标
+                if(kpiDataZrbm2.getDepartKpi() != null){
+                    if(kpiDataZrbm2.getDepartKpi().equals(BigDecimal.valueOf(0))){
+                        kpiDataZrbm2.setKpiCompletRate(BigDecimal.valueOf(1));
+                    }else{
+                        kpiDataZrbm2.setKpiCompletRate(kpiDataZrbm2.getContractAmount().divide(kpiDataZrbm2.getDepartKpi(), 2, RoundingMode.HALF_UP));
+                    }
+                }
+            }
+//            System.out.println("kpiDataZrbmList");
+            //责任部门指标完成度排序
+            kpiDataZrbmList.sort(Comparator.comparing(IndexKpiCompletByDate::getKpiCompletRate, Comparator.nullsFirst(BigDecimal::compareTo)).reversed());
+//            System.out.println(kpiDataZrbmList);
+        });
+        CompletableFuture<Void> setKpiDataJycsList = CompletableFuture.runAsync(() -> {
+            //下达部门列表填充kpi
+            for(IndexKpiCompletByDate kpiDataJycs:kpiDataJycsList){
+                //根据部门输入部门指标
+                kpiDataJycs.setDepartKpi(kpiMap.getOrDefault(kpiDataJycs.getDepart(), kpiDataJycs).getDepartKpi());
+            }
+            //下达部门列表填充合同额、已收款、完成度
+            for(IndexKpiCompletByDate kpiDataJycs2:kpiDataJycsList){
+                //根据部门找到今年的合同额和已收款
+                IndexKpiCompletByDate htereceivedJycs = htereceivedJycsMap.getOrDefault(kpiDataJycs2.getDepart(), kpiDataJycs2);
+                IndexKpiCompletByDate htereceivedJycsLast = htereceivedJycsLastMap.getOrDefault(kpiDataJycs2.getDepart(), kpiDataJycs2);
+                kpiDataJycs2.setContractAmount(htereceivedJycs.getContractAmount().subtract(htereceivedJycsLast.getContractAmount()));//合同额
+                kpiDataJycs2.setReceived(htereceivedJycs.getReceived().subtract(htereceivedJycsLast.getReceived()));//已收款
+
+                //计算完成度  合同额(是计算的某个月或某个年的合同额 增量)/ 指标
+                if(kpiDataJycs2.getDepartKpi() != null){
+                    if(kpiDataJycs2.getDepartKpi().equals(BigDecimal.valueOf(0))){
+                        kpiDataJycs2.setKpiCompletRate(BigDecimal.valueOf(1));
+                    }else{
+                        kpiDataJycs2.setKpiCompletRate(kpiDataJycs2.getContractAmount().divide(kpiDataJycs2.getDepartKpi(), 2, RoundingMode.HALF_UP));
+                    }
+                }
+            }
+//            System.out.println("kpiDataJycsList");
+            //下达部门指标完成度排序
+            kpiDataJycsList.sort(Comparator.comparing(IndexKpiCompletByDate::getKpiCompletRate, Comparator.nullsFirst(BigDecimal::compareTo)).reversed());
+//            System.out.println(kpiDataJycsList);
+        });
+        CompletableFuture<Void> future2 = CompletableFuture.allOf(setKpiDataZrbmList, setKpiDataJycsList);
+        future2.join();
+//        System.out.println(kpiDataZrbmList);
+//        System.out.println(kpiDataJycsList);
+        indexKpiDataDepart.setZrbmCharts(kpiDataZrbmList);
+        indexKpiDataDepart.setJycsCharts(kpiDataJycsList);
+
+        return indexKpiDataDepart;
+    }
 
     public List<IndexKpiCompletByDate> testSort(){
         List<IndexKpiCompletByDate> indexKpiCompletByDateList = new ArrayList<>();

+ 0 - 215
module_kzks/src/main/java/org/jeecg/modules/kpiImportList/vue/KpiImportListList.vue

@@ -1,215 +0,0 @@
-<template>
-  <a-card :bordered="false">
-    <!-- 查询区域 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="searchQuery">
-        <a-row :gutter="24">
-          <a-col :xl="6" :lg="7" :md="8" :sm="24">
-            <a-form-item label="指标年份">
-              <a-input placeholder="请输入指标年份" v-model="queryParam.year"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :xl="6" :lg="7" :md="8" :sm="24">
-            <a-form-item label="指标部门">
-              <a-input placeholder="请输入指标部门" v-model="queryParam.department"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :xl="6" :lg="7" :md="8" :sm="24">
-            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
-              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
-              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
-              <a @click="handleToggleSearch" style="margin-left: 8px">
-                {{ toggleSearchStatus ? '收起' : '展开' }}
-                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
-              </a>
-            </span>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- 查询区域-END -->
-
-    <!-- 操作按钮区域 -->
-    <div class="table-operator">
-      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
-      <a-button type="primary" icon="download" @click="handleExportXls('年指标导入')">导出</a-button>
-      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
-        <a-button type="primary" icon="import">导入</a-button>
-      </a-upload>
-      <!-- 高级查询区域 -->
-      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
-      <a-dropdown v-if="selectedRowKeys.length > 0">
-        <a-menu slot="overlay">
-          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
-        </a-menu>
-        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
-      </a-dropdown>
-    </div>
-
-    <!-- table区域-begin -->
-    <div>
-      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
-        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
-        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
-      </div>
-
-      <a-table
-        ref="table"
-        size="middle"
-        :scroll="{x:true}"
-        bordered
-        rowKey="id"
-        :columns="columns"
-        :dataSource="dataSource"
-        :pagination="ipagination"
-        :loading="loading"
-        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
-        class="j-table-force-nowrap"
-        @change="handleTableChange">
-
-        <template slot="htmlSlot" slot-scope="text">
-          <div v-html="text"></div>
-        </template>
-        <template slot="imgSlot" slot-scope="text,record">
-          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
-          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
-        </template>
-        <template slot="fileSlot" slot-scope="text">
-          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
-          <a-button
-            v-else
-            :ghost="true"
-            type="primary"
-            icon="download"
-            size="small"
-            @click="downloadFile(text)">
-            下载
-          </a-button>
-        </template>
-
-        <span slot="action" slot-scope="text, record">
-          <a @click="handleEdit(record)">编辑</a>
-
-          <a-divider type="vertical" />
-          <a-dropdown>
-            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
-            <a-menu slot="overlay">
-              <a-menu-item>
-                <a @click="handleDetail(record)">详情</a>
-              </a-menu-item>
-              <a-menu-item>
-                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
-                  <a>删除</a>
-                </a-popconfirm>
-              </a-menu-item>
-            </a-menu>
-          </a-dropdown>
-        </span>
-
-      </a-table>
-    </div>
-
-    <kpi-import-list-modal ref="modalForm" @ok="modalFormOk"></kpi-import-list-modal>
-  </a-card>
-</template>
-
-<script>
-
-  import '@/assets/less/TableExpand.less'
-  import { mixinDevice } from '@/utils/mixin'
-  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
-  import KpiImportListModal from './modules/KpiImportListModal'
-
-  export default {
-    name: 'KpiImportListList',
-    mixins:[JeecgListMixin, mixinDevice],
-    components: {
-      KpiImportListModal
-    },
-    data () {
-      return {
-        description: '年指标导入管理页面',
-        // 表头
-        columns: [
-          {
-            title: '#',
-            dataIndex: '',
-            key:'rowIndex',
-            width:60,
-            align:"center",
-            customRender:function (t,r,index) {
-              return parseInt(index)+1;
-            }
-          },
-          {
-            title:'指标年份',
-            align:"center",
-            dataIndex: 'year'
-          },
-          {
-            title:'指标金额',
-            align:"center",
-            dataIndex: 'kpi'
-          },
-          {
-            title:'平均每月',
-            align:"center",
-            dataIndex: 'kpiMonth'
-          },
-          {
-            title:'指标部门',
-            align:"center",
-            dataIndex: 'department'
-          },
-          {
-            title:'指标年月',
-            align:"center",
-            dataIndex: 'ym'
-          },
-          {
-            title: '操作',
-            dataIndex: 'action',
-            align:"center",
-            fixed:"right",
-            width:147,
-            scopedSlots: { customRender: 'action' }
-          }
-        ],
-        url: {
-          list: "/kpiImportList/kpiImportList/list",
-          delete: "/kpiImportList/kpiImportList/delete",
-          deleteBatch: "/kpiImportList/kpiImportList/deleteBatch",
-          exportXlsUrl: "/kpiImportList/kpiImportList/exportXls",
-          importExcelUrl: "kpiImportList/kpiImportList/importExcel",
-          
-        },
-        dictOptions:{},
-        superFieldList:[],
-      }
-    },
-    created() {
-    this.getSuperFieldList();
-    },
-    computed: {
-      importExcelUrl: function(){
-        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
-      },
-    },
-    methods: {
-      initDictConfig(){
-      },
-      getSuperFieldList(){
-        let fieldList=[];
-        fieldList.push({type:'int',value:'year',text:'指标年份',dictCode:''})
-        fieldList.push({type:'BigDecimal',value:'kpi',text:'指标金额',dictCode:''})
-        fieldList.push({type:'string',value:'kpiMonth',text:'平均每月',dictCode:''})
-        fieldList.push({type:'string',value:'department',text:'指标部门',dictCode:''})
-        fieldList.push({type:'string',value:'ym',text:'指标年月',dictCode:''})
-        this.superFieldList = fieldList
-      }
-    }
-  }
-</script>
-<style scoped>
-  @import '~@assets/less/common.less';
-</style>

+ 0 - 17
module_kzks/src/main/java/org/jeecg/modules/kpiImportList/vue/KpiImportList_menu_insert.sql

@@ -1,26 +0,0 @@
-
-
-INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external) 
-VALUES ('2023101611029980560', NULL, '年指标导入', '/kpiImportList/kpiImportListList', 'kpiImportList/KpiImportListList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 1, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-10-16 11:02:56', NULL, NULL, 0);
-
-INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
-VALUES ('2023101611029980561', '2023101611029980560', '添加年指标导入', NULL, NULL, 0, NULL, NULL, 2, 'org.jeecg.modules:kzks_kpi_import_list:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-10-16 11:02:56', NULL, NULL, 0, 0, '1', 0);
-INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
-VALUES ('2023101611029980562', '2023101611029980560', '编辑年指标导入', NULL, NULL, 0, NULL, NULL, 2, 'org.jeecg.modules:kzks_kpi_import_list:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-10-16 11:02:56', NULL, NULL, 0, 0, '1', 0);
-INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
-VALUES ('2023101611029980563', '2023101611029980560', '删除年指标导入', NULL, NULL, 0, NULL, NULL, 2, 'org.jeecg.modules:kzks_kpi_import_list:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-10-16 11:02:56', NULL, NULL, 0, 0, '1', 0);
-INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
-VALUES ('2023101611029980564', '2023101611029980560', '批量删除年指标导入', NULL, NULL, 0, NULL, NULL, 2, 'org.jeecg.modules:kzks_kpi_import_list:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-10-16 11:02:56', NULL, NULL, 0, 0, '1', 0);
-INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
-VALUES ('2023101611029980565', '2023101611029980560', '导出excel_年指标导入', NULL, NULL, 0, NULL, NULL, 2, 'org.jeecg.modules:kzks_kpi_import_list:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-10-16 11:02:56', NULL, NULL, 0, 0, '1', 0);
-INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
-VALUES ('2023101611029980566', '2023101611029980560', '导入excel_年指标导入', NULL, NULL, 0, NULL, NULL, 2, 'org.jeecg.modules:kzks_kpi_import_list:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-10-16 11:02:56', NULL, NULL, 0, 0, '1', 0);

+ 0 - 134
module_kzks/src/main/java/org/jeecg/modules/kpiImportList/vue/modules/KpiImportListForm.vue

@@ -1,134 +0,0 @@
-<template>
-  <a-spin :spinning="confirmLoading">
-    <j-form-container :disabled="formDisabled">
-      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
-        <a-row>
-          <a-col :span="24">
-            <a-form-model-item label="指标年份" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="year">
-              <a-input-number v-model="model.year" placeholder="请输入指标年份" style="width: 100%" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="24">
-            <a-form-model-item label="指标金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="kpi">
-              <a-input-number v-model="model.kpi" placeholder="请输入指标金额" style="width: 100%" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="24">
-            <a-form-model-item label="平均每月" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="kpiMonth">
-              <a-input v-model="model.kpiMonth" placeholder="请输入平均每月"  ></a-input>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="24">
-            <a-form-model-item label="指标部门" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="department">
-              <a-input v-model="model.department" placeholder="请输入指标部门"  ></a-input>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="24">
-            <a-form-model-item label="指标年月" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ym">
-              <a-input v-model="model.ym" placeholder="请输入指标年月"  ></a-input>
-            </a-form-model-item>
-          </a-col>
-        </a-row>
-      </a-form-model>
-    </j-form-container>
-  </a-spin>
-</template>
-
-<script>
-
-  import { httpAction, getAction } from '@/api/manage'
-  import { validateDuplicateValue } from '@/utils/util'
-
-  export default {
-    name: 'KpiImportListForm',
-    components: {
-    },
-    props: {
-      //表单禁用
-      disabled: {
-        type: Boolean,
-        default: false,
-        required: false
-      }
-    },
-    data () {
-      return {
-        model:{
-         },
-        labelCol: {
-          xs: { span: 24 },
-          sm: { span: 5 },
-        },
-        wrapperCol: {
-          xs: { span: 24 },
-          sm: { span: 16 },
-        },
-        confirmLoading: false,
-        validatorRules: {
-           year: [
-              { required: true, message: '请输入指标年份!'},
-           ],
-           kpi: [
-              { required: true, message: '请输入指标金额!'},
-              { pattern: /^(([1-9][0-9]*)|([0]\.\d{0,2}|[1-9][0-9]*\.\d{0,2}))$/, message: '请输入正确的金额!'},
-           ],
-           department: [
-              { required: true, message: '请输入指标部门!'},
-           ],
-        },
-        url: {
-          add: "/kpiImportList/kpiImportList/add",
-          edit: "/kpiImportList/kpiImportList/edit",
-          queryById: "/kpiImportList/kpiImportList/queryById"
-        }
-      }
-    },
-    computed: {
-      formDisabled(){
-        return this.disabled
-      },
-    },
-    created () {
-       //备份model原始值
-      this.modelDefault = JSON.parse(JSON.stringify(this.model));
-    },
-    methods: {
-      add () {
-        this.edit(this.modelDefault);
-      },
-      edit (record) {
-        this.model = Object.assign({}, record);
-        this.visible = true;
-      },
-      submitForm () {
-        const that = this;
-        // 触发表单验证
-        this.$refs.form.validate(valid => {
-          if (valid) {
-            that.confirmLoading = true;
-            let httpurl = '';
-            let method = '';
-            if(!this.model.id){
-              httpurl+=this.url.add;
-              method = 'post';
-            }else{
-              httpurl+=this.url.edit;
-               method = 'put';
-            }
-            httpAction(httpurl,this.model,method).then((res)=>{
-              if(res.success){
-                that.$message.success(res.message);
-                that.$emit('ok');
-              }else{
-                that.$message.warning(res.message);
-              }
-            }).finally(() => {
-              that.confirmLoading = false;
-            })
-          }
-         
-        })
-      },
-    }
-  }
-</script>

+ 0 - 84
module_kzks/src/main/java/org/jeecg/modules/kpiImportList/vue/modules/KpiImportListModal.Style#Drawer.vue

@@ -1,84 +0,0 @@
-<template>
-  <a-drawer
-    :title="title"
-    :width="width"
-    placement="right"
-    :closable="false"
-    @close="close"
-    destroyOnClose
-    :visible="visible">
-    <kpi-import-list-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></kpi-import-list-form>
-    <div class="drawer-footer">
-      <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
-      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
-    </div>
-  </a-drawer>
-</template>
-
-<script>
-
-  import KpiImportListForm from './KpiImportListForm'
-
-  export default {
-    name: 'KpiImportListModal',
-    components: {
-      KpiImportListForm
-    },
-    data () {
-      return {
-        title:"操作",
-        width:800,
-        visible: false,
-        disableSubmit: false
-      }
-    },
-    methods: {
-      add () {
-        this.visible=true
-        this.$nextTick(()=>{
-          this.$refs.realForm.add();
-        })
-      },
-      edit (record) {
-        this.visible=true
-        this.$nextTick(()=>{
-          this.$refs.realForm.edit(record);
-        });
-      },
-      close () {
-        this.$emit('close');
-        this.visible = false;
-      },
-      submitCallback(){
-        this.$emit('ok');
-        this.visible = false;
-      },
-      handleOk () {
-        this.$refs.realForm.submitForm();
-      },
-      handleCancel () {
-        this.close()
-      }
-    }
-  }
-</script>
-
-<style lang="less" scoped>
-/** Button按钮间距 */
-  .ant-btn {
-    margin-left: 30px;
-    margin-bottom: 30px;
-    float: right;
-  }
-  .drawer-footer{
-    position: absolute;
-    bottom: -8px;
-    width: 100%;
-    border-top: 1px solid #e8e8e8;
-    padding: 10px 16px;
-    text-align: right;
-    left: 0;
-    background: #fff;
-    border-radius: 0 0 2px 2px;
-  }
-</style>

+ 0 - 60
module_kzks/src/main/java/org/jeecg/modules/kpiImportList/vue/modules/KpiImportListModal.vue

@@ -1,60 +0,0 @@
-<template>
-  <j-modal
-    :title="title"
-    :width="width"
-    :visible="visible"
-    switchFullscreen
-    @ok="handleOk"
-    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
-    @cancel="handleCancel"
-    cancelText="关闭">
-    <kpi-import-list-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></kpi-import-list-form>
-  </j-modal>
-</template>
-
-<script>
-
-  import KpiImportListForm from './KpiImportListForm'
-  export default {
-    name: 'KpiImportListModal',
-    components: {
-      KpiImportListForm
-    },
-    data () {
-      return {
-        title:'',
-        width:800,
-        visible: false,
-        disableSubmit: false
-      }
-    },
-    methods: {
-      add () {
-        this.visible=true
-        this.$nextTick(()=>{
-          this.$refs.realForm.add();
-        })
-      },
-      edit (record) {
-        this.visible=true
-        this.$nextTick(()=>{
-          this.$refs.realForm.edit(record);
-        })
-      },
-      close () {
-        this.$emit('close');
-        this.visible = false;
-      },
-      handleOk () {
-        this.$refs.realForm.submitForm();
-      },
-      submitCallback(){
-        this.$emit('ok');
-        this.visible = false;
-      },
-      handleCancel () {
-        this.close()
-      }
-    }
-  }
-</script>