Browse Source

归档调整

user5 1 year ago
parent
commit
37e122bc34
11 changed files with 217 additions and 5 deletions
  1. 1 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/CwProjectInfoMapper.java
  2. 1 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/CwProjectReportMapper.java
  3. 10 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReportArchive/mapper/CwProjectReportArchiveMapper.java
  4. 57 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReportArchive/mapper/xml/CwProjectReportArchiveMapper.xml
  5. 6 1
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReportArchive/service/CwProjectReportArchiveService.java
  6. 11 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/reportCancellApply/mapper/ReportCancellApplyMapper.java
  7. 24 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/reportCancellApply/mapper/xml/ReportCancellApplyMapper.xml
  8. 13 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/reportCancellApplyArchived/mapper/ReportCancellApplyArchivedMapper.java
  9. 90 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/reportCancellApplyArchived/mapper/xml/ReportCancellApplyArchivedMapper.xml
  10. 3 3
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/reportCancellApplyArchived/service/ReportCancellApplyArchivedService.java
  11. 1 1
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/OfficeController.java

+ 1 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/CwProjectInfoMapper.java

@@ -45,6 +45,7 @@ public interface CwProjectInfoMapper extends BaseMapper<CwProjectInfoData> {
      */
      */
     String selectReportNumberByProjectNo(String projectNo);
     String selectReportNumberByProjectNo(String projectNo);
 
 
+    @InterceptorIgnore(tenantLine = "true")
     CwProjectInfoData getById(String id);
     CwProjectInfoData getById(String id);
 
 
     /**
     /**

+ 1 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/CwProjectReportMapper.java

@@ -154,6 +154,7 @@ public interface CwProjectReportMapper extends BaseMapper<CwProjectReport> {
     @InterceptorIgnore(tenantLine = "true")
     @InterceptorIgnore(tenantLine = "true")
     List<WorkAttachmentDto> findDtos(@Param("id") String id);
     List<WorkAttachmentDto> findDtos(@Param("id") String id);
 
 
+    @InterceptorIgnore(tenantLine = "true")
     CwProjectReport getByNewLineId(String reportId);
     CwProjectReport getByNewLineId(String reportId);
 
 
     /**
     /**

+ 10 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReportArchive/mapper/CwProjectReportArchiveMapper.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Constants;
 import com.baomidou.mybatisplus.core.toolkit.Constants;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.finance.invoice.domain.CwFinanceInvoice;
 import com.jeeplus.finance.projectReportArchive.domain.CwProjectReportArchive;
 import com.jeeplus.finance.projectReportArchive.domain.CwProjectReportArchive;
 import com.jeeplus.finance.projectReportArchive.service.dto.CwProjectReportArchiveDTO;
 import com.jeeplus.finance.projectReportArchive.service.dto.CwProjectReportArchiveDTO;
 import com.jeeplus.finance.projectReportArchive.service.dto.ReportDTO;
 import com.jeeplus.finance.projectReportArchive.service.dto.ReportDTO;
@@ -18,6 +19,7 @@ public interface CwProjectReportArchiveMapper extends BaseMapper<CwProjectReport
     @InterceptorIgnore(tenantLine = "true")
     @InterceptorIgnore(tenantLine = "true")
     IPage<CwProjectReportArchiveDTO> findList(Page<CwProjectReportArchiveDTO> page, @Param("currentUser") UserDTO currentUser, @Param("isBmzr") String isBmzr, @Param("officeIds") String officeIds, @Param(Constants.WRAPPER) QueryWrapper<CwProjectReportArchive> queryWrapper, @Param("sta") String sta);
     IPage<CwProjectReportArchiveDTO> findList(Page<CwProjectReportArchiveDTO> page, @Param("currentUser") UserDTO currentUser, @Param("isBmzr") String isBmzr, @Param("officeIds") String officeIds, @Param(Constants.WRAPPER) QueryWrapper<CwProjectReportArchive> queryWrapper, @Param("sta") String sta);
 
 
+    @InterceptorIgnore(tenantLine = "true")
     CwProjectReportArchiveDTO queryById(@Param("id") String id);
     CwProjectReportArchiveDTO queryById(@Param("id") String id);
 
 
     IPage<ReportDTO> findReportList(Page<ReportDTO> page, @Param(Constants.WRAPPER) QueryWrapper<ReportDTO> queryWrapper);
     IPage<ReportDTO> findReportList(Page<ReportDTO> page, @Param(Constants.WRAPPER) QueryWrapper<ReportDTO> queryWrapper);
@@ -28,6 +30,14 @@ public interface CwProjectReportArchiveMapper extends BaseMapper<CwProjectReport
      * @return
      * @return
      */
      */
     CwProjectReportArchiveDTO queryByReportId(@Param("reportId") String reportId);
     CwProjectReportArchiveDTO queryByReportId(@Param("reportId") String reportId);
+
+
+    /**
+     * 修改归档信息
+     * @param cwProjectReportArchive
+     */
+    @InterceptorIgnore(tenantLine = "true")
+    void updateInfoById(CwProjectReportArchive cwProjectReportArchive);
 }
 }
 
 
 
 

