|
|
|
|
|
|
12
|
import com.google.gson.JsonObject;
|
12
|
import com.google.gson.JsonObject;
|
|
13
|
import com.ruoyi.common.annotation.DataScope;
|
13
|
import com.ruoyi.common.annotation.DataScope;
|
|
14
|
import com.ruoyi.common.constant.CaseApplicationConstants;
|
14
|
import com.ruoyi.common.constant.CaseApplicationConstants;
|
|
|
|
15
|
+import com.ruoyi.common.core.domain.AjaxResult;
|
|
15
|
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
|
16
|
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
|
|
16
|
import com.ruoyi.common.core.domain.entity.SysDept;
|
17
|
import com.ruoyi.common.core.domain.entity.SysDept;
|
|
17
|
|
18
|
|
|
|
|
|
|
|
723
|
for (CaseAttach caseAttach : caseAttachList) {
|
724
|
for (CaseAttach caseAttach : caseAttachList) {
|
|
724
|
if (caseAttach.getAnnexType() == 3) {
|
725
|
if (caseAttach.getAnnexType() == 3) {
|
|
725
|
String annexPath = caseAttach.getAnnexPath();
|
726
|
String annexPath = caseAttach.getAnnexPath();
|
|
726
|
- //String path = "/home/ruoyi/" + annexPath;
|
|
|
|
727
|
- String path ="D:\\home\\仲裁裁决书模板.docx";
|
|
|
|
|
|
727
|
+ String path = "/home/ruoyi/" + annexPath;
|
|
|
|
728
|
+ System.out.println("这是查询到的裁决书路径"+path);
|
|
|
|
729
|
+ //String path ="D:\\home\\仲裁裁决书模板.docx";
|
|
728
|
//获取文件上传地址
|
730
|
//获取文件上传地址
|
|
729
|
EsignHttpResponse response = SaaSAPIFileUtils.getUploadUrl(path);
|
731
|
EsignHttpResponse response = SaaSAPIFileUtils.getUploadUrl(path);
|
|
730
|
String body = response.getBody();
|
732
|
String body = response.getBody();
|
|
|
|
|
|
|
751
|
Gson gson = new Gson();
|
753
|
Gson gson = new Gson();
|
|
752
|
JsonObject positionsJsonObject = gson.fromJson(positions.getBody(), JsonObject.class);
|
754
|
JsonObject positionsJsonObject = gson.fromJson(positions.getBody(), JsonObject.class);
|
|
753
|
JsonObject positionsData = positionsJsonObject.getAsJsonObject("data");
|
755
|
JsonObject positionsData = positionsJsonObject.getAsJsonObject("data");
|
|
754
|
- String keywordPositions = positionsData.get("keywordPositions").getAsString();
|
|
|
|
|
|
756
|
+ String keywordPositions = positionsData.get("keywordPositions").toString();
|
|
755
|
//发起签署
|
757
|
//发起签署
|
|
756
|
sealSignRecord.setFilename(fileName);
|
758
|
sealSignRecord.setFilename(fileName);
|
|
757
|
String arbitratorId = caseApplication2.getArbitratorId();
|
759
|
String arbitratorId = caseApplication2.getArbitratorId();
|
|
|
|
|
|
|
764
|
sealSignRecord.setPensonName(sysUser.getNickName());
|
766
|
sealSignRecord.setPensonName(sysUser.getNickName());
|
|
765
|
}
|
767
|
}
|
|
766
|
sealSignRecord.setOrgnizeName("西安云美电子科技有限公司");
|
768
|
sealSignRecord.setOrgnizeName("西安云美电子科技有限公司");
|
|
767
|
- sealSignRecord.setOrgnizeNamePsnAccount("秦桃则");
|
|
|
|
768
|
- sealSignRecord.setOrgnizeName("西安云美电子科技有限公司");
|
|
|
|
769
|
sealSignRecord.setOrgnizeNamePsnAccount("17691338406");
|
769
|
sealSignRecord.setOrgnizeNamePsnAccount("17691338406");
|
|
770
|
sealSignRecord.setOrgnizeNamepsnName("韩超勃");
|
770
|
sealSignRecord.setOrgnizeNamepsnName("韩超勃");
|
|
771
|
//解析文件签名印章位置
|
771
|
//解析文件签名印章位置
|
|
|
|
|
|
|
773
|
for (int i = 0; i < jsonArray.size(); i++) {
|
773
|
for (int i = 0; i < jsonArray.size(); i++) {
|
|
774
|
JSONObject jsonObject3 = jsonArray.getJSONObject(i);
|
774
|
JSONObject jsonObject3 = jsonArray.getJSONObject(i);
|
|
775
|
String keyword = jsonObject3.getString("keyword");
|
775
|
String keyword = jsonObject3.getString("keyword");
|
|
776
|
- if (keyword.equals("仲裁员")){
|
|
|
|
|
|
776
|
+ if (keyword.equals("仲裁员:")){
|
|
777
|
//签名
|
777
|
//签名
|
|
778
|
JSONArray positionsArray = jsonObject3.getJSONArray("positions");
|
778
|
JSONArray positionsArray = jsonObject3.getJSONArray("positions");
|
|
779
|
// 遍历 positionsArray 中的每个元素
|
779
|
// 遍历 positionsArray 中的每个元素
|
|
|
|
|
|
|
807
|
}
|
807
|
}
|
|
808
|
EsignHttpResponse response3 = SignAward.createByFile(sealSignRecord);
|
808
|
EsignHttpResponse response3 = SignAward.createByFile(sealSignRecord);
|
|
809
|
JSONObject jsonObject3 = JSONObject.parseObject(response3.getBody());
|
809
|
JSONObject jsonObject3 = JSONObject.parseObject(response3.getBody());
|
|
810
|
- if (jsonObject1.getIntValue("code")==0){
|
|
|
|
|
|
810
|
+ if (jsonObject3.getIntValue("code")==0){
|
|
811
|
//获取签署流程ID
|
811
|
//获取签署流程ID
|
|
812
|
JSONObject data1 = jsonObject3.getJSONObject("data");
|
812
|
JSONObject data1 = jsonObject3.getJSONObject("data");
|
|
813
|
String signFlowId = data1.getString("signFlowId");
|
813
|
String signFlowId = data1.getString("signFlowId");
|
|
|
|
|
|
|
816
|
sealSignRecord.setSignFlowid(signFlowId);
|
816
|
sealSignRecord.setSignFlowid(signFlowId);
|
|
817
|
sealSignRecord.setSignFlowStatus(1);//待签名
|
817
|
sealSignRecord.setSignFlowStatus(1);//待签名
|
|
818
|
sealSignRecordMapper.insertSealSignRecord(sealSignRecord);
|
818
|
sealSignRecordMapper.insertSealSignRecord(sealSignRecord);
|
|
|
|
819
|
+ }else {
|
|
|
|
820
|
+ throw new ServiceException("发起签署流程失败,请检查参数是否有误");
|
|
819
|
}
|
821
|
}
|
|
820
|
}
|
822
|
}
|
|
821
|
}
|
823
|
}
|