Browse Source

Merge remote-tracking branch 'origin/master'

sangwenwei 1 year ago
parent
commit
4e1919e4f6

+ 1 - 1
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/program/configuration/projectList/mapper/ProjectListMapper.java

@@ -32,7 +32,7 @@ public interface ProjectListMapper extends BaseMapper<ProgramProjectListInfo> {
     void updateStatusById(@Param("id")String id, @Param("status")String status);
 
     //@InterceptorIgnore(tenantLine = "true")
-    IPage<ProgramProjectListInfo> findPageList(Page<ProgramProjectListInfo> page, @Param(Constants.WRAPPER) QueryWrapper<ProgramProjectListInfo> wrapper,@Param("userId") String userId);
+    IPage<ProgramProjectListInfo> findPageList(Page<ProgramProjectListInfo> page, @Param(Constants.WRAPPER) QueryWrapper<ProgramProjectListInfo> wrapper,@Param("userId") String userId,@Param("archiveStatusFlag") String archiveStatusFlag);
     /**
      * 项目登记列表,和上面findPageList接口是一样的,目的时跳过findPageList mapper接口的数据规则(比如仅部门可见、仅自己可见之类的)
      */

+ 5 - 1
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/program/configuration/projectList/mapper/xml/ProjectListMapper.xml

@@ -180,7 +180,11 @@
             LEFT JOIN act_ru_task artd ON d.proc_ins_id = artd.PROC_INST_ID_
             LEFT JOIN act_ru_task art_archive ON pa.proc_ins_id = art_archive.PROC_INST_ID_
             ${ew.customSqlSegment}
-            ORDER BY a.create_by_id = #{userId} desc,a.assessment_objective='' desc, a.create_time DESC
+            ORDER BY a.create_by_id = #{userId} desc,
+            <if test="archiveStatusFlag == 1">
+                a.assessment_objective='' desc,
+            </if>
+            a.create_time DESC
     </select>
     <select id="findPageList2" resultType="com.jeeplus.assess.program.configuration.projectList.domain.ProgramProjectListInfo">
         SELECT

+ 5 - 1
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/program/configuration/projectList/service/ProjectListService.java

@@ -774,7 +774,11 @@ public class ProjectListService {
                 break;
             }
         }*/
