|
@@ -3874,12 +3874,12 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
|
|
|
List<Location> locations = Lists.newArrayList();
|
|
|
Location location = new Location();
|
|
|
location.setDocumentId(documentList.get(0));
|
|
|
- location.setPage(0);
|
|
|
+ location.setPage("0");
|
|
|
location.setRectType("SEAL_CORPORATE");
|
|
|
//location.setKeyword("咨询企业(章)");
|
|
|
location.setKeywordIndex(-1);
|
|
|
- location.setOffsetX(0.7749);
|
|
|
- location.setOffsetY(0.2725);
|
|
|
+ location.setOffsetX("0.7749");
|
|
|
+ location.setOffsetY("0.2725");
|
|
|
locations.add(location);
|
|
|
companyAction.setLocations(locations);
|
|
|
actions.add(companyAction);
|
|
@@ -3902,12 +3902,12 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
|
|
|
List<Location> principalLocations = Lists.newArrayList();
|
|
|
Location principalLocation = new Location();
|
|
|
principalLocation.setDocumentId(documentList.get(0));
|
|
|
- principalLocation.setPage(0);
|
|
|
+ principalLocation.setPage("0");
|
|
|
principalLocation.setRectType("SEAL_CORPORATE");
|
|
|
//principalLocation.setKeyword("项目负责人(签字盖章)");
|
|
|
principalLocation.setKeywordIndex(-1);
|
|
|
- principalLocation.setOffsetX(0.7759);
|
|
|
- principalLocation.setOffsetY(0.1934);
|
|
|
+ principalLocation.setOffsetX("0.7759");
|
|
|
+ principalLocation.setOffsetY("0.1934");
|
|
|
principalLocations.add(principalLocation);
|
|
|
actionUser.setLocations(principalLocations);
|
|
|
actions.add(actionUser);
|
|
@@ -3930,12 +3930,12 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
|
|
|
List<Location> principalLocations = Lists.newArrayList();
|
|
|
Location principalLocation = new Location();
|
|
|
principalLocation.setDocumentId(documentList.get(0));
|
|
|
- principalLocation.setPage(0);
|
|
|
+ principalLocation.setPage("0");
|
|
|
principalLocation.setRectType("SEAL_CORPORATE");
|
|
|
//principalLocation.setKeyword("签发人");
|
|
|
principalLocation.setKeywordIndex(-1);
|
|
|
- principalLocation.setOffsetX(0.7518);
|
|
|
- principalLocation.setOffsetY(0.1642);
|
|
|
+ principalLocation.setOffsetX("0.7518");
|
|
|
+ principalLocation.setOffsetY("0.1642");
|
|
|
principalLocations.add(principalLocation);
|
|
|
actionUser.setLocations(principalLocations);
|
|
|
actions.add(actionUser);
|
|
@@ -4040,9 +4040,70 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
|
|
|
stamper.setDocumentId(invalidDocumentId);
|
|
|
stamper.setType("SEAL_CORPORATE");
|
|
|
stamper.setSealId(location.getSealId());
|
|
|
- stamper.setPage(location.getPage());
|
|
|
- stamper.setX(location.getOffsetX());
|
|
|
- stamper.setY(location.getOffsetY());
|
|
|
+ stamper.setPage(Integer.parseInt(location.getPage()));
|
|
|
+ stamper.setX(Double.valueOf(location.getOffsetX()));
|
|
|
+ stamper.setY(Double.valueOf(location.getOffsetY()));
|
|
|
+ stampers.add(stamper);
|
|
|
+ }
|
|
|
+ signByCompanyInfo.setStampers(stampers);
|
|
|
+ //将数据转换为jsonString
|
|
|
+ Object obj = com.alibaba.fastjson.JSONArray.toJSON(signByCompanyInfo);
|
|
|
+ String signByCompanyInfoJsonStr = obj.toString();
|
|
|
+ //进行静默签署
|
|
|
+ String signByCompanyStr = SignaturePostUtil.sendPostApplicationJson(HTTPTOP + "/contract/signbycompany", signByCompanyInfoJsonStr);
|
|
|
+ HashMap signByCompanyStrMap = JSON.parseObject(signByCompanyStr, HashMap.class);
|
|
|
+ String signByCompanyStrResult = signByCompanyStrMap.get("code").toString();
|
|
|
+ if (!"0".equals(signByCompanyStrResult)) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据contractId进行静默签署(非坐标)
|
|
|
+ * @param contractId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public String signbyCompanyByKeyWord (String contractId,List<String> invalidDocumentIdList){
|
|
|
+
|
|
|
+ //根据合同id查询坐标
|
|
|
+ Map map = new HashMap();
|
|
|
+ map.put("contractId",contractId);
|
|
|
+ String coordinateMapStr = SignaturePostUtil.doGet( map,HTTPTOP + "/contract/query/location");
|
|
|
+ HashMap hashMap = JSON.parseObject(coordinateMapStr, HashMap.class);
|
|
|
+ String resultStr = hashMap.get("result").toString();
|
|
|
+ Map classMap = new HashMap();
|
|
|
+ classMap.put("locations", Location.class);
|
|
|
+ //2、使用JSONArray
|
|
|
+ JSONArray jsonArray= JSONArray.fromObject(resultStr);
|
|
|
+ //获得jsonArray的第一个元素
|
|
|
+ Object o=jsonArray.get(0);
|
|
|
+ net.sf.json.JSONObject jsonObject= net.sf.json.JSONObject.fromObject(o);
|
|
|
+ //对json数据进行实例化
|
|
|
+ CoordinateInfo coordinateInfo = (CoordinateInfo) net.sf.json.JSONObject.toBean(jsonObject, CoordinateInfo.class, classMap);
|
|
|
+ //发起合同
|
|
|
+ Map sendContractMap = new HashMap();
|
|
|
+ sendContractMap.put("contractId",contractId);
|
|
|
+ String sendContractJsonString = JSON.toJSONString(sendContractMap);
|
|
|
+ String sendContractStr = SignaturePostUtil.sendPostApplicationJson( HTTPTOP + "/contract/send",sendContractJsonString);
|
|
|
+ HashMap signUrlHashMap = JSON.parseObject(sendContractStr, HashMap.class);
|
|
|
+ String sendContractResult = signUrlHashMap.get("code").toString();
|
|
|
+ if("0".equals(sendContractResult)) {
|
|
|
+ List<Location> locations = coordinateInfo.getLocations();
|
|
|
+
|
|
|
+ SignByCompanyInfo signByCompanyInfo = new SignByCompanyInfo();
|
|
|
+ signByCompanyInfo.setContractId(contractId);
|
|
|
+ signByCompanyInfo.setTenantName("江苏兴光项目管理有限公司");
|
|
|
+
|
|
|
+ for (Location location : locations) {
|
|
|
+ List<Stamper> stampers = Lists.newArrayList();
|
|
|
+ for (String invalidDocumentId : invalidDocumentIdList) {
|
|
|
+ Stamper stamper = new Stamper();
|
|
|
+ stamper.setDocumentId(invalidDocumentId);
|
|
|
+ stamper.setType("SEAL_CORPORATE");
|
|
|
+ stamper.setSealId(location.getSealId());
|
|
|
stampers.add(stamper);
|
|
|
}
|
|
|
signByCompanyInfo.setStampers(stampers);
|
|
@@ -4076,23 +4137,44 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
|
|
|
List<Action> actions = Lists.newArrayList();
|
|
|
Action companyAction = new Action();
|
|
|
companyAction.setType("CORPORATE");
|
|
|
- companyAction.setName("公司印章");
|
|
|
+ companyAction.setName("公司执业印章");
|
|
|
companyAction.setSerialNo("1");
|
|
|
- companyAction.setSealId("2894161942659543252");
|
|
|
+ //公司方章编号
|
|
|
+ companyAction.setSealId("2894163220106129636");
|
|
|
//添加盖章位置
|
|
|
List<Location> locations = Lists.newArrayList();
|
|
|
Location location = new Location();
|
|
|
location.setDocumentId(documentList.get(0));
|
|
|
- location.setPage(0);
|
|
|
+ //location.setPage(0);
|
|
|
location.setRectType("SEAL_CORPORATE");
|
|
|
- //location.setKeyword("咨询企业(章)");
|
|
|
- location.setKeywordIndex(-1);
|
|
|
- location.setOffsetX(0.7749);
|
|
|
- location.setOffsetY(0.2725);
|
|
|
+ location.setKeyword("咨询企业执业印章");
|
|
|
+ location.setKeywordIndex(1);
|
|
|
+ /*location.setOffsetX(0.7749);
|
|
|
+ location.setOffsetY(0.2725);*/
|
|
|
locations.add(location);
|
|
|
companyAction.setLocations(locations);
|
|
|
actions.add(companyAction);
|
|
|
|
|
|
+ Action companyActionCircle = new Action();
|
|
|
+ companyActionCircle.setType("CORPORATE");
|
|
|
+ companyActionCircle.setName("公司印章");
|
|
|
+ companyActionCircle.setSerialNo("1");
|
|
|
+ //公司圆章编号
|
|
|
+ companyActionCircle.setSealId("2894161942659543252");
|
|
|
+ //添加盖章位置
|
|
|
+ List<Location> locationCircles = Lists.newArrayList();
|
|
|
+ Location locationCircle = new Location();
|
|
|
+ locationCircle.setDocumentId(documentList.get(0));
|
|
|
+ //location.setPage(0);
|
|
|
+ locationCircle.setRectType("SEAL_CORPORATE");
|
|
|
+ locationCircle.setKeyword("江苏兴光项目管理有限公司(印章)");
|
|
|
+ locationCircle.setKeywordIndex(1);
|
|
|
+ locationCircle.setOffsetX("-0.2");
|
|
|
+ //locationCircle.setOffsetY("0.2725");
|
|
|
+ locationCircles.add(locationCircle);
|
|
|
+ companyActionCircle.setLocations(locationCircles);
|
|
|
+ actions.add(companyActionCircle);
|
|
|
+
|
|
|
//根据角色信息录入签署方信息
|
|
|
//负责人
|
|
|
if(StringUtils.isNotBlank(principalUserId)){
|
|
@@ -4111,15 +4193,36 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
|
|
|
List<Location> principalLocations = Lists.newArrayList();
|
|
|
Location principalLocation = new Location();
|
|
|
principalLocation.setDocumentId(documentList.get(0));
|
|
|
- principalLocation.setPage(0);
|
|
|
+ //principalLocation.setPage(0);
|
|
|
principalLocation.setRectType("SEAL_CORPORATE");
|
|
|
- //principalLocation.setKeyword("项目负责人(签字盖章)");
|
|
|
- principalLocation.setKeywordIndex(-1);
|
|
|
- principalLocation.setOffsetX(0.7759);
|
|
|
- principalLocation.setOffsetY(0.1934);
|
|
|
+ principalLocation.setKeyword("项目负责人");
|
|
|
+ principalLocation.setKeywordIndex(3);
|
|
|
+ /*principalLocation.setOffsetX(0.7759);
|
|
|
+ principalLocation.setOffsetY(0.1934);*/
|
|
|
principalLocations.add(principalLocation);
|
|
|
actionUser.setLocations(principalLocations);
|
|
|
actions.add(actionUser);
|
|
|
+
|
|
|
+
|
|
|
+ Action actionUserSign = new Action();
|
|
|
+ actionUserSign.setType("CORPORATE");
|
|
|
+ actionUserSign.setName(user.getName() + "印章"); //填写人员信息
|
|
|
+ actionUserSign.setSerialNo("1");
|
|
|
+ actionUserSign.setSealId(userSealId); //人员印章id
|
|
|
+
|
|
|
+ //添加盖章位置
|
|
|
+ List<Location> principalLocationSigns = Lists.newArrayList();
|
|
|
+ Location principalLocationSign = new Location();
|
|
|
+ principalLocationSign.setDocumentId(documentList.get(0));
|
|
|
+ //principalLocation.setPage(0);
|
|
|
+ principalLocationSign.setRectType("SEAL_CORPORATE");
|
|
|
+ principalLocationSign.setKeyword("项目负责人署名");
|
|
|
+ principalLocationSign.setKeywordIndex(1);
|
|
|
+ /*principalLocation.setOffsetX(0.7759);
|
|
|
+ principalLocation.setOffsetY(0.1934);*/
|
|
|
+ principalLocationSigns.add(principalLocationSign);
|
|
|
+ actionUserSign.setLocations(principalLocationSigns);
|
|
|
+ actions.add(actionUserSign);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -4127,7 +4230,7 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
|
|
|
User technologyPrincipalUser = UserUtils.getByLoginName("陈红星");
|
|
|
if(null != technologyPrincipalUser){
|
|
|
//获取成员印章id信息
|
|
|
- String userSealId = SignaturePostUtil.getUserSealByMobile(technologyPrincipalUser.getMobile(),"","陈红星个人签名章");
|
|
|
+ String userSealId = SignaturePostUtil.getUserSealByMobile(technologyPrincipalUser.getMobile(),"","陈星造价工程师印章");
|
|
|
if(StringUtils.isNotBlank(userSealId)){
|
|
|
Action actionUser = new Action();
|
|
|
actionUser.setType("CORPORATE");
|
|
@@ -4139,12 +4242,12 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
|
|
|
List<Location> principalLocations = Lists.newArrayList();
|
|
|
Location principalLocation = new Location();
|
|
|
principalLocation.setDocumentId(documentList.get(0));
|
|
|
- principalLocation.setPage(0);
|
|
|
+ //principalLocation.setPage(0);
|
|
|
principalLocation.setRectType("SEAL_CORPORATE");
|
|
|
- //principalLocation.setKeyword("签发人");
|
|
|
- principalLocation.setKeywordIndex(-1);
|
|
|
- principalLocation.setOffsetX(0.7518);
|
|
|
- principalLocation.setOffsetY(0.1642);
|
|
|
+ principalLocation.setKeyword("技术负责人");
|
|
|
+ principalLocation.setKeywordIndex(2);
|
|
|
+ /*principalLocation.setOffsetX(0.7518);
|
|
|
+ principalLocation.setOffsetY(0.1642);*/
|
|
|
principalLocations.add(principalLocation);
|
|
|
actionUser.setLocations(principalLocations);
|
|
|
actions.add(actionUser);
|