Browse Source

下达部门指标排行合同额已收款导出修改+项目成本总成本导出+项目成本材料费相关

丁治程 11 months ago
parent
commit
00dd56e84e

+ 2 - 2
module_kzks/src/main/java/org/jeecg/modules/Index/service/impl/IndexNewServiceImpl.java

@@ -1221,7 +1221,7 @@ public class IndexNewServiceImpl implements IndexNewServer {
         ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
         //此处设置的filename无效 ,前端会重更新设置一下
         mv.addObject(NormalExcelConstants.FILE_NAME, title);
-        mv.addObject(NormalExcelConstants.CLASS, IndexKpiDetail.class);
+        mv.addObject(NormalExcelConstants.CLASS, ComContractInfoExchangeNewHTEVO.class);
         //update-begin--Author:liusq  Date:20210126 for:图片导出报错,ImageBasePath未设置--------------------
         ExportParams exportParams=new ExportParams(title + "报表", "导出人:" + sysUser.getRealname(), title);
         exportParams.setImageBasePath(upLoadPath);
@@ -1244,7 +1244,7 @@ public class IndexNewServiceImpl implements IndexNewServer {
         ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
         //此处设置的filename无效 ,前端会重更新设置一下
         mv.addObject(NormalExcelConstants.FILE_NAME, title);
-        mv.addObject(NormalExcelConstants.CLASS, IndexKpiDetail.class);
+        mv.addObject(NormalExcelConstants.CLASS, ComContractInfoExchangeNewYSKVO.class);
         //update-begin--Author:liusq  Date:20210126 for:图片导出报错,ImageBasePath未设置--------------------
         ExportParams exportParams=new ExportParams(title + "报表", "导出人:" + sysUser.getRealname(), title);
         exportParams.setImageBasePath(upLoadPath);

+ 14 - 0
module_kzks/src/main/java/org/jeecg/modules/projectCostHuiji/controller/ProjectCostHuijiController.java

@@ -525,4 +525,18 @@ public class ProjectCostHuijiController extends JeecgController<ProjectCostHuiji
         return projectCostHuijiService.exportXlsProjectCost(request, projectCostHuiji, ProjectCostHuiji.class, "项目成本表", isFolding);
     }
 
+    /**
+    *   author: dzc
+    *   version: 1.0
+    *   des: 总成本导出
+    *   date: 2024/6/24
+    */
+    @ApiOperation(value="项目成本汇总级总成本导出excel")
+    @RequestMapping(value = "/exportZcbXls")
+    public ModelAndView exportZcbXls(@RequestParam(required = false) String tasknos,HttpServletRequest request) {
+        //return indexNewServer.exportCbeDetail(departNameList,request, WzOutboundOrderBNew.class, "成本额详情");
+        return projectCostHuijiService.exportZcbDetail(Arrays.asList(tasknos.split(",")),request);
+    }
+
+
 }

+ 2 - 1
module_kzks/src/main/java/org/jeecg/modules/projectCostHuiji/service/IProjectCostHuijiService.java

@@ -59,4 +59,5 @@ public interface IProjectCostHuijiService extends IService<ProjectCostHuiji> {
      */
     public ModelAndView exportXlsProjectCost(HttpServletRequest request, ProjectCostHuiji projectCostHuiji, Class<ProjectCostHuiji> clazz, String title, String isFolding);
 
-    }
+    ModelAndView exportZcbDetail(List<String> tasknoList, HttpServletRequest request);
+}

+ 162 - 0
module_kzks/src/main/java/org/jeecg/modules/projectCostHuiji/service/impl/ProjectCostHuijiServiceImpl.java

@@ -22,6 +22,23 @@ import org.jeecg.modules.costModelProductPrice.mapper.KzksCostModelProductPriceM
 import org.jeecg.modules.costModelXmxqCl.entity.CostModelXmxqCl;
 import org.jeecg.modules.dataSourceSwitch.annotation.TargetDataSource;
 import org.jeecg.modules.dataSourceSwitch.enums.DataSourceType;
