取消部门接口权限校验

This commit is contained in:
gy b
2023-10-13 15:20:50 +08:00
parent dbc73da777
commit ce01c9366a
7 changed files with 186 additions and 142 deletions
@@ -25,7 +25,6 @@ public class AdjudicationController extends BaseController {
* @return * @return
*/ */
@PostMapping("/document") @PostMapping("/document")
@PreAuthorize("@ss.hasPermi('caseManagement:list:createaward')")
public AjaxResult createDocument(@Validated @RequestBody CaseApplication caseApplication){ public AjaxResult createDocument(@Validated @RequestBody CaseApplication caseApplication){
return adjudicationService.createDocument(caseApplication); return adjudicationService.createDocument(caseApplication);
} }
@@ -58,7 +57,7 @@ public class AdjudicationController extends BaseController {
* @return * @return
*/ */
@PostMapping("/signature") @PostMapping("/signature")
@PreAuthorize("@ss.hasPermi('awardManagement:list:sign')") // @PreAuthorize("@ss.hasPermi('awardManagement:list:sign')")
public AjaxResult signature(@Validated @RequestBody CaseApplication caseApplication){ public AjaxResult signature(@Validated @RequestBody CaseApplication caseApplication){
return adjudicationService.signature(caseApplication); return adjudicationService.signature(caseApplication);
} }
@@ -69,7 +68,7 @@ public class AdjudicationController extends BaseController {
* @return * @return
*/ */
@PostMapping("/caseFile") @PostMapping("/caseFile")
@PreAuthorize("@ss.hasPermi('awardManagement:list:file')") // @PreAuthorize("@ss.hasPermi('awardManagement:list:file')")
public AjaxResult caseFile(@Validated @RequestBody CaseApplication caseApplication){ public AjaxResult caseFile(@Validated @RequestBody CaseApplication caseApplication){
return adjudicationService.caseFile(caseApplication); return adjudicationService.caseFile(caseApplication);
} }
@@ -80,7 +79,7 @@ public class AdjudicationController extends BaseController {
* @return * @return
*/ */
@PostMapping("/service") @PostMapping("/service")
@PreAuthorize("@ss.hasPermi('awardManagement:list:sendaward')") // @PreAuthorize("@ss.hasPermi('awardManagement:list:sendaward')")
public AjaxResult service(@RequestBody BookSendVO bookSendVO){ public AjaxResult service(@RequestBody BookSendVO bookSendVO){
return adjudicationService.service(bookSendVO.getId(),bookSendVO.getAppEmail(),bookSendVO.getResEmail(),bookSendVO.getApptrackingNum(),bookSendVO.getRestrackingNum()); return adjudicationService.service(bookSendVO.getId(),bookSendVO.getAppEmail(),bookSendVO.getResEmail(),bookSendVO.getApptrackingNum(),bookSendVO.getRestrackingNum());
} }
@@ -90,7 +89,7 @@ public class AdjudicationController extends BaseController {
* @return * @return
*/ */
@PostMapping("/stamp") @PostMapping("/stamp")
@PreAuthorize("@ss.hasPermi('awardManagement:list:signprint')") // @PreAuthorize("@ss.hasPermi('awardManagement:list:signprint')")
public AjaxResult stamp(@Validated @RequestBody CaseApplication caseApplication){ public AjaxResult stamp(@Validated @RequestBody CaseApplication caseApplication){
return adjudicationService.stamp(caseApplication); return adjudicationService.stamp(caseApplication);
} }
@@ -41,7 +41,7 @@ public class CaseApplicationController extends BaseController {
/** /**
* 新增立案数据 * 新增立案数据
*/ */
@PreAuthorize("@ss.hasPermi('caseManagement:list:add')") // @PreAuthorize("@ss.hasPermi('caseManagement:list:add')")
@Log(title = "新增立案数据", businessType = BusinessType.INSERT) @Log(title = "新增立案数据", businessType = BusinessType.INSERT)
@PostMapping("/addCaseApplication") @PostMapping("/addCaseApplication")
public AjaxResult addCaseApplication(@Validated @RequestBody CaseApplication caseApplication) public AjaxResult addCaseApplication(@Validated @RequestBody CaseApplication caseApplication)
@@ -54,7 +54,7 @@ public class CaseApplicationController extends BaseController {
/** /**
* 修改立案数据 * 修改立案数据
*/ */
@PreAuthorize("@ss.hasPermi('caseManagement:list:update')") // @PreAuthorize("@ss.hasPermi('caseManagement:list:update')")
@Log(title = "修改立案数据", businessType = BusinessType.UPDATE) @Log(title = "修改立案数据", businessType = BusinessType.UPDATE)
@PostMapping("/editCaseApplication") @PostMapping("/editCaseApplication")
public AjaxResult editCaseApplication(@Validated @RequestBody CaseApplication caseApplication) { public AjaxResult editCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
@@ -66,7 +66,7 @@ public class CaseApplicationController extends BaseController {
/** /**
* 提交立案申请 * 提交立案申请
*/ */
@PreAuthorize("@ss.hasPermi('caseManagement:list:submit')") // @PreAuthorize("@ss.hasPermi('caseManagement:list:submit')")
@Log(title = "提交立案申请", businessType = BusinessType.UPDATE) @Log(title = "提交立案申请", businessType = BusinessType.UPDATE)
@PostMapping("/submitCaseApplication") @PostMapping("/submitCaseApplication")
public AjaxResult submitCaseApplication(@Validated @RequestBody CaseApplication caseApplication) { public AjaxResult submitCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
@@ -77,7 +77,7 @@ public class CaseApplicationController extends BaseController {
/** /**
* 删除立案数据 * 删除立案数据
*/ */
@PreAuthorize("@ss.hasPermi('caseManagement:list:delete')") // @PreAuthorize("@ss.hasPermi('caseManagement:list:delete')")
@Log(title = "删除立案数据", businessType = BusinessType.DELETE) @Log(title = "删除立案数据", businessType = BusinessType.DELETE)
@PostMapping("/removeCaseApplication") @PostMapping("/removeCaseApplication")
public AjaxResult removeCaseApplication(@Validated @RequestBody CaseApplication caseApplication) { public AjaxResult removeCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
@@ -88,7 +88,7 @@ public class CaseApplicationController extends BaseController {
/** /**
* 查询立案信息 * 查询立案信息
*/ */
@PreAuthorize("@ss.hasPermi('caseManagement:list:detail')") // @PreAuthorize("@ss.hasPermi('caseManagement:list:detail')")
@PostMapping("/selectCaseApplication") @PostMapping("/selectCaseApplication")
public AjaxResult selectCaseApplication(@Validated @RequestBody CaseApplication caseApplication) { public AjaxResult selectCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
CaseApplication caseApplicationselect = caseApplicationService.selectCaseApplication(caseApplication); CaseApplication caseApplicationselect = caseApplicationService.selectCaseApplication(caseApplication);
@@ -105,7 +105,7 @@ public class CaseApplicationController extends BaseController {
} }
@Log(title = "立案信息导入", businessType = BusinessType.IMPORT) @Log(title = "立案信息导入", businessType = BusinessType.IMPORT)
@PreAuthorize("@ss.hasPermi('caseManagement:list:import')") // @PreAuthorize("@ss.hasPermi('caseManagement:list:import')")
@PostMapping("/importData") @PostMapping("/importData")
public AjaxResult importData(MultipartFile file) throws Exception { public AjaxResult importData(MultipartFile file) throws Exception {
if(file==null){ if(file==null){
@@ -121,7 +121,7 @@ public class CaseApplicationController extends BaseController {
/** /**
* 组庭 * 组庭
*/ */
@PreAuthorize("@ss.hasPermi('caseApplication:pendTral')") // @PreAuthorize("@ss.hasPermi('caseApplication:pendTral')")
@Log(title = "组庭", businessType = BusinessType.UPDATE) @Log(title = "组庭", businessType = BusinessType.UPDATE)
@PostMapping("/pendTral") @PostMapping("/pendTral")
public AjaxResult pendTral(@Validated @RequestBody CaseApplication caseApplication) { public AjaxResult pendTral(@Validated @RequestBody CaseApplication caseApplication) {
@@ -131,7 +131,7 @@ public class CaseApplicationController extends BaseController {
/** /**
* 组庭审核 * 组庭审核
*/ */
@PreAuthorize("@ss.hasPermi('caseManagement:list:checkgroup')") // @PreAuthorize("@ss.hasPermi('caseManagement:list:checkgroup')")
@Log(title = "组庭审核", businessType = BusinessType.UPDATE) @Log(title = "组庭审核", businessType = BusinessType.UPDATE)
@PostMapping("/pendTralCheck") @PostMapping("/pendTralCheck")
public AjaxResult pendTralCheck(@Validated @RequestBody CaseApplication caseApplication) { public AjaxResult pendTralCheck(@Validated @RequestBody CaseApplication caseApplication) {
@@ -141,7 +141,7 @@ public class CaseApplicationController extends BaseController {
/** /**
* 组庭确认 * 组庭确认
*/ */
@PreAuthorize("@ss.hasPermi('caseManagement:list:confirmgroup')") // @PreAuthorize("@ss.hasPermi('caseManagement:list:confirmgroup')")
@Log(title = "组庭确认", businessType = BusinessType.UPDATE) @Log(title = "组庭确认", businessType = BusinessType.UPDATE)
@PostMapping("/pendTralSure") @PostMapping("/pendTralSure")
public AjaxResult pendTralSure(@Validated @RequestBody CaseApplication caseApplication) { public AjaxResult pendTralSure(@Validated @RequestBody CaseApplication caseApplication) {
@@ -151,7 +151,7 @@ public class CaseApplicationController extends BaseController {
/** /**
* 核验裁决书 * 核验裁决书
*/ */
@PreAuthorize("@ss.hasPermi('caseApplication:verificationArbitrateRecord')") // @PreAuthorize("@ss.hasPermi('caseApplication:verificationArbitrateRecord')")
@Log(title = "核验裁决书", businessType = BusinessType.UPDATE) @Log(title = "核验裁决书", businessType = BusinessType.UPDATE)
@PostMapping("/verificationArbitrateRecord") @PostMapping("/verificationArbitrateRecord")
public AjaxResult verificationArbitrateRecord(@Validated @RequestBody CaseApplication caseApplication) { public AjaxResult verificationArbitrateRecord(@Validated @RequestBody CaseApplication caseApplication) {
@@ -161,7 +161,7 @@ public class CaseApplicationController extends BaseController {
/** /**
* 审核裁决书 * 审核裁决书
*/ */
@PreAuthorize("@ss.hasPermi('caseApplication:checkArbitrateRecord')") // @PreAuthorize("@ss.hasPermi('caseApplication:checkArbitrateRecord')")
@Log(title = "审核裁决书", businessType = BusinessType.UPDATE) @Log(title = "审核裁决书", businessType = BusinessType.UPDATE)
@PostMapping("/checkArbitrateRecord") @PostMapping("/checkArbitrateRecord")
public AjaxResult checkArbitrateRecord(@Validated @RequestBody CaseApplication caseApplication) { public AjaxResult checkArbitrateRecord(@Validated @RequestBody CaseApplication caseApplication) {
@@ -172,7 +172,7 @@ public class CaseApplicationController extends BaseController {
/** /**
* 是否指派仲裁员 * 是否指派仲裁员
*/ */
@PreAuthorize("@ss.hasPermi('caseApplication:pendingAppointArbotrar')") // @PreAuthorize("@ss.hasPermi('caseApplication:pendingAppointArbotrar')")
@Log(title = "是否指派仲裁员", businessType = BusinessType.UPDATE) @Log(title = "是否指派仲裁员", businessType = BusinessType.UPDATE)
@PostMapping("/pendingAppointArbotrar") @PostMapping("/pendingAppointArbotrar")
public AjaxResult pendingAppointArbotrar(@Validated @RequestBody CaseApplication caseApplication) { public AjaxResult pendingAppointArbotrar(@Validated @RequestBody CaseApplication caseApplication) {
@@ -182,7 +182,7 @@ public class CaseApplicationController extends BaseController {
/** /**
* 提交立案审查 * 提交立案审查
*/ */
@PreAuthorize("@ss.hasPermi('caseManagement:list:check')") // @PreAuthorize("@ss.hasPermi('caseManagement:list:check')")
@Log(title = "提交立案审查", businessType = BusinessType.UPDATE) @Log(title = "提交立案审查", businessType = BusinessType.UPDATE)
@PostMapping("/submitCaseApplicationCheck") @PostMapping("/submitCaseApplicationCheck")
public AjaxResult submitCaseApplicationCheck(@Validated @RequestBody CaseApplication caseApplication) { public AjaxResult submitCaseApplicationCheck(@Validated @RequestBody CaseApplication caseApplication) {
@@ -193,7 +193,7 @@ public class CaseApplicationController extends BaseController {
/** /**
* 确认缴费查询立案信息 * 确认缴费查询立案信息
*/ */
@PreAuthorize("@ss.hasPermi('paymentManagement:list:detail')") // @PreAuthorize("@ss.hasPermi('paymentManagement:list:detail')")
@PostMapping("/selectCaseApplicationConfirm") @PostMapping("/selectCaseApplicationConfirm")
public AjaxResult selectCaseApplicationConfirm(@Validated @RequestBody CaseApplication caseApplication) { public AjaxResult selectCaseApplicationConfirm(@Validated @RequestBody CaseApplication caseApplication) {
CaseApplication caseApplicationselect = caseApplicationService.selectCaseApplicationConfirm(caseApplication); CaseApplication caseApplicationselect = caseApplicationService.selectCaseApplicationConfirm(caseApplication);
@@ -35,7 +35,6 @@ public class CaseArbitrateController extends BaseController {
* @return * @return
*/ */
@PostMapping("/writtenHear") @PostMapping("/writtenHear")
@PreAuthorize("@ss.hasPermi('caseManagement:hear')")
public AjaxResult writtenHear(@Validated @RequestBody ArbitrateRecord arbitrateRecord){ public AjaxResult writtenHear(@Validated @RequestBody ArbitrateRecord arbitrateRecord){
return caseArbitrateService.writtenHear(arbitrateRecord); return caseArbitrateService.writtenHear(arbitrateRecord);
} }
@@ -25,7 +25,7 @@ public class CasePaymentController {
* @param casePayDTO 缴费传入参数 * @param casePayDTO 缴费传入参数
* @return 统一响应结果 * @return 统一响应结果
*/ */
@PreAuthorize("@ss.hasPermi('caseManagement:list:pay')") // @PreAuthorize("@ss.hasPermi('caseManagement:list:pay')")
@PostMapping("/casePay") @PostMapping("/casePay")
public AjaxResult casePay(@Validated @RequestBody CasePayDTO casePayDTO) { public AjaxResult casePay(@Validated @RequestBody CasePayDTO casePayDTO) {
return paymentService.casePay(casePayDTO); return paymentService.casePay(casePayDTO);
@@ -36,7 +36,7 @@ public class CasePaymentController {
* @param caseApplication * @param caseApplication
* @return * @return
*/ */
@PreAuthorize("@ss.hasPermi('paymentManagement:list:payconfirm')") // @PreAuthorize("@ss.hasPermi('paymentManagement:list:payconfirm')")
@PutMapping("/confirm") @PutMapping("/confirm")
public AjaxResult confirmPayment(@Validated @RequestBody CaseApplication caseApplication) { public AjaxResult confirmPayment(@Validated @RequestBody CaseApplication caseApplication) {
return paymentService.confirmPayment(caseApplication); return paymentService.confirmPayment(caseApplication);
@@ -94,14 +94,20 @@ spring:
mail: mail:
host: smtp.163.com host: smtp.163.com
port: 25 port: 25
username: hjbjava@163.com username: lmj1549843951@163.com
password: BSRSSEPJWGNNVYYL password: JGIOQVFCLAZKXRKO
default-encoding: UTF-8 default-encoding: UTF-8
properties: properties:
mail: mail:
smtp: smtp:
connectiontimeout: 5000
timeout: 5000
writetimeout: 5000
socketFactoryClass: javax.net.ssl.SSLSocketFactory socketFactoryClass: javax.net.ssl.SSLSocketFactory
socketFactoryFallback: false
socketFactoryPort: 465
debug: false debug: false
protocol: smtp
#上上签配置参数 #上上签配置参数
ssq: ssq:
developerId: 1695872832013855470 developerId: 1695872832013855470
@@ -299,7 +299,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATED_SEAL); caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATED_SEAL);
caseApplicationMapper.submitCaseApplication(caseApplication); caseApplicationMapper.submitCaseApplication(caseApplication);
// 新增日志 // 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.ARBITRATED_SEAL,""); CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.ARBITRATED_SEAL, "");
return AjaxResult.success("签名成功,案件状态已改为待仲裁文书用印"); return AjaxResult.success("签名成功,案件状态已改为待仲裁文书用印");
} }
@@ -310,7 +310,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
caseApplication.setCaseStatus(CaseApplicationConstants.CASE_ARCHIVED); caseApplication.setCaseStatus(CaseApplicationConstants.CASE_ARCHIVED);
caseApplicationMapper.submitCaseApplication(caseApplication); caseApplicationMapper.submitCaseApplication(caseApplication);
// 新增日志 // 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CASE_ARCHIVED,""); CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_ARCHIVED, "");
return AjaxResult.success("归档成功,案件状态已改为已归档"); return AjaxResult.success("归档成功,案件状态已改为已归档");
} }
@@ -343,19 +343,58 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
} }
} }
} }
//发送邮件
sendCaseEmail(caseApplication1, appEmail, resEmail);
// 新增日志 // 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CASE_FILING,""); CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_FILING, "");
return AjaxResult.success("仲裁文书送达成功"); return AjaxResult.success("仲裁文书送达成功");
} }
/**
* 通过邮件发送裁决书文件
*
* @param caseApplication1
* @param appEmail
* @param resEmail
*/
private void sendCaseEmail(CaseApplication caseApplication1, String appEmail, String resEmail) {
List<File> fileList = new ArrayList<>();
File file = null;
// List<CaseAttach> caseAttachList = caseApplication1.getCaseAttachList();
// if (caseAttachList != null && caseAttachList.size() > 0) {
// for (CaseAttach caseAttach : caseAttachList) {
// if (caseAttach.getAnnexType() == 3) {
// String annexPath = caseAttach.getAnnexPath();
// String path = "/home/ruoyi/" + annexPath;
// String path = "/home/ruoyi/uploadPath/upload/2023/10/12/裁决书测试20231012test.docx";
String path = "E:/WorkDoc/SH/裁决书测试20231012test.docx";
file = new File(path);
fileList.add(file);
System.out.println("文件长度:" + file.length());
// }
// }
// }
if (file != null) {
JavaMailSender javaMailSender = emailOutUtil.rebuildMailSender();
try {
// emailOutUtil.sendMessageCarryFile(appEmail, "裁决书", "您好,审核后的裁决书在附件中请查阅", file, "hjbjava@163.com", javaMailSender);
emailOutUtil.sendMessageCarryFiles(appEmail, "裁决书", "您好,审核后的裁决书在附件中请查阅", fileList, "lmj1549843951@163.com", javaMailSender);
} catch (Exception e) {
System.out.println("邮件发送失败++++++++++++++++++++++++++++++++");
System.out.println(e.toString());
}
}
}
@Override @Override
public AjaxResult stamp(CaseApplication caseApplication) { public AjaxResult stamp(CaseApplication caseApplication) {
//更改案件状态(暂时) //更改案件状态(暂时)
caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATION_DELIVERY); caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATION_DELIVERY);
caseApplicationMapper.submitCaseApplication(caseApplication); caseApplicationMapper.submitCaseApplication(caseApplication);
// 新增日志 // 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.ARBITRATION_DELIVERY,""); CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.ARBITRATION_DELIVERY, "");
return AjaxResult.success("用印成功,案件状态已改为待仲裁文书送达"); return AjaxResult.success("用印成功,案件状态已改为待仲裁文书送达");
} }
@@ -716,120 +716,121 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord); arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord);
Integer agreeOrNotCheck = caseApplication.getAgreeOrNotCheck(); Integer agreeOrNotCheck = caseApplication.getAgreeOrNotCheck();
if(agreeOrNotCheck.intValue()==1){//同意审核 if(agreeOrNotCheck.intValue()==1){//同意审核
try { //TODO 取消一下注释
//获取当前案件的裁决书 // try {
CaseApplication caseApplication2 = caseApplicationService.selectCaseApplication(caseApplication); // //获取当前案件的裁决书
List<CaseAttach> caseAttachList = caseApplication2.getCaseAttachList(); // CaseApplication caseApplication2 = caseApplicationService.selectCaseApplication(caseApplication);
if (caseAttachList != null && caseAttachList.size() > 0) { // List<CaseAttach> caseAttachList = caseApplication2.getCaseAttachList();
for (CaseAttach caseAttach : caseAttachList) { // if (caseAttachList != null && caseAttachList.size() > 0) {
if (caseAttach.getAnnexType() == 3) { // for (CaseAttach caseAttach : caseAttachList) {
String annexPath = caseAttach.getAnnexPath(); // if (caseAttach.getAnnexType() == 3) {
//String path = "/home/ruoyi/" + annexPath; // String annexPath = caseAttach.getAnnexPath();
String path ="D:\\home\\仲裁裁决书模板.docx"; // String path = "/home/ruoyi/" + annexPath;
//获取文件上传地址 //// String path ="D:\\home\\仲裁裁决书模板.docx";
EsignHttpResponse response = SaaSAPIFileUtils.getUploadUrl(path); // //获取文件上传地址
String body = response.getBody(); // EsignHttpResponse response = SaaSAPIFileUtils.getUploadUrl(path);
if (body != null){ // String body = response.getBody();
JSONObject jsonObject = JSONObject.parseObject(body); // if (body != null){
String fileId = jsonObject.getJSONObject("data").getString("fileId"); // JSONObject jsonObject = JSONObject.parseObject(body);
String fileUploadUrl = jsonObject.getJSONObject("data").getString("fileUploadUrl"); // String fileId = jsonObject.getJSONObject("data").getString("fileId");
//上传文件流 // String fileUploadUrl = jsonObject.getJSONObject("data").getString("fileUploadUrl");
EsignHttpResponse response1 = SaaSAPIFileUtils.uploadFile(fileUploadUrl, path); // //上传文件流
JSONObject jsonObject1 = JSONObject.parseObject(response1.getBody()); // EsignHttpResponse response1 = SaaSAPIFileUtils.uploadFile(fileUploadUrl, path);
if (jsonObject1.getIntValue("errCode")==0){ // JSONObject jsonObject1 = JSONObject.parseObject(response1.getBody());
//查看文件上传状态 // if (jsonObject1.getIntValue("errCode")==0){
Thread.sleep(5000); // //查看文件上传状态
EsignHttpResponse response2 = SaaSAPIFileUtils.getFileStatus(fileId); // Thread.sleep(5000);
JSONObject jsonObject2 = JSONObject.parseObject(response2.getBody()); // EsignHttpResponse response2 = SaaSAPIFileUtils.getFileStatus(fileId);
JSONObject data = jsonObject2.getJSONObject("data"); // JSONObject jsonObject2 = JSONObject.parseObject(response2.getBody());
int fileStatus =data.getIntValue("fileStatus"); // JSONObject data = jsonObject2.getJSONObject("data");
if (fileStatus == 2 || fileStatus == 5){ // int fileStatus =data.getIntValue("fileStatus");
String fileName = data.getString("fileName"); // if (fileStatus == 2 || fileStatus == 5){
//上传成功,获取文件签名印章位置 // String fileName = data.getString("fileName");
SealSignRecord sealSignRecord = new SealSignRecord(); // //上传成功,获取文件签名印章位置
sealSignRecord.setFileid(fileId); // SealSignRecord sealSignRecord = new SealSignRecord();
EsignHttpResponse positions = SignAward.getPositions(sealSignRecord); // sealSignRecord.setFileid(fileId);
Gson gson = new Gson(); // EsignHttpResponse positions = SignAward.getPositions(sealSignRecord);
JsonObject positionsJsonObject = gson.fromJson(positions.getBody(), JsonObject.class); // Gson gson = new Gson();
JsonObject positionsData = positionsJsonObject.getAsJsonObject("data"); // JsonObject positionsJsonObject = gson.fromJson(positions.getBody(), JsonObject.class);
String keywordPositions = positionsData.get("keywordPositions").getAsString(); // JsonObject positionsData = positionsJsonObject.getAsJsonObject("data");
//发起签署 // String keywordPositions = positionsData.get("keywordPositions").getAsString();
sealSignRecord.setFilename(fileName); // //发起签署
String arbitratorId = caseApplication2.getArbitratorId(); // sealSignRecord.setFilename(fileName);
if (arbitratorId!=null){ // String arbitratorId = caseApplication2.getArbitratorId();
SysUser sysUser = sysUserMapper.selectUserById(Long.valueOf(arbitratorId)); // if (arbitratorId!=null){
if (sysUser == null){ // SysUser sysUser = sysUserMapper.selectUserById(Long.valueOf(arbitratorId));
return rows; // if (sysUser == null){
} // return rows;
sealSignRecord.setPensonAccount(sysUser.getPhonenumber()); // }
sealSignRecord.setPensonName(sysUser.getNickName()); // sealSignRecord.setPensonAccount(sysUser.getPhonenumber());
} // sealSignRecord.setPensonName(sysUser.getNickName());
sealSignRecord.setOrgnizeName("西安云美电子科技有限公司"); // }
sealSignRecord.setOrgnizeNamePsnAccount("秦桃则"); // sealSignRecord.setOrgnizeName("西安云美电子科技有限公司");
sealSignRecord.setOrgnizeName("西安云美电子科技有限公司"); // sealSignRecord.setOrgnizeNamePsnAccount("秦桃则");
sealSignRecord.setOrgnizeNamePsnAccount("17691338406"); // sealSignRecord.setOrgnizeName("西安云美电子科技有限公司");
sealSignRecord.setOrgnizeNamepsnName("韩超勃"); // sealSignRecord.setOrgnizeNamePsnAccount("17691338406");
//解析文件签名印章位置 // sealSignRecord.setOrgnizeNamepsnName("韩超勃");
JSONArray jsonArray = JSONArray.parseArray(keywordPositions); // //解析文件签名印章位置
for (int i = 0; i < jsonArray.size(); i++) { // JSONArray jsonArray = JSONArray.parseArray(keywordPositions);
JSONObject jsonObject3 = jsonArray.getJSONObject(i); // for (int i = 0; i < jsonArray.size(); i++) {
String keyword = jsonObject3.getString("keyword"); // JSONObject jsonObject3 = jsonArray.getJSONObject(i);
if (keyword.equals("仲裁员")){ // String keyword = jsonObject3.getString("keyword");
//签名 // if (keyword.equals("仲裁员")){
JSONArray positionsArray = jsonObject3.getJSONArray("positions"); // //签名
// 遍历 positionsArray 中的每个元素 // JSONArray positionsArray = jsonObject3.getJSONArray("positions");
for (int j = 0; j < positionsArray.size(); j++){ // // 遍历 positionsArray 中的每个元素
JSONObject positionObj = positionsArray.getJSONObject(j); // for (int j = 0; j < positionsArray.size(); j++){
int pageNum = positionObj.getIntValue("pageNum"); // JSONObject positionObj = positionsArray.getJSONObject(j);
sealSignRecord.setPositionPagepsn(String.valueOf(pageNum)); // int pageNum = positionObj.getIntValue("pageNum");
JSONArray coordinatesArray = positionObj.getJSONArray("coordinates"); // sealSignRecord.setPositionPagepsn(String.valueOf(pageNum));
JSONObject coordinateObj = coordinatesArray.getJSONObject(0); // JSONArray coordinatesArray = positionObj.getJSONArray("coordinates");
double positionX = coordinateObj.getDoubleValue("positionX"); // JSONObject coordinateObj = coordinatesArray.getJSONObject(0);
double positionY = coordinateObj.getDoubleValue("positionY"); // double positionX = coordinateObj.getDoubleValue("positionX");
sealSignRecord.setPositionXpsn(positionX); // double positionY = coordinateObj.getDoubleValue("positionY");
sealSignRecord.setPositionYpsn(positionY); // sealSignRecord.setPositionXpsn(positionX);
} // sealSignRecord.setPositionYpsn(positionY);
}else { // }
//用印 // }else {
JSONArray positionsArray = jsonObject3.getJSONArray("positions"); // //用印
// 遍历 positionsArray 中的每个元素 // JSONArray positionsArray = jsonObject3.getJSONArray("positions");
for (int j = 0; j < positionsArray.size(); j++) { // // 遍历 positionsArray 中的每个元素
JSONObject positionObj = positionsArray.getJSONObject(j); // for (int j = 0; j < positionsArray.size(); j++) {
int pageNum = positionObj.getIntValue("pageNum"); // JSONObject positionObj = positionsArray.getJSONObject(j);
sealSignRecord.setPositionPageorg(String.valueOf(pageNum)); // int pageNum = positionObj.getIntValue("pageNum");
JSONArray coordinatesArray = positionObj.getJSONArray("coordinates"); // sealSignRecord.setPositionPageorg(String.valueOf(pageNum));
JSONObject coordinateObj = coordinatesArray.getJSONObject(0); // JSONArray coordinatesArray = positionObj.getJSONArray("coordinates");
double positionX = coordinateObj.getDoubleValue("positionX"); // JSONObject coordinateObj = coordinatesArray.getJSONObject(0);
double positionY = coordinateObj.getDoubleValue("positionY"); // double positionX = coordinateObj.getDoubleValue("positionX");
sealSignRecord.setPositionXorg(positionX); // double positionY = coordinateObj.getDoubleValue("positionY");
sealSignRecord.setPositionYorg(positionY); // sealSignRecord.setPositionXorg(positionX);
} // sealSignRecord.setPositionYorg(positionY);
} // }
} // }
EsignHttpResponse response3 = SignAward.createByFile(sealSignRecord); // }
JSONObject jsonObject3 = JSONObject.parseObject(response3.getBody()); // EsignHttpResponse response3 = SignAward.createByFile(sealSignRecord);
if (jsonObject1.getIntValue("code")==0){ // JSONObject jsonObject3 = JSONObject.parseObject(response3.getBody());
//获取签署流程ID // if (jsonObject1.getIntValue("code")==0){
JSONObject data1 = jsonObject3.getJSONObject("data"); // //获取签署流程ID
String signFlowId = data1.getString("signFlowId"); // JSONObject data1 = jsonObject3.getJSONObject("data");
//保存案件id,文件id,文件名称.流程id到签署用印记录表里 // String signFlowId = data1.getString("signFlowId");
sealSignRecord.setCaseAppliId(caseApplication.getId()); // //保存案件id,文件id,文件名称.流程id到签署用印记录表里
sealSignRecord.setSignFlowid(signFlowId); // sealSignRecord.setCaseAppliId(caseApplication.getId());
sealSignRecord.setSignFlowStatus(1);//待签名 // sealSignRecord.setSignFlowid(signFlowId);
sealSignRecordMapper.insertSealSignRecord(sealSignRecord); // sealSignRecord.setSignFlowStatus(1);//待签名
} // sealSignRecordMapper.insertSealSignRecord(sealSignRecord);
} // }
} // }
} // }
break; // }
} // break;
} // }
} // }
} catch (EsignDemoException e) { // }
e.printStackTrace(); // } catch (EsignDemoException e) {
} catch (InterruptedException e) { // e.printStackTrace();
e.printStackTrace(); // } catch (InterruptedException e) {
} // e.printStackTrace();
// }
caseApplication.setCaseStatus(CaseApplicationConstants.SIGN_ARBITRATION); caseApplication.setCaseStatus(CaseApplicationConstants.SIGN_ARBITRATION);
// 新增日志 // 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.SIGN_ARBITRATION,""); CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.SIGN_ARBITRATION,"");