Преглед на файлове

Merge remote-tracking branch 'origin/master'

wangqiang преди 2 години
родител
ревизия
0b0b3e5030
променени са 40 файла, в които са добавени 1667 реда и са изтрити 53 реда
  1. 9 0
      jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/sys/factory/UserApiFallbackFactory.java
  2. 18 0
      jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/sys/feign/IUserApi.java
  3. 1 1
      jeeplus-common/jeeplus-common-mybatis-plus/src/main/java/com/jeeplus/config/TenantLineHandlerImpl.java
  4. 9 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/mapper/CwFinanceInvoiceMapper.java
  5. 97 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/mapper/xml/CwFinanceInvoiceMapper.xml
  6. 11 2
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/service/CwFinanceInvoiceService.java
  7. 5 5
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/util/SignaturePostUtil.java
  8. 4 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/mapper/CwProjectRecordsMapper.java
  9. 13 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/mapper/xml/CwProjectRecordsMapper.xml
  10. 4 4
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/controller/CwProjectReportSignatureCallBackController.java
  11. 1 1
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/domain/CwProjectInfoData.java
  12. 7 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/CwProjectInfoMapper.java
  13. 12 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/CwProjectReportMapper.java
  14. 9 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/CwProjectReportReviewMapper.java
  15. 3 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/CwProjectReportSignatureMapper.java
  16. 6 1
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/CwProofreadDetailMapper.java
  17. 4 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/ProjectReportWorkAttachmentMapper.java
  18. 46 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/xml/CwProjectInfoMapper.xml
  19. 106 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/xml/CwProjectReportMapper.xml
  20. 95 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/xml/CwProjectReportReviewMapper.xml
  21. 25 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/xml/CwProjectReportSignatureMapper.xml
  22. 22 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/xml/CwProofreadDetailMapper.xml
  23. 4 4
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/service/CwProjectReportReviewService.java
  24. 39 17
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/service/CwProjectReportService.java
  25. 2 1
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReportAuditSheet/mapper/CwProofreadTypeMapper.java
  26. 29 0
      jeeplus-modules/jeeplus-finance/src/main/resources/bootstrap.yml
  27. 99 1
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/common/handler/ExtUserTaskActivityBehavior.java
  28. 7 0
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/mapper/FlowMapper.java
  29. 9 0
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/mapper/xml/FlowMapper.xml
  30. 3 1
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/service/FlowProcessService.java
  31. 2 2
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/service/FlowTaskService.java
  32. 851 0
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/utils/StringUtils.java
  33. 2 1
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/reimApprovalType/mapper/CwReimbursementTypeMapper.java
  34. 2 0
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/serialNumTpl/mapper/SerialnumTplMapper.java
  35. 21 1
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/UserController.java
  36. 10 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/feign/UserApiImpl.java
  37. 20 1
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/UserMapper.java
  38. 36 10
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/xml/UserMapper.xml
  39. 22 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/UserService.java
  40. 2 0
      jeeplus-modules/jeeplus-system/src/main/resources/bootstrap.yml

+ 9 - 0
jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/sys/factory/UserApiFallbackFactory.java

@@ -56,6 +56,10 @@ public class UserApiFallbackFactory implements FallbackFactory <IUserApi> {
             public UserDTO getById(String id) {
                 return null;
             }
+            @Override
+            public UserDTO getFlowAbleById(String id) {
+                return null;
+            }
 
             @Override
             public List <UserDTO> findListByPostId(String postId) {
@@ -63,6 +67,11 @@ public class UserApiFallbackFactory implements FallbackFactory <IUserApi> {
             }
 
             @Override
+            public List <UserDTO> findListFlowAbleByPostId(String postId) {
+                return Lists.newArrayList ( );
+            }
+
+            @Override
             public List <UserDTO> findListByRoleId(String roleId) {
                 return Lists.newArrayList ( );
             }

+ 18 - 0
jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/sys/feign/IUserApi.java

@@ -76,6 +76,15 @@ public interface IUserApi {
     UserDTO getById(@RequestParam("id") String id);
 
     /**
+     * 根据id获取用户
+     *
+     * @param id
+     * @return
+     */
+    @GetMapping(value = BASE_URL + "/getFlowAbleById")
+    UserDTO getFlowAbleById(@RequestParam("id") String id);
+
+    /**
      * 根据岗位id获取用户列表
      *
      * @param postId
@@ -85,6 +94,15 @@ public interface IUserApi {
     List <UserDTO> findListByPostId(@RequestParam("postId") String postId);
 
     /**
+     * 根据岗位id获取用户列表
+     *
+     * @param postId
+     * @return
+     */
+    @GetMapping(value = BASE_URL + "/findListFlowAbleByPostId")
+    List <UserDTO> findListFlowAbleByPostId(@RequestParam("postId") String postId);
+
+    /**
      * 根据角色id获取用户列表
      *
      * @param roleId

+ 1 - 1
jeeplus-common/jeeplus-common-mybatis-plus/src/main/java/com/jeeplus/config/TenantLineHandlerImpl.java

@@ -39,7 +39,7 @@ public class TenantLineHandlerImpl implements TenantLineHandler {
                 return true;
         }
         // flowable工作流系统表(排除扩展表)采用自身saas方案实现租户模式,在这里做忽略处理
-        if ( tableName.startsWith ( "act_" ) && !tableName.startsWith ( "act_extension" ) ) {
+        if ( (tableName.startsWith ( "act_" ) || tableName.startsWith ( "ACT_" )) ) {
             return true;
         }
 

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

@@ -1,5 +1,6 @@
 package com.jeeplus.finance.invoice.mapper;
 
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Constants;
@@ -17,6 +18,7 @@ public interface CwFinanceInvoiceMapper extends BaseMapper<CwFinanceInvoice> {
 
     public IPage<CwFinanceInvoiceDTO> findList(Page<CwFinanceInvoiceDTO> page, @Param(Constants.WRAPPER) QueryWrapper<CwFinanceInvoice> queryWrapper, @Param("officeIds") String officeIds);
 
+    @InterceptorIgnore(tenantLine = "true")
     public CwFinanceInvoiceDTO queryById(@Param("id") String id);
 
     public List<String> getIdByProjectId(@Param("id") String id);
@@ -32,6 +34,13 @@ public interface CwFinanceInvoiceMapper extends BaseMapper<CwFinanceInvoice> {
      * @param id
      */
     void setReceivablesDateNull(@Param("id") String id);
+
+    /**
+     * 根据发票id清空发票的收款日期
+     * @param cwFinanceInvoice
+     */
+    @InterceptorIgnore(tenantLine = "true")
+    void updateInfoById(CwFinanceInvoice cwFinanceInvoice);
 }
 
 

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

@@ -304,4 +304,101 @@
     <update id="setReceivablesDateNull" parameterType="string">
         update cw_finance_invoice set receivables_date = null where id = #{id}
     </update>
+
+    <update id="updateInfoById">
+        update cw_finance_invoice set
+        <if test="null != delFlag and delFlag != ''">
+            del_flag = #{delFlag},
+        </if>
+        <if test="null != type and type != ''">
+            type = #{type},
+        </if>
+        <if test="null != billingType and billingType != ''">
+            billing_type = #{billingType},
+        </if>
+        <if test="null != billingWorkplaceReal and billingWorkplaceReal != ''">
+            billing_workplace_real = #{billingWorkplaceReal},
+        </if>
+        <if test="null != taxpayerIdentificationNo and taxpayerIdentificationNo != ''">
+            taxpayer_identification_no = #{taxpayerIdentificationNo},
+        </if>
+        <if test="null != address and address != ''">
+            address = #{address},
+        </if>
+        <if test="null != telPhone and telPhone != ''">
+            tel_phone = #{telPhone},
+        </if>
+        <if test="null != openBank and openBank != ''">
+            open_bank = #{openBank},
+        </if>
+        <if test="null != bankAccount and bankAccount != ''">
+            bank_account = #{bankAccount},
+        </if>
+        <if test="null != name and name != ''">
+            name = #{name},
+        </if>
+        <if test="null != receivablesType and receivablesType != ''">
+            receivables_type = #{receivablesType},
+        </if>
+        <if test="null != billingContent and billingContent != ''">
+            billing_content = #{billingContent},
+        </if>
+        <if test="null != account and account != ''">
+            account = #{account},
+        </if>
+        <if test="null != billingContentTerms and billingContentTerms != ''">
+            billing_content_terms = #{billingContentTerms},
+        </if>
+        <if test="null != billingPeople and billingPeople != ''">
+            billing_people = #{billingPeople},
+        </if>
+        <if test="null != billingDate">
+            billing_date = #{billingDate},
+        </if>
+        <if test="null != collectDate">
+            collect_date = #{collectDate},
+        </if>
+        <if test="null != billingPeopleReal and billingPeopleReal != ''">
+            billing_people_real = #{billingPeopleReal},
+        </if>
+        <if test="null != reconciliationPeople and reconciliationPeople != ''">
+            reconciliation_people = #{reconciliationPeople},
+        </if>
+        <if test="null != reconciliationArea and reconciliationArea != ''">
+            reconciliation_area = #{reconciliationArea},
+        </if>
+        <if test="null != billingWorkplaceRealId and billingWorkplaceRealId != ''">
+            billing_workplace_real_id = #{billingWorkplaceRealId},
+        </if>
+        <if test="null != billingPeopleId and billingPeopleId != ''">
+            billing_people_id = #{billingPeopleId},
+        </if>
+        <if test="null != status and status != ''">
+            status = #{status},
+        </if>
+        <if test="null != procInsId and procInsId != ''">
+            proc_ins_id = #{procInsId},
+        </if>
+        <if test="null != processDefinitionId and processDefinitionId != ''">
+            process_definition_id = #{processDefinitionId},
+        </if>
+        <if test="null != receivablesStatus and receivablesStatus != ''">
+            receivables_status = #{receivablesStatus},
+        </if>
+        <if test="null != invalidStatus and invalidStatus != ''">
+            invalid_status = #{invalidStatus},
+        </if>
+        <if test="null != receivablesDate">
+            receivables_date = #{receivablesDate},
+        </if>
+        <if test="null != isMultiple and isMultiple != ''">
+            is_multiple = #{isMultiple},
+        </if>
+        <if test="null != billingId and billingId != ''">
+            billing_id = #{billingId},
+        </if>
+
+        remarks = #{remarks}
+        where id = #{id}
+    </update>
 </mapper>

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

@@ -327,7 +327,12 @@ public class CwFinanceInvoiceService extends ServiceImpl<CwFinanceInvoiceMapper,
                 }
             }
         }
