浏览代码

1月30日从513导出

lw 1 年之前
父节点
当前提交
6a0d4c5284

+ 1 - 1
jeecg-module-system/jeecg-system-start/src/main/resources/application.yml

@@ -2,4 +2,4 @@ spring:
   application:
   application:
     name: jeecg-system
     name: jeecg-system
   profiles:
   profiles:
-    active: 'dev'
+    active: 'prod'

+ 1 - 1
module_kzks/src/main/java/org/jeecg/modules/Index/service/impl/IndexZcbServiceImpl.java

@@ -605,7 +605,7 @@ public class IndexZcbServiceImpl implements IndexZcbService {
                         gzjlwfList.add(costList.get(i).getGzjlwf());
                         gzjlwfList.add(costList.get(i).getGzjlwf());
                         glfList.add(costList.get(i).getGlf());
                         glfList.add(costList.get(i).getGlf());
                         sxfList.add(costList.get(i).getSxf());
                         sxfList.add(costList.get(i).getSxf());
-                        BigDecimal sumZcbValue = costList.get(i).getClf().add(costList.get(i).getZyf()).add(costList.get(i).getSwf()).add(costList.get(i).getWxf()).add(costList.get(i).getRldlf()).add(costList.get(i).getGdzczj()).add(costList.get(i).getGzjlwf()).add(costList.get(i).getGlf()).add(costList.get(i).getSxf());
+                        BigDecimal sumZcbValue = costList.get(i).getClf().add(costList.get(i).getZyf()).add(costList.get(i).getSwf()).add(costList.get(i).getWxf()).add(costList.get(i).getRldlf()).add(costList.get(i).getGdzczj()).add(costList.get(i).getGzjlwf()).add(costList.get(i).getGlf()).add(Optional.ofNullable(costList.get(i).getSxf()).orElse(new BigDecimal(0)));
                         zcbSumValueList.add(sumZcbValue);
                         zcbSumValueList.add(sumZcbValue);
                         i++;
                         i++;
                     }else {
                     }else {

+ 1 - 2
module_kzks/src/main/java/org/jeecg/modules/kyTaskTemp/service/impl/KyTaskTempServiceImpl.java

@@ -8,7 +8,6 @@ import com.alibaba.excel.read.metadata.ReadSheet;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.config.mybatis.ThreadLocalDataHelper;
 import org.jeecg.modules.dataSourceSwitch.annotation.UseMasterDataSource;
 import org.jeecg.modules.dataSourceSwitch.annotation.UseMasterDataSource;
 import org.jeecg.modules.kyTaskTemp.entity.KyTaskTemp;
 import org.jeecg.modules.kyTaskTemp.entity.KyTaskTemp;
 import org.jeecg.modules.kyTaskTemp.mapper.KyTaskTempMapper;
 import org.jeecg.modules.kyTaskTemp.mapper.KyTaskTempMapper;
@@ -46,7 +45,7 @@ public class KyTaskTempServiceImpl extends ServiceImpl<KyTaskTempMapper, KyTaskT
     public Result<?> importExcel1(String strUrl, Class<KyTaskTemp> clazz) {
     public Result<?> importExcel1(String strUrl, Class<KyTaskTemp> clazz) {
         long startTime = System.currentTimeMillis();
         long startTime = System.currentTimeMillis();
         File file = new File(strUrl);
         File file = new File(strUrl);
-        ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(8, 8, 60, TimeUnit.SECONDS, new ArrayBlockingQueue<>(100));
+        ExecutorService threadPoolExecutor = Executors.newFixedThreadPool(8);
         try {
         try {
             IKyTaskTempService iKyTaskTempService = (IKyTaskTempService) AopContext.currentProxy();
             IKyTaskTempService iKyTaskTempService = (IKyTaskTempService) AopContext.currentProxy();
             iKyTaskTempService.truncateTable();
             iKyTaskTempService.truncateTable();

+ 201 - 2
module_kzks/src/main/java/org/jeecg/modules/projectImportList/dto/ProjectChb.java

@@ -10,6 +10,8 @@ import org.jeecgframework.poi.excel.annotation.Excel;
 import org.springframework.format.annotation.DateTimeFormat;
 import org.springframework.format.annotation.DateTimeFormat;
 
 
 import java.io.Serializable;
 import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
 
 
 @Data
 @Data
 public class ProjectChb implements Serializable {
 public class ProjectChb implements Serializable {
@@ -83,7 +85,7 @@ public class ProjectChb implements Serializable {
     @Excel(name = "金额", width = 15)
     @Excel(name = "金额", width = 15)
     @ApiModelProperty(value = "金额")
     @ApiModelProperty(value = "金额")
     @ExcelProperty(value = "金额")
     @ExcelProperty(value = "金额")
-    private java.lang.String je;
+    private java.math.BigDecimal je;
     /**部门*/
     /**部门*/
     @Excel(name = "部门", width = 15)
     @Excel(name = "部门", width = 15)
     @ApiModelProperty(value = "部门")
     @ApiModelProperty(value = "部门")
@@ -98,7 +100,7 @@ public class ProjectChb implements Serializable {
     @Excel(name = "辅助金额", width = 15)
     @Excel(name = "辅助金额", width = 15)
     @ApiModelProperty(value = "辅助金额")
     @ApiModelProperty(value = "辅助金额")
     @ExcelProperty(value = "辅助金额")
     @ExcelProperty(value = "辅助金额")
-    private java.lang.String fzje;
+    private java.math.BigDecimal fzje;
     /**制单人*/
     /**制单人*/
     @Excel(name = "制单人", width = 15)
     @Excel(name = "制单人", width = 15)
     @ApiModelProperty(value = "制单人")
     @ApiModelProperty(value = "制单人")
@@ -134,4 +136,201 @@ public class ProjectChb implements Serializable {
     @ApiModelProperty(value = "任务号")
     @ApiModelProperty(value = "任务号")
     @ExcelProperty(value = "任务号")
     @ExcelProperty(value = "任务号")
     private java.lang.String taskno;
     private java.lang.String taskno;
+
+
+    public static long getSerialVersionUID() {
+        return serialVersionUID;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getCreateBy() {
+        return createBy;
+    }
+
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getUpdateBy() {
+        return updateBy;
+    }
+
+    public void setUpdateBy(String updateBy) {
+        this.updateBy = updateBy;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getSysOrgCode() {
+        return sysOrgCode;
+    }
+
+    public void setSysOrgCode(String sysOrgCode) {
+        this.sysOrgCode = sysOrgCode;
+    }
+
+    public String getNd() {
+        return nd;
+    }
+
+    public void setNd(String nd) {
+        this.nd = nd;
+    }
+
+    public String getPzrq() {
+        return pzrq;
+    }
+
+    public void setPzrq(String pzrq) {
+        this.pzrq = pzrq;
+    }
+
+    public String getPzh() {
+        return pzh;
+    }
+
+    public void setPzh(String pzh) {
+        this.pzh = pzh;
+    }
+
+    public String getZy() {
+        return zy;
+    }
+
+    public void setZy(String zy) {
+        this.zy = zy;
+    }
+
+    public String getKmbh() {
+        return kmbh;
+    }
+
+    public void setKmbh(String kmbh) {
+        this.kmbh = kmbh;
+    }
+
+    public String getKm() {
+        return km;
+    }
+
+    public void setKm(String km) {
+        this.km = km;
+    }
+
+    public String getFx() {
+        return fx;
+    }
+
+    public void setFx(String fx) {
+        this.fx = fx;
+    }
+
+    public BigDecimal getJe() {
+        return je;
+    }
+
+    public void setJe(BigDecimal je) {
+        this.je = je;
+    }
+
+    public String getBm() {
+        return bm;
+    }
+
+    public void setBm(String bm) {
+        this.bm = bm;
+    }
+
+    public String getWldw() {
+        return wldw;
+    }
+
+    public void setWldw(String wldw) {
+        this.wldw = wldw;
+    }
+
+    public BigDecimal getFzje() {
+        return fzje;
+    }
+
+    public void setFzje(BigDecimal fzje) {
+        this.fzje = fzje;
+    }
+
+    public String getZdr() {
+        return zdr;
+    }
+
+    public void setZdr(String zdr) {
+        this.zdr = zdr;
+    }
+
+    public String getKjqj() {
+        return kjqj;
+    }
+
+    public void setKjqj(String kjqj) {
+        this.kjqj = kjqj;
+    }
+
+    public String getPznm() {
+        return pznm;
+    }
+
+    public void setPznm(String pznm) {
+        this.pznm = pznm;
+    }
+
+    public String getXmbh() {
+        return xmbh;
+    }
+
+    public void setXmbh(String xmbh) {
+        this.xmbh = xmbh;
+    }
+
+    public String getXmmc() {
+        return xmmc;
+    }
+
+    public void setXmmc(String xmmc) {
+        this.xmmc = xmmc;
+    }
+
+    public String getXmlb() {
+        return xmlb;
+    }
+
+    public void setXmlb(String xmlb) {
+        this.xmlb = xmlb;
+    }
+
+    public String getTaskno() {
+        return taskno;
+    }
+
+    public void setTaskno(String taskno) {
+        this.taskno = taskno;
+    }
 }
 }

+ 4 - 6
module_kzks/src/main/java/org/jeecg/modules/projectImportList/readListener/KyTaskTempImportReadListener.java

@@ -8,9 +8,7 @@ import org.jeecg.modules.kyTaskTemp.service.IKyTaskTempService;
 
 
 import java.util.ArrayList;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.List;
-import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
+import java.util.concurrent.*;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicInteger;
 
 
 @Slf4j
 @Slf4j
@@ -19,7 +17,7 @@ public class KyTaskTempImportReadListener extends AnalysisEventListener<KyTaskTe
     private final IKyTaskTempService service;
     private final IKyTaskTempService service;
     private static int sheetSize;
     private static int sheetSize;
     private static final AtomicInteger sheetCount;
     private static final AtomicInteger sheetCount;
-    private static ThreadPoolExecutor pool;
+    private static ExecutorService pool;
     public final ThreadLocal<List<KyTaskTemp>> threadLocal;
     public final ThreadLocal<List<KyTaskTemp>> threadLocal;
 
 
     public static void setSheetSize(int sheetSize) {
     public static void setSheetSize(int sheetSize) {
@@ -28,7 +26,7 @@ public class KyTaskTempImportReadListener extends AnalysisEventListener<KyTaskTe
 
 
     static {
     static {
         sheetCount = new AtomicInteger();
         sheetCount = new AtomicInteger();
-        pool = new ThreadPoolExecutor(8, 8, 60, TimeUnit.SECONDS, new ArrayBlockingQueue<>(2000));
+        pool = Executors.newFixedThreadPool(8);
     }
     }
 
 
     public KyTaskTempImportReadListener(IKyTaskTempService service) {
     public KyTaskTempImportReadListener(IKyTaskTempService service) {
@@ -45,7 +43,7 @@ public class KyTaskTempImportReadListener extends AnalysisEventListener<KyTaskTe
                 ArrayList<KyTaskTemp> kyTaskTemps = new ArrayList<>(temps);
                 ArrayList<KyTaskTemp> kyTaskTemps = new ArrayList<>(temps);
                 temps = new ArrayList<>(1000);
                 temps = new ArrayList<>(1000);
                 if (pool.isShutdown())
                 if (pool.isShutdown())
-                    pool = new ThreadPoolExecutor(8, 8, 60, TimeUnit.SECONDS, new ArrayBlockingQueue<>(2000));
+                    pool = Executors.newFixedThreadPool(8);
                 pool.submit(() -> {
                 pool.submit(() -> {
                     try {
                     try {
                         service.batchSave(kyTaskTemps);
                         service.batchSave(kyTaskTemps);

+ 137 - 106
module_kzks/src/main/java/org/jeecg/modules/projectImportList/readListener/ProjectChbImportReadListener.java

@@ -1,8 +1,11 @@
 package org.jeecg.modules.projectImportList.readListener;
 package org.jeecg.modules.projectImportList.readListener;
 
 
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.collection.ListUtil;
 import com.alibaba.excel.context.AnalysisContext;
 import com.alibaba.excel.context.AnalysisContext;
 import com.alibaba.excel.event.AnalysisEventListener;
 import com.alibaba.excel.event.AnalysisEventListener;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.ArrayUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.jeecg.common.util.RedisUtil;
 import org.jeecg.common.util.RedisUtil;
 import org.jeecg.modules.Index.util.CacheKey;
 import org.jeecg.modules.Index.util.CacheKey;
@@ -28,7 +31,9 @@ import org.jeecg.modules.projectImportList.service.impl.ProjectImportListService
 import org.jeecg.modules.projectKmbh.entity.KzksProjectKmbh;
 import org.jeecg.modules.projectKmbh.entity.KzksProjectKmbh;
 import org.jeecg.modules.projectKmbh.service.IKzksProjectKmbhService;
 import org.jeecg.modules.projectKmbh.service.IKzksProjectKmbhService;
 
 
+import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 import java.util.List;
 
 
 import java.util.concurrent.*;
 import java.util.concurrent.*;
@@ -67,9 +72,9 @@ public class ProjectChbImportReadListener extends AnalysisEventListener<ProjectC
     private final RedisUtil redisUtil;
     private final RedisUtil redisUtil;
     private static final AtomicInteger overTaskCount = new AtomicInteger();
     private static final AtomicInteger overTaskCount = new AtomicInteger();
 
 
-    private final ThreadPoolExecutor threadPoolExecutor;
+    private final ExecutorService threadPoolExecutor;
 
 
-    public ProjectChbImportReadListener(IKzksProjectKmbhService kmbhService, IProjectChbSwfService swfService, IProjectChbZyfService zyfService, IKzksProjectChbRdfService rdfService, IKzksProjectChbZjfService zjfService, IKzksProjectChbGlfService glfService, IKzksProjectChbRgfService rgfService, IProjectChbSxfService sxfService, IProjectChbWxfService wxfService, RedisUtil redisUtil, ThreadPoolExecutor threadPoolExecutor) {
+    public ProjectChbImportReadListener(IKzksProjectKmbhService kmbhService, IProjectChbSwfService swfService, IProjectChbZyfService zyfService, IKzksProjectChbRdfService rdfService, IKzksProjectChbZjfService zjfService, IKzksProjectChbGlfService glfService, IKzksProjectChbRgfService rgfService, IProjectChbSxfService sxfService, IProjectChbWxfService wxfService, RedisUtil redisUtil, ExecutorService threadPoolExecutor) {
         this.kmbhService = kmbhService;
         this.kmbhService = kmbhService;
         this.swfService = swfService;
         this.swfService = swfService;
         this.zyfService = zyfService;
         this.zyfService = zyfService;
@@ -86,52 +91,29 @@ public class ProjectChbImportReadListener extends AnalysisEventListener<ProjectC
     @Override
     @Override
     public void invoke(ProjectChb projectChb, AnalysisContext analysisContext) {
     public void invoke(ProjectChb projectChb, AnalysisContext analysisContext) {
         try {
         try {
-            //String sheetName = analysisContext.readSheetHolder().getSheetName();
-            //Integer rowIndex = analysisContext.readRowHolder().getRowIndex();
-            //log.info("当前读的是{},第{}行", sheetName, rowIndex);
+//            String sheetName = analysisContext.readSheetHolder().getSheetName();
+//            Integer rowIndex = analysisContext.readRowHolder().getRowIndex();
+//            log.info("当前读的是{},第{}行", sheetName, rowIndex);
             String taskno = projectChb.getTaskno();
             String taskno = projectChb.getTaskno();
             String nd = projectChb.getNd();
             String nd = projectChb.getNd();
             String kmbh = projectChb.getKmbh();
             String kmbh = projectChb.getKmbh();
             if (StringUtils.isEmpty(taskno) || StringUtils.isEmpty(nd) || StringUtils.isEmpty(kmbh)) return;
             if (StringUtils.isEmpty(taskno) || StringUtils.isEmpty(nd) || StringUtils.isEmpty(kmbh)) return;
-            if (!taskno.equals("") && !nd.equals("") && !kmbh.equals("")) {
-                String fylb = (String) redisUtil.hget(CacheKey.ND_KMBH_MONEY_TYPE + ":" + nd, kmbh);
-                if (StringUtils.isEmpty(fylb)) return;
-                switch (fylb) {
-                    case "事务费":
-                        swfList.add(CHBConvert.INSTANCE.toSWF(projectChb));
-                        swfDe.add(nd);
-                        break;
-                    case "专用费":
-                        zyfList.add(CHBConvert.INSTANCE.toZYF(projectChb));
-                        zyfDe.add(nd);
-                        break;
-                    case "外协费":
-                        wxfList.add(CHBConvert.INSTANCE.toWXF(projectChb));
-                        wxfDe.add(nd);
-                        break;
-                    case "燃动费":
-                        rdfList.add(CHBConvert.INSTANCE.toRDF(projectChb));
-                        rdfDe.add(nd);
-                        break;
-                    case "折旧费":
-                        zjfList.add(CHBConvert.INSTANCE.toZJF(projectChb));
-                        zjfDe.add(nd);
-                        break;
-                    case "管理费":
-                        glfList.add(CHBConvert.INSTANCE.toGLF(projectChb));
-                        glfDe.add(nd);
-                        break;
-                    case "人工费":
-                        rgfList.add(CHBConvert.INSTANCE.toRGF(projectChb));
-                        rgfDe.add(nd);
-                        break;
-                    case "筛选费":
-                        sxfList.add(CHBConvert.INSTANCE.toSXF(projectChb));
-                        sxfDe.add(nd);
-                        break;
+            String[] split = taskno.split("/");
+            List<String> chbs = Arrays.asList(split);
+            if (chbs.size() == 1) {
+                chbConvert(projectChb, nd, kmbh);
+            } else {
+                for (String chb : chbs) {
+                    ProjectChb newChbs = new ProjectChb();
+                    BeanUtil.copyProperties(projectChb, newChbs);
+                    newChbs.setTaskno(chb);
+                    newChbs.setJe(projectChb.getJe().divide(BigDecimal.valueOf(chbs.size()), 2, BigDecimal.ROUND_HALF_UP));
+                    newChbs.setFzje(projectChb.getFzje().divide(BigDecimal.valueOf(chbs.size()), 2, BigDecimal.ROUND_HALF_UP));
+                    chbConvert(newChbs, nd, kmbh);
                 }
                 }
             }
             }
-        } catch (Exception e) {
+        } catch (
+                Exception e) {
             e.printStackTrace();
             e.printStackTrace();
             clear();
             clear();
             throw new RuntimeException(e);
             throw new RuntimeException(e);
@@ -141,7 +123,7 @@ public class ProjectChbImportReadListener extends AnalysisEventListener<ProjectC
     @Override
     @Override
     public void doAfterAllAnalysed(AnalysisContext analysisContext) {
     public void doAfterAllAnalysed(AnalysisContext analysisContext) {
         try {
         try {
-            log.info("{}执行完毕",analysisContext.readSheetHolder().getSheetName());
+            log.info("{}执行完毕", analysisContext.readSheetHolder().getSheetName());
             int taskCount = ProjectImportListServiceImpl.taskCount;
             int taskCount = ProjectImportListServiceImpl.taskCount;
             int ovTaskCount = overTaskCount.incrementAndGet();
             int ovTaskCount = overTaskCount.incrementAndGet();
             if (taskCount != ovTaskCount) return;
             if (taskCount != ovTaskCount) return;
@@ -160,15 +142,6 @@ public class ProjectChbImportReadListener extends AnalysisEventListener<ProjectC
                     }
                     }
                 }
                 }
             }
             }
-            if (!swfList.isEmpty()) {
-                List<List<ProjectChbSwf>> lists = splitList(swfList);
-                for (List<ProjectChbSwf> list : lists) {
-                    threadPoolExecutor.submit(() -> {
-                        swfService.saveBatch(list);
-                    });
-                }
-            }
-
             if (!zyfDe.isEmpty()) {
             if (!zyfDe.isEmpty()) {
                 for (String nd : zyfDe) {
                 for (String nd : zyfDe) {
                     int count = zyfService.getIfHaveThisNd(nd);
                     int count = zyfService.getIfHaveThisNd(nd);
@@ -177,14 +150,6 @@ public class ProjectChbImportReadListener extends AnalysisEventListener<ProjectC
                     }
                     }
                 }
                 }
             }
             }
-            if (!zyfList.isEmpty()) {
-                List<List<ProjectChbZyf>> lists = splitList(zyfList);
-                for (List<ProjectChbZyf> list : lists) {
-                    threadPoolExecutor.submit(() -> {
-                        zyfService.saveBatch(list);
-                    });
-                }
-            }
             if (!wxfDe.isEmpty()) {
             if (!wxfDe.isEmpty()) {
                 for (String nd : wxfDe) {
                 for (String nd : wxfDe) {
                     int count = wxfService.getIfHaveThisNd(nd);
                     int count = wxfService.getIfHaveThisNd(nd);
@@ -193,14 +158,6 @@ public class ProjectChbImportReadListener extends AnalysisEventListener<ProjectC
                     }
                     }
                 }
                 }
             }
             }
-            if (!wxfList.isEmpty()) {
-                List<List<ProjectChbWxf>> lists = splitList(wxfList);
-                for (List<ProjectChbWxf> list : lists) {
-                    threadPoolExecutor.submit(() -> {
-                        wxfService.saveBatch(list);
-                    });
-                }
-            }
             if (!rdfDe.isEmpty()) {
             if (!rdfDe.isEmpty()) {
                 for (String nd : rdfDe) {
                 for (String nd : rdfDe) {
                     int count = rdfService.getIfHaveThisNd(nd);
                     int count = rdfService.getIfHaveThisNd(nd);
@@ -209,16 +166,6 @@ public class ProjectChbImportReadListener extends AnalysisEventListener<ProjectC
                     }
                     }
                 }
                 }
             }
             }
-
-            if (!rdfList.isEmpty()) {
-                List<List<ProjectChbRdf>> lists = splitList(rdfList);
-                for (List<ProjectChbRdf> list : lists) {
-                    threadPoolExecutor.submit(() -> {
-                        rdfService.saveBatch(list);
-                    });
-                }
-            }
-
             if (!zjfDe.isEmpty()) {
             if (!zjfDe.isEmpty()) {
                 for (String nd : zjfDe) {
                 for (String nd : zjfDe) {
                     int count = zjfService.getIfHaveThisNd(nd);
                     int count = zjfService.getIfHaveThisNd(nd);
@@ -227,15 +174,6 @@ public class ProjectChbImportReadListener extends AnalysisEventListener<ProjectC
                     }
                     }
                 }
                 }
             }
             }
-            if (!zjfList.isEmpty()) {
-                List<List<ProjectChbZjf>> lists = splitList(zjfList);
-                for (List<ProjectChbZjf> list : lists) {
-                    threadPoolExecutor.submit(() -> {
-                        zjfService.saveBatch(list);
-                    });
-                }
-            }
-
             if (!glfDe.isEmpty()) {
             if (!glfDe.isEmpty()) {
                 for (String nd : glfDe) {
                 for (String nd : glfDe) {
                     int count = glfService.getIfHaveThisNd(nd);
                     int count = glfService.getIfHaveThisNd(nd);
@@ -244,15 +182,6 @@ public class ProjectChbImportReadListener extends AnalysisEventListener<ProjectC
                     }
                     }
                 }
                 }
             }
             }
-            if (!glfList.isEmpty()) {
-                List<List<ProjectChbGlf>> lists = splitList(glfList);
-                for (List<ProjectChbGlf> list : lists) {
-                    threadPoolExecutor.submit(() -> {
-                        glfService.saveBatch(list);
-                    });
-                }
-            }
-
             if (!rgfDe.isEmpty()) {
             if (!rgfDe.isEmpty()) {
                 for (String nd : rgfDe) {
                 for (String nd : rgfDe) {
                     int count = rgfService.getIfHaveThisNd(nd);
                     int count = rgfService.getIfHaveThisNd(nd);
@@ -261,15 +190,6 @@ public class ProjectChbImportReadListener extends AnalysisEventListener<ProjectC
                     }
                     }
                 }
                 }
             }
             }
-            if (!rgfList.isEmpty()) {
-                List<List<ProjectChbRgf>> lists = splitList(rgfList);
-                for (List<ProjectChbRgf> list : lists) {
-                    threadPoolExecutor.submit(() -> {
-                        rgfService.saveBatch(list);
-                    });
-                }
-            }
-
             if (!sxfDe.isEmpty()) {
             if (!sxfDe.isEmpty()) {
                 for (String nd : sxfDe) {
                 for (String nd : sxfDe) {
                     int count = sxfService.getIfHaveThisNd(nd);
                     int count = sxfService.getIfHaveThisNd(nd);
@@ -279,6 +199,76 @@ public class ProjectChbImportReadListener extends AnalysisEventListener<ProjectC
                 }
                 }
             }
             }
 
 
+            if (!swfList.isEmpty()) {
+                List<List<ProjectChbSwf>> lists = splitList(swfList);
+                for (List<ProjectChbSwf> list : lists) {
+                    threadPoolExecutor.submit(() -> {
+                        swfService.saveBatch(list);
+                    });
+                }
+            }
+            if (!zyfList.isEmpty()) {
+                List<List<ProjectChbZyf>> lists = splitList(zyfList);
+                for (List<ProjectChbZyf> list : lists) {
+                    threadPoolExecutor.submit(() -> {
+                        zyfService.saveBatch(list);
+                    });
+                }
+            }
+
+            if (!wxfList.isEmpty()) {
+                List<List<ProjectChbWxf>> lists = splitList(wxfList);
+                for (List<ProjectChbWxf> list : lists) {
+                    threadPoolExecutor.submit(() -> {
+                        wxfService.saveBatch(list);
+                    });
+                }
+            }
+
+            if (!rdfList.isEmpty()) {
+                List<List<ProjectChbRdf>> lists = splitList(rdfList);
+                for (List<ProjectChbRdf> list : lists) {
+                    threadPoolExecutor.submit(() -> {
+                        try {
+                            rdfService.saveBatch(list);
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+                    });
+                }
+            }
+            if (!zjfList.isEmpty()) {
+                List<List<ProjectChbZjf>> lists = splitList(zjfList);
+                for (List<ProjectChbZjf> list : lists) {
+                    threadPoolExecutor.submit(() -> {
+                        zjfService.saveBatch(list);
+                    });
+                }
+            }
+            if (!glfList.isEmpty()) {
+                List<List<ProjectChbGlf>> lists = splitList(glfList);
+                for (List<ProjectChbGlf> list : lists) {
+                    threadPoolExecutor.submit(() -> {
+                        try {
+                            glfService.saveBatch(list);
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+                    });
+                }
+            }
+            if (!rgfList.isEmpty()) {
+                List<List<ProjectChbRgf>> lists = splitList(rgfList);
+                for (List<ProjectChbRgf> list : lists) {
+                    threadPoolExecutor.submit(() -> {
+                        try {
+                            rgfService.saveBatch(list);
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+                    });
+                }
+            }
             if (!sxfList.isEmpty()) {
             if (!sxfList.isEmpty()) {
                 List<List<ProjectChbSxf>> lists = splitList(sxfList);
                 List<List<ProjectChbSxf>> lists = splitList(sxfList);
                 for (List<ProjectChbSxf> list : lists) {
                 for (List<ProjectChbSxf> list : lists) {
@@ -302,7 +292,7 @@ public class ProjectChbImportReadListener extends AnalysisEventListener<ProjectC
     public void initRedisCache() {
     public void initRedisCache() {
         List<KzksProjectKmbh> kmbhs = kmbhService.getAll();
         List<KzksProjectKmbh> kmbhs = kmbhService.getAll();
         for (KzksProjectKmbh kmbh : kmbhs) {
         for (KzksProjectKmbh kmbh : kmbhs) {
-            redisUtil.hset(CacheKey.ND_KMBH_MONEY_TYPE + ":" + kmbh.getYear(), kmbh.getKemuNo(), kmbh.getMoneyType(),60*120);
+            redisUtil.hset(CacheKey.ND_KMBH_MONEY_TYPE + ":" + kmbh.getYear(), kmbh.getKemuNo(), kmbh.getMoneyType(), 60 * 120);
         }
         }
     }
     }
 
 
@@ -349,4 +339,45 @@ public class ProjectChbImportReadListener extends AnalysisEventListener<ProjectC
         return lists;
         return lists;
     }
     }
 
 
+    public void chbConvert(ProjectChb newChbs, String nd, String kmbh) {
+        String fylb = (String) redisUtil.hget(CacheKey.ND_KMBH_MONEY_TYPE + ":" + nd, kmbh);
+        if (StringUtils.isEmpty(fylb)) return;
+        switch (fylb) {
+            case "事务费":
+                swfList.add(CHBConvert.INSTANCE.toSWF(newChbs));
+                swfDe.add(nd);
+                break;
+            case "专用费":
+                zyfList.add(CHBConvert.INSTANCE.toZYF(newChbs));
+                zyfDe.add(nd);
+                break;
+            case "外协费":
+                wxfList.add(CHBConvert.INSTANCE.toWXF(newChbs));
+                wxfDe.add(nd);
+                break;
+            case "燃动费":
+                rdfList.add(CHBConvert.INSTANCE.toRDF(newChbs));
+                rdfDe.add(nd);
+                break;
+            case "固资费":
+            case "折旧费":
+                zjfList.add(CHBConvert.INSTANCE.toZJF(newChbs));
+                zjfDe.add(nd);
+                break;
+            case "管理费":
+                glfList.add(CHBConvert.INSTANCE.toGLF(newChbs));
+                glfDe.add(nd);
+                break;
+            case "人工费":
+                rgfList.add(CHBConvert.INSTANCE.toRGF(newChbs));
+                rgfDe.add(nd);
+                break;
+            case "筛选费":
+                sxfList.add(CHBConvert.INSTANCE.toSXF(newChbs));
+                sxfDe.add(nd);
+                break;
+            default:
+                break;
+        }
+    }
 }
 }

+ 2 - 2
module_kzks/src/main/java/org/jeecg/modules/projectImportList/service/impl/ProjectImportListServiceImpl.java

@@ -77,8 +77,8 @@ public class ProjectImportListServiceImpl extends ServiceImpl<ProjectImportListM
     public Result<?> importExcel1(String strUrl, Class<ProjectChb> clazz) throws InterruptedException, ExecutionException, IOException {
     public Result<?> importExcel1(String strUrl, Class<ProjectChb> clazz) throws InterruptedException, ExecutionException, IOException {
         long startTime = System.currentTimeMillis();
         long startTime = System.currentTimeMillis();
         File file = new File(strUrl);
         File file = new File(strUrl);
-        ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(8, 8, 60, TimeUnit.SECONDS, new ArrayBlockingQueue<>(100));
-        ThreadPoolExecutor poolExecutor = new ThreadPoolExecutor(8, 8, 60, TimeUnit.SECONDS, new ArrayBlockingQueue<>(2000));
+        ExecutorService threadPoolExecutor = Executors.newFixedThreadPool(8);
+        ExecutorService poolExecutor = Executors.newFixedThreadPool(8);
         try {
         try {
             ProjectChbImportReadListener projectChbImportReadListener =
             ProjectChbImportReadListener projectChbImportReadListener =
                     new ProjectChbImportReadListener(kmbhService, swfService, zyfService, rdfService, zjfService, glfService, rgfService, sxfService, wxfService, redisUtil, poolExecutor);
                     new ProjectChbImportReadListener(kmbhService, swfService, zyfService, rdfService, zjfService, glfService, rgfService, sxfService, wxfService, redisUtil, poolExecutor);

+ 76 - 0
module_kzks/src/main/java/org/jeecg/modules/projectKmbh/entity/KzksProjectKmbh.java

@@ -67,4 +67,80 @@ public class KzksProjectKmbh implements Serializable {
 	@Excel(name = "费用类别", width = 15)
 	@Excel(name = "费用类别", width = 15)
     @ApiModelProperty(value = "费用类别")
     @ApiModelProperty(value = "费用类别")
     private java.lang.String moneyType;
     private java.lang.String moneyType;
+
+    public static long getSerialVersionUID() {
+        return serialVersionUID;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getCreateBy() {
+        return createBy;
+    }
+
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getUpdateBy() {
+        return updateBy;
+    }
+
+    public void setUpdateBy(String updateBy) {
+        this.updateBy = updateBy;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getSysOrgCode() {
+        return sysOrgCode;
+    }
+
+    public void setSysOrgCode(String sysOrgCode) {
+        this.sysOrgCode = sysOrgCode;
+    }
+
+    public String getYear() {
+        return year;
+    }
+
+    public void setYear(String year) {
+        this.year = year;
+    }
+
+    public String getKemuNo() {
+        return kemuNo;
+    }
+
+    public void setKemuNo(String kemuNo) {
+        this.kemuNo = kemuNo;
+    }
+
+    public String getMoneyType() {
+        return moneyType;
+    }
+
+    public void setMoneyType(String moneyType) {
+        this.moneyType = moneyType;
+    }
 }
 }

+ 15 - 8
module_kzks/src/main/java/org/jeecg/modules/projectKmbh/service/impl/KzksProjectKmbhServiceImpl.java

@@ -1,6 +1,7 @@
 package org.jeecg.modules.projectKmbh.service.impl;
 package org.jeecg.modules.projectKmbh.service.impl;
 
 
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.modules.projectChbZyf.entity.ProjectChbZyf;
 import org.jeecg.modules.projectChbZyf.entity.ProjectChbZyf;
 import org.jeecg.modules.projectImportList.dto.ProjectChb;
 import org.jeecg.modules.projectImportList.dto.ProjectChb;
@@ -23,7 +24,7 @@ import java.util.*;
 /**
 /**
  * @Description: 科目编号
  * @Description: 科目编号
  * @Author: jeecg-boot
  * @Author: jeecg-boot
- * @Date:   2023-08-24
+ * @Date: 2023-08-24
  * @Version: V1.0
  * @Version: V1.0
  */
  */
 @Service
 @Service
@@ -37,6 +38,7 @@ public class KzksProjectKmbhServiceImpl extends ServiceImpl<KzksProjectKmbhMappe
 
 
     /**
     /**
      * 通过excel导入数据
      * 通过excel导入数据
+     *
      * @return
      * @return
      */
      */
     public Result<?> importExcel1(String strUrl, Class<KzksProjectKmbh> clazz) {
     public Result<?> importExcel1(String strUrl, Class<KzksProjectKmbh> clazz) {
@@ -58,9 +60,12 @@ public class KzksProjectKmbhServiceImpl extends ServiceImpl<KzksProjectKmbhMappe
 
 
             //确保年度和科目编号对应唯一一个费用类别,如果已经存在,更新对应的费用类别
             //确保年度和科目编号对应唯一一个费用类别,如果已经存在,更新对应的费用类别
             List<KzksProjectKmbh> list1 = new ArrayList<>();
             List<KzksProjectKmbh> list1 = new ArrayList<>();
-            for(KzksProjectKmbh kmbh : list){
+            for (KzksProjectKmbh kmbh : list) {
+                if (StringUtils.isEmpty(kmbh.getYear()) || StringUtils.isEmpty(kmbh.getKemuNo()) || StringUtils.isEmpty(kmbh.getMoneyType())) {
+                    continue;
+                }
                 String id = this.getByNdAndKmbh(kmbh.getYear(), kmbh.getKemuNo());//费用类别
                 String id = this.getByNdAndKmbh(kmbh.getYear(), kmbh.getKemuNo());//费用类别
-                if(id!=null) kmbhMapper.updateByNdAndKmbh(kmbh.getYear(), kmbh.getKemuNo(),kmbh.getMoneyType());
+                if (id != null) kmbhMapper.updateByNdAndKmbh(kmbh.getYear(), kmbh.getKemuNo(), kmbh.getMoneyType());
                 else list1.add(kmbh);
                 else list1.add(kmbh);
             }
             }
 
 
@@ -74,9 +79,9 @@ public class KzksProjectKmbhServiceImpl extends ServiceImpl<KzksProjectKmbhMappe
             //update-begin-author:taoyan date:20211124 for: 导入数据重复增加提示
             //update-begin-author:taoyan date:20211124 for: 导入数据重复增加提示
             String msg = e.getMessage();
             String msg = e.getMessage();
             log.error(msg, e);
             log.error(msg, e);
-            if(msg!=null && msg.indexOf("Duplicate entry")>=0){
+            if (msg != null && msg.indexOf("Duplicate entry") >= 0) {
                 return Result.error("文件导入失败:有重复数据!");
                 return Result.error("文件导入失败:有重复数据!");
-            }else{
+            } else {
                 return Result.error("文件导入失败:" + e.getMessage());
                 return Result.error("文件导入失败:" + e.getMessage());
             }
             }
             //update-end-author:taoyan date:20211124 for: 导入数据重复增加提示
             //update-end-author:taoyan date:20211124 for: 导入数据重复增加提示
@@ -89,9 +94,11 @@ public class KzksProjectKmbhServiceImpl extends ServiceImpl<KzksProjectKmbhMappe
         }
         }
     }
     }
 
 
-    /**根据年度和科目编号查询费用类别*/
-    public String getByNdAndKmbh(String nd, String kmbh){
-        return kmbhMapper.getByNdAndKmbh(nd,kmbh);
+    /**
+     * 根据年度和科目编号查询费用类别
+     */
+    public String getByNdAndKmbh(String nd, String kmbh) {
+        return kmbhMapper.getByNdAndKmbh(nd, kmbh);
     }
     }
 
 
     @Override
     @Override

+ 1 - 0
module_kzks/src/main/java/org/jeecg/modules/visibleClient/controller.java

@@ -26,6 +26,7 @@ public class controller {
     @GetMapping("start")
     @GetMapping("start")
     public Result<String> startSummary(){
     public Result<String> startSummary(){
         String url = "http://127.0.0.1:8838/prod-api/visibleServer/start";
         String url = "http://127.0.0.1:8838/prod-api/visibleServer/start";
+        //String url = "http://127.0.0.1/dev-api/visibleServer/start";
         ResponseEntity<String> forEntity = restTemplate.getForEntity(url, String.class);
         ResponseEntity<String> forEntity = restTemplate.getForEntity(url, String.class);
         String body = forEntity.getBody();
         String body = forEntity.getBody();
         Map<String, String> map = JSONObject.parseObject(body, new TypeReference<Map<String, String>>() {
         Map<String, String> map = JSONObject.parseObject(body, new TypeReference<Map<String, String>>() {