diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/DeptIdentifyController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/DeptIdentifyController.java index af52df3..49f61a3 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/DeptIdentifyController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/DeptIdentifyController.java @@ -61,9 +61,8 @@ public class DeptIdentifyController extends BaseController { * @return */ @PostMapping("/sealUpload") - public AjaxResult sealUpload(@Validated @RequestBody DeptIdentify deptIdentify - , @RequestParam("file") MultipartFile file) { - return deptIdentifyService.sealUpload(deptIdentify, file); + public AjaxResult sealUpload(Long id, String sealName , @RequestParam("file") MultipartFile file) { + return deptIdentifyService.sealUpload(id,sealName, file); } /** diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/MyTest.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/MyTest.java deleted file mode 100644 index 42b2507..0000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/MyTest.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.ruoyi.web.controller.wisdomarbitrate; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonObject; -import com.ruoyi.common.core.domain.entity.EsignHttpResponse; -import com.ruoyi.common.exception.EsignDemoException; -import com.ruoyi.wisdomarbitrate.domain.DeptIdentify; -import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper; -import com.ruoyi.wisdomarbitrate.mapper.CaseAttachMapper; -import com.ruoyi.wisdomarbitrate.mapper.DeptIdentifyMapper; -import com.ruoyi.wisdomarbitrate.mapper.SealSignRecordMapper; -import com.ruoyi.wisdomarbitrate.utils.SignAward; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import java.util.List; - -@RestController -@RequestMapping -public class MyTest { - @Autowired - private CaseApplicationMapper caseApplicationMapper; - @Autowired - private SealSignRecordMapper sealSignRecordMapper; - @Autowired - private CaseAttachMapper caseAttachMapper; - @Autowired - private DeptIdentifyMapper deptIdentifyMapper; - @GetMapping("/test") - public void myTest() throws EsignDemoException { - Gson gson = new Gson(); - DeptIdentify deptIdentify = new DeptIdentify(); - deptIdentify.setIdentifyStatus(0); - List deptIdentifysnew = deptIdentifyMapper.selectDeptIdentifylist(deptIdentify); - if (deptIdentifysnew != null && deptIdentifysnew.size() > 0) { - for (int i = 0; i < deptIdentifysnew.size(); i++) { - EsignHttpResponse identifyInfo = SignAward.getDeptIdentifyInfo(deptIdentifysnew.get(i)); - JsonObject identifyInfoJsonObject = gson.fromJson(identifyInfo.getBody(), JsonObject.class); - JsonObject identifyInfoData = identifyInfoJsonObject.getAsJsonObject("data"); - int realnameStatus = identifyInfoData.get("realnameStatus").getAsInt(); - if (realnameStatus == 1) { - String orgId = identifyInfoData.get("orgId").getAsString(); - System.out.println("这是orgId"+orgId+"======================="); - EsignHttpResponse identifyInfo1 = SignAward.deptIdentifySealList(orgId); - //将orgId保存到数据库里 - DeptIdentify deptIdentifynew = deptIdentifysnew.get(i); - deptIdentifynew.setOrgId(orgId); - JsonObject identifyInfoJsonObject1 = gson.fromJson(identifyInfo1.getBody(), JsonObject.class); - JsonObject identifyInfoData1 = identifyInfoJsonObject1.getAsJsonObject("data"); - JsonArray sealArray = identifyInfoData1.get("seals").getAsJsonArray(); - String sealNames = ""; - if (sealArray.size() > 0) { - for (int j = 0; j < sealArray.size(); j++) { - JsonObject sealObject = (JsonObject) sealArray.get(j); - String sealName = sealObject.get("sealName").toString(); - String sealNamenew = sealName.substring(1, sealName.length() - 1); - sealNames += sealNamenew + ","; - } - } - String sealName = sealNames.substring(0, sealNames.length() - 1); - deptIdentifynew.setIdentifyStatus(1); - deptIdentifynew.setSealName(sealName); - int row = deptIdentifyMapper.updateDeptIdentify(deptIdentifynew); - } - } - } - } -} diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index 4da42d5..fb697f9 100644 --- a/ruoyi-admin/src/main/resources/application-druid.yml +++ b/ruoyi-admin/src/main/resources/application-druid.yml @@ -6,7 +6,7 @@ spring: druid: # 主库数据源 master: - url: jdbc:mysql://121.40.189.20:3306/smart_arbitration?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=Asia/Shanghai&useSSL=false + url: jdbc:mysql://121.40.189.20:3306/test_smart_arbitration?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=Asia/Shanghai&useSSL=false username: root password: YMzc157# # 从库数据源 diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index 7aa036c..3b9ca78 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -18,7 +18,7 @@ ruoyi: # 开发环境配置 server: # 服务器的HTTP端口,默认为8080 - port: 9001 + port: 8001 servlet: # 应用的访问路径 context-path: / diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/SealUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/SealUtil.java index 95bfef5..9cab428 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/SealUtil.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/SealUtil.java @@ -96,9 +96,7 @@ public class SealUtil { //生成签名鉴权方式的的header Map header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId,eSignAppSecret,jsonParm,requestType.name(),apiaddr,true); //发起接口请求 - EsignHttpResponse response = EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, true); - System.out.println(response); - return response; + return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, true); } /** @@ -114,6 +112,7 @@ public class SealUtil { return EsignHttpHelper.doUploadHttp(uploadUrl,requestType,esignFileBean.getFileBytes(),esignFileBean.getFileContentMD5(), EsignHeaderConstant.CONTENTTYPE_STREAM.VALUE(),true); } public static void main(String[] args) throws Exception { + queryAuthProcess("OF-2b1e52987408005c"); // createOrgByImage(); // getOrgEmpower(); // queryAuthProcess("OF-2b00885895080028"); diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/IDeptIdentifyService.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/IDeptIdentifyService.java index 7e99c0d..5d7007b 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/IDeptIdentifyService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/IDeptIdentifyService.java @@ -18,7 +18,7 @@ public interface IDeptIdentifyService { AjaxResult enableDept(DeptIdentify deptIdentify); - AjaxResult sealUpload(DeptIdentify deptIdentify, MultipartFile file); + AjaxResult sealUpload(Long id, String sealName , MultipartFile file); AjaxResult receiveNotify(String body); diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/DeptIdentifyServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/DeptIdentifyServiceImpl.java index 47ee8bd..cdb824e 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/DeptIdentifyServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/DeptIdentifyServiceImpl.java @@ -71,14 +71,16 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService { EsignHttpResponse identifyUrl = SignAward.deptIdentifyUrl(deptIdentifyselect); JsonObject signUrlJsonObject = gson.fromJson(identifyUrl.getBody(), JsonObject.class); int code = signUrlJsonObject.get("code").getAsInt(); - JsonObject signUrlData = signUrlJsonObject.getAsJsonObject("data"); - String url = signUrlData.get("authUrl").getAsString(); - //获取本次认证授权流程ID - String authFlowId = signUrlData.get("authFlowId").getAsString(); - deptIdentify.setAuthFlowId(authFlowId); - deptIdentifynew.setIdentifyUrl(url); - deptIdentify.setIdentifyDate(new Date()); - int row = deptIdentifyMapper.updateDeptIdentify(deptIdentify); + if (code == 0){ + JsonObject signUrlData = signUrlJsonObject.getAsJsonObject("data"); + String url = signUrlData.get("authUrl").getAsString(); + //获取本次认证授权流程ID + String authFlowId = signUrlData.get("authFlowId").getAsString(); + deptIdentify.setAuthFlowId(authFlowId); + deptIdentifynew.setIdentifyUrl(url); + deptIdentify.setIdentifyDate(new Date()); + int row = deptIdentifyMapper.updateDeptIdentify(deptIdentify); + } } return deptIdentifynew; } @@ -113,7 +115,7 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService { } @Override - public AjaxResult sealUpload(DeptIdentify deptIdentify, MultipartFile file) { + public AjaxResult sealUpload(Long id, String sealName , MultipartFile file) { try { if (file.isEmpty()) { return AjaxResult.error("请选择要上传的文件"); @@ -121,6 +123,8 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService { String filePath = RuoYiConfig.getUploadPath(); // 上传 String fileName = FileUploadUtils.upload(filePath, file); + DeptIdentify deptIdentify = new DeptIdentify(); + deptIdentify.setId(id); List deptIdentifies = deptIdentifyMapper.selectDeptIdentifyBydeptid(deptIdentify); if (deptIdentifies != null && deptIdentifies.size() > 0) { for (DeptIdentify identify : deptIdentifies) { @@ -133,21 +137,32 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService { String prefix = "/profile"; int startIndex = fileName.indexOf(prefix); startIndex += prefix.length(); - String annexPath = "/uploadPath" + fileName.substring(startIndex); + //String annexPath = "home/ruoyi/uploadPath" + fileName.substring(startIndex); //创建机构图片印章 + String annexPath = "D:\\develop\\2.jpg"; + identify.setSealName(sealName); EsignHttpResponse response = SignAward.createOrgByImage(identify, annexPath); JSONObject jsonObject = JSONObject.parseObject(response.getBody()); int code = jsonObject.getIntValue("code"); if (code == 0) { //业务码,0表示成功,非0表示异常。 String sealId = jsonObject.getJSONObject("data").getString("sealId"); - identify.setSealId(sealId); - identify.setIsUse(0); //设置印章使用状态为未启用 //保存到表里 - int i = deptIdentifyMapper.updateDeptIdentify(identify); + DeptIdentify deptIdentify1 = new DeptIdentify(); + deptIdentify1.setDeptId(identify.getDeptId()); + deptIdentify1.setUserId(identify.getUserId()); + deptIdentify1.setIdentifyStatus(identify.getIdentifyStatus()); + deptIdentify1.setIdentifyDate(identify.getIdentifyDate()); + deptIdentify1.setIsUse(identify.getIsUse()); + deptIdentify1.setSealName(sealName); + deptIdentify1.setOrgId(identify.getOrgId()); + deptIdentify1.setAuthFlowId(identify.getAuthFlowId()); + deptIdentify1.setSealId(sealId); + int i = deptIdentifyMapper.insertDeptIdentify(deptIdentify1); if (i > 0) { return AjaxResult.success("上传成功"); } } + return AjaxResult.error("公章上传失败,请检查印章名称是否重复"); } return AjaxResult.error("企业用户未授予资源管理权限"); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/FixSelectFlowDetailUtils.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/FixSelectFlowDetailUtils.java index 83a5996..5b0d162 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/FixSelectFlowDetailUtils.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/FixSelectFlowDetailUtils.java @@ -181,32 +181,36 @@ public class FixSelectFlowDetailUtils { if (deptIdentifysnew != null && deptIdentifysnew.size() > 0) { for (int i = 0; i < deptIdentifysnew.size(); i++) { EsignHttpResponse identifyInfo = SignAward.getDeptIdentifyInfo(deptIdentifysnew.get(i)); + JsonObject identifyInfoJsonObject = gson.fromJson(identifyInfo.getBody(), JsonObject.class); - JsonObject identifyInfoData = identifyInfoJsonObject.getAsJsonObject("data"); - int realnameStatus = identifyInfoData.get("realnameStatus").getAsInt(); - if (realnameStatus == 1) { - String orgId = identifyInfoData.get("orgId").getAsString(); - System.out.println("这是orgId"+orgId+"======================="); - EsignHttpResponse identifyInfo1 = SignAward.deptIdentifySealList(orgId); - //将orgId保存到数据库里 - DeptIdentify deptIdentifynew = deptIdentifysnew.get(i); - deptIdentifynew.setOrgId(orgId); - JsonObject identifyInfoJsonObject1 = gson.fromJson(identifyInfo1.getBody(), JsonObject.class); - JsonObject identifyInfoData1 = identifyInfoJsonObject1.getAsJsonObject("data"); - JsonArray sealArray = identifyInfoData1.get("seals").getAsJsonArray(); - String sealNames = ""; - if (sealArray.size() > 0) { - for (int j = 0; j < sealArray.size(); j++) { - JsonObject sealObject = (JsonObject) sealArray.get(j); - String sealName = sealObject.get("sealName").toString(); - String sealNamenew = sealName.substring(1, sealName.length() - 1); - sealNames += sealNamenew + ","; + int code = identifyInfoJsonObject.get("code").getAsInt(); + if (code == 0) { + JsonObject identifyInfoData = identifyInfoJsonObject.getAsJsonObject("data"); + int realnameStatus = identifyInfoData.get("realnameStatus").getAsInt(); + if (realnameStatus == 1) { + String orgId = identifyInfoData.get("orgId").getAsString(); + System.out.println("这是orgId" + orgId + "======================="); + EsignHttpResponse identifyInfo1 = SignAward.deptIdentifySealList(orgId); + //将orgId保存到数据库里 + DeptIdentify deptIdentifynew = deptIdentifysnew.get(i); + deptIdentifynew.setOrgId(orgId); + JsonObject identifyInfoJsonObject1 = gson.fromJson(identifyInfo1.getBody(), JsonObject.class); + JsonObject identifyInfoData1 = identifyInfoJsonObject1.getAsJsonObject("data"); + JsonArray sealArray = identifyInfoData1.get("seals").getAsJsonArray(); + String sealNames = ""; + if (sealArray.size() > 0) { + for (int j = 0; j < sealArray.size(); j++) { + JsonObject sealObject = (JsonObject) sealArray.get(j); + String sealName = sealObject.get("sealName").toString(); + String sealNamenew = sealName.substring(1, sealName.length() - 1); + sealNames += sealNamenew + ","; + } } + String sealName = sealNames.substring(0, sealNames.length() - 1); + deptIdentifynew.setIdentifyStatus(1); + deptIdentifynew.setSealName(sealName); + int row = deptIdentifyMapper.updateDeptIdentify(deptIdentifynew); } - String sealName = sealNames.substring(0, sealNames.length() - 1); - deptIdentifynew.setIdentifyStatus(1); - deptIdentifynew.setSealName(sealName); - int row = deptIdentifyMapper.updateDeptIdentify(deptIdentifynew); } } } @@ -217,9 +221,9 @@ public class FixSelectFlowDetailUtils { * * @throws EsignDemoException */ - // @Scheduled(cron = "0/30 * * * * ?") + // @Scheduled(cron = "0/30 * * * * ?") @Transactional - public void searchForInstitutionalSeal() { + public void searchForInstitutionalSeal() { try { DeptIdentify deptIdentify = new DeptIdentify(); deptIdentify.setIsUse(0); @@ -228,16 +232,16 @@ public class FixSelectFlowDetailUtils { for (DeptIdentify identify : deptIdentifies) { //查询企业内部印章 Integer annexId = identify.getAnnexId(); - if (annexId == null){ + if (annexId == null) { //说明之前没有下载过 EsignHttpResponse response = SignAward.orgOwnSealList(identify); JSONObject jsonObject = JSONObject.parseObject(response.getBody()); JSONObject data = jsonObject.getJSONObject("data"); JSONArray seals = data.getJSONArray("seals"); - for (int i = 0; i < seals.size(); i++){ + for (int i = 0; i < seals.size(); i++) { JSONObject seal = seals.getJSONObject(i); int statusDescription = seal.getIntValue("statusDescription"); - if (statusDescription==1){//印章状态 1已启用,2待审核,3审核不通过,4 挂起 + if (statusDescription == 1) {//印章状态 1已启用,2待审核,3审核不通过,4 挂起 //已启用证明审核通过,下载到数据库 String sealImageDownloadUrl = seal.getString("sealImageDownloadUrl"); LocalDate now = LocalDate.now(); @@ -265,7 +269,7 @@ public class FixSelectFlowDetailUtils { caseAttach.setAnnexPath(savePath); caseAttach.setAnnexName(saveName); int i1 = caseAttachMapper.save(caseAttach); - if (i1>0){ + if (i1 > 0) { //将附件id保存到公章管理表里 Integer annexId1 = caseAttach.getAnnexId(); identify.setAnnexId(annexId1); diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/SignAward.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/SignAward.java index ee977cd..f1ead65 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/SignAward.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/SignAward.java @@ -119,7 +119,10 @@ public class SignAward { // System.out.println(signFlowDetailJsonObject); - + DeptIdentify deptIdentify = new DeptIdentify(); + deptIdentify.setOrgId("db279dd50d844e6fa64770d9a6edc7dd"); + EsignHttpResponse orgByImage = createOrgByImage(deptIdentify, "D:\\develop\\2.jpg"); + System.out.println("这是结果===============" + orgByImage); } @@ -435,48 +438,38 @@ public class SignAward { * @return */ public static EsignHttpResponse createOrgByImage(DeptIdentify deptIdentify, String filePath) throws EsignDemoException { - //获取认证授权流程ID - String authFlowId = deptIdentify.getAuthFlowId(); - //查询认证授权流程详情 - EsignHttpResponse response = SealUtil.queryAuthProcess(authFlowId); - String body = response.getBody(); - if (body != null) { - JSONObject jsonObject = JSONObject.parseObject(body); - //查询授权流程状态 - int authorizedStatus = jsonObject.getJSONObject("data").getIntValue("authorizedStatus"); - if (authorizedStatus == 1) {//0 -流程过期失效 1 - 已授权 2 - 授权中 3 - 审批未通过 - String apiaddr = "/v3/seals/org-seals/create-by-image"; - String orgId = deptIdentify.getOrgId(); - //上传印章图片 - //步骤一:获取印章图片上传地址fileUploadUrl - EsignHttpResponse response1 = SealUtil.getFileUploadUrl(filePath); - JSONObject jsonObject1 = JSONObject.parseObject(response1.getBody()); - String fileUploadUrl = jsonObject1.getJSONObject("data").getString("fileUploadUrl"); - //步骤二:将印章图片文件流上传到fileUploadUrl - EsignHttpResponse response2 = SealUtil.fileStreamUpload(fileUploadUrl, filePath); - JSONObject jsonObject2 = JSONObject.parseObject(response2.getBody()); - int errCode = jsonObject2.getIntValue("errCode"); - if (errCode == 0){ //业务码,0表示成功,非0表示异常。 - //获取步骤一里面的fileKey - String sealImageFileKey = jsonObject1.getJSONObject("data").getString("fileKey"); - String sealName = deptIdentify.getSealName(); - //请求参数body体,json格式。get或者delete请求时jsonString传空json:"{}"或者null - String jsonParm = "{\n" + - " \"orgId\": \"" + orgId + "\",\n" + - " \"sealImageFileKey\": \"" + sealImageFileKey + "\",\n" + - " \"sealName\": \" " + sealName + " \",\n" + - " \"sealWidth\": 50,\n" + - " \"sealHeight\": 50,\n" + - "}"; - //请求方法 - EsignRequestType requestType = EsignRequestType.POST; - //生成签名鉴权方式的的header - Map header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId, eSignAppSecret, jsonParm, requestType.name(), apiaddr, false); - //发起接口请求 - return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, false); - } - } + String apiaddr = "/v3/seals/org-seals/create-by-image"; + String orgId = deptIdentify.getOrgId(); + //上传印章图片 + //步骤一:获取印章图片上传地址fileUploadUrl + EsignHttpResponse response1 = SealUtil.getFileUploadUrl(filePath); + JSONObject jsonObject1 = JSONObject.parseObject(response1.getBody()); + String fileUploadUrl = jsonObject1.getJSONObject("data").getString("fileUploadUrl"); + //步骤二:将印章图片文件流上传到fileUploadUrl + EsignHttpResponse response2 = SealUtil.fileStreamUpload(fileUploadUrl, filePath); + JSONObject jsonObject2 = JSONObject.parseObject(response2.getBody()); + int errCode = jsonObject2.getIntValue("errCode"); + if (errCode == 0) { //业务码,0表示成功,非0表示异常。 + //获取步骤一里面的fileKey + String sealImageFileKey = jsonObject1.getJSONObject("data").getString("fileKey"); + String sealName = deptIdentify.getSealName(); + //请求参数body体,json格式。get或者delete请求时jsonString传空json:"{}"或者null + String jsonParm = "{\n" + + " \"orgId\": \"" + orgId + "\",\n" + + " \"sealImageFileKey\": \"" + sealImageFileKey + "\",\n" + + " \"sealName\": \"" + sealName + "\",\n" + + " \"sealWidth\": 50,\n" + + " \"sealHeight\": 50,\n" + + " \"sealBizType\": \"COMMON\"\n" + + "}"; + //请求方法 + EsignRequestType requestType = EsignRequestType.POST; + //生成签名鉴权方式的的header + Map header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId, eSignAppSecret, jsonParm, requestType.name(), apiaddr, true); + //发起接口请求 + return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, true); } + return null; } @@ -485,35 +478,38 @@ public class SignAward { */ public static EsignHttpResponse orgOwnSealList(DeptIdentify deptIdentify) throws EsignDemoException { - String orgId=deptIdentify.getOrgId(); - int pageNum=1; - int pageSize=20; + String orgId = deptIdentify.getOrgId(); + int pageNum = 1; + int pageSize = 20; - String apiaddr="/v3/seals/org-own-seal-list?orgId="+orgId+"&pageNum="+pageNum+"&pageSize="+pageSize; + String apiaddr = "/v3/seals/org-own-seal-list?orgId=" + orgId + "&pageNum=" + pageNum + "&pageSize=" + pageSize; //请求参数body体,json格式。get或者delete请求时jsonString传空json:"{}"或者null - String jsonParm=null; + String jsonParm = null; //请求方法 - EsignRequestType requestType= EsignRequestType.GET; + EsignRequestType requestType = EsignRequestType.GET; //生成签名鉴权方式的的header - Map header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId,eSignAppSecret,jsonParm,requestType.name(),apiaddr,false); + Map header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId, eSignAppSecret, jsonParm, requestType.name(), apiaddr, false); //发起接口请求 - return EsignHttpHelper.doCommHttp(eSignHost, apiaddr,requestType , jsonParm, header,false); + return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, false); } + /** * 查询指定印章详情(机构) */ - public static EsignHttpResponse getOrgSeal(String orgId,String sealId) throws EsignDemoException { - String apiaddr="/v3/seals/org-seal-info?orgId="+orgId+"&sealId="+sealId; + public static EsignHttpResponse getOrgSeal(String orgId, String sealId) throws EsignDemoException { + String apiaddr = "/v3/seals/org-seal-info?orgId=" + orgId + "&sealId=" + sealId; //请求参数body体,json格式。get或者delete请求时jsonString传空json:"{}"或者null - String jsonParm=null; + String jsonParm = null; //请求方法 - EsignRequestType requestType= EsignRequestType.GET; + EsignRequestType requestType = EsignRequestType.GET; //生成签名鉴权方式的的header - Map header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId,eSignAppSecret,jsonParm,requestType.name(),apiaddr,false); + Map header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId, eSignAppSecret, jsonParm, requestType.name(), apiaddr, false); //发起接口请求 - return EsignHttpHelper.doCommHttp(eSignHost, apiaddr,requestType , jsonParm, header,false); + return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, false); } + + } diff --git a/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/DeptIdentifyMapper.xml b/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/DeptIdentifyMapper.xml index 3ea44c9..454a9ca 100644 --- a/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/DeptIdentifyMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/DeptIdentifyMapper.xml @@ -32,7 +32,7 @@ @@ -48,11 +51,23 @@ insert into dept_identify( dept_id, user_id, - identify_status + identify_status, + identify_date, + is_use, + seal_name, + org_id, + auth_flow_id, + seal_id )values( #{deptId}, #{userId}, - #{identifyStatus} + #{identifyStatus}, + #{identifyDate}, + #{isUse}, + #{sealName}, + #{orgId}, + #{authFlowId}, + #{sealId} ) @@ -104,14 +119,13 @@ org_id = #{orgId}, seal_id = #{sealId}, seal_status = #{sealStatus}, + auth_flow_id = #{authFlowId}, AND id = #{id} - - AND seal_id = #{sealId} - + @@ -119,6 +133,4 @@ - - \ No newline at end of file