-        this.saveOrUpdate(cwFinanceInvoice);
+        if(StringUtils.isNotBlank(cwFinanceInvoiceDTO.getId())){
+            cwFinanceInvoiceMapper.updateInfoById(cwFinanceInvoice);
+        }else{
+            cwFinanceInvoiceMapper.insert(cwFinanceInvoice);
+        }
+        //this.saveOrUpdate(cwFinanceInvoice);
 
         if (ObjectUtil.isNotEmpty(cwFinanceInvoiceDTO)) {
             // 如果当前是执行的是收款页面的保存方法
@@ -480,7 +485,11 @@ public class CwFinanceInvoiceService extends ServiceImpl<CwFinanceInvoiceMapper,
 
     public String updateStatusById(CwFinanceInvoiceDTO cwFinanceInvoiceDTO) {
         CwFinanceInvoice cwFinanceInvoice = CwFinanceInvoiceWrapper.INSTANCE.toEntity(cwFinanceInvoiceDTO);
-        cwFinanceInvoiceMapper.update(cwFinanceInvoice, new QueryWrapper<CwFinanceInvoice>().lambda().eq(CwFinanceInvoice::getId, cwFinanceInvoice.getId()));
+        if ("4".equals(cwFinanceInvoice.getStatus())) {
+            cwFinanceInvoiceMapper.updateInfoById(cwFinanceInvoice);
+        }else{
+            cwFinanceInvoiceMapper.update(cwFinanceInvoice, new QueryWrapper<CwFinanceInvoice>().lambda().eq(CwFinanceInvoice::getId, cwFinanceInvoice.getId()));
+        }
         return "操作成功";
     }
 

+ 5 - 5
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/util/SignaturePostUtil.java

@@ -40,14 +40,14 @@ import java.util.zip.ZipFile;
 public class SignaturePostUtil {
 
     //竖版模板templateId
-    private static final String VERTICALTEMPLATEID = Global.getConfig("vertical_templateId");
+    private static final String VERTICALTEMPLATEID = "2894156236229259396";
     //横板模板templateId
-    private static final String ACROSSTEMPLATEID = Global.getConfig("across_templateId");
-    private static final String HTTPTOP = Global.getConfig("signature_http_top");
+    private static final String ACROSSTEMPLATEID = "2894156210627227768";
+    private static final String HTTPTOP = "http://192.168.2.130:9182";
 
-    private final static String apptoken = Global.getConfig("apptoken");
+    private final static String apptoken = "uIJQmTwyGJ";
     private final static String appsecret = Global.getConfig("appsecret");
-    private final static String signature = Global.getConfig("signature");
+    private final static String signature = "232a44ee9ebd251d119f0a65628f678e";
 
 
     /**

+ 4 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/mapper/CwProjectRecordsMapper.java

@@ -1,5 +1,6 @@
 package com.jeeplus.finance.projectRecords.mapper;
 
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -66,4 +67,7 @@ public interface CwProjectRecordsMapper extends BaseMapper<CwProjectRecords> {
     List<String> isUseByReim(String[] idArray);
 
     List<String> isUseByFinance(String[] idArray);
+
+    @InterceptorIgnore(tenantLine = "true")
+    void updatereportReviewById(CwProjectRecords records);
 }

+ 13 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/mapper/xml/CwProjectRecordsMapper.xml

@@ -441,4 +441,17 @@
             #{id}
         </foreach>
     </select>
+
+    <update id="updatereportReviewById">
+        UPDATE cw_project_records
+        SET
+        <if test="reportReview != null and reportReview != ''">
+            report_review = #{reportReview},
+        </if>
+        update_by_id = #{updateById},
+        update_time = #{updateTime}
+        WHERE
+            id = #{id}
+            AND del_flag = 0
+    </update>
 </mapper>

+ 4 - 4
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/controller/CwProjectReportSignatureCallBackController.java

@@ -250,8 +250,8 @@ public class CwProjectReportSignatureCallBackController {
             }else{
                 path = "/attachment-file/";
             }
-            String aliyunUrl = Global.getAliyunUrl();
-            String aliDownloadUrl = Global.getAliDownloadUrl();
+            String aliyunUrl = "http://cdn.gangwaninfo.com";
+            String aliDownloadUrl = "http://oss.gangwaninfo.com";
 
 
             String file = aliyunUrl + signatureUrl;
@@ -399,8 +399,8 @@ public class CwProjectReportSignatureCallBackController {
             }else{
                 path = "/attachment-file/";
             }
-            String aliyunUrl = Global.getAliyunUrl();
-            String aliDownloadUrl = Global.getAliDownloadUrl();
+            String aliyunUrl = "http://cdn.gangwaninfo.com";
+            String aliDownloadUrl = "http://oss.gangwaninfo.com";
 
 
             String file = aliyunUrl + signatureUrl;

+ 1 - 1
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/domain/CwProjectInfoData.java

@@ -26,7 +26,7 @@ public class CwProjectInfoData extends BaseEntity {
     private String deleteSign;
 
     //报告文号(字典值) 基字
-    public static final String BIZ_CODE = "  ";
+    public static final String BIZ_CODE = "23";
 
     //报告文号(字典值) 咨字
     public static final String CONSULT_BIZ_CODE = "24";

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

@@ -1,5 +1,6 @@
 package com.jeeplus.finance.projectReport.mapper;
 
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.jeeplus.finance.projectReport.domain.CwProjectInfoData;
 import org.apache.ibatis.annotations.Mapper;
@@ -23,6 +24,7 @@ public interface CwProjectInfoMapper extends BaseMapper<CwProjectInfoData> {
 
     CwProjectInfoData selectIdByReportId(String id);
 
+    @InterceptorIgnore(tenantLine = "true")
     CwProjectInfoData selectByReportId(String id);
 
     CwProjectInfoData selectContainDelByReportId(String id);
@@ -33,6 +35,7 @@ public interface CwProjectInfoMapper extends BaseMapper<CwProjectInfoData> {
      */
     List<String> getReportNo();
 
+    @InterceptorIgnore(tenantLine = "true")
     CwProjectInfoData selectInfoByReportId(String id);
 
     /**
@@ -70,6 +73,7 @@ public interface CwProjectInfoMapper extends BaseMapper<CwProjectInfoData> {
      * @param id
      * @return
      */
+    @InterceptorIgnore(tenantLine = "true")
     CwProjectInfoData getByReportId(String id);
 
     CwProjectInfoData getContainDelByReportId(String id);
@@ -94,4 +98,7 @@ public interface CwProjectInfoMapper extends BaseMapper<CwProjectInfoData> {
      * @param id
      */
     void saveById(@Param("id")String id);
+
+    @InterceptorIgnore(tenantLine = "true")
+    void updateCwProjectInfoDataById(CwProjectInfoData cwProjectInfoData);
 }

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

@@ -1,5 +1,6 @@
 package com.jeeplus.finance.projectReport.mapper;
 
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -38,6 +39,7 @@ public interface CwProjectReportMapper extends BaseMapper<CwProjectReport> {
 
     Integer deleteAttachement(@Param("id") String id,@Param("attachmentFlag") String attachmentFlag);
 
+    @InterceptorIgnore(tenantLine = "true")
     CwProjectReportData queryById(@Param("id") String id);
 
     /**
@@ -48,6 +50,7 @@ public interface CwProjectReportMapper extends BaseMapper<CwProjectReport> {
      */
     public IPage<CwWorkClientBaseDTO> findClineList(Page<CwWorkClientBaseDTO> page, @Param(Constants.WRAPPER) QueryWrapper<CwWorkClientBase> queryWrapper);
 
+    @InterceptorIgnore(tenantLine = "true")
     String getUserNameById(String id);
 
     /**
@@ -86,6 +89,7 @@ public interface CwProjectReportMapper extends BaseMapper<CwProjectReport> {
      * @param projectId
      * @return
      */
+    @InterceptorIgnore(tenantLine = "true")
     List<CwProjectReportData> getByProjectId(String projectId);
 
     List<CwProjectReportData> getContainDelByProjectId(String projectId);
@@ -136,8 +140,10 @@ public interface CwProjectReportMapper extends BaseMapper<CwProjectReport> {
      * @param postName
      * @return
      */
+    @InterceptorIgnore(tenantLine = "true")
     List<ReviewUser> getReviewByPost(@Param("postName") String postName);
 
+    @InterceptorIgnore(tenantLine = "true")
     List<WorkAttachmentDto> findDtos(@Param("id") String id);
 
     CwProjectReport getByNewLineId(String reportId);
@@ -177,4 +183,10 @@ public interface CwProjectReportMapper extends BaseMapper<CwProjectReport> {
     void updateAnnotatorById(@Param("report")CwProjectReport cwProjectReport);
 
     void saveById(@Param("id")String id);
+
+    @InterceptorIgnore(tenantLine = "true")
+    void updateCwProjectReportDataById(CwProjectReport cwProjectReportData);
+
+    @InterceptorIgnore(tenantLine = "true")
+    CwProjectReport getById(@Param("id") String id);
 }

+ 9 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/CwProjectReportReviewMapper.java

@@ -1,5 +1,6 @@
 package com.jeeplus.finance.projectReport.mapper;
 
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.jeeplus.finance.projectReport.domain.CwProjectReportData;
 import com.jeeplus.finance.projectReport.domain.CwProjectReview;
@@ -14,6 +15,7 @@ import org.apache.ibatis.annotations.Param;
 @Mapper
 public interface CwProjectReportReviewMapper extends BaseMapper<CwProjectReview> {
 
+    @InterceptorIgnore(tenantLine = "true")
     CwProjectReview selectByReportId(String id);
 
     void updateReviewStatysByReportId(@Param("reviewStatus") String reviewStatus,@Param("id") String id,
@@ -41,4 +43,11 @@ public interface CwProjectReportReviewMapper extends BaseMapper<CwProjectReview>
      */
     ReportNoDto getProjectReportByNumber(String number);
 
+
+    @InterceptorIgnore(tenantLine = "true")
+    CwProjectReview selectById(String id);
+
+    @InterceptorIgnore(tenantLine = "true")
+    void updateReviewById(CwProjectReview review);
+
 }

+ 3 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/CwProjectReportSignatureMapper.java

@@ -1,5 +1,6 @@
 package com.jeeplus.finance.projectReport.mapper;
 
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.jeeplus.finance.projectReport.domain.CwProjectReportSignature;
 import org.apache.ibatis.annotations.Mapper;
@@ -9,6 +10,8 @@ import org.apache.ibatis.annotations.Mapper;
  */
 @Mapper
 public interface CwProjectReportSignatureMapper extends BaseMapper<CwProjectReportSignature> {
+    @InterceptorIgnore(tenantLine = "true")
+    CwProjectReportSignature getInfoById(String id);
 
 }
 

+ 6 - 1
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/CwProofreadDetailMapper.java

@@ -1,5 +1,6 @@
 package com.jeeplus.finance.projectReport.mapper;
 
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.jeeplus.finance.projectReport.domain.CwProofreadDetail;
 import org.apache.ibatis.annotations.Param;
@@ -9,10 +10,14 @@ import java.util.List;
 public interface CwProofreadDetailMapper extends BaseMapper<CwProofreadDetail> {
 
     List<CwProofreadDetail> findByInfoId(@Param("id") String id);
-
+    @InterceptorIgnore(tenantLine = "true")
     List<CwProofreadDetail> findByReportInfoId(@Param("id") String id);
 
     List<CwProofreadDetail> findList(@Param("type")String type);
 
+    @InterceptorIgnore(tenantLine = "true")
     CwProofreadDetail getByTypeIdAndInfoId(@Param("typeId")String typeId,@Param("infoId")String infoId);
+
+    @InterceptorIgnore(tenantLine = "true")
+    void updateReportReviewInfoById(CwProofreadDetail detail);
 }

+ 4 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/ProjectReportWorkAttachmentMapper.java

@@ -1,5 +1,6 @@
 package com.jeeplus.finance.projectReport.mapper;
 
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.jeeplus.finance.projectReport.domain.CwProjectReportFile;
 import com.jeeplus.finance.projectReport.service.dto.ProjectReportWorkAttachmentDTO;
@@ -27,10 +28,13 @@ public interface ProjectReportWorkAttachmentMapper extends BaseMapper<CwProjectR
 
     void deleteByAttachMnentId(String id);
 
+    @InterceptorIgnore(tenantLine = "true")
     List<ProjectReportWorkAttachmentDTO> selectByInfoId(String id);
 
+    @InterceptorIgnore(tenantLine = "true")
     List<ProjectReportWorkAttachmentDTO> selectByInfoIdAndNewLineId(String id);
 
+    @InterceptorIgnore(tenantLine = "true")
     CwProjectReportFile selectInfoByFileId(@Param("id") String id,@Param("fileType") String fileTType);
 
     /**

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

@@ -66,4 +66,50 @@
     <update id="saveById">
         update cw_project_report_new_line set del_flag = '0' where id = #{id}
     </update>
+
+    <update id="updateCwProjectInfoDataById">
+        update cw_project_report_new_line set
+        <if test="delFlag != null and delFlag != ''">
+            del_flag = #{delFlag},
+        </if>
+        <if test="reportId != null and reportId != ''">
+            report_id = #{reportId},
+        </if>
+        <if test="servedUnitId != null and servedUnitId != ''">
+            served_unit_id = #{servedUnitId},
+        </if>
+        <if test="reportDate != null and reportDate != ''">
+            report_date = #{reportDate},
+        </if>
+        <if test="reportType != null and reportType != ''">
+            report_type = #{reportType},
+        </if>
+        <if test="reportNumber != null and reportNumber != ''">
+            report_number = #{reportNumber},
+        </if>
+        <if test="reportNo != null and reportNo != ''">
+            report_no = #{reportNo},
+        </if>
+        <if test="issueReport != null and issueReport != ''">
+            issue_report = #{issueReport},
+        </if>
+        <if test="opinionType != null and opinionType != ''">
+            opinion_type = #{opinionType},
+        </if>
+        <if test="sealType != null and sealType != ''">
+            seal_type = #{sealType},
+        </if>
+        <if test="fileNumber != null and fileNumber != ''">
+            file_number = #{fileNumber},
+        </if>
+        <if test="deleteSign != null and deleteSign != ''">
+            delete_sign = #{deleteSign},
+        </if>
+        <if test="tenantId != null and tenantId != ''">
+            tenant_id = #{tenantId},
+        </if>
+        update_by_id = #{updateById},
+        update_time = #{updateTime}
+        where id = #{id}
+    </update>
 </mapper>

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

@@ -640,4 +640,110 @@
     <update id="saveById">
         update cw_project_report set del_flag = '0' where id = #{id}
     </update>
+
+
+
+    <update id="updateCwProjectReportDataById">
+        update cw_project_report
+        set
+        <if test="delFlag != null and delFlag != ''">
+            del_flag = ${delFlag},
+        </if>
+        <if test="documentNo != null and documentNo != ''">
+            document_no = ${documentNo},
+        </if>
+        <if test="projectId != null and projectId != ''">
+            project_id = ${projectId},
+        </if>
+        <if test="officeId != null and officeId != ''">
+            office_id = ${officeId},
+        </if>
+        <if test="signatureType != null and signatureType != ''">
+            signature_type = ${signatureType},
+        </if>
+        <if test="signatureAnnotator1 != null and signatureAnnotator1 != ''">
+            signature_annotator1 = ${signatureAnnotator1},
+        </if>
+        <if test="signatureAnnotator2 != null and signatureAnnotator2 != ''">
+            signature_annotator2 = ${signatureAnnotator2},
+        </if>
+        <if test="signatureContractId != null and signatureContractId != ''">
+            signature_contract_id = ${signatureContractId},
+        </if>
+        <if test="procInsId != null and procInsId != ''">
+            proc_ins_id = ${procInsId},
+        </if>
+        <if test="status != null and status != ''">
+            status = ${status},
+        </if>
+        <if test="processDefinitionId != null and processDefinitionId != ''">
+            process_definition_id = ${processDefinitionId},
+        </if>
+        <if test="auditFees != null and auditFees != ''">
+            audit_fees = ${auditFees},
+        </if>
+        <if test="businessType != null and businessType != ''">
+            business_type = ${businessType},
+        </if>
+        <if test="auditBusinessType != null and auditBusinessType != ''">
+            audit_business_type = ${auditBusinessType},
+        </if>
+        <if test="registerAddress != null and registerAddress != ''">
+            register_address = ${registerAddress},
+        </if>
+        <if test="businessLocation != null and businessLocation != ''">
+            business_location = ${businessLocation},
+        </if>
+        <if test="securityBusiness != null and securityBusiness != ''">
+            security_business = ${securityBusiness},
+        </if>
+        <if test="industry != null and industry != ''">
+            industry = ${industry},
+        </if>
+        <if test="businessObjects != null and businessObjects != ''">
+            business_objects = ${businessObjects},
+        </if>
+        <if test="tenantId != null and tenantId != ''">
+            tenant_id = ${tenantId},
+        </if>
+        update_by_id = #{updateById},
+        update_time = #{updateTime}
+        where del_flag = 0 and id = #{id}
+    </update>
+
+    <select id="getById" resultType="com.jeeplus.finance.projectReport.domain.CwProjectReport">
+        SELECT
+            id,
+            remarks,
+            document_no,
+            project_id,
+            office_id,
+            signature_annotator1,
+            signature_annotator2,
+            signature_type,
+            proc_ins_id,
+            process_definition_id,
+            STATUS,
+            signature_contract_id,
+            real_create,
+            audit_fees,
+            business_type,
+            audit_business_type,
+            register_address,
+            business_location,
+            security_business,
+            industry,
+            business_objects,
+            create_time,
+            create_by_id,
+            update_time,
+            update_by_id,
+            del_flag,
+            tenant_id
+        FROM
+            cw_project_report
+        WHERE
+            id = #{id}
+            AND del_flag = 0
+    </select>
 </mapper>

+ 95 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/xml/CwProjectReportReviewMapper.xml

@@ -34,4 +34,99 @@
         limit 1
     </select>
 
+    <select id="selectById" resultType="com.jeeplus.finance.projectReport.domain.CwProjectReview">
+        SELECT
+            id,
+            proc_ins_id,
+            process_definition_id,
+            review_status,
+            all_print_num,
+            issue_num,
+            place_on_file_num,
+            printed_by,
+            check_autograph,
+            report_id,
+            report_review_no,
+            report_title_type,
+            need_update1,
+            need_update2,
+            need_update3,
+            remark1,
+            remark2,
+            remark3,
+            computer_no,
+            review_by,
+            create_time,
+            create_by_id,
+            update_time,
+            update_by_id,
+            del_flag,
+            tenant_id
+        FROM
+            cw_project_report_review
+        WHERE
+            id = #{id}
+    </select>
+
+    <update id="updateReviewById">
+        UPDATE cw_project_report_review
+        SET
+        <if test="reviewStatus != null and reviewStatus != ''">
+            review_status = #{reviewStatus},
+        </if>
+        <if test="allPrintNum != null and allPrintNum != ''">
+            all_print_num = #{allPrintNum},
+        </if>
+        <if test="issueNum != null and issueNum != ''">
+            issue_num = #{issueNum},
+        </if>
+        <if test="placeOnFileNum != null and placeOnFileNum != ''">
+            place_on_file_num = #{placeOnFileNum},
+        </if>
+        <if test="printedBy != null and printedBy != ''">
+            printed_by = #{printedBy},
+        </if>
+        <if test="checkAutograph != null and checkAutograph != ''">
+            check_autograph = #{checkAutograph},
+        </if>
+        <if test="reportReviewNo != null and reportReviewNo != ''">
+            report_review_no = #{reportReviewNo},
+        </if>
+        <if test="reportTitleType != null and reportTitleType != ''">
+            report_title_type = #{reportTitleType},
+        </if>
+        <if test="reportTitleType != null and reportTitleType != ''">
+            report_title_type = #{reportTitleType},
+        </if>
+        <if test="needUpdate1 != null and needUpdate1 != ''">
+            need_update1 = #{needUpdate1},
+        </if>
+        <if test="needUpdate2 != null and needUpdate2 != ''">
+            need_update2 = #{needUpdate2},
+        </if>
+        <if test="needUpdate3 != null and needUpdate3 != ''">
+            need_update3 = #{needUpdate3},
+        </if>
+        <if test="remark1 != null and remark1 != ''">
+            remark1 = #{remark1},
+        </if>
+        <if test="remark2 != null and remark2 != ''">
+            remark2 = #{remark2},
+        </if>
+        <if test="remark3 != null and remark3 != ''">
+            remark3 = #{remark3},
+        </if>
+        <if test="computerNo != null and computerNo != ''">
+            computer_no = #{computerNo},
+        </if>
+        <if test="reviewBy != null and reviewBy != ''">
+            review_by = #{reviewBy},
+        </if>
+        update_by_id = #{updateById},
+        update_time = #{updateTime}
+        WHERE
+            id = #{id}
+            AND del_flag = 0
+    </update>
+
 </mapper>

+ 25 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/xml/CwProjectReportSignatureMapper.xml

@@ -33,4 +33,29 @@
         cw_prs.status,
         cw_prs.process_definition_id
     </sql>
+
+    <select id="getInfoById" resultType="com.jeeplus.finance.projectReport.domain.CwProjectReportSignature">
+        SELECT
+            id,
+            remarks,
+            report_id,
+            type,
+            proc_ins_id,
+            STATUS,
+            process_definition_id,
+            signature_annotator1_status,
+            signature_annotator2_status,
+            seal_admin_status,
+            create_time,
+            create_by_id,
+            update_time,
+            update_by_id,
+            del_flag,
+            tenant_id
+        FROM
+            cw_project_report_signature
+        WHERE
+            id = #{id}
+            AND del_flag = 0
+    </select>
 </mapper>

+ 22 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/xml/CwProofreadDetailMapper.xml

@@ -50,4 +50,26 @@
 	<select id="getByTypeIdAndInfoId" resultType="com.jeeplus.finance.projectReport.domain.CwProofreadDetail">
 		select * from cw_proofread_detail where type_id = #{typeId} and info_id = #{infoId}
 	</select>
+
+	<update id="updateReportReviewInfoById">
+		UPDATE cw_proofread_detail
+		SET
+		<if test="infoId != null and infoId != ''">
+			info_id = #{infoId},
+		</if>
+		<if test="typeId != null and typeId != ''">
+			type_id = #{typeId},
+		</if>
+		<if test="reviewComments != null and reviewComments != ''">
+			review_comments = #{reviewComments},
+		</if>
+		<if test="tenantId != null and tenantId != ''">
+			tenant_id = #{tenantId},
+		</if>
+		update_by_id = #{updateById},
+		update_time = #{updateTime}
+		WHERE
+			id = #{id}
+			AND del_flag = 0
+	</update>
 </mapper>

+ 4 - 4
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/service/CwProjectReportReviewService.java

@@ -310,15 +310,15 @@ public class CwProjectReportReviewService extends ServiceImpl<CwProjectReportRev
                 report.setBusinessObjects(reportData.getBusinessObjects());
             }
             if (ObjectUtil.isNotEmpty(report)) {
-                cwProjectReportService.update(report, new QueryWrapper<CwProjectReport>().lambda().eq(CwProjectReport::getId,reportData.getId()));
+                cwProjectReportService.updateCwProjectReportDataById(report);
             }
         }
-        mapper.updateById(review);
+        mapper.updateReviewById(review);
         if ("5".equals(review.getReviewStatus())) {
             CwProjectRecords records = new CwProjectRecords();
             records.setId(reportData.getProjectId());
             records.setReportReview("1"); // 已开始报告复核
-            recordsMapper.updateById(records);
+            recordsMapper.updatereportReviewById(records);
         }
         //对复核数据进行持久化操作
         if (CollectionUtils.isNotEmpty(reportData.getDetails())) {
@@ -340,7 +340,7 @@ public class CwProjectReportReviewService extends ServiceImpl<CwProjectReportRev
                     detail1.setInfoId(review.getId());
                     detail1.setUpdateById(userDTO.getId());
                     detail1.setUpdateTime(new Date());
-                    detailMapper.updateById(detail1);
+                    detailMapper.updateReportReviewInfoById(detail1);
                 }
             }
         }

+ 39 - 17
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/service/CwProjectReportService.java

@@ -54,7 +54,9 @@ import org.flowable.bpmn.model.FlowNode;
 //import org.flowable.task.api.Task;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Component;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -66,6 +68,9 @@ import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.stream.Collectors;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.env.Environment;
+import org.springframework.stereotype.Component;
 
 /**
  * @author: 王强
@@ -73,17 +78,15 @@ import java.util.stream.Collectors;
  **/
 @Service
 @Transactional(rollbackFor = Exception.class)
+@Component
 public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, CwProjectReport> {
 
-    private static final String HTTPTOP = Global.getConfig("signature_http_top");
-    private static final String COMPANYROUNDSEALID = Global.getConfig("company_round_seal_id");
-    private static final String COMPANYROUNDSEALIDVERTICAL = Global.getConfig("company_round_seal_id_vertical");
-    private static final String COMPANYPARTIESSEALID = Global.getConfig("company_parties_seal_id");
-    private static final String APPROVALCATEGORYID = Global.getConfig("approval_category_id");
-    private static final String APPROVALYCCATEGORYID = Global.getConfig("approval_YC_category_id");
-    private static final String REPORTCATEGORYID = Global.getConfig("report_category_id");
-    private static final String REPORTYCCATEGORYID = Global.getConfig("report_YC_category_id");
-    private static final String JUDGEMENTCATEGORYID = Global.getConfig("judgement_category_id");
+    @Value("${signature_http_top}")
+    private static String HTTPTOP;
+    @Value("${approval_category_id}")
+    private static String APPROVALCATEGORYID;
+    @Autowired
+    private Environment environment;
 
     @Resource
     private CwProjectReportMapper reportMapper;
@@ -140,6 +143,17 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
     @Resource
     private CwProjectRecordsService cwProjectRecordsService;
 
+
+    public String getApprovalCategoryId() {
+        return environment.getProperty("approval_category_id");
+        // 使用myProperty的值
+    }
+
+    public String getSignatureHttpTop() {
+        return environment.getProperty("signature_http_top");
+        // 使用myProperty的值
+    }
+
     /**
      * 保存项目以及其他相关信息
      * @param reportData
@@ -149,7 +163,7 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
     public String saveForm(CwProjectReportData reportData) throws Exception{
         if (StringUtils.isNotEmpty(reportData.getId())){
 
-            CwProjectReport report = reportMapper.selectById(reportData.getId());
+            CwProjectReport report = reportMapper.getById(reportData.getId());
             if (report != null){
                 reportData.setCreateBy(reportData.getCreateBy());
                 return update(reportData);
@@ -171,7 +185,7 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
         BeanUtils.copyProperties(reportData, report);
         report.setUpdateById(userDTO.getId());
         report.setUpdateTime(new Date());
-        reportMapper.updateById(report);
+        reportMapper.updateCwProjectReportDataById(report);
         //修改新增行数据
         CwProjectInfoData infoData = infoMapper.selectInfoByReportId(report.getId());
         infoData.setServedUnitName(report.getServedUnitName());
@@ -182,7 +196,7 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
         infoData.setServedUnitId(report.getServedUnitId());
         infoData.setUpdateById(UserUtils.getCurrentUserDTO().getId());
         infoData.setUpdateTime(new Date());
-        infoMapper.updateById(infoData);
+        infoMapper.updateCwProjectInfoDataById(infoData);
 
         //对上传的文件数据进行持久化操作
         List<ProjectReportWorkAttachmentDTO> cwFileInfoList = report.getCwFileInfoList();
@@ -1930,8 +1944,8 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
             }else{
                 path = "/attachment-file/";
             }
-            String aliyunUrl = Global.getAliyunUrl();
-            String aliDownloadUrl = Global.getAliDownloadUrl();
+            String aliyunUrl = "http://cdn.gangwaninfo.com";
+            String aliDownloadUrl = "http://oss.gangwaninfo.com";
 
             //获取文件生成的documentId
             List<String> documentList = Lists.newArrayList();
@@ -2256,7 +2270,8 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
         SignatureContract signatureContract = new SignatureContract();
         signatureContract.setDocuments(documentList);
         //审定单用印流程id
-        signatureContract.setCategoryId(APPROVALCATEGORYID);
+        String approvalCategoryId = getApprovalCategoryId();
+        signatureContract.setCategoryId(approvalCategoryId);
         signatureContract.setSend(true);
         signatureContract.setSignatories(signatories);
         signatureContract.setSn("");
@@ -2265,7 +2280,8 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
         System.out.println(json.toString());
         long s5=System.currentTimeMillis();
         System.out.println(json.toString());
-        String contractIdMapStr = SignaturePostUtil.sendPostApplicationJson(HTTPTOP + "/contract/createbycategory", json.toString());
+        String signatureHttpTop = getSignatureHttpTop();
+        String contractIdMapStr = SignaturePostUtil.sendPostApplicationJson(signatureHttpTop + "/contract/createbycategory", json.toString());
         long s6=System.currentTimeMillis();
         System.out.println("获取合同id获取时间:" + (s6 - s5));
         hashMap = JSON.parseObject(contractIdMapStr, HashMap.class);
@@ -2274,7 +2290,7 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
     }
 
     public CwProjectReportData queryBySignatureId(String signatureId) {
-        CwProjectReportSignature cwProjectReportSignature = cwProjectReportSignatureMapper.selectById(signatureId);
+        CwProjectReportSignature cwProjectReportSignature = cwProjectReportSignatureMapper.getInfoById(signatureId);
         if (ObjectUtil.isNotEmpty(cwProjectReportSignature)){
             if (StringUtils.isNotBlank(cwProjectReportSignature.getReportId())){
                 return this.queryById(cwProjectReportSignature.getReportId());
@@ -3062,4 +3078,10 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
         }
         return reportData;
     }
+
+    public void updateCwProjectReportDataById(CwProjectReport report){
+        if(StringUtils.isNotBlank(report.getId())){
+            reportMapper.updateCwProjectReportDataById(report);
+        }
+    }
 }

+ 2 - 1
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReportAuditSheet/mapper/CwProofreadTypeMapper.java

@@ -1,5 +1,6 @@
 package com.jeeplus.finance.projectReportAuditSheet.mapper;
 
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.jeeplus.core.domain.TreeMapper;
 import com.jeeplus.finance.projectReport.domain.CwProofreadDetail;
@@ -13,7 +14,7 @@ import java.util.List;
  * @create: 2022-12-08 09:19
  **/
 public interface CwProofreadTypeMapper extends BaseMapper<CwProofreadType>, TreeMapper<CwProofreadType> {
-
+    @InterceptorIgnore(tenantLine = "true")
     List<CwProofreadDetail> prooList(@Param("type")String type);
 
     Integer checkNameIsExist(@Param("parentId")String parentId, @Param("name") String name, @Param("type")String type);

+ 29 - 0
jeeplus-modules/jeeplus-finance/src/main/resources/bootstrap.yml

@@ -96,3 +96,32 @@ config:
 aliyun_directory: attachment-file/assess
 #签章阿里云文件bucketName
 qzBucketName: xg-qz
+
+#192.168.2.6签章测试参数
+apptoken: uIJQmTwyGJ
+appsecret: 2NMBqFigKoInmd43Wohxv5aEDKiiHo
+signature: 232a44ee9ebd251d119f0a65628f678e
+
+signature_http_top: http://192.168.2.130:9182
+#signature_http_top: https://3m0m810894.goho.co
+
+#竖版模板templateId
+vertical_templateId: 2894156236229259396
+#横板模板templateId
+across_templateId: 2894156210627227768
+#公司圆章
+company_round_seal_id: 2894161942659543252
+#公司圆章-竖
+company_round_seal_id_vertical: 2898043523878957918
+#公司方章
+company_parties_seal_id: 2894163220106129636
+#审定单用印流程id
+approval_category_id: 3032265972836684447
+#报告用印流程id
+report_category_id: 2895618951099527314
+##审定内用印流程id
+judgement_category_id: 2920938119742709765
+#审定单用印流程id(盐城)
+approval_YC_category_id: 2932214418853044239
+#报告用印流程id(盐城)
+report_YC_category_id: 2933233458312618324

+ 99 - 1
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/common/handler/ExtUserTaskActivityBehavior.java

@@ -8,8 +8,10 @@ import com.jeeplus.extension.domain.TaskDefExtension;
 import com.jeeplus.extension.service.TaskDefExtensionService;
 import com.jeeplus.extension.service.dto.FlowAssigneeDTO;
 import com.jeeplus.flowable.utils.FlowableUtils;
+import com.jeeplus.flowable.utils.StringUtils;
 import com.jeeplus.sys.feign.IUserApi;
 import com.jeeplus.sys.service.dto.UserDTO;
+import com.jeeplus.sys.utils.UserUtils;
 import lombok.extern.slf4j.Slf4j;
 import org.flowable.bpmn.model.FlowElement;
 import org.flowable.bpmn.model.Process;
@@ -17,9 +19,11 @@ import org.flowable.bpmn.model.UserTask;
 import org.flowable.common.engine.impl.el.ExpressionManager;
 import org.flowable.engine.HistoryService;
 import org.flowable.engine.RepositoryService;
+import org.flowable.engine.RuntimeService;
 import org.flowable.engine.delegate.DelegateExecution;
 import org.flowable.engine.impl.bpmn.behavior.UserTaskActivityBehavior;
 import org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl;
+import org.flowable.engine.runtime.ProcessInstance;
 import org.flowable.task.api.history.HistoricTaskInstance;
 import org.flowable.task.service.TaskService;
 import org.flowable.task.service.impl.persistence.entity.TaskEntity;
@@ -67,7 +71,7 @@ public class ExtUserTaskActivityBehavior extends UserTaskActivityBehavior {
                     case "post":
                         if ( StrUtil.isNotBlank ( flowAssignee.getValue ( ) ) ) {
                             String postId = flowAssignee.getValue ( );
-                            List <UserDTO> userList = userApi.findListByPostId ( postId );
+                            List <UserDTO> userList = userApi.findListFlowAbleByPostId ( postId );
                             candidateUserIds.addAll ( CollectionUtils.extractToList ( userList, "id" ) );
                         }
 
@@ -115,6 +119,100 @@ public class ExtUserTaskActivityBehavior extends UserTaskActivityBehavior {
                         break;
                     case "custom":
                         //根据你的自定义标记,请自行实现
+                        //如果字符串中包含 "currentUserSql:" 则进行如下代码替换和处理
+                        if(flowAssignee.getValue ().contains("currentUserSql:")){
+                            //对应sql为:select su.* from sys_user_role a left join sys_role sr on sr.id = a.role_id left join sys_user su on su.id = a.user_id left join sys_office so on so.id = su.office_id where sr.en_name= 'bmzr' and so.id = (select office_id from sys_user where id = @currentUser.id)
+                            //用于查询当前登录人的部门主任人员信息
+                            UserDTO currentUserDTO = UserUtils.getCurrentUserDTO();
+                            String sql = flowAssignee.getValue ();
+                            if(sql.contains("@currentUser.id")){
+                                //将标志进行去除
+                                sql = sql.replaceAll("currentUserSql:","");
+                                //将判断条件进行替换
+                                sql = sql.replaceAll("@currentUser.id","'" + currentUserDTO.getId() + "'");
+                            }
+                            List<Map<String, Object>> maps = SpringUtil.getBean(JdbcTemplate.class).queryForList(sql);
+                            for (Map<String, Object> map : maps) {
+                                candidateUserIds.add(map.get ("id").toString ());
+                            }
+                        }
+                        //如果字符串中包含 "cwCurrentUserSql:" 则进行如下代码替换和处理
+                        if(flowAssignee.getValue ().contains("cwCurrentUserSql:")){
+                            //对应sql为:select su.* from sys_user_role a left join sys_role sr on sr.id = a.role_id left join sys_user su on su.id = a.user_id left join sys_office so on so.id = su.office_id where sr.en_name= 'bmzr' and so.id = (select office_id from sys_user where id = @currentUser.id)
+                            //用于查询当前登录人的部门主任人员信息
+                            UserDTO currentUserDTO = UserUtils.getCurrentUserDTO();
+                            String sql = flowAssignee.getValue ();
+                            if(sql.contains("@currentUser.id")){
+                                //将标志进行去除
+                                sql = sql.replaceAll("cwCurrentUserSql:","");
+                                //将判断条件进行替换
+                                sql = sql.replaceAll("@currentUser.id","'" + currentUserDTO.getId() + "'");
+                            }
+                            if(sql.contains("@currentUser.officeDTO.name")){
+                                //将标志进行去除
+                                sql = sql.replaceAll("cwCurrentUserSql:","");
+                                //将判断条件进行替换
+                                sql = sql.replaceAll("@currentUser.officeDTO.name","'" + currentUserDTO.getOfficeDTO().getName() + "'");
+                            }
+                            List<Map<String, Object>> maps = SpringUtil.getBean(JdbcTemplate.class).queryForList(sql);
+                            for (Map<String, Object> map : maps) {
+                                candidateUserIds.add(map.get ("id").toString ());
+                            }
+                        }
+                        if(flowAssignee.getValue ().contains("zsbxCurrentUserSql:")){
+                            //对应sql为:select su.* from sys_user_role a left join sys_role sr on sr.id = a.role_id left join sys_user su on su.id = a.user_id left join sys_office so on so.id = su.office_id where sr.en_name= 'bmzr' and so.id = (select office_id from sys_user where id = @currentUser.id)
+                            //用于查询当前登录人的部门主任人员信息
+                            UserDTO currentUserDTO = UserUtils.getCurrentUserDTO();
+                            String sql = flowAssignee.getValue ();
+                            if(sql.contains("@currentUser.id")){
+                                //将标志进行去除
+                                sql = sql.replaceAll("zsbxCurrentUserSql:","");
+                                //将判断条件进行替换
+                                sql = sql.replaceAll("@currentUser.id","'" + currentUserDTO.getId() + "'");
+                            }
+                            if(sql.contains("@currentUser.officeDTO.name")){
+                                //将标志进行去除
+                                sql = sql.replaceAll("zsbxCurrentUserSql:","");
+                                //将判断条件进行替换
+                                sql = sql.replaceAll("@currentUser.officeDTO.name","'" + currentUserDTO.getOfficeDTO().getName() + "'");
+                            }
+                            List<Map<String, Object>> maps = SpringUtil.getBean(JdbcTemplate.class).queryForList(sql);
+                            for (Map<String, Object> map : maps) {
+                                candidateUserIds.add(map.get ("id").toString ());
+                            }
+                        }
+                        //如果字符串中包含 "gsldbxCurrentUserSql:" 则进行如下代码替换和处理
+                        if(flowAssignee.getValue ().contains("gsldbxCurrentUserSql:")){
+                            String sql = flowAssignee.getValue ();
+                            // 流程发起人
+                            ProcessInstance processInstance = SpringUtil.getBean(RuntimeService.class)
+                                    .createProcessInstanceQuery()
+                                    .processInstanceId(execution.getProcessInstanceId())
+                                    .singleResult();
+                            if(null != processInstance && StringUtils.isNotBlank(processInstance.getStartUserId())){
+                                String startUserId = processInstance.getStartUserId();
+                                //通过查询流程发起人确认发起人所在部门以及部门分管领导信息
+                                if(sql.contains("@currentUser.id")){
+                                    //将标志进行去除
+                                    sql = sql.replaceAll("gsldbxCurrentUserSql:","");
+                                    //将判断条件进行替换
+                                    sql = sql.replaceAll("@currentUser.id","'" + startUserId + "'");
+                                }
+                            } else {
+                                //如果找不到发起人信息 则审核人默认为 角色 总经办人员信息
+                                sql = "SELECT su.* FROM sys_user_role a LEFT JOIN sys_role sr ON sr.id = a.role_id LEFT JOIN sys_user su ON su.id = a.user_id LEFT JOIN sys_office so ON so.id = su.office_id WHERE sr.en_name = 'zjb'";
+                            }
+                            //设定部门分管领导为审核人
+                            List<Map<String, Object>> maps = SpringUtil.getBean(JdbcTemplate.class).queryForList(sql);
+                            if(null == maps || maps.size()==0){
+                                sql = "SELECT su.* FROM sys_user_role a LEFT JOIN sys_role sr ON sr.id = a.role_id LEFT JOIN sys_user su ON su.id = a.user_id LEFT JOIN sys_office so ON so.id = su.office_id WHERE sr.en_name = 'zjb'";
+                                maps = SpringUtil.getBean(JdbcTemplate.class).queryForList(sql);
+                            }
+                            for (Map<String, Object> map : maps) {
+                                candidateUserIds.add(map.get ("id").toString ());
+                            }
+                        }
+
                         break;
                 }
             }

+ 7 - 0
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/mapper/FlowMapper.java

@@ -26,4 +26,11 @@ public interface FlowMapper extends BaseMapper <Flow> {
      */
     ActRuTaskInfo getTaskInfoByTaskId(String taskId);
 
+    /**
+     * 查询流程对应租户id
+     * @param procDefKey
+     * @return
+     */
+    String getTenantIdByProcDefKey(String procDefKey);
+
 }

+ 9 - 0
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/mapper/xml/FlowMapper.xml

@@ -52,4 +52,13 @@
 		limit 1
 	</select>
 
+    <select id="getTenantIdByProcDefKey" resultType="java.lang.String">
+		select
+		  TENANT_ID_ as "tenantId"
+		from
+		  ACT_RE_PROCDEF
+		where KEY_ = #{procDefKey}
+		limit 1
+	</select>
+
 </mapper>

+ 3 - 1
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/service/FlowProcessService.java

@@ -4,6 +4,7 @@
 package com.jeeplus.flowable.service;
 
 import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.node.ObjectNode;
@@ -132,8 +133,9 @@ public class FlowProcessService {
     /**
      * 流程定义列表
      */
+    @InterceptorIgnore(tenantLine = "true")
     public Page <Map> processList(Page <Map> page, String category) {
-        ProcessDefinitionQuery processDefinitionQuery = repositoryService.createProcessDefinitionQuery ( ).processDefinitionTenantId ( tenantApi.getCurrentTenantId ( ) ).active ( )
+        ProcessDefinitionQuery processDefinitionQuery = repositoryService.createProcessDefinitionQuery ( )/*.processDefinitionTenantId ( tenantApi.getCurrentTenantId ( ) )*/.active ( )
                 .latestVersion ( ).orderByProcessDefinitionKey ( ).asc ( );
         if ( StrUtil.isNotEmpty ( category ) ) {
             processDefinitionQuery.processDefinitionCategory ( category );

+ 2 - 2
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/service/FlowTaskService.java

@@ -411,7 +411,7 @@ public class FlowTaskService {
         }
 
         // 启动流程
-        ProcessInstance procIns = runtimeService.startProcessInstanceByKeyAndTenantId ( procDefKey, businessTable + ":" + businessId, vars, tenantApi.getCurrentTenantId ( ) );
+        ProcessInstance procIns = runtimeService.startProcessInstanceByKeyAndTenantId ( procDefKey, businessTable + ":" + businessId, vars, /*tenantApi.getCurrentTenantId ( )*/ flowMapper.getTenantIdByProcDefKey(procDefKey) );
 
         // 更新业务表流程实例ID
         Flow act = new Flow ( );
@@ -547,7 +547,7 @@ public class FlowTaskService {
         }
         // 获取任务执行人名称
         if ( StrUtil.isNotEmpty ( histIns.getAssignee ( ) ) ) {
-            UserDTO user = userApi.getById ( histIns.getAssignee ( ) );
+            UserDTO user = userApi.getFlowAbleById ( histIns.getAssignee ( ) );
             if ( user != null ) {
                 e.setAssignee ( histIns.getAssignee ( ) );
                 e.setAssigneeName ( user.getName ( ) );

+ 851 - 0
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/utils/StringUtils.java

@@ -0,0 +1,851 @@
+/**
+ * Copyright &copy; 2013-2017 <a href="http://www.rhcncpa.com/">瑞华会计师事务所</a> All rights reserved.
+ */
+package com.jeeplus.flowable.utils;
+
+import com.google.common.collect.Lists;
+import com.jeeplus.sys.utils.SpringContextHolder;
+import com.jeeplus.utils.Encodes;
+import net.sf.json.JSONObject;
+import org.apache.commons.lang3.StringEscapeUtils;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+import org.springframework.web.servlet.LocaleResolver;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.UnsupportedEncodingException;
+import java.math.BigDecimal;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * 字符串工具类, 继承org.apache.commons.lang3.StringUtils类
+ * @author jeeplus
+ * @version 2013-05-22
+ */
+public class StringUtils extends org.apache.commons.lang3.StringUtils {
+
+	private static final char SEPARATOR = '_';
+	private static final String CHARSET_NAME = "UTF-8";
+	private static final int DEF_DIV_SCALE = 10; //这个类不能实例化
+	public static SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+	public static SimpleDateFormat sdfs = new SimpleDateFormat("HHmm");
+
+	/**
+	 * 转换为字节数组
+	 * @param str
+	 * @return
+	 */
+	public static byte[] getBytes(String str){
+		if (str != null){
+			try {
+				return str.getBytes(CHARSET_NAME);
+			} catch (UnsupportedEncodingException e) {
+				return null;
+			}
+		}else{
+			return null;
+		}
+	}
+
+	/**
+	 * 转换为字节数组
+	 * @param bytes
+	 * @return
+	 */
+	public static String toString(byte[] bytes){
+		try {
+			return new String(bytes, CHARSET_NAME);
+		} catch (UnsupportedEncodingException e) {
+			return EMPTY;
+		}
+	}
+
+	/**
+	 * 是否包含字符串
+	 * @param str 验证字符串
+	 * @param strs 字符串组
+	 * @return 包含返回true
+	 */
+	public static boolean inString(String str, String... strs){
+		if (str != null){
+			for (String s : strs){
+				if (str.equals(trim(s))){
+					return true;
+				}
+			}
+		}
+		return false;
+	}
+
+	/**
+	 * 替换掉HTML标签方法
+	 */
+	public static String replaceHtml(String html) {
+		if (isBlank(html)){
+			return "";
+		}
+		String regEx = "<.+?>";
+		Pattern p = Pattern.compile(regEx);
+		Matcher m = p.matcher(html);
+		String s = m.replaceAll("");
+		return s;
+	}
+
+	/**
+	 * 替换为手机识别的HTML,去掉样式及属性,保留回车。
+	 * @param html
+	 * @return
+	 */
+	public static String replaceMobileHtml(String html){
+		if (html == null){
+			return "";
+		}
+		return html.replaceAll("<([a-z]+?)\\s+?.*?>", "<$1>");
+	}
+
+	/**
+	 * 替换为手机识别的HTML,去掉样式及属性,保留回车。
+	 * @param txt
+	 * @return
+	 */
+	public static String toHtml(String txt){
+		if (txt == null){
+			return "";
+		}
+		return replace(replace(Encodes.escapeHtml(txt), "\n", "<br/>"), "\t", "&nbsp; &nbsp; ");
+	}
+
+	/**
+	 * 缩略字符串(不区分中英文字符)
+	 * @param str 目标字符串
+	 * @param length 截取长度
+	 * @return
+	 */
+	public static String abbr(String str, int length) {
+		if (str == null) {
+			return "";
+		}
+		try {
+			StringBuilder sb = new StringBuilder();
+			int currentLength = 0;
+			for (char c : replaceHtml(StringEscapeUtils.unescapeHtml4(str)).toCharArray()) {
+				currentLength += String.valueOf(c).getBytes("GBK").length;
+				if (currentLength <= length - 3) {
+					sb.append(c);
+				} else {
+					sb.append("...");
+					break;
+				}
+			}
+			return sb.toString();
+		} catch (UnsupportedEncodingException e) {
+			e.printStackTrace();
+		}
+		return "";
+	}
+
+	public static String abbr2(String param, int length) {
+		if (param == null) {
+			return "";
+		}
+		StringBuffer result = new StringBuffer();
+		int n = 0;
+		char temp;
+		boolean isCode = false; // 是不是HTML代码
+		boolean isHTML = false; // 是不是HTML特殊字符,如&nbsp;
+		for (int i = 0; i < param.length(); i++) {
+			temp = param.charAt(i);
+			if (temp == '<') {
+				isCode = true;
+			} else if (temp == '&') {
+				isHTML = true;
+			} else if (temp == '>' && isCode) {
+				n = n - 1;
+				isCode = false;
+			} else if (temp == ';' && isHTML) {
+				isHTML = false;
+			}
+			try {
+				if (!isCode && !isHTML) {
+					n += String.valueOf(temp).getBytes("GBK").length;
+				}
+			} catch (UnsupportedEncodingException e) {
+				e.printStackTrace();
+			}
+
+			if (n <= length - 3) {
+				result.append(temp);
+			} else {
+				result.append("...");
+				break;
+			}
+		}
+		// 取出截取字符串中的HTML标记
+		String temp_result = result.toString().replaceAll("(>)[^<>]*(<?)",
+				"$1$2");
+		// 去掉不需要结素标记的HTML标记
+		temp_result = temp_result
+				.replaceAll(
+						"</?(AREA|BASE|BASEFONT|BODY|BR|COL|COLGROUP|DD|DT|FRAME|HEAD|HR|HTML|IMG|INPUT|ISINDEX|LI|LINK|META|OPTION|P|PARAM|TBODY|TD|TFOOT|TH|THEAD|TR|area|base|basefont|body|br|col|colgroup|dd|dt|frame|head|hr|html|img|input|isindex|li|link|meta|option|p|param|tbody|td|tfoot|th|thead|tr)[^<>]*/?>",
+						"");
+		// 去掉成对的HTML标记
+		temp_result = temp_result.replaceAll("<([a-zA-Z]+)[^<>]*>(.*?)</\\1>",
+				"$2");
+		// 用正则表达式取出标记
+		Pattern p = Pattern.compile("<([a-zA-Z]+)[^<>]*>");
+		Matcher m = p.matcher(temp_result);
+		List<String> endHTML = Lists.newArrayList();
+		while (m.find()) {
+			endHTML.add(m.group(1));
+		}
+		// 补全不成对的HTML标记
+		for (int i = endHTML.size() - 1; i >= 0; i--) {
+			result.append("</");
+			result.append(endHTML.get(i));
+			result.append(">");
+		}
+		return result.toString();
+	}
+
+	/**
+	 * 转换为Double类型
+	 */
+	public static Double toDouble(Object val){
+		if (val == null){
+			return 0D;
+		}
+		try {
+			return Double.valueOf(trim(val.toString()));
+		} catch (Exception e) {
+			return 0D;
+		}
+	}
+
+	/**
+	 * 转换为Float类型
+	 */
+	public static Float toFloat(Object val){
+		return toDouble(val).floatValue();
+	}
+
+	/**
+	 * 转换为Long类型
+	 */
+	public static Long toLong(Object val){
+		return toDouble(val).longValue();
+	}
+
+	/**
+	 * 转换为Integer类型
+	 */
+	public static Integer toInteger(Object val){
+		return toLong(val).intValue();
+	}
+
+	/**
+	 * 获得i18n字符串
+	 */
+	public static String getMessage(String code, Object[] args) {
+		LocaleResolver localLocaleResolver = (LocaleResolver) SpringContextHolder.getBean(LocaleResolver.class);
+		HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
+		Locale localLocale = localLocaleResolver.resolveLocale(request);
+		return SpringContextHolder.getApplicationContext().getMessage(code, args, localLocale);
+	}
+
+	/**
+	 * 获得用户远程地址
+	 */
+	public static String getRemoteAddr(HttpServletRequest request){
+		String remoteAddr = request.getHeader("X-Real-IP");
+		if (isNotBlank(remoteAddr)) {
+			remoteAddr = request.getHeader("X-Forwarded-For");
+		}else if (isNotBlank(remoteAddr)) {
+			remoteAddr = request.getHeader("Proxy-Client-IP");
+		}else if (isNotBlank(remoteAddr)) {
+			remoteAddr = request.getHeader("WL-Proxy-Client-IP");
+		}
+		return remoteAddr != null ? remoteAddr : request.getRemoteAddr();
+	}
+
+	/**
+	 * 驼峰命名法工具
+	 * @return
+	 * 		toCamelCase("hello_world") == "helloWorld"
+	 * 		toCapitalizeCamelCase("hello_world") == "HelloWorld"
+	 * 		toUnderScoreCase("helloWorld") = "hello_world"
+	 */
+	public static String toCamelCase(String s) {
+		if (s == null) {
+			return null;
+		}
+
+		s = s.toLowerCase();
+
+		StringBuilder sb = new StringBuilder(s.length());
+		boolean upperCase = false;
+		for (int i = 0; i < s.length(); i++) {
+			char c = s.charAt(i);
+
+			if (c == SEPARATOR) {
+				upperCase = true;
+			} else if (upperCase) {
+				sb.append(Character.toUpperCase(c));
+				upperCase = false;
+			} else {
+				sb.append(c);
+			}
+		}
+
+		return sb.toString();
+	}
+
+	/**
+	 * 驼峰命名法工具
+	 * @return
+	 * 		toCamelCase("hello_world") == "helloWorld"
+	 * 		toCapitalizeCamelCase("hello_world") == "HelloWorld"
+	 * 		toUnderScoreCase("helloWorld") = "hello_world"
+	 */
+	public static String toCapitalizeCamelCase(String s) {
+		if (s == null) {
+			return null;
+		}
+		s = toCamelCase(s);
+		return s.substring(0, 1).toUpperCase() + s.substring(1);
+	}
+
+	/**
+	 * 驼峰命名法工具
+	 * @return
+	 * 		toCamelCase("hello_world") == "helloWorld"
+	 * 		toCapitalizeCamelCase("hello_world") == "HelloWorld"
+	 * 		toUnderScoreCase("helloWorld") = "hello_world"
+	 */
+	public static String toUnderScoreCase(String s) {
+		if (s == null) {
+			return null;
+		}
+
+		StringBuilder sb = new StringBuilder();
+		boolean upperCase = false;
+		for (int i = 0; i < s.length(); i++) {
+			char c = s.charAt(i);
+
+			boolean nextUpperCase = true;
+
+			if (i < (s.length() - 1)) {
+				nextUpperCase = Character.isUpperCase(s.charAt(i + 1));
+			}
+
+			if ((i > 0) && Character.isUpperCase(c)) {
+				if (!upperCase || !nextUpperCase) {
+					sb.append(SEPARATOR);
+				}
+				upperCase = true;
+			} else {
+				upperCase = false;
+			}
+
+			sb.append(Character.toLowerCase(c));
+		}
+
+		return sb.toString();
+	}
+
+	/**
+	 * 如果不为空,则设置值
+	 * @param target
+	 * @param source
+	 */
+	public static void setValueIfNotBlank(String target, String source) {
+		if (isNotBlank(source)){
+			target = source;
+		}
+	}
+
+	/**
+	 * 转换为JS获取对象值,生成三目运算返回结果
+	 * @param objectString 对象串
+	 *   例如:row.user.id
+	 *   返回:!row?'':!row.user?'':!row.user.id?'':row.user.id
+	 */
+	public static String jsGetVal(String objectString){
+		StringBuilder result = new StringBuilder();
+		StringBuilder val = new StringBuilder();
+		String[] vals = split(objectString, ".");
+		for (int i=0; i<vals.length; i++){
+			val.append("." + vals[i]);
+			result.append("!"+(val.substring(1))+"?'':");
+		}
+		result.append(val.substring(1));
+		return result.toString();
+	}
+
+
+
+	public static boolean isChinese(char c) {
+		Character.UnicodeBlock ub = Character.UnicodeBlock.of(c);
+		if (ub == Character.UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS || ub == Character.UnicodeBlock.CJK_COMPATIBILITY_IDEOGRAPHS
+				|| ub == Character.UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A || ub == Character.UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B
+				|| ub == Character.UnicodeBlock.CJK_SYMBOLS_AND_PUNCTUATION || ub == Character.UnicodeBlock.HALFWIDTH_AND_FULLWIDTH_FORMS
+				|| ub == Character.UnicodeBlock.GENERAL_PUNCTUATION) {
+			return true;
+		}
+		return false;
+	}
+
+	public static Map<String, String> StringToJson(String contentStr){
+		HashMap<String, String> requestMap = new HashMap<String, String>();
+
+
+		JSONObject jsonObject = JSONObject.fromObject(contentStr);//
+		Iterator<String> keys = jsonObject.keys();// 定义迭代器
+		String key = null;
+		String value = null;
+		while (keys.hasNext()) {
+			key = keys.next().toString();
+			value = jsonObject.get(key).toString();
+			requestMap.put(key.trim(), value.trim());
+		}
+		return requestMap;
+	}
+
+	/**
+	 * 根据键值对填充字符串,如("hello {name}",{name:"xiaoming"})
+	 * 输出:
+	 * @param content
+	 * @param map
+	 * @return
+	 */
+	public static String renderString(String content, Map<String, String> map){
+		Set<Map.Entry<String, String>> sets = map.entrySet();
+		for(Map.Entry<String, String> entry : sets) {
+			String regex = "\\{" + entry.getKey() + "\\}";
+			Pattern pattern = Pattern.compile(regex);
+			Matcher matcher = pattern.matcher(content);
+			content = matcher.replaceAll(entry.getValue());
+		}
+		return content;
+	}
+
+	/**
+	 * 提供精确的加法运算。
+	 * @param v1 被加数
+	 * @param v2 加数
+	 * @return 两个参数的和
+	 */
+	public static double add(double v1,double v2){
+		BigDecimal b1 = new BigDecimal(Double.toString(v1));
+		BigDecimal b2 = new BigDecimal(Double.toString(v2));
+		return b1.add(b2).doubleValue();
+	}
+	/**
+	 * 提供精确的减法运算。
+	 * @param v1 被减数
+	 * @param v2 减数
+	 * @return 两个参数的差
+	 */
+	public static double sub(double v1,double v2){
+		BigDecimal b1 = new BigDecimal(Double.toString(v1));
+		BigDecimal b2 = new BigDecimal(Double.toString(v2));
+		return b1.subtract(b2).doubleValue();
+	}
+	/**
+	 * 提供精确的乘法运算。
+	 * @param v1 被乘数
+	 * @param v2 乘数
+	 * @return 两个参数的积
+	 */
+	public static double mul(double v1,double v2){
+		BigDecimal b1 = new BigDecimal(Double.toString(v1));
+		BigDecimal b2 = new BigDecimal(Double.toString(v2));
+		return b1.multiply(b2).doubleValue();
+	}
+	/**
+	 * 提供(相对)精确的除法运算,当发生除不尽的情况时,精确到
+	 * 小数点以后10位,以后的数字四舍五入。
+	 * @param v1 被除数
+	 * @param v2 除数
+	 * @return 两个参数的商
+	 */
+	public static double div(double v1,double v2){
+		return div(v1,v2,DEF_DIV_SCALE);
+	}
+	/**
+	 * 提供(相对)精确的除法运算。当发生除不尽的情况时,由scale参数指
+	 * 定精度,以后的数字四舍五入。
+	 * @param v1 被除数
+	 * @param v2 除数
+	 * @param scale 表示表示需要精确到小数点以后几位。
+	 * @return 两个参数的商
+	 */
+	public static double div(double v1,double v2,int scale){
+		if(scale<0){
+			throw new IllegalArgumentException(
+					"The scale must be a positive integer or zero");
+		}
+		BigDecimal b1 = new BigDecimal(Double.toString(v1));
+		BigDecimal b2 = new BigDecimal(Double.toString(v2));
+		return b1.divide(b2,scale,BigDecimal.ROUND_HALF_UP).doubleValue();
+	}
+	/**
+	 * 提供精确的小数位四舍五入处理。
+	 * @param v 需要四舍五入的数字
+	 * @param scale 小数点后保留几位
+	 * @return 四舍五入后的结果
+	 */
+	public static double round(double v,int scale){
+		if(scale<0){
+			throw new IllegalArgumentException("The scale must be a positive integer or zero");
+		}
+		BigDecimal b = new BigDecimal(Double.toString(v));
+		BigDecimal one = new BigDecimal("1");
+		return b.divide(one,scale,BigDecimal.ROUND_HALF_UP).doubleValue();
+	}
+
+	public static Map<String,String> getByDictMap(){
+		Map<String,String> map = new HashMap<>();
+		map.put("13","报销申请");
+		map.put("16","合同申请");
+		map.put("21","发票申请");
+		map.put("38","案例登记");
+		map.put("39","项目登记");
+		map.put("40","退票申请");
+		map.put("41","项目变更");
+		map.put("42","合同归档");
+		map.put("43","合同作废");
+		map.put("44","合同变更");
+		map.put("45","报告申请");
+		map.put("46","报告变更");
+		map.put("47","报告作废");
+		map.put("48","发票变更");
+		map.put("49","退票变更");
+		map.put("50","投标申请");
+		map.put("51","报告归档");
+		map.put("52","收入结算");
+		map.put("53","收入调整");
+		map.put("54","调整作废");
+		map.put("55","收文申请");
+		map.put("56","行政盖章");
+		map.put("57","采购合同");
+		map.put("58","日常事务");
+		map.put("59","借用申请");
+		map.put("60","归还借用");
+		map.put("61","采购申请");
+		map.put("62","发文申请");
+		map.put("63","报废申请");
+		map.put("64","领用申请");
+		map.put("66","转正申请");
+		map.put("67","劳动关系");
+		map.put("68","部门调转");
+		map.put("69","日常事务");
+		map.put("70","职级调整");
+		map.put("71","离职申请");
+		map.put("72","合同完成");
+		map.put("74","系统预警");
+		map.put("75","加入企业");
+		map.put("76","案例申请");
+		map.put("77","加班申请");
+		map.put("78","出差申请");
+		map.put("79","外勤申请");
+		map.put("80","请假申请");
+		map.put("81","销假申请");
+		map.put("82","续假申请");
+		map.put("83","补卡申请");
+		map.put("84","考勤审批");
+		return map;
+	}
+
+	public static String firstDay(String month,String day,String companyId) {
+		if(StringUtils.isBlank(month)) {
+			if (StringUtils.isBlank(day)) {
+				//获取上月第一天:
+				Calendar c = Calendar.getInstance();
+				c.add(Calendar.MONTH, -1);
+				c.set(Calendar.DAY_OF_MONTH, 1);//设置为1号,当前日期既为本月第一天
+				String first = format.format(c.getTime());
+				return first;
+			}else{
+				Calendar now = Calendar.getInstance();
+				int nowDay = now.get(Calendar.DAY_OF_MONTH);
+				now.set(Calendar.DAY_OF_MONTH, 0);
+				String last = format.format(now.getTime()).substring(8,10);
+				if (last.equals(day)){
+					return format.format(now.getTime()).substring(0,8)+"01";
+				}else {
+					if (nowDay < Integer.parseInt(day)) {
+						//获取上月第一天:
+						Calendar c = Calendar.getInstance();
+						c.add(Calendar.MONTH, -2);
+						c.set(Calendar.DAY_OF_MONTH, 1);//设置为1号,当前日期既为本月第一天
+						String first = format.format(c.getTime()).substring(0, 8) + (Integer.parseInt(day) < 10 ? "0" + Integer.parseInt(day) : day);
+						return first;
+					} else {
+						//获取上月第一天:
+						Calendar c = Calendar.getInstance();
+						c.add(Calendar.MONTH, -1);
+						c.set(Calendar.DAY_OF_MONTH, 1);//设置为1号,当前日期既为本月第一天
+						String first = format.format(c.getTime()).substring(0, 8) + (Integer.parseInt(day) < 10 ? "0" + Integer.parseInt(day) : day);
+						return first;
+					}
+				}
+			}
+		}else{
+			if (StringUtils.isBlank(day)) {
+				return month+"-01";
+			}else {
+				int m = Integer.parseInt(month.substring(5,7))-1;
+				if (m==1){
+					int year = Integer.parseInt(month.substring(0,4)) - 1;
+					return year+"-01-"+(Integer.parseInt(day)<10?"0"+day:day);
+				}else if(m>10){
+					return month.substring(0,5)+m+"-"+(Integer.parseInt(day)<10?"0"+Integer.parseInt(day):day);
+				}else{
+					return month.substring(0,5)+"0"+m+"-"+(Integer.parseInt(day)<10?"0"+Integer.parseInt(day):day);
+				}
+			}
+		}
+	}
+	public static String lastDay(String month,String day,String companyId) {
+		if(StringUtils.isBlank(month)) {
+			if (StringUtils.isBlank(day)) {
+				//获取上月最后一天
+				Calendar ca = Calendar.getInstance();
+				ca.set(Calendar.DAY_OF_MONTH, 0);
+				String last = format.format(ca.getTime());
+				return last;
+			}else{
+				Calendar now = Calendar.getInstance();
+				int nowDay = now.get(Calendar.DAY_OF_MONTH);
+				now.set(Calendar.DAY_OF_MONTH, 0);
+				String l = format.format(now.getTime()).substring(8,10);
+				if (l.equals(day)){
+					return format.format(now.getTime()).substring(0,8)+day;
+				}else {
+					if (nowDay < Integer.parseInt(day)) {
+						//获取上月最后一天
+
+						int days = Integer.parseInt(day) - 1;
+						if (days>0) {
+							Calendar ca = Calendar.getInstance();
+							ca.set(Calendar.DAY_OF_MONTH, 0);
+							String last = format.format(ca.getTime()).substring(0, 8) + (days < 10 ? "0" + days : days);
+							return last;
+						}else {
+							Calendar ca = Calendar.getInstance();
+							ca.set(Calendar.DAY_OF_MONTH, 1);
+							return format.format(ca.getTime());
+						}
+					} else {
+						//获取上月最后一天
+						int days = Integer.parseInt(day) - 1;
+						if (days>0) {
+							Calendar ca = Calendar.getInstance();
+							ca.set(Calendar.DAY_OF_MONTH, +1);
+							String last = format.format(ca.getTime()).substring(0, 8) + (days < 10 ? "0" + days : days);
+							return last;
+						}else {
+							Calendar ca = Calendar.getInstance();
+							ca.set(Calendar.DAY_OF_MONTH, 0);
+							return format.format(ca.getTime());
+						}
+					}
+				}
+			}
+		}else {
+			if (StringUtils.isBlank(day)) {
+				//格式化日期
+				SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+				Calendar cal = Calendar.getInstance();
+				//设置年份
+				cal.set( Integer.parseInt(month.substring(0,4)),(Integer.parseInt(month.substring(5,7))-1),1);
+				//设置月份
+				//获取某月最大天数
+				int lastDay = cal.getActualMaximum(Calendar.DATE);
+				//设置日历中月份的最大天数
+				cal.set(Calendar.DAY_OF_MONTH, lastDay);
+				return sdf.format(cal.getTime());
+			}else {
+				int days = Integer.parseInt(day)-1;
+				if (days>0){
+					return month+"-"+(days<10?"0"+days:days);
+				}else{
+					Calendar calendar = Calendar.getInstance();
+					Date date = null;
+					try {
+						date = format.parse(month+"-01");
+					} catch (ParseException e) {
+						e.printStackTrace();
+					}
+					calendar.setTime(date);
+					calendar.set(Calendar.DAY_OF_MONTH, -1);
+					int lastDay = calendar.getActualMaximum(Calendar.DATE);
+					//设置日历中月份的最大天数
+					calendar.set(Calendar.DAY_OF_MONTH, lastDay);
+					return format.format(calendar.getTime());
+				}
+			}
+		}
+	}
+	public static Boolean isWeek(String day) {
+		SimpleDateFormat sdfDay = new SimpleDateFormat("yyyy-MM-dd");
+		Date date= null;//取时间
+		try {
+			date = sdfDay.parse(day);
+			Calendar calendar = Calendar.getInstance();
+			calendar.setTime(date);
+			int week  =  calendar.get(Calendar.DAY_OF_WEEK)-1;
+			if (week==0 || week==6){
+				return true;
+			}else {
+				return false;
+			}
+		} catch (ParseException e) {
+			e.printStackTrace();
+		}
+		return false;
+	}
+
+	public static int lateEarlyTime(String cardType,Date start,Date end,Date now){
+		Integer nowh = Integer.parseInt(sdfs.format(new Date()).substring(0,2));
+		Integer nowm = Integer.parseInt(sdfs.format(new Date()).substring(2,4));
+		if (cardType.equals("1")){
+			Integer ruleh = Integer.parseInt(sdfs.format(start).substring(0,2));
+			Integer rulem = Integer.parseInt(sdfs.format(start).substring(2,4));
+			if (ruleh - nowh < 0 && rulem >= nowm){
+				return nowh - ruleh;
+			}else if(ruleh - nowh < 0 && rulem < nowm){
+				return nowh - ruleh + 1;
+			}else {
+				return 0;
+			}
+		}else {
+			Integer ruleh = Integer.parseInt(sdfs.format(end).substring(0,2));
+			Integer rulem = Integer.parseInt(sdfs.format(end).substring(2,4));
+			if (ruleh - nowh > 0 && rulem > nowm){
+				return ruleh - nowh + 1;
+			}else if(ruleh - nowh > 0 && rulem <= nowm){
+				return ruleh - nowh;
+			}else {
+				return 0;
+			}
+		}
+	}
+
+	public static Map<String,String> getMonth() {
+		//获取上月最后一天
+		Calendar ca = Calendar.getInstance();
+		String month = format.format(ca.getTime()).substring(0,7);
+		ca.set(Calendar.DAY_OF_MONTH, 0);
+		String oldMonth = format.format(ca.getTime()).substring(0,7);
+		Map<String,String> map = new HashMap<>();
+		map.put("1",month);
+		map.put("2",oldMonth);
+		return map;
+	}
+
+
+	/**
+	 * date转Str
+	 * @param currentTime
+	 * @return
+	 */
+	public static String getDateStr(Date currentTime) {
+		SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
+		String dateString = formatter.format(currentTime);
+		return dateString;
+	}
+
+
+	//@ author: walker
+
+	/**
+	 * ⽤正则表达式判断字符串是否为数字(含负数)
+	 * @param str
+	 * @return
+	 */
+	public static boolean isNumeric(String str) {
+		String regEx = "^-?[0-9]+$";
+		Pattern pat = Pattern.compile(regEx);
+		Matcher mat = pat.matcher(str);
+		if (mat.find()) {
+			return true;
+		}else {
+			return false;
+		}
+	}
+
+
+	/**
+	 * 是否包含字符串
+	 *
+	 * @param str 验证字符串
+	 * @param strs 字符串组
+	 * @return 包含返回true
+	 */
+	public static boolean inStringIgnoreCase(String str, String... strs)
+	{
+		if (str != null && strs != null)
+		{
+			for (String s : strs)
+			{
+				if (str.equalsIgnoreCase(trim(s)))
+				{
+					return true;
+				}
+			}
+		}
+		return false;
+	}
+
+	/**
+	 * 将下划线大写方式命名的字符串转换为驼峰式。如果转换前的下划线大写方式命名的字符串为空,则返回空字符串。 例如:HELLO_WORLD->HelloWorld
+	 *
+	 * @param name 转换前的下划线大写方式命名的字符串
+	 * @return 转换后的驼峰式命名的字符串
+	 */
+	public static String convertToCamelCase(String name)
+	{
+		StringBuilder result = new StringBuilder();
+		// 快速检查
+		if (name == null || name.isEmpty())
+		{
+			// 没必要转换
+			return "";
+		}
+		else if (!name.contains("_"))
+		{
+			// 不含下划线,仅将首字母大写
+			return name.substring(0, 1).toUpperCase() + name.substring(1);
+		}
+		// 用下划线将原始字符串分割
+		String[] camels = name.split("_");
+		for (String camel : camels)
+		{
+			// 跳过原始字符串中开头、结尾的下换线或双重下划线
+			if (camel.isEmpty())
+			{
+				continue;
+			}
+			// 首字母大写
+			result.append(camel.substring(0, 1).toUpperCase());
+			result.append(camel.substring(1).toLowerCase());
+		}
+		return result.toString();
+	}
+
+	/**
+	 * * 判断一个对象是否为空
+	 *
+	 * @param object Object
+	 * @return true:为空 false:非空
+	 */
+	public static boolean isNull(Object object)
+	{
+		return object == null;
+	}
+}

+ 2 - 1
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/reimApprovalType/mapper/CwReimbursementTypeMapper.java

@@ -1,5 +1,6 @@
 package com.jeeplus.pubmodules.reimApprovalType.mapper;
 
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -26,7 +27,7 @@ public interface CwReimbursementTypeMapper extends BaseMapper<CwReimbursementTyp
      */
     List<CwReimbursementTypeInfo> findList(@Param(Constants.WRAPPER) Wrapper<CwReimbursementTypeInfo> queryWrapper);
 
-
+    @InterceptorIgnore(tenantLine = "true")
     List<CwReimbursementTypeInfo> bxList2(@Param(Constants.WRAPPER) Wrapper<CwReimbursementTypeInfo> queryWrapper,
                                           @Param("officeId") String officeId);
 

+ 2 - 0
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/serialNumTpl/mapper/SerialnumTplMapper.java

@@ -1,5 +1,6 @@
 package com.jeeplus.pubmodules.serialNumTpl.mapper;
 
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -12,6 +13,7 @@ public interface SerialnumTplMapper extends BaseMapper<SysSerialnumTpl> {
 
     IPage<SysSerialnumTpl> pageList(Page<SysSerialnumTpl> page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper);
 
+    @InterceptorIgnore(tenantLine = "true")
     SysSerialnumTpl queryByComAndBizCode(@Param("id")String id, @Param("bizCode")String bizCode);
 
     void resetSerialNum(@Param("id")String id,@Param("yearBuilt")String yearBuilt,@Param("newYear")String newYear);

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

@@ -121,7 +121,7 @@ public class UserController {
      */
     @ApiLog("用户数据列表")
     @ApiOperation(value = "用户数据列表")
-    @PreAuthorize("hasAuthority('sys:user:list')")
+    //@PreAuthorize("hasAuthority('sys:user:list')")
     @GetMapping("list")
     public ResponseEntity list(UserDTO userDTO, Page <UserDTO> page) throws Exception {
         QueryWrapper <UserDTO> queryWrapper = QueryWrapperGenerator.buildQueryCondition ( userDTO, UserDTO.class );
@@ -132,6 +132,26 @@ public class UserController {
         return ResponseEntity.ok ( result );
     }
 
+    /**
+     * 查询列表(排除admin)
+     *
+     * @param userDTO
+     * @param page
+     * @return
+     */
+    @ApiLog("用户数据列表")
+    @ApiOperation(value = "用户数据列表")
+    @PreAuthorize("hasAuthority('sys:user:list')")
+    @GetMapping("list2")
+    public ResponseEntity list2(UserDTO userDTO, Page <UserDTO> page) throws Exception {
+        QueryWrapper <UserDTO> queryWrapper = QueryWrapperGenerator.buildQueryCondition ( userDTO, UserDTO.class );
+        if ( userDTO.getTenantDTO ( ) != null && StrUtil.isNotBlank ( userDTO.getTenantDTO ( ).getId ( ) ) ) {
+            queryWrapper.eq ( "a.tenant_id", userDTO.getTenantDTO ( ).getId ( ) );
+        }
+        IPage <UserDTO> result = userService.findPage2 ( page, queryWrapper );
+        return ResponseEntity.ok ( result );
+    }
+
 
     /**
      * 保存用户

+ 10 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/feign/UserApiImpl.java

@@ -65,11 +65,21 @@ public class UserApiImpl implements IUserApi {
     }
 
     @Override
+    public UserDTO getFlowAbleById(String id) {
+        return userService.getFlowAbleById ( id );
+    }
+
+    @Override
     public List <UserDTO> findListByPostId(String postId) {
         return userService.findListByPostId ( postId );
     }
 
     @Override
+    public List<UserDTO> findListFlowAbleByPostId(String postId) {
+        return userService.findListFlowAbleByPostId ( postId );
+    }
+
+    @Override
     public List <UserDTO> findListByRoleId(String roleId) {
         return userService.findListByRoleId ( roleId );
     }

+ 20 - 1
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/UserMapper.java

@@ -31,6 +31,7 @@ public interface UserMapper extends BaseMapper <User> {
      * @param enName 角色名称
      * @return
      */
+    @InterceptorIgnore(tenantLine = "true")
     List <UserDTO> getUserInfoByEnName(String enName);
 
     /**
@@ -47,9 +48,18 @@ public interface UserMapper extends BaseMapper <User> {
      * @param queryWrapper
      * @return
      */
-    @InterceptorIgnore(dataPermission = "true")
+    @InterceptorIgnore(tenantLine = "true")
     UserDTO get(@Param(Constants.WRAPPER) Wrapper queryWrapper);
 
+    /**
+     * 根据条件查询用户
+     *
+     * @param queryWrapper
+     * @return
+     */
+    @InterceptorIgnore(tenantLine = "true")
+    UserDTO getFlowAbleById(@Param(Constants.WRAPPER) Wrapper queryWrapper);
+
     @InterceptorIgnore(tenantLine = "true")
     int updateById(@Param("et") User entity);
 
@@ -89,6 +99,15 @@ public interface UserMapper extends BaseMapper <User> {
     List <UserDTO> findListByPostId(@Param("postId") String postId);
 
     /**
+     * 按岗位获取用户列表
+     *
+     * @param postId
+     * @return
+     */
+    @InterceptorIgnore(tenantLine = "true")
+    List <UserDTO> findListFlowAbleByPostId(@Param("postId") String postId);
+
+    /**
      * 删除用户角色关联数据
      *
      * @param userId

+ 36 - 10
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/xml/UserMapper.xml

@@ -94,6 +94,25 @@
         ${ew.customSqlSegment}
     </select>
 
+    <!-- 获得用户 -->
+    <select id="getFlowAbleById" resultMap="userResult">
+        SELECT
+        <include refid="userColumns"/>,
+        r.id AS "roleDTO.id",
+        r.name AS "roleDTO.name",
+        r.en_name AS "roleDTO.enname",
+        p.id AS "postDTO.id",
+        p.code AS "postDTO.code",
+        p.name AS "postDTO.name"
+        FROM sys_user a
+        <include refid="userJoins"/>
+        LEFT JOIN sys_user_role ur ON ur.user_id = a.id
+        LEFT JOIN sys_role r ON r.id = ur.role_id
+        LEFT JOIN sys_user_post up ON up.user_id = a.id
+        LEFT JOIN sys_post p ON p.id = up.post_id
+        ${ew.customSqlSegment}
+    </select>
+
 
     <!-- 分页查询用户信息 -->
     <select id="findList" resultMap="userResult">
@@ -108,19 +127,11 @@
     <!-- 分页查询用户信息 -->
     <select id="findList2" resultMap="userResult">
         SELECT
-        <include refid="userColumns"/>,
-        r.id AS "roleDTO.id",
-        r.name AS "roleDTO.name",
-        r.en_name AS "roleDTO.enname",
-        p.id AS "postDTO.id",
-        p.name AS "postDTO.name"
+        <include refid="userColumns"/>
         FROM sys_user a
         <include refid="userJoins"/>
-        LEFT JOIN sys_user_role ur ON ur.user_id = a.id
-        LEFT JOIN sys_role r ON r.id = ur.role_id
-        LEFT JOIN sys_user_post up ON up.user_id = a.id
-        LEFT JOIN sys_post p ON p.id = up.post_id
         ${ew.customSqlSegment}
+        and (a.is_admin is null or a.is_admin = '' or a.is_admin != 1)
     </select>
 
     <!-- 查询角色下的用户 -->
@@ -151,6 +162,21 @@
             p.id = #{postId} and a.del_flag = 0
         </where>
     </select>
+
+    <!-- 查询岗位下的用户 -->
+    <select id="findListFlowAbleByPostId" resultMap="userResult">
+        SELECT
+        <include refid="userColumns"/>,
+        p.id AS "postDTO.id",
+        p.name AS "postDTO.name"
+        FROM sys_user a
+        <include refid="userJoins"/>
+        LEFT JOIN sys_user_post up ON up.user_id = a.id
+        LEFT JOIN sys_post p ON p.id = up.post_id
+        <where>
+            p.id = #{postId} and a.del_flag = 0
+        </where>
+    </select>
     <select id="getUserByName" resultType="com.jeeplus.sys.service.dto.UserDTO">
 select a.id, a.company_id as "companyDTO.id", a.office_id as "officeDTO.id", a.login_name as "loginName",
 		a.password,

+ 22 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/UserService.java

@@ -89,6 +89,19 @@ public class UserService extends ServiceImpl <UserMapper, User> {
     }
 
     /**
+     * 获取用户
+     *
+     * @param id
+     * @return
+     */
+    public UserDTO getFlowAbleById(String id) {
+        QueryWrapper queryWrapper = new QueryWrapper ( );
+        queryWrapper.eq ( "a.id", id );
+        queryWrapper.eq ( "a.del_flag", CommonConstants.NOT_DELETED ); // 排除已经删除
+        return userMapper.getFlowAbleById ( queryWrapper );
+    }
+
+    /**
      * 根据登录名获取用户
      *
      * @param loginName
@@ -169,8 +182,17 @@ public class UserService extends ServiceImpl <UserMapper, User> {
      */
     public List <UserDTO> findListByPostId(String postId) {
         return baseMapper.findListByPostId ( postId );
+    }
 
 
+    /**
+     * 查询岗位下关联的用户
+     *
+     * @param postId
+     * @return
+     */
+    public List <UserDTO> findListFlowAbleByPostId(String postId) {
+        return baseMapper.findListFlowAbleByPostId ( postId );
     }
 
 

+ 2 - 0
jeeplus-modules/jeeplus-system/src/main/resources/bootstrap.yml

@@ -19,6 +19,8 @@ server:
 
 # Spring
 spring:
+  main:
+    allow-bean-definition-overriding: true
   application:
     # 应用名称
     name: jeeplus-system