+ 57 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReportArchive/mapper/xml/CwProjectReportArchiveMapper.xml

@@ -354,4 +354,61 @@
         from cw_project_report_archive cw_pa
         from cw_project_report_archive cw_pa
         where cw_pa.del_flag = '0' and cw_pa.report_id = #{reportId}
         where cw_pa.del_flag = '0' and cw_pa.report_id = #{reportId}
     </select>
     </select>
+
+    <update id="updateInfoById">
+        update
+          cw_project_report_archive
+        set
+        <if test="remarks != null and remarks != ''">
+            remarks = #{remarks},
+        </if>
+        <if test="projectId != null and projectId != ''">
+            project_id = #{projectId},
+        </if>
+        <if test="name != null and name != ''">
+            name = #{name},
+        </if>
+        <if test="auditedUnits != null and auditedUnits != ''">
+            audited_units = #{auditedUnits},
+        </if>
+        <if test="reportNum != null and reportNum != ''">
+            report_num = #{reportNum},
+        </if>
+        <if test="papersNum != null and papersNum != ''">
+            papers_num = #{papersNum},
+        </if>
+        <if test="year != null and year != ''">
+            year = #{year},
+        </if>
+        <if test="number != null and number != ''">
+            number = #{number},
+        </if>
+        <if test="isNumber != null and isNumber != ''">
+            is_number = #{isNumber},
+        </if>
+        <if test="auditDate != null">
+            audit_date = #{auditDate},
+        </if>
+        <if test="procInsId != null and procInsId != ''">
+            proc_ins_id = #{procInsId},
+        </if>
+        <if test="processDefinitionId != null and processDefinitionId != ''">
+            process_definition_id = #{processDefinitionId},
+        </if>
+        <if test="status != null and status != ''">
+            status = #{status},
+        </if>
+        <if test="fileNumber != null and fileNumber != ''">
+            file_number = #{fileNumber},
+        </if>
+        <if test="reportId != null and reportId != ''">
+            report_id = #{reportId},
+        </if>
+        <if test="reportRemarks != null and reportRemarks != ''">
+            report_remarks = #{reportRemarks},
+        </if>
+        update_by_id = #{updateById},
+        update_time = #{updateTime}
+        where id = #{id} ;
+    </update>
 </mapper>
 </mapper>

+ 6 - 1
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReportArchive/service/CwProjectReportArchiveService.java

@@ -321,7 +321,12 @@ public class CwProjectReportArchiveService extends ServiceImpl<CwProjectReportAr
                 cwProjectReportArchive.setFileNumber(fileNumber);
                 cwProjectReportArchive.setFileNumber(fileNumber);
             }
             }
         }
         }