+import org.jeecg.modules.projectChbGlf.entity.ProjectChbGlf;
+import org.jeecg.modules.projectChbGlf.service.IKzksProjectChbGlfService;
+import org.jeecg.modules.projectChbRdf.entity.ProjectChbRdf;
+import org.jeecg.modules.projectChbRdf.service.IKzksProjectChbRdfService;
+import org.jeecg.modules.projectChbRgf.entity.ProjectChbRgf;
+import org.jeecg.modules.projectChbRgf.service.IKzksProjectChbRgfService;
+import org.jeecg.modules.projectChbSwf.entity.ProjectChbSwf;
+import org.jeecg.modules.projectChbSwf.service.IProjectChbSwfService;
+import org.jeecg.modules.projectChbSxf.entity.ProjectChbSxf;
+import org.jeecg.modules.projectChbSxf.service.IProjectChbSxfService;
+import org.jeecg.modules.projectChbWxf.entity.ProjectChbWxf;
+import org.jeecg.modules.projectChbWxf.service.IProjectChbWxfService;
+import org.jeecg.modules.projectChbZjf.entity.ProjectChbZjf;
+import org.jeecg.modules.projectChbZjf.service.IKzksProjectChbZjfService;
+import org.jeecg.modules.projectChbZyf.entity.ProjectChbZyf;
+import org.jeecg.modules.projectChbZyf.entity.ProjectChbZyfExpoet;
+import org.jeecg.modules.projectChbZyf.service.IProjectChbZyfService;
 import org.jeecg.modules.projectCost.entity.ProjectCost;
 import org.jeecg.modules.projectCost.entity.ProjectCostSumVo;
 import org.jeecg.modules.projectCost.vo.ProjectCostVO;
@@ -33,10 +50,14 @@ import org.jeecg.modules.projectCostHuiji.vo.ProjectCostHuijiExportVO;
 import org.jeecg.modules.projectCostHuiji.vo.ProjectCostHuijiListVO;
 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.WzOutboundOrderBNewExport;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
 import org.jeecgframework.poi.excel.entity.ExportParams;
 import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -56,6 +77,7 @@ import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.stream.Collectors;
 import java.util.stream.IntStream;
