Browse Source

项目成本材料费详情+导出修改

丁治程 11 months ago
parent
commit
7c3740cd6e

+ 3 - 2
module_kzks/src/main/java/org/jeecg/modules/projectCostHuiji/service/impl/ProjectCostHuijiServiceImpl.java

@@ -52,6 +52,7 @@ import org.jeecg.modules.system.mapper.SysDepartMapper;
 import org.jeecg.modules.system.service.ISysUserService;
 import org.jeecg.modules.wzOutboundOrder.service.IWzOutboundOrderHService;
 import org.jeecg.modules.wzOutboundOrder.vo.WzOutboundOrderBDetailListVO;
+import org.jeecg.modules.wzOutboundOrderBNew.entity.WzOutboundOrderBNew;
 import org.jeecg.modules.wzOutboundOrderBNew.entity.WzOutboundOrderBNewExport;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
 import org.jeecgframework.poi.excel.entity.ExportParams;
@@ -392,7 +393,7 @@ public class ProjectCostHuijiServiceImpl extends ServiceImpl<ProjectCostHuijiMap
     @Override
     public ModelAndView exportZcbDetail(List<String> tasknoList, HttpServletRequest request) {
         // 材料费
-        List<WzOutboundOrderBDetailListVO> wzList = wzOutboundOrderHService.getClfListByTasknos(tasknoList);
+        List<WzOutboundOrderBNew> wzList = wzOutboundOrderHService.getClfListByTasknos(tasknoList);
         // 专用费
         List<ProjectChbZyf> zyfList = zyfService.getZYFDetailListByTasknos(tasknoList);
         // 事务费
@@ -414,7 +415,7 @@ public class ProjectCostHuijiServiceImpl extends ServiceImpl<ProjectCostHuijiMap
         return exportZcbExcel(wzList,zyfList,swfList,wxfList,rdfList,zjfList,rgfList,glfList,sxfList);
     }
 
