Parcourir la source

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/UserService.java
sangwenwei il y a 1 an
Parent
commit
c9fcef3d19
31 fichiers modifiés avec 1164 ajouts et 91 suppressions
  1. 2 1
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/workContract/mapper/WorkContractFileMapper.java
  2. 6 5
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/util/SignaturePostUtil.java
  3. 1 1
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/mapper/CwProjectRecordsMapper.java
  4. 3 2
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/controller/CwProjectReportSignatureCallBackController.java
  5. 1 1
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/xml/CwProofreadDetailMapper.xml
  6. 7 34
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/service/CwProjectReportService.java
  7. 504 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/utils/Global.java
  8. 154 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/utils/PropertiesLoader.java
  9. 63 0
      jeeplus-modules/jeeplus-finance/src/main/resources/application-finance-development.yml
  10. 54 0
      jeeplus-modules/jeeplus-finance/src/main/resources/application-finance-production.yml
  11. 2 0
      jeeplus-modules/jeeplus-finance/src/main/resources/application-finance.yml
  12. 0 29
      jeeplus-modules/jeeplus-finance/src/main/resources/bootstrap.yml
  13. 5 2
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/listener/MyExecutionListener.java
  14. 83 0
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/modules/flowable/listener/MyExecutionListener.java
  15. 6 6
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/collect/mapper/xml/CollectBasicsReturnHiMapper.xml
  16. 1 1
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/serialNumTpl/mapper/xml/TemplateMapper.xml
  17. 2 1
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/supplier/mapper/MaterialSupplierMapper.java
  18. 1 1
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/wareHouse/mapper/WareHouseDetailedMapper.java
  19. 1 0
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/wareHouse/service/WareHouseBasicService.java
  20. 15 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/DataRuleController.java
  21. 22 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/OfficeController.java
  22. 34 5
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/UserController.java
  23. 7 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/DataRuleMapper.java
  24. 2 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/MenuMapper.java
  25. 16 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/OfficeMapper.java
  26. 1 1
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/UserMapper.java
  27. 22 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/xml/DataRuleMapper.xml
  28. 2 1
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/xml/MenuMapper.xml
  29. 65 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/xml/OfficeMapper.xml
  30. 63 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/OfficeService.java
  31. 19 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/UserService.java

+ 2 - 1
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/workContract/mapper/WorkContractFileMapper.java

@@ -1,5 +1,6 @@
 package com.jeeplus.assess.workContract.mapper;
 
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.jeeplus.assess.workContract.domain.WorkContractFile;
 import org.apache.ibatis.annotations.Mapper;
@@ -9,6 +10,6 @@ import org.apache.ibatis.annotations.Param;
 public interface WorkContractFileMapper extends BaseMapper<WorkContractFile> {
 
     void updateStatusById(@Param("id") String id, @Param("filedType")String filedType);
-
+    @InterceptorIgnore(tenantLine = "true")
     WorkContractFile selectFileByContractInfoId (@Param("id") String id);
 }

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

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.jeeplus.finance.invoice.domain.SealUserInfo;
 //import com.jeeplus.sys.utils.Global;