+import java.util.stream.Stream;
 
 /**
  * @Description: 项目成本汇集表
@@ -84,6 +106,44 @@ public class ProjectCostHuijiServiceImpl extends ServiceImpl<ProjectCostHuijiMap
     @Autowired
     private RedisUtil redisUtil;
 
+    @Autowired
+    private IWzOutboundOrderHService wzOutboundOrderHService;
+
+    @Autowired
+    @SuppressWarnings("all")
+    private IProjectChbZyfService zyfService;
+
+    @Autowired
+    @SuppressWarnings("all")
+    private IKzksProjectChbZjfService zjfService;
+
+    @Autowired
+    @SuppressWarnings("all")
+    private IProjectChbWxfService wxfService;
+
+    @Autowired
+    @SuppressWarnings("all")
+    private IProjectChbSxfService sxfService;
+
+    @Autowired
+    @SuppressWarnings("all")
+    private IProjectChbSwfService swfService;
+
+    @Autowired
+    @SuppressWarnings("all")
+    private IKzksProjectChbRdfService rdfService;
+
+    @Autowired
+    @SuppressWarnings("all")
+    private IKzksProjectChbRgfService rgfService;
+
+    @Autowired
+    @SuppressWarnings("all")
+    private IKzksProjectChbGlfService glfService;
+
+    @Value("${jeecg.path.upload}")
+    private String upLoadPath;
+
 
     /**
      * 分页查询
@@ -327,4 +387,106 @@ public class ProjectCostHuijiServiceImpl extends ServiceImpl<ProjectCostHuijiMap
         return mv;
 
     }
+
+
+    @Override
+    public ModelAndView exportZcbDetail(List<String> tasknoList, HttpServletRequest request) {
+        // 材料费
+        List<WzOutboundOrderBDetailListVO> wzList = wzOutboundOrderHService.getClfListByTasknos(tasknoList);
+        // 专用费
+        List<ProjectChbZyf> zyfList = zyfService.getZYFDetailListByTasknos(tasknoList);
+        // 事务费
+        List<ProjectChbSwf> swfList = swfService.getSWFDetailListByTasknos(tasknoList);
+        // 外协费
+        List<ProjectChbWxf> wxfList = wxfService.getWXFDetailListByTasknos(tasknoList);
+        // 燃料动力费
+        List<ProjectChbRdf> rdfList = rdfService.getRDFDetailListByTasknos(tasknoList);
+        // 折旧费
+        List<ProjectChbZjf> zjfList = zjfService.getZJFDetailListByTasknos(tasknoList);
+        // 工资及劳务费
+        List<ProjectChbRgf> rgfList = rgfService.getRGFDetailListByTasknos(tasknoList);
+        // 管理费
+        List<ProjectChbGlf> glfList = glfService.getGLFDetailListByTasknos(tasknoList);
+        // 筛选费
+        List<ProjectChbSxf> sxfList = sxfService.getSXFDetailListByTasknos(tasknoList);
+
+        // 调用导出excel的方法 一个费用一个sheet
+        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) {
+        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+        String title = "成本额明细";
+
+        Map<String, Object> sheet1Map = new HashMap<>();
+        sheet1Map.put(NormalExcelConstants.CLASS, WzOutboundOrderBNewExport.class);
+        ExportParams exportParam1=new ExportParams(  "材料费报表", "导出人:" + sysUser.getRealname(), "材料费");
+        exportParam1.setImageBasePath(upLoadPath);
+        sheet1Map.put(NormalExcelConstants.PARAMS,exportParam1);
+        sheet1Map.put(NormalExcelConstants.DATA_LIST,wzList);
+
+        Map<String, Object> sheet2Map = new HashMap<>();
+        sheet2Map.put(NormalExcelConstants.CLASS, ProjectChbZyfExpoet.class);
+        ExportParams exportParam2=new ExportParams(  "专用费报表", "导出人:" + sysUser.getRealname(), "专用费");
+        exportParam2.setImageBasePath(upLoadPath);
+        sheet2Map.put(NormalExcelConstants.PARAMS,exportParam2);
+        sheet2Map.put(NormalExcelConstants.DATA_LIST,zyfList);
+
+        Map<String, Object> sheet3Map = new HashMap<>();
+        sheet3Map.put(NormalExcelConstants.CLASS,ProjectChbZyfExpoet.class);
+        ExportParams exportParam3=new ExportParams(  "事务费报表", "导出人:" + sysUser.getRealname(), "事务费");
+        exportParam3.setImageBasePath(upLoadPath);
+        sheet3Map.put(NormalExcelConstants.PARAMS,exportParam3);
+        sheet3Map.put(NormalExcelConstants.DATA_LIST,swfList);
+
+        Map<String, Object> sheet4Map = new HashMap<>();
+        sheet4Map.put(NormalExcelConstants.CLASS,ProjectChbZyfExpoet.class);
+        ExportParams exportParam4=new ExportParams(  "外协费报表", "导出人:" + sysUser.getRealname(), "外协费");
+        exportParam4.setImageBasePath(upLoadPath);
+        sheet4Map.put(NormalExcelConstants.PARAMS,exportParam4);
+        sheet4Map.put(NormalExcelConstants.DATA_LIST,wxfList);
+
+        Map<String, Object> sheet5Map = new HashMap<>();
+        sheet5Map.put(NormalExcelConstants.CLASS,ProjectChbZyfExpoet.class);
+        ExportParams exportParam5=new ExportParams(  "燃料动力费报表", "导出人:" + sysUser.getRealname(), "燃料动力费");
+        exportParam5.setImageBasePath(upLoadPath);
+        sheet5Map.put(NormalExcelConstants.PARAMS,exportParam5);
+        sheet5Map.put(NormalExcelConstants.DATA_LIST,rdfList);
+
+        Map<String, Object> sheet6Map = new HashMap<>();
+        sheet6Map.put(NormalExcelConstants.CLASS,ProjectChbZyfExpoet.class);
+        ExportParams exportParam6=new ExportParams(  "固定资产折旧费报表", "导出人:" + sysUser.getRealname(), "固定资产折旧费");
+        exportParam6.setImageBasePath(upLoadPath);
+        sheet6Map.put(NormalExcelConstants.PARAMS,exportParam6);
+        sheet6Map.put(NormalExcelConstants.DATA_LIST,zjfList);
+
+        Map<String, Object> sheet7Map = new HashMap<>();
+        sheet7Map.put(NormalExcelConstants.CLASS,ProjectChbZyfExpoet.class);
+        ExportParams exportParam7=new ExportParams(  "工资及劳务费报表", "导出人:" + sysUser.getRealname(), "工资及劳务费");
+        exportParam7.setImageBasePath(upLoadPath);
+        sheet7Map.put(NormalExcelConstants.PARAMS,exportParam7);
+        sheet7Map.put(NormalExcelConstants.DATA_LIST,rgfList);
+
+        Map<String, Object> sheet8Map = new HashMap<>();
+        sheet8Map.put(NormalExcelConstants.CLASS,ProjectChbZyfExpoet.class);
+        ExportParams exportParam8=new ExportParams(  "管理费报表", "导出人:" + sysUser.getRealname(), "管理费");
+        exportParam8.setImageBasePath(upLoadPath);
+        sheet8Map.put(NormalExcelConstants.PARAMS,exportParam8);
+        sheet8Map.put(NormalExcelConstants.DATA_LIST,glfList);
+
+        Map<String, Object> sheet9Map = new HashMap<>();
+        sheet9Map.put(NormalExcelConstants.CLASS,ProjectChbZyfExpoet.class);
+        ExportParams exportParam9=new ExportParams(  "筛选费报表", "导出人:" + sysUser.getRealname(), "筛选费");
+        exportParam9.setImageBasePath(upLoadPath);
+        sheet9Map.put(NormalExcelConstants.PARAMS,exportParam9);
+        sheet9Map.put(NormalExcelConstants.DATA_LIST,sxfList);
+
+        List<Map<String, Object>> sheetList = Stream.of(sheet1Map, sheet2Map, sheet3Map, sheet4Map, sheet5Map, sheet6Map, sheet7Map, sheet8Map, sheet9Map).collect(Collectors.toList());
+
+        ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+        mv.addObject(NormalExcelConstants.FILE_NAME,title);
+        mv.addObject(NormalExcelConstants.MAP_LIST,sheetList);
+
+        return mv;
+    }
 }

+ 21 - 0
module_kzks/src/main/java/org/jeecg/modules/wzOutboundOrder/controller/WzOutboundOrderHController.java

@@ -73,6 +73,18 @@ public class WzOutboundOrderHController extends JeecgController<WzOutboundOrderH
         return wzOutboundOrderHService.exportHteDetail(list, WzOutboundOrderBDetailListVO.class, "材料费详情");
     }
 
+    /**
+     * 导出材料费详情excel
+     */
+    @ApiOperation(value = "项目成本——导出材料费详情excel汇总级()")
+    @RequestMapping(value = "/exportCLFDetailByTasknos")
+    public ModelAndView exportCLFDetailByTasknos(String tasknos) {
+        List<WzOutboundOrderBDetailListVO> list = getCLFListByTasknos(tasknos);
+        return wzOutboundOrderHService.exportHteDetail(list, WzOutboundOrderBDetailListVO.class, "材料费详情");
+    }
+
+
+
 
     @ApiOperation(value = "项目成本——材料费详情对比", notes = "项目成本——材料费详情对比")
     @GetMapping(value = "/compareCLFDetailListExportExcel")
