|
@@ -4028,7 +4028,13 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
|
|
|
User user = UserUtils.get(principalUserId);
|
|
|
if(null != user){
|
|
|
//获取成员印章id信息
|
|
|
+ long s1=System.currentTimeMillis();
|
|
|
String userSealId = SignaturePostUtil.getUserSealByMobile(user.getMobile(),"",user.getName() + "一级注册造价工程师章-竖");
|
|
|
+ long s2=System.currentTimeMillis();
|
|
|
+ System.out.println("第一个人员印章获取时间:" + (s2 - s1));
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
if(StringUtils.isNotBlank(userSealId)){
|
|
|
for (String documentId: documentList) {
|
|
|
//添加盖章位置
|
|
@@ -4058,7 +4064,11 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
|
|
|
User technologyPrincipalUser = UserUtils.getByLoginName("陈红星");
|
|
|
if(null != technologyPrincipalUser){
|
|
|
//获取成员印章id信息
|
|
|
+ long s1=System.currentTimeMillis();
|
|
|
String userSealId = SignaturePostUtil.getUserSealByMobile(technologyPrincipalUser.getMobile(),"","陈红星个人签名章-竖");
|
|
|
+ long s2=System.currentTimeMillis();
|
|
|
+ System.out.println("第二个人员印章获取时间:" + (s2 - s1));
|
|
|
+
|
|
|
if(StringUtils.isNotBlank(userSealId)){
|
|
|
for (String documentId: documentList) {
|
|
|
//添加盖章位置
|
|
@@ -4086,14 +4096,14 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
|
|
|
}
|
|
|
List<String> serialIdList = new ArrayList<String>(serialIdSet);
|
|
|
companyAction.setSealIds("[" + String.join(",", serialIdList) + "]");
|
|
|
- companyAction.setAutoSign("true");
|
|
|
+ companyAction.setAutoSign("false");
|
|
|
companyAction.setLocations(locations);
|
|
|
actions.add(companyAction);
|
|
|
|
|
|
//创建个人职业章参数
|
|
|
Action professionalChapterAction = new Action();
|
|
|
professionalChapterAction.setType("PRACTICE");
|
|
|
- professionalChapterAction.setName("个人职业章");
|
|
|
+ professionalChapterAction.setName("杨荣华个人职业章");
|
|
|
professionalChapterAction.setSerialNo("1");
|
|
|
|
|
|
//添加盖章位置
|
|
@@ -4103,12 +4113,16 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
|
|
|
|
|
|
//添加个人职业章人员信息
|
|
|
ActionOperatorInfo actionOperatorInfo = new ActionOperatorInfo();
|
|
|
- actionOperatorInfo.setOperatorContact("15240492484");
|
|
|
+ actionOperatorInfo.setOperatorContact("15240492484");//个人职业章盖章人的手机号
|
|
|
List<ActionOperatorInfo> actionOperators = Lists.newArrayList();
|
|
|
+ actionOperators.add(actionOperatorInfo);
|
|
|
professionalChapterAction.setActionOperators(actionOperators);
|
|
|
|
|
|
//获取成员印章id信息
|
|
|
+ long s1=System.currentTimeMillis();
|
|
|
String userSealId = SignaturePostUtil.getUserSealByMobile("15240492484","","杨荣华个人签名");
|
|
|
+ long s2=System.currentTimeMillis();
|
|
|
+ System.out.println("第三个人员印章获取时间:" + (s2 - s1));
|
|
|
if(StringUtils.isNotBlank(userSealId)){
|
|
|
for (String documentId: documentList) {
|
|
|
//添加盖章位置
|
|
@@ -4129,34 +4143,62 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
|
|
|
return hashMap;
|
|
|
}
|
|
|
|
|
|
- /*//获取成员印章id信息
|
|
|
- String userSealId2 = SignaturePostUtil.getUserSealByMobile("18351935168","","陈红星造价工程师章");
|
|
|
+ List<String> serialIdsList = new ArrayList<String>(professionalChapterSerialIdSet);
|
|
|
+ professionalChapterAction.setSealIds("[" + String.join(",", serialIdsList) + "]");
|
|
|
+ professionalChapterAction.setLocations(professionalChapterLocations);
|
|
|
+ net.sf.json.JSONObject professionalChapterJson = net.sf.json.JSONObject.fromObject(professionalChapterAction);
|
|
|
+ System.out.println(professionalChapterJson.toString());
|
|
|
+ actions.add(professionalChapterAction);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ //创建个人职业章参数
|
|
|
+ Action professionalChapterTwoAction = new Action();
|
|
|
+ professionalChapterTwoAction.setType("PRACTICE");
|
|
|
+ professionalChapterTwoAction.setName("刘建春个人职业章");
|
|
|
+ professionalChapterTwoAction.setSerialNo("1");
|
|
|
+
|
|
|
+ //添加盖章位置
|
|
|
+ List<Location> professionalChapterTwoLocations = Lists.newArrayList();
|
|
|
+
|
|
|
+ Set<String> professionalChapterTwoSerialIdSet = new HashSet<>();
|
|
|
+
|
|
|
+ //添加个人职业章人员信息
|
|
|
+ ActionOperatorInfo actionTwoOperatorInfo = new ActionOperatorInfo();
|
|
|
+ actionTwoOperatorInfo.setOperatorContact("13398782899");
|
|
|
+ List<ActionOperatorInfo> actionTwoOperators = Lists.newArrayList();
|
|
|
+ actionTwoOperators.add(actionTwoOperatorInfo);
|
|
|
+ professionalChapterTwoAction.setActionOperators(actionTwoOperators);
|
|
|
+
|
|
|
+ //获取成员印章id信息
|
|
|
+ long s3=System.currentTimeMillis();
|
|
|
+ String userSealId2 = SignaturePostUtil.getUserSealByMobile("13398782899","","杨荣华个人签名章");
|
|
|
+ long s4=System.currentTimeMillis();
|
|
|
+ System.out.println("第四个人员印章获取时间:" + (s4 - s3));
|
|
|
if(StringUtils.isNotBlank(userSealId2)){
|
|
|
for (String documentId: documentList) {
|
|
|
//添加盖章位置
|
|
|
Location principalLocation = new Location();
|
|
|
- professionalChapterSerialIdSet.add(userSealId2);
|
|
|
+ professionalChapterTwoSerialIdSet.add(userSealId2);
|
|
|
principalLocation.setSealId(userSealId2);
|
|
|
principalLocation.setDocumentId(documentId);
|
|
|
principalLocation.setPage("0");
|
|
|
principalLocation.setRectType("SEAL_CORPORATE");
|
|
|
principalLocation.setKeywordIndex(-1);
|
|
|
- principalLocation.setOffsetX("0.7758");
|
|
|
- principalLocation.setOffsetY("0.7339");
|
|
|
- professionalChapterLocations.add(principalLocation);
|
|
|
+ principalLocation.setOffsetX("0.5971");
|
|
|
+ principalLocation.setOffsetY("0.8176");
|
|
|
+ professionalChapterTwoLocations.add(principalLocation);
|
|
|
}
|
|
|
|
|
|
- }*/
|
|
|
+ }
|
|
|
|
|
|
- List<String> serialIdsList = new ArrayList<String>(professionalChapterSerialIdSet);
|
|
|
- professionalChapterAction.setSealIds("[" + String.join(",", serialIdsList) + "]");
|
|
|
- professionalChapterAction.setLocations(locations);
|
|
|
- net.sf.json.JSONObject professionalChapterJson = net.sf.json.JSONObject.fromObject(professionalChapterAction);
|
|
|
+ serialIdsList = new ArrayList<String>(professionalChapterTwoSerialIdSet);
|
|
|
+ professionalChapterTwoAction.setSealIds("[" + String.join(",", serialIdsList) + "]");
|
|
|
+ professionalChapterTwoAction.setLocations(professionalChapterTwoLocations);
|
|
|
+ professionalChapterJson = net.sf.json.JSONObject.fromObject(professionalChapterTwoAction);
|
|
|
System.out.println(professionalChapterJson.toString());
|
|
|
- actions.add(professionalChapterAction);
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ actions.add(professionalChapterTwoAction);
|
|
|
|
|
|
|
|
|
|
|
@@ -4177,9 +4219,106 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
|
|
|
signatureContract.setSn("");
|
|
|
signatureContract.setSubject(ruralProjectRecords.getProjectName());//添加项目名称
|
|
|
net.sf.json.JSONObject json = net.sf.json.JSONObject.fromObject(signatureContract);
|
|
|
+ System.out.println(json.toString());
|
|
|
+ long s5=System.currentTimeMillis();
|
|
|
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);
|
|
|
|
|
|
+ //访问个人职业章接口信息
|
|
|
+ String contractIdCode = hashMap.get("code").toString();
|
|
|
+ String contractId = "";
|
|
|
+
|
|
|
+ //首先进行公司章的签署认证
|
|
|
+ if("0".equals(contractIdCode)){
|
|
|
+ contractId = hashMap.get("contractId").toString();
|
|
|
+ if(!"".equals(contractId)){
|
|
|
+ CommonSealSign seal = new CommonSealSign();
|
|
|
+ //添加刚生成的盖章合同id
|
|
|
+ seal.setContractId(contractId);
|
|
|
+ seal.setTenantName("江苏兴光项目管理有限公司");
|
|
|
+ net.sf.json.JSONObject sealJson = net.sf.json.JSONObject.fromObject(seal);
|
|
|
+ //访问个人章方法
|
|
|
+ long s7=System.currentTimeMillis();
|
|
|
+ String personalCareerSealMapStr = SignaturePostUtil.sendPostApplicationJson(HTTPTOP + "/contract/signbycompany", sealJson.toString());
|
|
|
+ long s8=System.currentTimeMillis();
|
|
|
+ System.out.println("签署公司章方法获取时间:" + (s8 - s7));
|
|
|
+ System.out.println(personalCareerSealMapStr);
|
|
|
+
|
|
|
+ hashMap = JSON.parseObject(personalCareerSealMapStr, HashMap.class);
|
|
|
+ contractIdCode = hashMap.get("code").toString();
|
|
|
+ if(!"0".equals(contractIdCode)){
|
|
|
+ String message = hashMap.get("message").toString();
|
|
|
+ message = message.replaceAll(contractId + ";","");
|
|
|
+ hashMap.put("message" , message);
|
|
|
+ return hashMap;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if("0".equals(contractIdCode)){
|
|
|
+ contractId = hashMap.get("contractId").toString();
|
|
|
+ if(!"".equals(contractId)){
|
|
|
+ //个人签字章数据处理
|
|
|
+
|
|
|
+ //将原有个人章的RectType进行变更
|
|
|
+ for (Location info : professionalChapterLocations) {
|
|
|
+ info.setRectType("SEAL_PRACTICE");
|
|
|
+ }
|
|
|
+ PersonalSignatureSeal seal = new PersonalSignatureSeal();
|
|
|
+ //添加个人章手机号
|
|
|
+ seal.setContact(actionOperatorInfo.getOperatorContact());
|
|
|
+ //添加刚生成的盖章合同id
|
|
|
+ seal.setContractId(contractId);
|
|
|
+ seal.setTenantName("江苏兴光项目管理有限公司");
|
|
|
+ seal.setStampers(professionalChapterLocations);
|
|
|
+ net.sf.json.JSONObject sealJson = net.sf.json.JSONObject.fromObject(seal);
|
|
|
+ System.out.println(sealJson.toString());
|
|
|
+ //访问个人章方法
|
|
|
+ long s7=System.currentTimeMillis();
|
|
|
+ String personalCareerSealMapStr = SignaturePostUtil.sendPostApplicationJson(HTTPTOP + "/contract/signbypractice", sealJson.toString());
|
|
|
+ long s8=System.currentTimeMillis();
|
|
|
+ System.out.println("访问第一个个人签字章方法获取时间:" + (s8 - s7));
|
|
|
+ System.out.println(personalCareerSealMapStr);
|
|
|
+
|
|
|
+ hashMap = JSON.parseObject(personalCareerSealMapStr, HashMap.class);
|
|
|
+ contractIdCode = hashMap.get("code").toString();
|
|
|
+ if(!"0".equals(contractIdCode)){
|
|
|
+ String message = hashMap.get("message").toString();
|
|
|
+ message = message.replaceAll(contractId + ";","");
|
|
|
+ hashMap.put("message" , message);
|
|
|
+ return hashMap;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ for (Location info : professionalChapterTwoLocations) {
|
|
|
+ info.setRectType("SEAL_PRACTICE");
|
|
|
+ }
|
|
|
+ PersonalSignatureSeal sealTwo = new PersonalSignatureSeal();
|
|
|
+ sealTwo.setContact(actionTwoOperatorInfo.getOperatorContact());
|
|
|
+ sealTwo.setContractId(contractId);
|
|
|
+ sealTwo.setTenantName("江苏兴光项目管理有限公司");
|
|
|
+ sealTwo.setStampers(professionalChapterTwoLocations);
|
|
|
+ net.sf.json.JSONObject sealTwoJson = net.sf.json.JSONObject.fromObject(sealTwo);
|
|
|
+ System.out.println(sealTwoJson.toString());
|
|
|
+ long s9=System.currentTimeMillis();
|
|
|
+ String personalCareerSealTwoMapStr = SignaturePostUtil.sendPostApplicationJson(HTTPTOP + "/contract/signbypractice", sealTwoJson.toString());
|
|
|
+ long s10=System.currentTimeMillis();
|
|
|
+ System.out.println("访问第二个个人签字章方法获取时间:" + (s10 - s9));
|
|
|
+ System.out.println(personalCareerSealTwoMapStr);
|
|
|
+
|
|
|
+ hashMap = JSON.parseObject(personalCareerSealTwoMapStr, HashMap.class);
|
|
|
+ contractIdCode = hashMap.get("code").toString();
|
|
|
+ if(!"0".equals(contractIdCode)){
|
|
|
+ String message = hashMap.get("message").toString();
|
|
|
+ message = message.replaceAll(contractId + ";","");
|
|
|
+ hashMap.put("message" , message);
|
|
|
+ return hashMap;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
return hashMap;
|
|
|
}
|
|
|
|