-        this.saveOrUpdate(cwProjectReportArchive);
+        if(StringUtils.isNotBlank(cwProjectReportArchive.getId())){ //修改
+            cwProjectReportArchiveMapper.updateInfoById(cwProjectReportArchive);
+        }else{  //新增
+            cwProjectReportArchiveMapper.insert(cwProjectReportArchive);
+        }
+        //this.saveOrUpdate(cwProjectReportArchive);
         if (ObjectUtil.isNotEmpty(cwProjectReportArchiveDTO)) {
         if (ObjectUtil.isNotEmpty(cwProjectReportArchiveDTO)) {
             // 附件
             // 附件
             ossServiceMapper.delete(new QueryWrapper<WorkAttachment>().lambda().eq(WorkAttachment::getAttachmentId, cwProjectReportArchive.getId()));
             ossServiceMapper.delete(new QueryWrapper<WorkAttachment>().lambda().eq(WorkAttachment::getAttachmentId, cwProjectReportArchive.getId()));

+ 11 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/reportCancellApply/mapper/ReportCancellApplyMapper.java

@@ -1,5 +1,6 @@
 package com.jeeplus.finance.reportCancellApply.mapper;
 package com.jeeplus.finance.reportCancellApply.mapper;
 
 
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -36,7 +37,17 @@ public interface ReportCancellApplyMapper extends BaseMapper<ReportCancellApply>
      */
      */
     IPage<ReportInfoDto> findList(Page<ReportInfoDto> page, @Param(Constants.WRAPPER) QueryWrapper<ReportInfoDto> queryWrapper);
     IPage<ReportInfoDto> findList(Page<ReportInfoDto> page, @Param(Constants.WRAPPER) QueryWrapper<ReportInfoDto> queryWrapper);
 
 
+    @InterceptorIgnore(tenantLine = "true")
     ReportCancellApply selectByArchivedId(String id);
     ReportCancellApply selectByArchivedId(String id);
 
 
+
     String queryReportIdByReportNo(String no);
     String queryReportIdByReportNo(String no);
+
+    /**
+     * 根据id查询信息
+     * @param id
+     * @return
+     */
+    @InterceptorIgnore(tenantLine = "true")
+    ReportCancellApply getById(String id);
 }
 }

+ 24 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/reportCancellApply/mapper/xml/ReportCancellApplyMapper.xml

@@ -116,4 +116,28 @@
         select report_id
         select report_id
         from cw_project_report_new_line where report_no = #{no}
         from cw_project_report_new_line where report_no = #{no}
     </select>
     </select>
+
+    <select id="getById" resultType="com.jeeplus.finance.reportCancellApply.domain.ReportCancellApply">
+        select
+          id,
+          create_by_id,
+          create_time,
+          update_by_id,
+          update_time,
+          del_flag,
+          remarks,
+          report_new_line_id,
+          cancellate_reason,
+          report_no,
+          proc_ins_id,
+          status,
+          process_definition_id,
+          apply_file_type,
+          tenant_id
+        from
+          cw_project_report_cancell_apply
+        WHERE
+            id =#{id}
+            AND del_flag =0
+    </select>
 </mapper>
 </mapper>

+ 13 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/reportCancellApplyArchived/mapper/ReportCancellApplyArchivedMapper.java

@@ -1,5 +1,6 @@
 package com.jeeplus.finance.reportCancellApplyArchived.mapper;
 package com.jeeplus.finance.reportCancellApplyArchived.mapper;
 
 
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -40,14 +41,17 @@ public interface ReportCancellApplyArchivedMapper extends BaseMapper<CwProjectRe
     /**
     /**
      * 根据attachmentId删除上传文件信息
      * 根据attachmentId删除上传文件信息
      */
      */
+    @InterceptorIgnore(tenantLine = "true")
     void deleteFileInfo(String attachmentId);
     void deleteFileInfo(String attachmentId);
 
 
     List<WorkAttachment> findList(@Param("id") String id);
     List<WorkAttachment> findList(@Param("id") String id);
 
 
     Integer findIsExit(@Param("id") String id, @Param("name")String name);
     Integer findIsExit(@Param("id") String id, @Param("name")String name);
 
 
+    @InterceptorIgnore(tenantLine = "true")
     void updateArchiveStyle(@Param("id") String id, @Param("status")String status);
     void updateArchiveStyle(@Param("id") String id, @Param("status")String status);
 
 
+    @InterceptorIgnore(tenantLine = "true")
     List<CwWorkAttachmentArchiveDto> selectFileInfoByAttid(String id);
     List<CwWorkAttachmentArchiveDto> selectFileInfoByAttid(String id);
 
 
     CwProjectReportApplyArchive selectByArchiveId(String id);
     CwProjectReportApplyArchive selectByArchiveId(String id);