@@ -403,6 +415,15 @@ public class WzOutboundOrderHController extends JeecgController<WzOutboundOrderH
     }
 
     /**
+     * 材料费详情
+     */
+    @ApiOperation(value = "项目成本——材料费详情(汇总级)", notes = "项目成本——材料费详情(汇总级)")
+    @GetMapping(value = "/getCLFListByTasknos")
+    public List<WzOutboundOrderBDetailListVO> getCLFListByTasknos(String tasknos) {
+        return wzOutboundOrderHService.getClfListByTasknos(Arrays.asList(tasknos.split(",")));
+    }
+
+    /**
      * 分页列表查询
      *
      * @param wzOutboundOrderH

+ 2 - 0
module_kzks/src/main/java/org/jeecg/modules/wzOutboundOrder/service/IWzOutboundOrderHService.java

@@ -35,4 +35,6 @@ public interface IWzOutboundOrderHService extends IService<WzOutboundOrderH> {
     List<CLfCompareDO> getCLFCompareDoListByTaskNoListHasPcCode(String taskno,Boolean hasPcCode,Double proportion);
 
     ModelAndView compareCLFDetailListExportExcel(String tasknos);
+
+    List<WzOutboundOrderBDetailListVO> getClfListByTasknos(List<String> tasknoList);
 }

+ 5 - 0
module_kzks/src/main/java/org/jeecg/modules/wzOutboundOrder/service/impl/WzOutboundOrderHServiceImpl.java

@@ -97,6 +97,11 @@ public class WzOutboundOrderHServiceImpl extends ServiceImpl<WzOutboundOrderHMap
     }
 
     @Override
+    public List<WzOutboundOrderBDetailListVO> getClfListByTasknos(List<String> tasknoList) {
+        return orderBNewMapper.getClfListByTasknos(tasknoList);
+    }
+
+    @Override
     public List<CLfCompareDO> getCLFCompareDoListByTaskNoListHasPcCode(String taskno,Boolean hasPcCode,Double proportion) {
         //return hMapper.getCLFCompareDoListByTaskNoListHasPcCode(taskno,hasPcCode,proportion);
         return orderBNewMapper.getCLFCompareDoListByTaskNoListHasPcCode(taskno,hasPcCode,proportion);

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

@@ -48,4 +48,6 @@ public interface WzOutboundOrderBNewMapper extends BaseMapper<WzOutboundOrderBNe
     int getCountClfDetail(@Param("nowMonth") String nowMonth);
 
     List<WzOutboundOrderBNewExport> getClfDetailIfBoss1ByOffset(@Param("nowMonth") String nowMonth,@Param("index") Integer index,@Param("size") Integer size);
+
+    List<WzOutboundOrderBDetailListVO> getClfListByTasknos(@Param("tasknoList") List<String> tasknoList);
 }

+ 16 - 0
module_kzks/src/main/java/org/jeecg/modules/wzOutboundOrderBNew/mapper/xml/WzOutboundOrderBNewMapper.xml

@@ -111,4 +111,20 @@
         select * from wz_outbound_order_b_new where yearmonth = #{nowMonth}
         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
+        from wz_outbound_order_b_new
+        where tcrwh in
+        <foreach item='item' index='index' collection='tasknoList' open='(' separator=',' close=')'>
+            #{item}
+        </foreach>
+    </select>
 </mapper>