-        IPage<ProgramProjectListInfo> pageList = projectListMapper.findPageList(page, wrapper,userId);
+        String archiveStatusFlag = "0";
+        if(StringUtils.isNotBlank(info.getArchiveStatus()) && ("5".equals(info.getArchiveStatus())  || "7".equals(info.getArchiveStatus()))){
+            archiveStatusFlag = "1";
+        }
+        IPage<ProgramProjectListInfo> pageList = projectListMapper.findPageList(page, wrapper,userId,archiveStatusFlag);
         pageList.getRecords().stream().forEach(item ->{
             // 查询关联发票的开票状态
             if (StringUtils.isNotBlank(info.getShowInvoiceFlag()) && "1".equals(info.getShowInvoiceFlag())) {

+ 1 - 1
jeeplus-modules/jeeplus-ccpm/pom.xml

@@ -149,7 +149,7 @@
     </dependencies>
 
     <build>
-        <finalName>jeeplus-centrecareful</finalName>
+        <finalName>jeeplus-ccpm</finalName>
         <plugins>
             <plugin>
                 <groupId>org.springframework.boot</groupId>

+ 4 - 4
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/controller/CwFinanceInvoiceController.java

@@ -70,7 +70,7 @@ public class CwFinanceInvoiceController {
     @GetMapping("list")
     public ResponseEntity<IPage<CwFinanceInvoiceDTO>> data(CwFinanceInvoiceDTO cwFinanceInvoiceDTO, Page<CwFinanceInvoiceDTO> page) throws Exception {
         IPage<CwFinanceInvoiceDTO> result = new Page<CwFinanceInvoiceDTO>();
-        result = cwFinanceInvoiceService.findList (page, cwFinanceInvoiceDTO);
+        result = cwFinanceInvoiceService.findList (page, cwFinanceInvoiceDTO,"");
         System.out.println("当前时间1:"+System.currentTimeMillis());
         result.getRecords().stream().forEach(i -> {
             // 发票申请
@@ -339,15 +339,15 @@ public class CwFinanceInvoiceController {
         String sheetName = options.getSheetName();
         List<CwFinanceInvoiceDTO> result = new ArrayList<>();
         if ( ExportMode.current.equals ( options.getMode() ) ) {
-            result = cwFinanceInvoiceService.findList (page,cwFinanceInvoiceDTO).getRecords();
+            result = cwFinanceInvoiceService.findList (page,cwFinanceInvoiceDTO,"export").getRecords();
         } else if (ExportMode.selected.equals ( options.getMode() )) {
-            result = cwFinanceInvoiceService.findList (page,cwFinanceInvoiceDTO).getRecords().stream ( ).filter ( item ->
+            result = cwFinanceInvoiceService.findList (page,cwFinanceInvoiceDTO,"export").getRecords().stream ( ).filter ( item ->
                     options.getSelectIds ( ).contains ( item.getId ( ) )
             ).collect ( Collectors.toList ( ) );
         } else {
             page.setSize (-1);
             page.setCurrent (0);
-            result = cwFinanceInvoiceService.findList (page,cwFinanceInvoiceDTO).getRecords();
+            result = cwFinanceInvoiceService.findList (page,cwFinanceInvoiceDTO,"export").getRecords();
         }
         EasyPoiUtil.exportExcel ( result, sheetName,  sheetName, CwFinanceInvoiceDTO.class, fileName, response );
 

+ 8 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/mapper/CwFinanceInvoiceMapper.java

@@ -18,6 +18,14 @@ import java.util.List;
 public interface CwFinanceInvoiceMapper extends BaseMapper<CwFinanceInvoice> {
 
     public IPage<CwFinanceInvoiceDTO> findList(Page<CwFinanceInvoiceDTO> page, @Param(Constants.WRAPPER) QueryWrapper<CwFinanceInvoice> queryWrapper);
+
+    /**
+     * 下载导出
+     * @param page
+     * @param queryWrapper
+     * @return
+     */
+    public IPage<CwFinanceInvoiceDTO> findExportList(Page<CwFinanceInvoiceDTO> page, @Param(Constants.WRAPPER) QueryWrapper<CwFinanceInvoice> queryWrapper);
     @InterceptorIgnore(tenantLine = "true")
     public CwFinanceInvoiceDTO queryById(@Param("id") String id);
 

+ 81 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/mapper/xml/CwFinanceInvoiceMapper.xml

@@ -52,6 +52,49 @@
             <collection property="financeInvoiceDetailDTOList" column="id" select="getFidList" ofType="com.jeeplus.finance.invoice.service.dto.CwFinanceInvoiceDetailDTO"></collection>
             <collection property="workAttachmentDtoList" ofType="com.jeeplus.sys.domain.WorkAttachmentInfo" column="id" select="getFileList"></collection>
     </resultMap>
+    <resultMap id="BaseExportResultMap" type="com.jeeplus.finance.invoice.service.dto.CwFinanceInvoiceDTO">
+            <id property="id" column="id" jdbcType="VARCHAR"/>
+            <result property="createBy.id" column="create_by_id" jdbcType="VARCHAR"/>
+            <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+            <result property="updateBy.id" column="update_by_id" jdbcType="VARCHAR"/>
+            <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
+            <result property="delFlag" column="del_flag" jdbcType="INTEGER"/>
+            <result property="remarks" column="remarks" jdbcType="VARCHAR"/>
+            <result property="type" column="type" jdbcType="VARCHAR"/>
+            <result property="no" column="no" jdbcType="VARCHAR"/>
+            <result property="billingType" column="billing_type" jdbcType="VARCHAR"/>
+            <result property="billingWorkplaceReal" column="billing_workplace_real" jdbcType="VARCHAR"/>
+            <result property="taxpayerIdentificationNo" column="taxpayer_identification_no" jdbcType="VARCHAR"/>
+            <result property="address" column="address" jdbcType="VARCHAR"/>
+            <result property="telPhone" column="tel_phone" jdbcType="VARCHAR"/>
+            <result property="openBank" column="open_bank" jdbcType="VARCHAR"/>
+            <result property="bankAccount" column="bank_account" jdbcType="VARCHAR"/>
+            <result property="name" column="name" jdbcType="VARCHAR"/>
+            <result property="receivablesType" column="receivables_type" jdbcType="VARCHAR"/>
+            <result property="billingContent" column="billing_content" jdbcType="VARCHAR"/>
+            <result property="account" column="account" jdbcType="VARCHAR"/>
+            <result property="billingContentTerms" column="billing_content_terms" jdbcType="VARCHAR"/>
+            <result property="billingPeople" column="billing_people" jdbcType="VARCHAR"/>
+            <result property="billingDate" column="billing_date" jdbcType="TIMESTAMP"/>
+            <result property="collectDate" column="collect_date" jdbcType="TIMESTAMP"/>
+            <result property="billingPeopleReal" column="billing_people_real" jdbcType="VARCHAR"/>
+            <result property="reconciliationPeople" column="reconciliation_people" jdbcType="VARCHAR"/>
+            <result property="reconciliationArea" column="reconciliation_area" jdbcType="VARCHAR"/>
+            <result property="billingWorkplaceRealId" column="billing_workplace_real_id" jdbcType="VARCHAR"/>
+            <result property="billingPeopleId" column="billing_people_id" jdbcType="VARCHAR"/>
+            <result property="status" column="status" jdbcType="VARCHAR"/>
+            <result property="procInsId" column="proc_ins_id" jdbcType="VARCHAR"/>
+            <result property="processDefinitionId" column="process_definition_id" jdbcType="VARCHAR"/>
+            <result property="receivablesStatus" column="receivables_status" jdbcType="VARCHAR"/>
+            <result property="invalidStatus" column="invalid_status" jdbcType="VARCHAR"/>
+            <result property="receivablesDate" column="receivables_date" jdbcType="TIMESTAMP"/>
+            <result property="operator" column="operator" jdbcType="VARCHAR"/>
+            <result property="operatorOffice" column="operator_office" jdbcType="VARCHAR"/>
+            <result property="invalidTaskId" column="invalid_task_id" jdbcType="VARCHAR"/>
+            <result property="taskId" column="task_id" jdbcType="VARCHAR"/>
+            <result property="isMultiple" column="is_multiple" jdbcType="VARCHAR"/>
+            <result property="billingId" column="billing_id" jdbcType="VARCHAR"/>
+    </resultMap>
 
     <resultMap id="AttachmentMap" type="com.jeeplus.sys.service.dto.WorkAttachmentInfoDTO">
         <id property="id" column="id" jdbcType="VARCHAR"/>
@@ -267,6 +310,44 @@
         fi.create_time DESC, cfid.number asc
     </select>
 
+<select id="findExportList" resultMap="BaseExportResultMap">
+        select DISTINCT a.id as 'baseId',
+        <include refid="Base_Column_List"></include>,
+        su.name as operator,
+        so.name as operator_office,
+        d.ID_ AS task_id,
+        (
+        case
+                 when a.type = '0' then (concat('其他:',a.program_name))
+                 when a.type = '1' then (select rpr.project_name from cw_project_records rpr where id = a.program_id)
+                 when a.type = '2' then (select rpr.project_name from cw_project_records rpr where id = (select project_id from cw_project_report where id = a.program_id))
+            else '' end
+        ) as programName,
+
+        (
+        case
+                 when a.type = '0' then (fi.report_type)
+                 when a.type = '1' then (select rpr.report_type from cw_project_records rpr where id = a.program_id)
+                 when a.type = '2' then (select rpr.report_type from cw_project_records rpr where id = (select project_id from cw_project_report where id = a.program_id))
+            else '' end
+        ) as reportType,
+        cfid.number as "number",
+        cfid.account as "accountDetail",
+        a.program_id,
+        a.type as 'recordType'
+        from cw_finance_invoice_base a
+        left join cw_finance_invoice fi on a.invoice_id = fi.id
+        left join cw_finance_invoice_detail cfid on cfid.invoice_id = fi.id and cfid.del_flag = '0'
+        left join sys_user su on fi.create_by_id = su.id and su.del_flag = '0'
+        left join sys_user_manage_office sumo on sumo.office_id = su.office_id
+        left join sys_office so on su.office_id = so.id and so.del_flag = '0'
+        LEFT JOIN act_ru_task d ON fi.proc_ins_id = d.PROC_INST_ID_
+        LEFT JOIN cw_project_records pr on a.program_id=pr.id
+        ${ew.customSqlSegment}
+        ORDER BY
+        fi.create_time DESC, cfid.number asc
+    </select>
+
     <select id="queryById" resultMap="BaseResultMap">
         select
         DISTINCT

+ 7 - 2
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/service/CwFinanceInvoiceService.java

@@ -98,7 +98,7 @@ public class CwFinanceInvoiceService extends ServiceImpl<CwFinanceInvoiceMapper,
         return newSearchIdList;
     }
 
-    public IPage<CwFinanceInvoiceDTO> findList(Page<CwFinanceInvoiceDTO> page, CwFinanceInvoiceDTO cwFinanceInvoiceDTO) throws Exception{
+    public IPage<CwFinanceInvoiceDTO> findList(Page<CwFinanceInvoiceDTO> page, CwFinanceInvoiceDTO cwFinanceInvoiceDTO,String export) throws Exception{
         QueryWrapper<CwFinanceInvoice> queryWrapper = QueryWrapperGenerator.buildQueryCondition ( CwFinanceInvoiceWrapper.INSTANCE.toEntity(cwFinanceInvoiceDTO), CwFinanceInvoice.class );
         queryWrapper.eq("fi.del_flag","0");
         queryWrapper.eq("a.del_flag","0");
@@ -320,7 +320,12 @@ public class CwFinanceInvoiceService extends ServiceImpl<CwFinanceInvoiceMapper,
 //                break;
 //            }
 //        }
-        IPage<CwFinanceInvoiceDTO> list = cwFinanceInvoiceMapper.findList(page, queryWrapper);
+        IPage<CwFinanceInvoiceDTO> list = null;
+        if(StringUtils.isNotBlank(export) && "export".equals(export)){
+            list = cwFinanceInvoiceMapper.findExportList(page, queryWrapper);
+        }else{
+            list = cwFinanceInvoiceMapper.findList(page, queryWrapper);
+        }
 
         return list;
     }