-    private ModelAndView exportZcbExcel(List<WzOutboundOrderBDetailListVO> wzList, List<ProjectChbZyf> zyfList, List<ProjectChbSwf> swfList, List<ProjectChbWxf> wxfList, List<ProjectChbRdf> rdfList, List<ProjectChbZjf> zjfList, List<ProjectChbRgf> rgfList, List<ProjectChbGlf> glfList, List<ProjectChbSxf> sxfList) {
+    private ModelAndView exportZcbExcel(List<WzOutboundOrderBNew> wzList, List<ProjectChbZyf> zyfList, List<ProjectChbSwf> swfList, List<ProjectChbWxf> wxfList, List<ProjectChbRdf> rdfList, List<ProjectChbZjf> zjfList, List<ProjectChbRgf> rgfList, List<ProjectChbGlf> glfList, List<ProjectChbSxf> sxfList) {
         LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
         String title = "成本额明细";
 

+ 7 - 6
module_kzks/src/main/java/org/jeecg/modules/wzOutboundOrder/controller/WzOutboundOrderHController.java

@@ -23,6 +23,7 @@ import org.jeecg.modules.wzOutboundOrder.service.IWzOutboundOrderHService;
 import org.jeecg.modules.wzOutboundOrder.vo.CLFCompareResultVO;
 import org.jeecg.modules.wzOutboundOrder.vo.CLFCompareTaskResultVo;
 import org.jeecg.modules.wzOutboundOrder.vo.WzOutboundOrderBDetailListVO;
+import org.jeecg.modules.wzOutboundOrderBNew.entity.WzOutboundOrderBNew;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.servlet.ModelAndView;
@@ -69,8 +70,8 @@ public class WzOutboundOrderHController extends JeecgController<WzOutboundOrderH
     @ApiOperation(value = "项目成本——导出材料费详情excel")
     @RequestMapping(value = "/exportCLFDetail")
     public ModelAndView exportCLFDetail(String taskno) {
-        List<WzOutboundOrderBDetailListVO> list = wzOutboundOrderHService.getClfList(taskno);
-        return wzOutboundOrderHService.exportHteDetail(list, WzOutboundOrderBDetailListVO.class, "材料费详情");
+        List<WzOutboundOrderBNew> list = wzOutboundOrderHService.getClfList(taskno);
+        return wzOutboundOrderHService.exportHteDetail(list, WzOutboundOrderBNew.class, "材料费详情");
     }
 
     /**
@@ -79,8 +80,8 @@ public class WzOutboundOrderHController extends JeecgController<WzOutboundOrderH
     @ApiOperation(value = "项目成本——导出材料费详情excel汇总级()")
     @RequestMapping(value = "/exportCLFDetailByTasknos")
     public ModelAndView exportCLFDetailByTasknos(String taskno) {
-        List<WzOutboundOrderBDetailListVO> list = wzOutboundOrderHService.getClfListByTasknos(Arrays.asList(taskno.split(",")));
-        return wzOutboundOrderHService.exportHteDetail(list, WzOutboundOrderBDetailListVO.class, "材料费详情");
+        List<WzOutboundOrderBNew> list = wzOutboundOrderHService.getClfListByTasknos(Arrays.asList(taskno.split(",")));
+        return wzOutboundOrderHService.exportHteDetail(list, WzOutboundOrderBNew.class, "材料费详情");
     }
 
 
@@ -410,7 +411,7 @@ public class WzOutboundOrderHController extends JeecgController<WzOutboundOrderH
      */
     @ApiOperation(value = "项目成本——材料费详情", notes = "项目成本——材料费详情")
     @GetMapping(value = "/getCLFList")
-    public Result<List<WzOutboundOrderBDetailListVO>> getCLFList(String taskno) {
+    public Result<List<WzOutboundOrderBNew>> getCLFList(String taskno) {
         return Result.OK(wzOutboundOrderHService.getClfList(taskno));
     }
 
@@ -419,7 +420,7 @@ public class WzOutboundOrderHController extends JeecgController<WzOutboundOrderH
      */
     @ApiOperation(value = "项目成本——材料费详情(汇总级)", notes = "项目成本——材料费详情(汇总级)")
     @GetMapping(value = "/getCLFListByTasknos")
-    public Result<List<WzOutboundOrderBDetailListVO>> getCLFListByTasknos(String taskno) {
+    public Result<List<WzOutboundOrderBNew>> getCLFListByTasknos(String taskno) {
         return Result.OK(wzOutboundOrderHService.getClfListByTasknos(Arrays.asList(taskno.split(","))));
     }
 

+ 4 - 3
module_kzks/src/main/java/org/jeecg/modules/wzOutboundOrder/service/IWzOutboundOrderHService.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
 import org.jeecg.modules.wzOutboundOrder.entity.CLfCompareDO;
 import org.jeecg.modules.wzOutboundOrder.entity.WzOutboundOrderH;
 import org.jeecg.modules.wzOutboundOrder.vo.WzOutboundOrderBDetailListVO;
+import org.jeecg.modules.wzOutboundOrderBNew.entity.WzOutboundOrderBNew;
 import org.springframework.web.servlet.ModelAndView;
 
 import java.util.List;
@@ -23,18 +24,18 @@ public interface IWzOutboundOrderHService extends IService<WzOutboundOrderH> {
     /**
      * 导出材料费详情excel
      */
-    public ModelAndView exportHteDetail(List<WzOutboundOrderBDetailListVO>  exportList, Class<WzOutboundOrderBDetailListVO> clazz, String title);
+    public ModelAndView exportHteDetail(List<WzOutboundOrderBNew>  exportList, Class<WzOutboundOrderBNew> clazz, String title);
 
     /**根据任务号列表查询所有出库单号*/
     public List<WzOutboundOrderH> getCKDHByTasknos(List<String> tasknoList);
 
     List<CLfCompareDO> getCLFCompareDoListByTaskNoList(String tasknos);
 
-    List<WzOutboundOrderBDetailListVO> getClfList(String taskno);
+    List<WzOutboundOrderBNew> getClfList(String taskno);
 
     List<CLfCompareDO> getCLFCompareDoListByTaskNoListHasPcCode(String taskno,Boolean hasPcCode,Double proportion);
 
     ModelAndView compareCLFDetailListExportExcel(String tasknos);
 
-    List<WzOutboundOrderBDetailListVO> getClfListByTasknos(List<String> tasknoList);
+    List<WzOutboundOrderBNew> getClfListByTasknos(List<String> tasknoList);
 }

+ 6 - 4
module_kzks/src/main/java/org/jeecg/modules/wzOutboundOrder/service/impl/WzOutboundOrderHServiceImpl.java

@@ -15,6 +15,7 @@ import org.jeecg.modules.wzOutboundOrder.mapper.WzOutboundOrderHMapper;
 import org.jeecg.modules.wzOutboundOrder.service.IWzOutboundOrderHService;
 import org.jeecg.modules.wzOutboundOrder.vo.CLFCompareResultVO;
 import org.jeecg.modules.wzOutboundOrder.vo.WzOutboundOrderBDetailListVO;
+import org.jeecg.modules.wzOutboundOrderBNew.entity.WzOutboundOrderBNew;
 import org.jeecg.modules.wzOutboundOrderBNew.mapper.WzOutboundOrderBNewMapper;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
 import org.jeecgframework.poi.excel.entity.ExportParams;
@@ -61,7 +62,7 @@ public class WzOutboundOrderHServiceImpl extends ServiceImpl<WzOutboundOrderHMap
     /**
      * 导出材料费详情excel
      */
-    public ModelAndView exportHteDetail(List<WzOutboundOrderBDetailListVO>  exportList, Class<WzOutboundOrderBDetailListVO> clazz, String title){
+    public ModelAndView exportHteDetail(List<WzOutboundOrderBNew>  exportList, Class<WzOutboundOrderBNew> clazz, String title){
         LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
         // Step.3 AutoPoi 导出Excel
         ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
@@ -91,13 +92,14 @@ public class WzOutboundOrderHServiceImpl extends ServiceImpl<WzOutboundOrderHMap
     }
 
     @Override
-    public List<WzOutboundOrderBDetailListVO> getClfList(String taskno) {
+    public List<WzOutboundOrderBNew> getClfList(String taskno) {
         //return hMapper.getClfList(taskno); // 采集的物资数据表
-        return orderBNewMapper.getClfList(taskno); // 导入的物资数据表
+        //return orderBNewMapper.getClfList(taskno); // 导入的物资数据表
+        return orderBNewMapper.getClfList1(taskno); // 导入的物资数据表
     }
 
     @Override
-    public List<WzOutboundOrderBDetailListVO> getClfListByTasknos(List<String> tasknoList) {
+    public List<WzOutboundOrderBNew> getClfListByTasknos(List<String> tasknoList) {
         return orderBNewMapper.getClfListByTasknos(tasknoList);
     }
 

+ 0 - 3
module_kzks/src/main/java/org/jeecg/modules/wzOutboundOrderBNew/entity/WzOutboundOrderBNew.java

@@ -298,15 +298,12 @@ public class WzOutboundOrderBNew implements Serializable {
     @ApiModelProperty(value = "优先级")
     private java.lang.String yxj;
 	/**年*/
-	@Excel(name = "年", width = 15)
     @ApiModelProperty(value = "年")
     private java.lang.Integer year;
 	/**月*/
-	@Excel(name = "月", width = 15)
     @ApiModelProperty(value = "月")
     private java.lang.Integer month;
 	/**年月*/
-	@Excel(name = "年月", width = 15)
     @ApiModelProperty(value = "年月")
     private java.lang.String yearmonth;
 }

+ 2 - 1
module_kzks/src/main/java/org/jeecg/modules/wzOutboundOrderBNew/mapper/WzOutboundOrderBNewMapper.java

@@ -32,6 +32,7 @@ public interface WzOutboundOrderBNewMapper extends BaseMapper<WzOutboundOrderBNe
 
 
     List<WzOutboundOrderBDetailListVO> getClfList(@Param("taskno") String taskno);
+    List<WzOutboundOrderBNew> getClfList1(@Param("taskno") String taskno);
 
     List<CLfCompareDO> getCLFCompareDoListByTaskNoList(@Param("taskno") String taskno);
 
@@ -49,5 +50,5 @@ public interface WzOutboundOrderBNewMapper extends BaseMapper<WzOutboundOrderBNe
 
     List<WzOutboundOrderBNewExport> getClfDetailIfBoss1ByOffset(@Param("nowMonth") String nowMonth,@Param("index") Integer index,@Param("size") Integer size);
 
-    List<WzOutboundOrderBDetailListVO> getClfListByTasknos(@Param("tasknoList") List<String> tasknoList);
+    List<WzOutboundOrderBNew> getClfListByTasknos(@Param("tasknoList") List<String> tasknoList);
 }

+ 8 - 9
module_kzks/src/main/java/org/jeecg/modules/wzOutboundOrderBNew/mapper/xml/WzOutboundOrderBNewMapper.xml

@@ -17,6 +17,12 @@
         from wz_outbound_order_b_new
         where tcrwh = #{taskno}
     </select>
+
+    <select id="getClfList1" resultType="org.jeecg.modules.wzOutboundOrderBNew.entity.WzOutboundOrderBNew">
+        select *
+        from wz_outbound_order_b_new
+        where tcrwh = #{taskno}
+    </select>
     <select id="getCLFCompareDoListByTaskNoList"
             resultType="org.jeecg.modules.wzOutboundOrder.entity.CLfCompareDO">
 
@@ -112,15 +118,8 @@
         limit #{index},#{size}
     </select>
 
-    <select id="getClfListByTasknos" resultType="org.jeecg.modules.wzOutboundOrder.vo.WzOutboundOrderBDetailListVO">
-        select
-            id,
-            ckdh,
-            wzmc as wlmc,
-            wlbm,
-            cgdj,
-            nbdj,
-            sfsl as sfzsl
+    <select id="getClfListByTasknos" resultType="org.jeecg.modules.wzOutboundOrderBNew.entity.WzOutboundOrderBNew">
+        select *
         from wz_outbound_order_b_new
         where tcrwh in
         <foreach item='item' index='index' collection='tasknoList' open='(' separator=',' close=')'>

+ 12 - 12
module_kzks/src/main/java/org/jeecg/modules/wzOutboundOrderBNew/service/impl/WzOutboundOrderBNewServiceImpl.java

@@ -88,7 +88,7 @@ public class WzOutboundOrderBNewServiceImpl extends ServiceImpl<WzOutboundOrderB
     public List<WzOutboundOrderBNewExport> getClfDetailIfBoss1(String nowMonth) {
         ArrayList<WzOutboundOrderBNewExport> resultList = new ArrayList<>();
 
-        ExecutorService threadPoolExecutors = Executors.newFixedThreadPool(8);
+        ExecutorService clfThreadPoolExecutors = Executors.newFixedThreadPool(8);
 
         int wzSize = orderBNewMapper.getCountClfDetail(nowMonth);        // 当前月份一共有多少条物资数据
         log.info("开始进行分片查询,共{}条数据",wzSize);
@@ -113,7 +113,7 @@ public class WzOutboundOrderBNewServiceImpl extends ServiceImpl<WzOutboundOrderB
         try {
             if (!map.get("0").isEmpty()){
                 String[] split = map.get("0").split("-");
-                threadPoolExecutors.submit(() -> {
+                clfThreadPoolExecutors.submit(() -> {
                     List<WzOutboundOrderBNewExport> list = orderBNewMapper.getClfDetailIfBoss1ByOffset(nowMonth,Integer.parseInt(split[0]), Integer.parseInt(split[1]));
                     resultList.addAll(list);
                 });
@@ -121,7 +121,7 @@ public class WzOutboundOrderBNewServiceImpl extends ServiceImpl<WzOutboundOrderB
 
             if (!map.get("1").isEmpty()){
                 String[] split = map.get("1").split("-");
-                threadPoolExecutors.submit(() -> {
+                clfThreadPoolExecutors.submit(() -> {
                     List<WzOutboundOrderBNewExport> list = orderBNewMapper.getClfDetailIfBoss1ByOffset(nowMonth,Integer.parseInt(split[0]), Integer.parseInt(split[1]));
                     resultList.addAll(list);
                 });
@@ -129,7 +129,7 @@ public class WzOutboundOrderBNewServiceImpl extends ServiceImpl<WzOutboundOrderB
 
             if (!map.get("2").isEmpty()){
                 String[] split = map.get("2").split("-");
-                threadPoolExecutors.submit(() -> {
+                clfThreadPoolExecutors.submit(() -> {
                     List<WzOutboundOrderBNewExport> list = orderBNewMapper.getClfDetailIfBoss1ByOffset(nowMonth,Integer.parseInt(split[0]), Integer.parseInt(split[1]));
                     resultList.addAll(list);
                 });
@@ -137,7 +137,7 @@ public class WzOutboundOrderBNewServiceImpl extends ServiceImpl<WzOutboundOrderB
 
             if (!map.get("3").isEmpty()){
                 String[] split = map.get("3").split("-");
-                threadPoolExecutors.submit(() -> {
+                clfThreadPoolExecutors.submit(() -> {
                     List<WzOutboundOrderBNewExport> list = orderBNewMapper.getClfDetailIfBoss1ByOffset(nowMonth,Integer.parseInt(split[0]), Integer.parseInt(split[1]));
                     resultList.addAll(list);
                 });
@@ -145,7 +145,7 @@ public class WzOutboundOrderBNewServiceImpl extends ServiceImpl<WzOutboundOrderB
 
             if (!map.get("4").isEmpty()){
                 String[] split = map.get("4").split("-");
-                threadPoolExecutors.submit(() -> {
+                clfThreadPoolExecutors.submit(() -> {
                     List<WzOutboundOrderBNewExport> list = orderBNewMapper.getClfDetailIfBoss1ByOffset(nowMonth,Integer.parseInt(split[0]), Integer.parseInt(split[1]));
                     resultList.addAll(list);
                 });
@@ -153,7 +153,7 @@ public class WzOutboundOrderBNewServiceImpl extends ServiceImpl<WzOutboundOrderB
 
             if (!map.get("5").isEmpty()){
                 String[] split = map.get("5").split("-");
-                threadPoolExecutors.submit(() -> {
+                clfThreadPoolExecutors.submit(() -> {
                     List<WzOutboundOrderBNewExport> list = orderBNewMapper.getClfDetailIfBoss1ByOffset(nowMonth,Integer.parseInt(split[0]), Integer.parseInt(split[1]));
                     resultList.addAll(list);
                 });
@@ -161,7 +161,7 @@ public class WzOutboundOrderBNewServiceImpl extends ServiceImpl<WzOutboundOrderB
 
             if (!map.get("6").isEmpty()){
                 String[] split = map.get("6").split("-");
-                threadPoolExecutors.submit(() -> {
+                clfThreadPoolExecutors.submit(() -> {
                     List<WzOutboundOrderBNewExport> list = orderBNewMapper.getClfDetailIfBoss1ByOffset(nowMonth,Integer.parseInt(split[0]), Integer.parseInt(split[1]));
                     resultList.addAll(list);
                 });
@@ -169,19 +169,19 @@ public class WzOutboundOrderBNewServiceImpl extends ServiceImpl<WzOutboundOrderB
 
             if (!map.get("7").isEmpty()){
                 String[] split = map.get("7").split("-");
-                threadPoolExecutors.submit(() -> {
+                clfThreadPoolExecutors.submit(() -> {
                     List<WzOutboundOrderBNewExport> list = orderBNewMapper.getClfDetailIfBoss1ByOffset(nowMonth,Integer.parseInt(split[0]), Integer.parseInt(split[1]));
                     resultList.addAll(list);
                 });
             }
 
-            threadPoolExecutors.shutdown();
-            boolean b = threadPoolExecutors.awaitTermination(5, TimeUnit.HOURS);
+            clfThreadPoolExecutors.shutdown();
+            boolean b = clfThreadPoolExecutors.awaitTermination(5, TimeUnit.HOURS);
             log.info("查询结束");
         } catch (Exception e) {
             throw new RuntimeException(e);
         } finally {
-            threadPoolExecutors.shutdown();
+            clfThreadPoolExecutors.shutdown();
         }
 
         return resultList;