@@ -58,6 +62,7 @@ public interface ReportCancellApplyArchivedMapper extends BaseMapper<CwProjectRe
      */
      */
     CwProjectRecordsDTO selectProjectInfo(String id);
     CwProjectRecordsDTO selectProjectInfo(String id);
 
 
+    @InterceptorIgnore(tenantLine = "true")
     UserDTO getUserInfo(String userId);
     UserDTO getUserInfo(String userId);
 
 
     void updateCancellArchiveType(@Param("status")String status,@Param("id")String id);
     void updateCancellArchiveType(@Param("status")String status,@Param("id")String id);
@@ -82,7 +87,15 @@ public interface ReportCancellApplyArchivedMapper extends BaseMapper<CwProjectRe
 
 
     String getBfId(String newLineId);
     String getBfId(String newLineId);
 
 
+    @InterceptorIgnore(tenantLine = "true")
     CwProjectReportApplyArchive getInfoByBFID(String bfId);
     CwProjectReportApplyArchive getInfoByBFID(String bfId);
 
 
+    @InterceptorIgnore(tenantLine = "true")
     CwProjectRecordsDTO getProjectByNewLineId(String reportNewLineId);
     CwProjectRecordsDTO getProjectByNewLineId(String reportNewLineId);
+
+    @InterceptorIgnore(tenantLine = "true")
+    void updateInfoById(CwProjectReportApplyArchive cwProjectReportArchive);
+
+    @InterceptorIgnore(tenantLine = "true")
+    CwProjectReportApplyArchive getById(String id);
 }
 }

+ 90 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/reportCancellApplyArchived/mapper/xml/ReportCancellApplyArchivedMapper.xml

@@ -291,4 +291,94 @@
         cw.report_type,
         cw.report_type,
         cw.report_review
         cw.report_review
     </sql>
     </sql>
+
+    <update id="updateInfoById">
+        UPDATE cw_project_report_cancell_apply_archived
+        SET
+        <if test="remarks != null and remarks != ''">
+            remarks = #{remarks},
+        </if>
+        <if test="projectId != null and projectId != ''">
+            project_id = #{projectId},
+        </if>
+        <if test="reportNum != null and reportNum != ''">
+            report_num = #{reportNum},
+        </if>
+        <if test="papersNum != null and papersNum != ''">
+            papers_num = #{papersNum},
+        </if>
+        <if test="year != null and year != ''">
+            `year` = #{year},
+        </if>
+        <if test="number != null and number != ''">
+            `number`'' = #{number},
+        </if>
+        <if test="isNumber != null and isNumber != ''">
+            is_number = #{isNumber},
+        </if>
+        <if test="auditDate != null">
+            audit_date = #{auditDate},
+        </if>
+        <if test="procInsId != null and procInsId != ''">
+            proc_ins_id = #{procInsId},
+        </if>
+        <if test="processDefinitionId != null and processDefinitionId != ''">
+            process_definition_id = #{processDefinitionId},
+        </if>
+        <if test="applyFileType != null and applyFileType != ''">
+            apply_file_type = #{applyFileType},
+        </if>
+        <if test="fileNumber != null and fileNumber != ''">
+            file_number = #{fileNumber},
+        </if>
+        <if test="reportId != null and reportId != ''">
+            report_id = #{reportId},
+        </if>
+        <if test="reportRemarks != null and reportRemarks != ''">
+            report_remarks = #{reportRemarks},
+        </if>
+        <if test="carchivedType != null and carchivedType != ''">
+            carchived_type = #{carchivedType},
+        </if>
+        <if test="archiveId != null and archiveId != ''">
+            archive_id = #{archiveId},
+        </if>
+		update_by_id = #{updateById},
+		update_time = #{updateTime}
+        WHERE
+            id = #{id}
+            AND del_flag = 0
+    </update>
+
+    <select id="getById" resultType="com.jeeplus.finance.reportCancellApplyArchived.domain.CwProjectReportApplyArchive">
+        SELECT
+            id,
+            remarks,
+            project_id,
+            report_num,
+            papers_num,
+            YEAR,
+            number,
+            is_number,
+            audit_date,
+            proc_ins_id,
+            process_definition_id,
+            apply_file_type,
+            file_number,
+            report_id,
+            report_remarks,
+            carchived_type,
+            archive_id,
+            create_time,
+            create_by_id,
+            update_time,
+            update_by_id,
+            del_flag,
+            tenant_id
+        FROM
+            cw_project_report_cancell_apply_archived
+        WHERE
+            id = #{id}
+            AND del_flag = 0
+    </select>
 </mapper>
 </mapper>