+import com.jeeplus.finance.utils.Global;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpResponse;
@@ -40,14 +41,14 @@ import java.util.zip.ZipFile;
 public class SignaturePostUtil {
 
     //竖版模板templateId
-    private static final String VERTICALTEMPLATEID = "2894156236229259396";
+    private static final String VERTICALTEMPLATEID = Global.getConfig("vertical_templateId");
     //横板模板templateId
-    private static final String ACROSSTEMPLATEID = "2894156210627227768";
-    private static final String HTTPTOP = "http://192.168.2.130:9182";
+    private static final String ACROSSTEMPLATEID = Global.getConfig("across_templateId");
+    private static final String HTTPTOP = Global.getConfig("signature_http_top");
 
-    private final static String apptoken = "uIJQmTwyGJ";
+    private final static String apptoken = Global.getConfig("apptoken");
 //    private final static String appsecret = Global.getConfig("appsecret");
-    private final static String signature = "232a44ee9ebd251d119f0a65628f678e";
+    private final static String signature = Global.getConfig("signature");
 
 
     /**

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

@@ -28,7 +28,7 @@ public interface CwProjectRecordsMapper extends BaseMapper<CwProjectRecords> {
      * @param queryWrapper
      * @return
      */
-    @InterceptorIgnore(tenantLine = "true")
+    // @InterceptorIgnore(tenantLine = "true")
     IPage<CwProjectRecordsDTO> findList(Page<CwProjectRecordsDTO> page, @Param(Constants.WRAPPER) QueryWrapper<CwProjectRecords> queryWrapper);
     /**
      * 查询项目数据集合,和上面findList是一样的,目的是跳过findList接口的数据规则(比如仅部门可见、仅自己可见之类的)

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

@@ -24,6 +24,7 @@ import com.jeeplus.finance.projectReport.mapper.CwProjectReportMapper;
 import com.jeeplus.finance.projectReport.mapper.CwProjectReportSignatureMapper;
 import com.jeeplus.finance.projectReport.mapper.ProjectReportWorkAttachmentMapper;
 import com.jeeplus.finance.projectReport.service.CwProjectReportService;
+import com.jeeplus.finance.utils.Global;
 import com.jeeplus.flowable.feign.IFlowableApi;
 //import com.jeeplus.pubmodules.oss.mapper.OssServiceMapper;
 //import com.jeeplus.pubmodules.oss.service.OSSClientService;
@@ -72,9 +73,9 @@ import org.springframework.mock.web.MockMultipartFile;
 public class CwProjectReportSignatureCallBackController {
 
 
-    private static final String DIRECTORY = "/attachment-file";
+    private static final String DIRECTORY  = Global.getConfig("directory");
 
-    private static final String ALIYUNURL = "http://oss.gangwaninfo.com";
+    private static final String ALIYUNURL = Global.getConfig("aliyunUrl");
 
     @Autowired
     private CwProjectReportService cwProjectReportService;

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

@@ -45,7 +45,7 @@
 		select a.*,b.`name` AS type_name,b.sort from cw_proofread_detail a
 		left join cw_proofread_type b on a.type_id = b.id
 		where info_id = #{id}
-		ORDER BY a.create_time
+		ORDER BY a.create_time DESC
 	</select>
 	<select id="getByTypeIdAndInfoId" resultType="com.jeeplus.finance.projectReport.domain.CwProofreadDetail">
 		select * from cw_proofread_detail where type_id = #{typeId} and info_id = #{infoId}

+ 7 - 34
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/service/CwProjectReportService.java

@@ -28,6 +28,7 @@ import com.jeeplus.finance.projectReport.service.mapstruct.CwProjectReportFileWr
 import com.jeeplus.finance.projectReportArchive.domain.CwProjectReportArchive;
 import com.jeeplus.finance.projectReportArchive.mapper.CwProjectReportArchiveMapper;
 import com.jeeplus.finance.projectReportArchive.service.dto.CwProjectReportArchiveDTO;
+import com.jeeplus.finance.utils.Global;
 import com.jeeplus.finance.workClientInfo.domain.CwWorkClientBase;
 import com.jeeplus.finance.workClientInfo.service.dto.CwWorkClientBaseDTO;
 import com.jeeplus.finance.workClientInfo.service.mapstruct.CwWorkClientBaseWrapper;
@@ -81,10 +82,9 @@ import org.springframework.stereotype.Component;
 @Component
 public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, CwProjectReport> {
 
-    @Value("${signature_http_top}")
-    private static String HTTPTOP;
-    @Value("${approval_category_id}")
-    private static String APPROVALCATEGORYID;
+    private static final String HTTPTOP = Global.getConfig("signature_http_top");
+
+    private static String APPROVALCATEGORYID  = Global.getConfig("approval_category_id");;
     @Autowired
     private Environment environment;
 
@@ -100,25 +100,10 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
     @Resource
     private ProjectReportWorkAttachmentMapper attachmentMapper;
 
-//    @Resource
-//    private SerialnumTplService serialnumTplService;
-
-//    @Resource
-//    private OssService ossService;
-//
-//    @Resource
-//    private OssServiceMapper ossServiceMapper;
 
     @Resource
     private CwProjectReportCancelMapper cancelMapper;
 
-//    @Autowired
-//    private UserService userService;
-//    @Autowired
-//    private OSSClientService ossClientService;
-
-//    @Resource
-//    private UserMapper userMapper;
 
     @Resource
     private CwProjectReportSignatureMapper cwProjectReportSignatureMapper;
@@ -141,16 +126,6 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
     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
@@ -2010,7 +1985,7 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
                         return map;
                     }
                     //获取真签单的documentId
-                    HashMap hashMap = SignaturePostUtil.getDocument(srcFile);
+                    HashMap hashMap = new SignaturePostUtil().getDocument(srcFile);
                     String code = hashMap.get("code").toString();
                     String documentId = "";
                     if("0".equals(code)){
@@ -2295,8 +2270,7 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
         SignatureContract signatureContract = new SignatureContract();
         signatureContract.setDocuments(documentList);
         //审定单用印流程id
-        String approvalCategoryId = getApprovalCategoryId();
-        signatureContract.setCategoryId(approvalCategoryId);
+        signatureContract.setCategoryId(APPROVALCATEGORYID);
         signatureContract.setSend(true);
         signatureContract.setSignatories(signatories);
         signatureContract.setSn("");
@@ -2305,8 +2279,7 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
         System.out.println(json.toString());
         long s5=System.currentTimeMillis();
         System.out.println(json.toString());
-        String signatureHttpTop = getSignatureHttpTop();
-        String contractIdMapStr = SignaturePostUtil.sendPostApplicationJson(signatureHttpTop + "/contract/createbycategory", json.toString());
+        String contractIdMapStr = SignaturePostUtil.sendPostApplicationJson(HTTPTOP + "/contract/createbycategory", json.toString());
         long s6=System.currentTimeMillis();
         System.out.println("获取合同id获取时间:" + (s6 - s5));
         hashMap = JSON.parseObject(contractIdMapStr, HashMap.class);

+ 504 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/utils/Global.java

@@ -0,0 +1,504 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.finance.utils;
+
+import com.google.common.collect.Maps;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.core.io.DefaultResourceLoader;
+import org.springframework.security.authentication.dao.DaoAuthenticationProvider;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Properties;
+
+/**
+ * 全局配置类
+ * @author jeeplus
+ * @version 2014-06-25
+ */
+public class Global {
+
+	/**
+	 * 当前对象实例
+	 */
+	private static Global global = new Global();
+
+	/**
+	 * 保存全局属性值
+	 */
+	private static Map<String, String> map = Maps.newHashMap();
+
+	/**
+	 * 属性文件加载对象
+	 */
+	private static PropertiesLoader loader = new PropertiesLoader("application-finance.yml");
+
+
+	/**
+	 * 显示/隐藏
+	 */
+	public static final String SHOW = "1";
+	public static final String HIDE = "0";
+
+	/**
+	 * 是/否
+	 */
+	public static final String YES = "1";
+	public static final String NO = "0";
+
+	/**
+	 * 对/错
+	 */
+	public static final String TRUE = "true";
+	public static final String FALSE = "false";
+
+	/**
+	 * 上传文件基础虚拟路径
+	 */
+	public static final String USERFILES_BASE_URL = "/userfiles/";
+
+	/**
+	 * 获取当前对象实例
+	 */
+	public static Global getInstance() {
+		return global;
+	}
+
+	/**
+	 * 获取配置
+	 * @see {fns:getConfig('adminPath')}
+	 */
+	public static String getConfig1(String key) {
+		String value = map.get(key);
+		if (value == null){
+			value = loader.getProperty(key);
+			map.put(key, value != null ? value : StringUtils.EMPTY);
+		}
+		return value;
+	}
+
+	public static String getConfig(String key) {
+		String value = null;
+		try {
+			String property = loader.getProperty("active");
+
+			if (StringUtils.isNotBlank(property)) {
+				switch (property){
+					case "development":
+						PropertiesLoader devLoader = new PropertiesLoader("application-finance-development.yml");
+						value = devLoader.getProperty(key);
+						break;
+					case "production":
+						PropertiesLoader proLoader = new PropertiesLoader("application-finance-production.yml");
+						value = proLoader.getProperty(key);
+						break;
+				}
+			}
+
+		} catch (Exception e) {
+
+		}
+		return value;
+	}
+
+	/**
+	 * 获取管理端根路径
+	 */
+	public static String getAdminPath() {
+		return getConfig("adminPath");
+	}
+	/**
+	 */
+	public static String getAliyunUrl() {
+		return getConfig("aliyunDownloadUrl");
+	}
+	/**
+	 */
+	public static String getAliDownloadUrl() {
+		return getConfig("aliyunUrl");
+	}
+	/**
+	 */
+	public static String getEndpoint() {
+		return getConfig("endpoint");
+	}
+	/**
+	 */
+	public static String getAccessKeyId() {
+		return getConfig("accessKeyId");
+	}
+	/**
+	 */
+	public static String getAccessKeySecret() {
+		return getConfig("accessKeySecret");
+	}
+	/**
+	 */
+	public static String getBucketName() {
+		return getConfig("bucketName");
+	}
+	/**
+	 */
+	public static String getQzBucketName() {
+		return getConfig("qzBucketName");
+	}
+	/**
+	 */
+	public static String getAvatarDir() {
+		return getConfig("avatarDir");
+	}
+	/**
+	 */
+	public static String getNotifyDir() {
+		return getConfig("notifyDir");
+	}
+	/**
+	 */
+	public static String getReportDir() {
+		return getConfig("reportDir");
+	}
+	/**
+	 */
+	public static String getRqcode() {
+		return getConfig("rqcode");
+	}
+	/**
+	 */
+	public static String getGoout() {
+		return getConfig("goout");
+	}
+	/**
+	 */
+	public static String getLeave() {
+		return getConfig("leave");
+	}
+	/**
+	 */
+	public static String getOvertimeform() {
+		return getConfig("overtimeform");
+	}
+	/**
+	 */
+	public static String getSealform() {
+		return getConfig("sealform");
+	}
+	/**
+	 *
+	 */
+	public static String getWorkReimbur() {return getConfig("workReimbur");}
+	/**
+	 */
+	public static String getEvection() {
+		return getConfig("evection");
+	}
+	/**
+	 */
+	public static String getOaBuy() {
+		return getConfig("oaBuy");
+	}
+	/**
+	 */
+	public static String getOaAll() {
+		return getConfig("oaAll");
+	}
+	/**
+	 */
+	public static String getIm() {
+		return getConfig("im");
+	}/**
+	 */
+	public static String getWorkContractInfo() {
+		return getConfig("workContractInfo");
+	}
+	/**
+	 */
+	public static String getNotifyData() {
+		return getConfig("notifyData");
+	}
+    /**
+     */
+    public static String getAppData() {
+        return getConfig("appData");
+    }
+	/**
+	 */
+	public static String getLogo() {
+		return getConfig("logo");
+	}
+    /**
+     */
+	public static String getPhoto() {
+		return getConfig("photo");
+	}
+	/**
+	 *
+	 */
+	public static String getUserEvaluation(){return getConfig("userEvaluation");}
+	/**
+	 */
+	public static String getWorkBidingDocument() {return getConfig("workBidingDocument");}
+	/**
+	 */
+	public static String getWorkEngineeringProject() {return getConfig("workEngineeringProject");}
+
+	/**
+	 */
+	public static String getWorkFullExecute() {return getConfig("workFullExecute");}
+	/**
+	 */
+	public static String getWorkFullMeetingminutes() {return getConfig("workFullMeetingminutes");}
+	/**
+	 */
+	public static String getWorkFullDesignchange(){return getConfig("workFullDesignchange");}
+	/**
+	 */
+	public static String getWorkFullConstructsheet(){return getConfig("workFullConstructsheet");}
+	/**
+	 */
+	public static String getWorkFullProprietorsheet(){return getConfig("workFullProprietorsheet");}
+	/**
+	 */
+	public static String getWorkFullSupervisorsheet(){return getConfig("workFullSupervisorsheet");}
+	/**
+	 */
+	public static String getWorkProjectReport() {return getConfig("workProjectReport");}
+	/**
+	 */
+	public static String getWorkProjectBasis() {return getConfig("workProjectBasis");}
+	/**
+	 */
+	public static String getWorkProjectRemote() {return getConfig("workProjectRemote");}
+	/**
+	 */
+	public static String getWorkProjectSummary() {return getConfig("workProjectSummary");}
+	/**
+	 */
+	public static String getWorkProjectOther() {return getConfig("workProjectOther");}
+	/**
+	 */
+	public static String getWorkVisa() {return getConfig("workVisa");}
+	/**
+	 */
+	public static String getOfficehonor() {return getConfig("Officehonor");}
+	/**
+	 *
+	 */
+	public static String getJobResume() {return getConfig("jobResume");}
+	/**
+	 *
+	 */
+	public static String getSatisfaction() {return getConfig("satisfaction");}
+	/**
+	 *
+	 */
+	public static String getCertificate() {return getConfig("certificate");}
+	/**
+	 *
+	 */
+	public static String getJudgeAttachment() {return getConfig("judgeAttachment");}
+	/**
+	 * 获取前端根路径
+	 */
+	public static String getFrontPath() {
+		return getConfig("frontPath");
+	}
+
+	/**
+	 * 获取URL后缀
+	 */
+	public static String getUrlSuffix() {
+		return getConfig("urlSuffix");
+	}
+
+	/**
+	 * 获取电子签章文件路径
+	 */
+	public static String getISignature() {
+		return getConfig("iSignature");
+	}
+
+	/**
+	 */
+	public static String getOSSUrl() {
+		return getConfig("oSSUrl");
+	}
+	public static String getContractNumPath() {
+		return getConfig("contract_num_path");
+	}
+	/**
+	 * 是否是演示模式,演示模式下不能修改用户、岗位、密码、菜单、授权
+	 */
+	public static Boolean isDemoMode() {
+		String dm = getConfig("demoMode");
+		return "true".equals(dm) || "1".equals(dm);
+	}
+
+	/**
+	 * 在修改系统用户和岗位时是否同步到Activiti
+	 */
+	public static Boolean isSynActivitiIndetity() {
+		String dm = getConfig("activiti.isSynActivitiIndetity");
+		return "true".equals(dm) || "1".equals(dm);
+	}
+
+	/**
+	 * 页面获取常量
+	 * @see {fns:getConst('YES')}
+	 */
+	public static Object getConst(String field) {
+		try {
+			return Global.class.getField(field).get(null);
+		} catch (Exception e) {
+			// 异常代表无配置,这里什么也不做
+		}
+		return null;
+	}
+
+    /**
+     * 获取工程路径
+     * @return
+     */
+    public static String getProjectPath(){
+    	// 如果配置了工程路径,则直接返回,否则自动获取。
+		String projectPath = Global.getConfig("projectPath");
+		if (StringUtils.isNotBlank(projectPath)){
+			return projectPath;
+		}
+		try {
+			File file = new DefaultResourceLoader().getResource("").getFile();
+			if (file != null){
+				while(true){
+					File f = new File(file.getPath() + File.separator + "src" + File.separator + "main");
+					if (f == null || f.exists()){
+						break;
+					}
+					if (file.getParentFile() != null){
+						file = file.getParentFile();
+					}else{
+						break;
+					}
+				}
+				projectPath = file.toString();
+			}
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+		return projectPath;
+    }
+
+    /**
+     * 获取短信SMS信息
+     */
+    public static String getSmsUserid() {
+        return getConfig("sms_userid");
+    }
+    public static String getSmsAccount() {
+        return getConfig("sms_account");
+    }
+    public static String getSmsPassword() {
+        return getConfig("sms_password");
+    }
+    public static String getSmsMobile() {
+        return getConfig("sms_mobile");
+    }
+    public static String getSmsContent() {
+        return getConfig("sms_content");
+    }
+    public static String getSmsSendTime() {
+        return getConfig("sms_sendTime");
+    }
+    public static String getSmsAction() {
+        return getConfig("sms_action");
+    }
+    public static String getSmsCheckcontent() {
+        return getConfig("sms_checkcontent");
+    }
+
+	/**
+	 * 获取数据库连接信息
+	 */
+	public static String getJdbcUserName() {
+		return getConfig("jdbc.username");
+	}
+	public static String getJdbcPassword() {
+		return getConfig("jdbc.password");
+	}
+	public static String getJdbcUrl() {
+		return getConfig("jdbc.url");
+	}
+	public static String getJdbcDriver() {
+		return getConfig("jdbc.driver");
+	}
+
+	/**
+	 * 获取容联云账户信息
+	 */
+	public static String getRongUserid() {
+		return getConfig("rong_userid");
+	}
+	public static String getRongToken() {
+		return getConfig("rong_token");
+	}
+	//应用id
+	public static String getAppId() {
+		return getConfig("app_id");
+	}
+	//模板id
+	public static String getTemplateId() {
+		return getConfig("template_id");
+	}
+	//短信发送方式(1:旧的 2:容联云通讯)
+	public static String getCodeType() {
+		return getConfig("code_type");
+	}
+
+    public static String getOpenOfficeAddr() {
+        return getConfig("open_office_addr");
+    }
+
+    public static int getOpenOfficePort() {
+        String openOfficePort = getConfig("open_office_port");
+        return StringUtils.isBlank(openOfficePort)?8100:Integer.valueOf(openOfficePort);
+    }
+    public static String getOpenfireServer() {
+        String openOfficePort = getConfig("openfire.server");
+        return StringUtils.isBlank(openOfficePort)?"oa-pre.ssruihua.com":openOfficePort;
+    }
+    public static String getSysNotify() {
+        String sysNotify = getConfig("sys.notify");
+        return StringUtils.isBlank(sysNotify)?"http://cdn.gangwaninfo.com/jeeplus-resource-data/static/sys/notify.png":sysNotify;
+    }
+
+    public static String getStaffBasicFilePath() {
+        return getConfig("staff_basic_file_path");
+    }
+	public static String getDbName() {
+		return getConfig("db.name");
+	}
+	public static String getVersion() {
+		return getConfig("app_version");
+	}
+	public static String getTestVersion() {
+		return getConfig("app_version_test");
+	}
+
+    public static String getProjectTemplatePath() {
+        return getConfig("project.plan.template.path");
+    }
+
+    public static String getYyApiCode(){
+		return getConfig("yy_apicode");
+	}
+
+	public static String getYyMhUrl(){
+		return getConfig("yy_mhcxurl");
+	}
+
+	public static String getYyShUrl(){
+		return getConfig("yy_shcxurl");
+	}
+}

+ 154 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/utils/PropertiesLoader.java

@@ -0,0 +1,154 @@
+/**
+ * Copyright (c) 2005-2011 springside.org.cn
+ * 
+ * $Id: PropertiesLoader.java 1690 2012-02-22 13:42:00Z calvinxiu $
+ */
+package com.jeeplus.finance.utils;
+
+import org.apache.commons.io.IOUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.core.io.DefaultResourceLoader;
+import org.springframework.core.io.Resource;
+import org.springframework.core.io.ResourceLoader;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.NoSuchElementException;
+import java.util.Properties;
+
+/**
+ * Properties文件载入工具类. 可载入多个properties文件, 相同的属性在最后载入的文件中的值将会覆盖之前的值,但以System的Property优先.
+ * @author calvin
+ * @version 2013-05-15
+ */
+public class PropertiesLoader {
+
+	private static Logger logger = LoggerFactory.getLogger(PropertiesLoader.class);
+
+	private static ResourceLoader resourceLoader = new DefaultResourceLoader();
+
+	private final Properties properties;
+
+	public PropertiesLoader(String... resourcesPaths) {
+		properties = loadProperties(resourcesPaths);
+	}
+
+	public Properties getProperties() {
+		return properties;
+	}
+
+	/**
+	 * 取出Property,但以System的Property优先,取不到返回空字符串.
+	 */
+	private String getValue(String key) {
+		String systemProperty = System.getProperty(key);
+		if (systemProperty != null) {
+			return systemProperty;
+		}
+		if (properties.containsKey(key)) {
+	        return properties.getProperty(key);
+	    }
+	    return "";
+	}
+
+	/**
+	 * 取出String类型的Property,但以System的Property优先,如果都为Null则抛出异常.
+	 */
+	public String getProperty(String key) {
+		String value = getValue(key);
+		if (value == null) {
+			throw new NoSuchElementException();
+		}
+		return value;
+	}
+
+	/**
+	 * 取出String类型的Property,但以System的Property优先.如果都为Null则返回Default值.
+	 */
+	public String getProperty(String key, String defaultValue) {
+		String value = getValue(key);
+		return value != null ? value : defaultValue;
+	}
+
+	/**
+	 * 取出Integer类型的Property,但以System的Property优先.如果都为Null或内容错误则抛出异常.
+	 */
+	public Integer getInteger(String key) {
+		String value = getValue(key);
+		if (value == null) {
+			throw new NoSuchElementException();
+		}
+		return Integer.valueOf(value);
+	}
+
+	/**
+	 * 取出Integer类型的Property,但以System的Property优先.如果都为Null则返回Default值,如果内容错误则抛出异常
+	 */
+	public Integer getInteger(String key, Integer defaultValue) {
+		String value = getValue(key);
+		return value != null ? Integer.valueOf(value) : defaultValue;
+	}
+
+	/**
+	 * 取出Double类型的Property,但以System的Property优先.如果都为Null或内容错误则抛出异常.
+	 */
+	public Double getDouble(String key) {
+		String value = getValue(key);
+		if (value == null) {
+			throw new NoSuchElementException();
+		}
+		return Double.valueOf(value);
+	}
+
+	/**
+	 * 取出Double类型的Property,但以System的Property优先.如果都为Null则返回Default值,如果内容错误则抛出异常
+	 */
+	public Double getDouble(String key, Integer defaultValue) {
+		String value = getValue(key);
+		return value != null ? Double.valueOf(value) : defaultValue;
+	}
+
+	/**
+	 * 取出Boolean类型的Property,但以System的Property优先.如果都为Null抛出异常,如果内容不是true/false则返回false.
+	 */
+	public Boolean getBoolean(String key) {
+		String value = getValue(key);
+		if (value == null) {
+			throw new NoSuchElementException();
+		}
+		return Boolean.valueOf(value);
+	}
+
+	/**
+	 * 取出Boolean类型的Property,但以System的Property优先.如果都为Null则返回Default值,如果内容不为true/false则返回false.
+	 */
+	public Boolean getBoolean(String key, boolean defaultValue) {
+		String value = getValue(key);
+		return value != null ? Boolean.valueOf(value) : defaultValue;
+	}
+
+	/**
+	 * 载入多个文件, 文件路径使用Spring Resource格式.
+	 */
+	private Properties loadProperties(String... resourcesPaths) {
+		Properties props = new Properties();
+
+		for (String location : resourcesPaths) {
+
+//			logger.debug("Loading properties file from:" + location);
+
+			InputStream is = null;
+			try {
+				Resource resource = resourceLoader.getResource(location);
+				is = resource.getInputStream();
+				props.load(is);
+			} catch (IOException ex) {
+				logger.info("Could not load properties from path:" + location + ", " + ex.getMessage());
+			} finally {
+				IOUtils.closeQuietly(is);
+			}
+		}
+		return props;
+	}
+}

+ 63 - 0
jeeplus-modules/jeeplus-finance/src/main/resources/application-finance-development.yml

@@ -0,0 +1,63 @@
+# 合同管理-客户信息
+yy_apicode: 35afe9ec3263424f9a18feb837177169
+yy_mhcxurl: https://api.yonyoucloud.com/apis/dst/enterpriseTicketQuery/enterpriseSearchByName
+yy_shcxurl: https://api.yonyoucloud.com/apis/dst/enterpriseTicketQuery/enterpriseTicketInfo
+
+# 公共密码
+publicPassword: jsxgpassword
+#阿里云文件夹路径
+aliyun_directory: attachment-file/assess
+#签章阿里云文件bucketName
+qzBucketName: xg-qz
+#文件存储位置
+directory: /attachment-file
+
+
+
+
+#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
+
+#验证码发送相关参数
+rong_userid: 8a216da86715511501673e331c24171e
+rong_token: 3d7dc58c6a334ad6887317efbf847e41
+app_id: 8a216da86715511501673e331c741725
+template_id: 435329
+code_type: 1
+
+#其他系统的地址
+CCPM_PATH:  http://localhost:8090
+#待办中展示其他系统的流程
+#ccpm =》 13、102 报销申请、39 项目登记
+CCPM_TASK:  13,102,39
+
+#各服务引用状态 =》 (若包含,则进行获取该服务的流程信息)
+INQUIRE_STATUS: ccpm
+
+CAS_PATH: http://www.casserver.com:8443

+ 54 - 0
jeeplus-modules/jeeplus-finance/src/main/resources/application-finance-production.yml

@@ -0,0 +1,54 @@
+
+#验证码发送相关参数
+rong_userid: 8a216da86715511501673e331c24171e
+rong_token: 3d7dc58c6a334ad6887317efbf847e41
+app_id: 8a216da86715511501673e331c741725
+template_id: 435329
+code_type: 1
+
+
+# 合同管理-客户信息
+yy_apicode: 35afe9ec3263424f9a18feb837177169
+yy_mhcxurl: https://api.yonyoucloud.com/apis/dst/enterpriseTicketQuery/enterpriseSearchByName
+yy_shcxurl: https://api.yonyoucloud.com/apis/dst/enterpriseTicketQuery/enterpriseTicketInfo
+
+# 公共密码
+publicPassword: jsxgpassword
+
+#阿里云文件夹路径
+aliyun_directory: attachment-file/assess
+#签章阿里云文件bucketName
+qzBucketName: xg-qz
+#文件存储位置
+directory: /attachment-file
+
+aliyunUrl: http://oss.gangwaninfo.com
+
+
+apptoken: Mt4een4BN8
+appsecret: qhA4aV2GKE8Oq8k4G3twLiUn4U60cN
+signature: 19ed90930b5b84800ea582e34b71d1dd
+
+signature_http_top: http://121.40.158.10:9182
+
+#竖版模板templateId
+vertical_templateId: 2896237810850173018
+#横板模板templateId
+across_templateId: 2896237585095954500
+#公司圆章
+company_round_seal_id: 2895593387063378002
+#公司圆章-竖
+company_round_seal_id_vertical: 2898042707446829376
+#公司方章
+company_parties_seal_id: 2895597212998434929
+#审定单用印流程id
+approval_category_id: 3040555949196452300
+#报告用印流程id
+report_category_id: 2896237012158222343
+#审定内用印流程id
+judgement_category_id: 2912238663717396786
+#审定单用印流程id(盐城)
+approval_YC_category_id: 2933219658963918882
+#报告用印流程id(盐城)
+report_YC_category_id: 2933233335469383748
+

+ 2 - 0
jeeplus-modules/jeeplus-finance/src/main/resources/application-finance.yml

@@ -0,0 +1,2 @@
+#active: development
+active: production

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

@@ -100,32 +100,3 @@ 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: 3032139783803457567
-#报告用印流程id
-report_category_id: 2895618951099527314
-##审定内用印流程id
-judgement_category_id: 2920938119742709765
-#审定单用印流程id(盐城)
-approval_YC_category_id: 2932214418853044239
-#报告用印流程id(盐城)
-report_YC_category_id: 2933233458312618324

+ 5 - 2
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/listener/MyExecutionListener.java

@@ -26,8 +26,11 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-@Component("myExecutionListener")
-public class MyExecutionListener implements ExecutionListener {
+/**
+ * 弃用的流程监听通知类
+ */
+@Component("myExecutionListenerAbandon")
+public class MyExecutionListenerAbandon implements ExecutionListener {
 
     @SneakyThrows
     public void notify(DelegateExecution delegateExecution) {

+ 83 - 0
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/modules/flowable/listener/MyExecutionListener.java

@@ -0,0 +1,83 @@
+package com.jeeplus.modules.flowable.listener;
+
+import cn.hutool.extra.spring.SpringUtil;
+import com.jeeplus.common.TokenProvider;
+import com.jeeplus.flowable.model.ActRuTaskInfo;
+import com.jeeplus.flowable.model.Flow;
+import com.jeeplus.flowable.service.FlowTaskService;
+import com.jeeplus.flowable.service.MyNoticeService;
+import com.jeeplus.sys.feign.IUserApi;
+import com.jeeplus.sys.service.dto.UserDTO;
+import lombok.SneakyThrows;
+import org.flowable.engine.RuntimeService;
+import org.flowable.engine.delegate.DelegateExecution;
+import org.flowable.engine.delegate.ExecutionListener;
+import org.flowable.engine.runtime.ProcessInstance;
+import org.springframework.stereotype.Component;
+
+import java.text.SimpleDateFormat;
+import java.util.List;
+
+@Component("myExecutionListener")
+public class MyExecutionListener implements ExecutionListener {
+
+    @SneakyThrows
+    public void notify(DelegateExecution delegateExecution) {
+
+        String eventName = delegateExecution.getEventName ( );
+        System.out.println("--------- delegateExecution -----------" + delegateExecution);
+
+        if ( "start".equals ( eventName ) ) {
+            System.out.println ( "start=========" );
+        } else if ( "end".equals ( eventName ) ) {
+            //根据这里的 delegateExecution的id去act_ru_task表中查该流程的数据 对应表中的EXECUTION_ID_
+            ActRuTaskInfo task = SpringUtil.getBean(MyNoticeService.class).getTaskInfoByID(delegateExecution.getId());
+
+            if (null != task) {
+                List<Flow> flows = SpringUtil.getBean(FlowTaskService.class).historicTaskList(task.getProcInstId());
+                //根据PROC_DEF_ID_去act_re_deployment中查询流程的名称
+                String substring = task.getProcDefId().substring(0, task.getProcDefId().indexOf(":"));
+                String actName = SpringUtil.getBean(FlowTaskService.class).getActNameByDefId(substring);
+
+                String titleName = "";
+                // 根据流程定义ID查询流程实例
+                ProcessInstance processInstance = SpringUtil.getBean(RuntimeService.class).createProcessInstanceQuery()
+                        .processInstanceId(task.getProcInstId())
+                        .singleResult();
+
+                if (processInstance != null) {
+                    // 获取流程实例标题变量名(假设标题存储在名为"title"的变量中)
+                    String titleVariableName = "title";
+
+                    // 查询流程实例的标题变量
+                    Object title = SpringUtil.getBean(RuntimeService.class).getVariable(processInstance.getId(), titleVariableName);
+
+                    if (title != null) {
+                        titleName = title.toString();
+                    } else {
+                        // 如果标题变量不存在或者没有值,可以返回默认标题
+                        titleName = "";
+                    }
+                }
+                Flow flow = new Flow();
+                for (int i=0;i<flows.size();i++){
+                    if (flows.get(i).getComment().getMessage().equals("发起流程")){
+                        flow = flows.get(i);
+                    }
+                }
+
+                SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
+                UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getByToken(TokenProvider.getCurrentToken());
+
+                SpringUtil.getBean(MyNoticeService.class).add(task.getProcInstId(),titleName,task.getProcDefId(),actName,
+                        flow.getAssigneeName(),format.format(flow.getHistIns().getEndTime()),
+                        flow.getAssigneeName(),flow.getAssigneeId(),userDTO.getId());
+            }
+
+            System.out.println ( "end=========" );
+        } else if ( "take".equals ( eventName ) ) {//连线监听
+            System.out.println ( "take=========" );
+        }
+    }
+}

+ 6 - 6
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/collect/mapper/xml/CollectBasicsReturnHiMapper.xml

@@ -4,10 +4,10 @@
 
     <sql id="HI_Column_List">
         hi.id,
-        hi.create_by,
-        hi.create_date,
-        hi.update_by,
-        hi.update_date,
+        hi.create_by_id,
+        hi.create_time,
+        hi.update_by_id,
+        hi.update_time,
         hi.del_flag,
         hi.remarks,
         hi.collect_id,
@@ -23,7 +23,7 @@
         from material_management_collect_basics_return_hi hi
         left join sys_user su on su.id = hi.return_user
         where hi.del_flag = '0' and hi.collect_id = #{collectId}
-        order by hi.create_date desc
+        order by hi.create_time desc
     </select>
 
     <select id="findHiByHiId" resultType="com.jeeplus.pubmodules.collect.domain.CollectBasicsReturnHi">
@@ -38,7 +38,7 @@
         <include refid="HI_Column_List"></include>
         from material_management_collect_basics_return_hi hi
         where hi.del_flag = '0' and hi.collect_id = #{collectId}
-        order by hi.create_date desc
+        order by hi.create_time desc
         limit 1
     </select>
 </mapper>

+ 1 - 1
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/serialNumTpl/mapper/xml/TemplateMapper.xml

@@ -19,7 +19,7 @@
 	<select id="queryByComAndBizCode" resultType="com.jeeplus.pubmodules.serialNumTpl.domain.SysSerialnumTpl">
 		select	a.*
 		 from sys_serialnum_tpl a
-		where a.company_id = #{id} and a.biz_code = #{bizCode} and a.del_flag = 0
+		where a.biz_code = #{bizCode} and a.del_flag = 0
 		order by update_time desc
 		limit 1
 	</select>

+ 2 - 1
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/supplier/mapper/MaterialSupplierMapper.java

@@ -1,5 +1,6 @@
 package com.jeeplus.pubmodules.supplier.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,7 +13,7 @@ import org.apache.ibatis.annotations.Param;
 
 @Mapper
 public interface MaterialSupplierMapper extends BaseMapper<MaterialSupplier> {
-
+    @InterceptorIgnore(tenantLine = "true")
     IPage<MaterialSupplierDTO> findList(Page<MaterialSupplierDTO> page, @Param(Constants.WRAPPER) QueryWrapper<MaterialSupplier> queryWrapper);
 
     MaterialSupplierDTO queryById(@Param("id") String id);

+ 1 - 1
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/wareHouse/mapper/WareHouseDetailedMapper.java

@@ -41,7 +41,7 @@ public interface WareHouseDetailedMapper extends BaseMapper<WareHouseDetailed> {
     void deleteByBasicId(String basicId);
 
     // 根据入库id删除关联附件  物理删除
-    void deleteFilesByIdList(List<String> attachmentIdList);
+    void deleteFilesByIdList(@Param("attachmentIdList")List<String> attachmentIdList);
 
     // 修改入库详情商品名称
     void saveTradeName(@Param("oldTradeName") String oldTradeName, @Param("tradeName") String tradeName, @Param("wareHouseType") String wareHouseType);

+ 1 - 0
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/wareHouse/service/WareHouseBasicService.java

@@ -210,6 +210,7 @@ public class WareHouseBasicService {
         // 查询基础信息表
         WareHouseBasic info = basicMapper.selectById(id);
         BeanUtils.copyProperties(info, dto);
+        dto.setCreateBy(info.getCreateById());
         // 查询入库详情数据,只包含没有被修改过的数据以及修改后的数据
         List<WareHouseDetailed> wareHouseList = detailedMapper.getByBasicId(id);
         // 审核页面或者查看详情页面要进这个判断,这里面会将被修改掉的数据也查出来

+ 15 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/DataRuleController.java

@@ -18,11 +18,15 @@ import com.jeeplus.sys.service.DataRuleService;
 import com.jeeplus.sys.service.MenuService;
 import com.jeeplus.sys.service.dto.DataRuleDTO;
 import com.jeeplus.sys.service.dto.MenuDTO;
+import com.jeeplus.sys.service.dto.UserDTO;
+import com.jeeplus.sys.utils.UserUtils;
+import com.jeeplus.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.HashSet;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
@@ -148,6 +152,17 @@ public class DataRuleController {
 
             boolean existDataRule = false;
             List <DataRuleDTO> dataRuleDTOList = menuDTO.getDataRuleDTOList ( );
+            //对数据作处理,根据当前登陆人所属租户,若不是该登陆人所属租户中的权限限定信息,则进行过滤
+            UserDTO userDTO = UserUtils.getCurrentUserDTO();
+            if(null != userDTO && StringUtils.isNotBlank(userDTO.getTenantDTO().getId()) && !CommonConstants.DEFAULT_TENANT_ID.equals(userDTO.getTenantDTO().getId())){
+                Iterator<DataRuleDTO> it = dataRuleDTOList.iterator();
+                while(it.hasNext()){
+                    DataRuleDTO d = it.next();
+                    if (null != d && null != d.getTenantDTO() && StringUtils.isNotBlank(d.getTenantDTO().getId()) && !userDTO.getTenantDTO().getId().equals(d.getTenantDTO().getId())) {
+                        it.remove();
+                    }
+                }
+            }
             for (DataRuleDTO dataRuleDTO : dataRuleDTOList) {
                 Map <String, Object> dataRuleMap = Maps.newHashMap ( );
                 dataRuleMap.put ( "id", "dataRule-" + dataRuleDTO.getId ( ) );

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

@@ -124,6 +124,28 @@ public class OfficeController {
         List <OfficeDTO> rootTree = officeService.getOldRootTree (parentId,list, extId, type, showAll );
         return ResponseEntity.ok ( rootTree );
     }
+    /**
+     * 根据签字注师岗位获取部门数据。
+     *
+     * @param extId   排除的ID
+     * @param type    类型(1:公司;2:部门)
+     * @param showAll 是否显示不可用数据 1 显示 0 隐藏
+     * @return
+     */
+    @ApiLog("根据签字注师岗位获取部门数据")
+    @GetMapping("accessTreeData")
+    public ResponseEntity <List <OfficeDTO>> accessTreeData(@RequestParam(required = false) String tenantId,
+                                                      @RequestParam(required = false) String parentId,
+                                                      @RequestParam(required = false) String extId,
+                                                      @RequestParam(required = false) String type,
+                                                      @RequestParam(required = false, defaultValue = CommonConstants.NO) String showAll) {
+        //根据签字注师2岗位用户所在部门查部门数据
+        List <OfficeDTO> list = officeService.findAccessList ( tenantId, parentId );
+        //List <OfficeDTO> rootTree = officeService.getRootTree (list, extId, type, showAll,"1" );
+        List <OfficeDTO> rootTree = officeService.getOldRootTree (parentId,list, extId, type, showAll );
+
+        return ResponseEntity.ok ( rootTree );
+    }
 
     /**
      * 获取机构JSON数据。

+ 34 - 5
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/UserController.java

@@ -330,11 +330,12 @@ public class UserController {
             if (StringUtils.isNotBlank(userDTO.getCertType()) && "6".equals(userDTO.getCertType())) {
                 List<UserDTO> userList = result.getRecords();
                 for (UserDTO info : userList) {
-                    if ("潘中".equals(info.getName())) {
-                        info.setAccountantUserFlag(0);
-                    } else {
-                        info.setAccountantUserFlag(1);
-                    }
+//                    if ("潘中".equals(info.getName())) {
+//                        info.setAccountantUserFlag(0);
+//                    } else {
+//                        info.setAccountantUserFlag(1);
+//                    }
+                    info.setAccountantUserFlag(0);
                     Integer accountantUserCount = userService.getAccountantUserCount(info.getId());
                     info.setAccountantUserCount(accountantUserCount);
                 }
@@ -610,6 +611,34 @@ public class UserController {
     }
 
     /**
+     * 获取评估机构JSON数据。
+     *
+     * @param officeName 部门名称
+     * @param extId 排除的ID
+     * @param type  类型(1:公司;2:部门)
+     * @param showAll 是否显示不可用数据 1 显示 0 隐藏
+     * @return
+     */
+    @ApiLog("获取评估部门用户数据")
+    @GetMapping("treeUserDataAccessOffice")
+    public ResponseEntity treeUserDataAccessOffice(@RequestParam(required = false) String officeName,@RequestParam(required = false) String extId, @RequestParam(required = false) String type, @RequestParam(required = false, defaultValue = CommonConstants.NO) String showAll) {
+        officeName = "评估部";
+        List<OfficeDTO> list = officeService.getOfficeAllByOfficeName (officeName);
+        if(list.size()>0){
+            List<String> officeIds = Lists.newArrayList();
+            for (OfficeDTO info : list) {
+                info.setTypeFlag(true);
+                officeIds.add(info.getId());
+            }
+            //根据部门查询对应部门下的所有数据
+            List<OfficeDTO> officeDTOList = userService.getUserByOffice(officeIds,type);
+            list.addAll(officeDTOList);
+        }
+        List rootTree = officeService.getAccessRootTree (list, extId, type, showAll, "1");
+        return ResponseEntity.ok (rootTree);
+    }
+
+    /**
      * 判断当前用户是否是管理员
      *
      * @return

+ 7 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/DataRuleMapper.java

@@ -4,7 +4,11 @@
 package com.jeeplus.sys.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;
+import com.baomidou.mybatisplus.core.toolkit.Constants;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.jeeplus.sys.domain.DataRule;
 import com.jeeplus.sys.service.dto.DataRuleDTO;
 import org.apache.ibatis.annotations.Param;
@@ -23,4 +27,7 @@ public interface DataRuleMapper extends BaseMapper <DataRule> {
 
     @InterceptorIgnore
     List <DataRuleDTO> findByUserId(@Param("userId") String userId);
+
+    @InterceptorIgnore(tenantLine = "true")
+    public IPage<DataRule> findList(Page<DataRule> page, @Param(Constants.WRAPPER) QueryWrapper<DataRule> queryWrapper);
 }

+ 2 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/MenuMapper.java

@@ -3,6 +3,7 @@
  */
 package com.jeeplus.sys.mapper;
 
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.toolkit.Constants;
 import com.jeeplus.core.domain.TreeMapper;
@@ -24,6 +25,7 @@ public interface MenuMapper extends TreeMapper <Menu> {
 
     void deleteMenuRole(@Param("menuId") String menuId);
 
+    @InterceptorIgnore(tenantLine = "true")
     List <MenuDTO> findAllWithDataRuleList();
 
     List <String> mrList(@Param(Constants.WRAPPER) Wrapper wrapper);

+ 16 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/OfficeMapper.java

@@ -47,6 +47,14 @@ public interface OfficeMapper extends TreeMapper <Office> {
      */
     public List <OfficeDTO> findList(@Param(Constants.WRAPPER) QueryWrapper queryWrapper);
 
+    /**
+     * 根据签字注师2获取列表
+     *
+     * @return
+     */
+    @InterceptorIgnore(tenantLine = "true")
+    public List <OfficeDTO> findAccessList(@Param(Constants.WRAPPER) QueryWrapper queryWrapper);
+
     SysParameterValue findValueByParameter(@Param("parameter")String parameter, @Param("branchOffice")String branchOffice);
 
     /**
@@ -78,4 +86,12 @@ public interface OfficeMapper extends TreeMapper <Office> {
      */
     @InterceptorIgnore(tenantLine = "true")
     List<Office> getChildren(@Param("rootId")String rootId);
+
+    /**
+     * 获取到所有parent_id为‘0’的评估部门数据
+     * @param rootId
+     * @return
+     */
+    @InterceptorIgnore(tenantLine = "true")
+    List<Office> getAccessChildren(@Param("rootId")String rootId);
 }

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

@@ -102,7 +102,7 @@ public interface UserMapper extends BaseMapper <User> {
      * @param queryWrapper
      * @return
      */
-    //@InterceptorIgnore(tenantLine = "true")
+    @InterceptorIgnore(tenantLine = "true")
     IPage <UserDTO> findList(Page <UserDTO> page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper);
 
 

+ 22 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/xml/DataRuleMapper.xml

@@ -35,4 +35,26 @@
         FROM sys_role_datarule
         WHERE datarule_id = #{dataRuleId}
     </delete>
+
+    <select id="findList" resultType="com.jeeplus.sys.domain.DataRule">
+        SELECT
+            id,
+            menu_id,
+            NAME,
+            class_name,
+            t_field AS field,
+            t_express AS express,
+            t_value AS VALUE,
+            sql_segment,
+            remarks,
+            create_time,
+            create_by_id,
+            update_time,
+            update_by_id,
+            del_flag,
+            tenant_id
+        FROM
+            sys_datarule
+        ${ew.customSqlSegment}
+    </select>
 </mapper>

+ 2 - 1
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/xml/MenuMapper.xml

@@ -95,7 +95,8 @@
         a.t_value AS "value",
         a.sql_segment AS "sqlSegment",
         a.remarks AS "remarks",
-        a.del_flag AS "delFlag"
+        a.del_flag AS "delFlag",
+        a.tenant_id AS "tenantDTO.id"
         FROM sys_datarule a
         <where>
             a.menu_id =#{id} and a.del_flag = 0

+ 65 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/xml/OfficeMapper.xml

@@ -192,5 +192,70 @@
             del_flag = 0
             and parent_id = #{rootId}
     </select>
+    <select id="getAccessChildren" resultType="com.jeeplus.sys.domain.Office">
+        SELECT
+            id,
+            is_public,
+            area,
+            CODE,
+            type,
+            grade,
+            address,
+            zip_code,
+            MASTER,
+            phone,
+            fax,
+            email,
+            useable,
+            remarks,
+            parent_id,
+            parent_ids,
+            NAME,
+            sort,
+            create_time,
+            create_by_id,
+            update_time,
+            update_by_id,
+            del_flag,
+            tenant_id
+        FROM
+            sys_office
+        WHERE
+            del_flag = 0
+            and parent_id = #{rootId}
+            and NAME LIKE concat('%','评估','%')
+    </select>
+    <select id="findAccessList" resultType="com.jeeplus.sys.service.dto.OfficeDTO">
+        SELECT DISTINCT
+        a.id,
+               a.parent_id    AS "parent.id",
+               a.parent_ids,
+               a.area,
+               a.code,
+               a.name,
+               a.sort,
+               a.type,
+               a.grade,
+               a.address,
+               a.zip_code,
+               a.master,
+               a.phone,
+               a.fax,
+               a.email,
+               a.remarks,
+               a.create_by_id AS "createBy.id",
+               a.create_time,
+               a.update_by_id AS "updateBy.id",
+               a.update_time,
+               a.del_flag,
+               a.useable      AS useable,
+               a.tenant_id    AS "tenantDTO.id",
+               p.name         AS "parent.name"
+        FROM sys_office a
+                 LEFT JOIN sys_office p ON p.id = a.parent_id
+                 LEFT JOIN sys_user_post AS user_post ON user_post.user_id = a.id
+	             LEFT JOIN sys_post AS post on user_post.post_id = post.id
+            ${ew.customSqlSegment}
+    </select>
 
 </mapper>

+ 63 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/OfficeService.java

@@ -15,6 +15,7 @@ import com.jeeplus.core.service.TreeService;
 import com.jeeplus.sys.domain.Office;
 import com.jeeplus.sys.mapper.OfficeMapper;
 import com.jeeplus.sys.service.dto.OfficeDTO;
+import com.jeeplus.sys.service.dto.UserDTO;
 import com.jeeplus.sys.service.mapstruct.OfficeWrapper;
 import com.jeeplus.sys.utils.UserUtils;
 import org.apache.commons.lang3.StringUtils;
@@ -42,6 +43,9 @@ public class OfficeService extends TreeService <OfficeMapper, Office> {
     @Autowired
     private OfficeWrapper officeWrapper;
 
+    @Autowired
+    private UserService userService;
+
     /**
      * 获取二级节点数据信息
      * @return
@@ -57,6 +61,7 @@ public class OfficeService extends TreeService <OfficeMapper, Office> {
      */
     public List <OfficeDTO> findList(String tenantId, String parentId) {
         QueryWrapper queryWrapper = new QueryWrapper ( );
+
         queryWrapper.like ( StringUtils.isNotBlank ( parentId ), "a.parent_ids", "," + parentId + "," );
         queryWrapper.eq ( StringUtils.isNotBlank ( tenantId ), "a.tenant_id", tenantId );
         queryWrapper.eq ( "a.del_flag", 0 );
@@ -64,6 +69,64 @@ public class OfficeService extends TreeService <OfficeMapper, Office> {
         return baseMapper.findList ( queryWrapper );
     }
 
+    /**
+     * 根据签字注师2获取列表
+     *
+     * @return
+     */
+    public List <OfficeDTO> findAccessList(String tenantId, String parentId) {
+        QueryWrapper queryWrapper = new QueryWrapper ( );
+        //查询签字注师2岗位用户信息
+        List<String> offId = userService.findOffId();
+        queryWrapper.like ( StringUtils.isNotBlank ( parentId ), "a.parent_ids", "," + parentId + "," );
+        queryWrapper.eq ( StringUtils.isNotBlank ( tenantId ), "a.tenant_id", tenantId );
+        queryWrapper.eq ( "a.del_flag", 0 );
+        queryWrapper.in ( "a.id", offId );
+        queryWrapper.orderByAsc ( "a.sort" );
+        return baseMapper.findAccessList ( queryWrapper );
+    }
+
+    public List <OfficeDTO> getAccessRootTree(List<OfficeDTO> list, String extId, String type, String showAll, String showMyOffice) {
+        List<OfficeDTO> offices = Lists.newArrayList ();
+        // 获取到所有parent_id为‘0’的部门数据
+        List<Office> children = officeMapper.getAccessChildren(OfficeDTO.getRootId());
+//        List<Office> children = super.getChildren(new Office(OfficeDTO.getRootId()));
+        List<OfficeDTO> rootTrees = OfficeWrapper.INSTANCE.toDTO (children);
+        for (OfficeDTO root : rootTrees) {
+            if (this.isUseAble ( extId, type,root, showAll )){
+                // 不是被排除节点的子节点
+                List<OfficeDTO> officeList = formatListToTree (root, list, extId, type, showAll);
+                offices.addAll (officeList);
+            }
+        }
+        if (StringUtils.isNotBlank(showMyOffice)) {
+            OfficeDTO officeDTO = UserUtils.getCurrentUserDTO().getOfficeDTO();
+            // 排除管理员
+            if (!UserUtils.getCurrentUserDTO().isAdmin()){
+                if (org.apache.commons.lang.StringUtils.isNotBlank(officeDTO.getParentIds())) {
+                    String[] split = officeDTO.getParentIds().split(",");
+                    if (split.length > 2) {
+                        Office office = officeMapper.selectById(split[2]);
+                        if ("0".equals(office.getIsPublic())) {
+                            // isPublic为“0”,当前用户的公司为私有,查询的部门包含自己所属公司全部部门和其他的公有部门
+                            if(null != officeDTO && org.apache.commons.lang.StringUtils.isNotBlank(officeDTO.getParentIds())){
+                                offices = this.getCompanyFromTree(offices);
+                            }
+                        }
+                    } else {
+                        if ("0".equals(officeDTO.getIsPublic())) {
+                            // isPublic为“0”,当前用户的公司为私有,查询的部门包含自己所属公司全部部门和其他的公有部门
+                            if(null != officeDTO && org.apache.commons.lang.StringUtils.isNotBlank(officeDTO.getParentIds())){
+                                offices = this.getCompanyFromTree(offices);
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        return offices;
+    }
+
     public List <OfficeDTO> getRootTree(List<OfficeDTO> list, String extId, String type, String showAll, String showMyOffice) {
         List<OfficeDTO> offices = Lists.newArrayList ();
         // 获取到所有parent_id为‘0’的部门数据

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

@@ -453,4 +453,23 @@ public class UserService extends ServiceImpl <UserMapper, User> {
         }
         return false;
     }
+
+    /**
+     * 岗位分页检索
+     * @param
+     * @param
+     * @return
+     */
+    public List<String> findOffId() {
+        UserDTO dto = new UserDTO();
+        List <UserDTO> list1 = baseMapper.findList1(dto);
+        List<String> list = new ArrayList<>();
+        list1.forEach(li->{
+            list.add(li.getOfficeDTO().getId());
+        });
+        list1.forEach(li->{
+            list.add(li.getCompanyDTO().getId());
+        });
+        return  list;
+    }
 }