+ 3 - 3
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/reportCancellApplyArchived/service/ReportCancellApplyArchivedService.java

@@ -138,7 +138,7 @@ public class ReportCancellApplyArchivedService extends ServiceImpl<ReportCancell
      */
      */
     public ApplyArchiveReportDTO queryById(String id) {
     public ApplyArchiveReportDTO queryById(String id) {
         //传过来的是报告作废流程表的id
         //传过来的是报告作废流程表的id
-        ReportCancellApply apply = cancellApplyMapper.selectById(id);
+        ReportCancellApply apply = cancellApplyMapper.getById(id);
         ApplyArchiveReportDTO reportDTO = new ApplyArchiveReportDTO();
         ApplyArchiveReportDTO reportDTO = new ApplyArchiveReportDTO();
         if (null != apply) {
         if (null != apply) {
             //根据报告表id查出报废归档信息
             //根据报告表id查出报废归档信息
@@ -238,7 +238,7 @@ public class ReportCancellApplyArchivedService extends ServiceImpl<ReportCancell
             report.setCreateById(cwProjectReportArchiveDTO.getCreateBy().getId());
             report.setCreateById(cwProjectReportArchiveDTO.getCreateBy().getId());
             return update(cwProjectReportArchiveDTO, report.getId(),report.getArchiveId(),report.getProcInsId(),report.getProcessDefinitionId());
             return update(cwProjectReportArchiveDTO, report.getId(),report.getArchiveId(),report.getProcInsId(),report.getProcessDefinitionId());
         } else {
         } else {
-            report = applyMapper.selectById(cwProjectReportArchiveDTO.getId());
+            report = applyMapper.getById(cwProjectReportArchiveDTO.getId());
             if (null != report) {
             if (null != report) {
                 return update(cwProjectReportArchiveDTO, report.getId(),report.getArchiveId(),report.getProcInsId(),report.getProcessDefinitionId());
                 return update(cwProjectReportArchiveDTO, report.getId(),report.getArchiveId(),report.getProcInsId(),report.getProcessDefinitionId());
             } else {
             } else {
@@ -294,7 +294,7 @@ public class ReportCancellApplyArchivedService extends ServiceImpl<ReportCancell
         cwProjectReportArchive.setArchiveId(archiveId);
         cwProjectReportArchive.setArchiveId(archiveId);
         cwProjectReportArchive.setProcInsId(procInsId);
         cwProjectReportArchive.setProcInsId(procInsId);
         cwProjectReportArchive.setProcessDefinitionId(defId);
         cwProjectReportArchive.setProcessDefinitionId(defId);
-        applyMapper.updateById(cwProjectReportArchive);
+        applyMapper.updateInfoById(cwProjectReportArchive);
         //修改报告作废表的归档状态
         //修改报告作废表的归档状态
         applyMapper.updateArchiveStyle(cwProjectReportArchive.getArchiveId(), cwProjectReportArchive.getApplyFileType());
         applyMapper.updateArchiveStyle(cwProjectReportArchive.getArchiveId(), cwProjectReportArchive.getApplyFileType());
         //对上传的文件数据进行持久化操作
         //对上传的文件数据进行持久化操作

+ 1 - 1
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/OfficeController.java

@@ -45,7 +45,7 @@ public class OfficeController {
      * @return
      * @return
      */
      */
     @ApiLog("查询部门")
     @ApiLog("查询部门")
-    @PreAuthorize("hasAnyAuthority('sys:office:view','sys:office:add','sys:office:edit')")
+    // @PreAuthorize("hasAnyAuthority('sys:office:view','sys:office:add','sys:office:edit')")
     @GetMapping("queryById")
     @GetMapping("queryById")
     public ResponseEntity queryById(@RequestParam String id) {
     public ResponseEntity queryById(@RequestParam String id) {
         OfficeDTO officeDTO = officeWrapper.toDTO ( officeService.getById ( id ) );
         OfficeDTO officeDTO = officeWrapper.toDTO ( officeService.getById ( id ) );