Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Mediation-Backend into wq1
This commit is contained in:
+16
@@ -77,6 +77,22 @@ public class MsSignSealController extends BaseController {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 印章审核回调
|
||||
*/
|
||||
@Anonymous
|
||||
@PostMapping("/sealCheckCallback")
|
||||
public AjaxResult sealCheckCallback() throws Exception {
|
||||
boolean checkResult= SignVerifyUtils.checkSignuter();
|
||||
if(checkResult){
|
||||
String reqbodystr =SignVerifyUtils.getRequestBody();
|
||||
return msSignSealService.sealCheckCallback(reqbodystr);
|
||||
}else {
|
||||
return AjaxResult.error("error");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询案件进度
|
||||
*/
|
||||
|
||||
+2
@@ -3,6 +3,7 @@ package com.ruoyi.wisdomarbitrate.mapper.dept;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.dept.DeptIdentify;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -24,4 +25,5 @@ public interface DeptIdentifyMapper {
|
||||
* @return
|
||||
*/
|
||||
String selectById(@Param("id") Long identifyId);
|
||||
|
||||
}
|
||||
|
||||
+2
@@ -37,4 +37,6 @@ public interface MsSignSealService {
|
||||
AjaxResult msCaseSignUrlResAPP(MsSignSealDTO dto) throws EsignDemoException;
|
||||
|
||||
AjaxResult signSeaalCaseApplicaCallback(String reqbodystr) throws EsignDemoException, IOException;
|
||||
|
||||
AjaxResult sealCheckCallback(String reqbodystr) throws EsignDemoException, IOException;
|
||||
}
|
||||
|
||||
+80
-2
@@ -1056,8 +1056,6 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
MsCaseFlow currentFlow = caseFlowMapper.selectByPrimaryKey(caseApplicationselect.getCaseFlowId());
|
||||
Integer caseNode = currentFlow.getNodeId();
|
||||
String caseStatusName = currentFlow.getCaseStatusName();
|
||||
|
||||
|
||||
if("SIGN_MISSON_COMPLETE".equals(action) && signResult==2){
|
||||
if(mediaResult.intValue()==1){
|
||||
//调解
|
||||
@@ -1344,6 +1342,86 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
return AjaxResult.success("success");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult sealCheckCallback(String reqbodystr) throws EsignDemoException, IOException {
|
||||
JSONObject jsonObjectCallback = JSONObject.parseObject(reqbodystr);
|
||||
Gson gson = new Gson();
|
||||
if (jsonObjectCallback != null) {
|
||||
int auditStatus = jsonObjectCallback.getIntValue("auditStatus");
|
||||
String action = jsonObjectCallback.getString("action");
|
||||
String orgId = jsonObjectCallback.getString("orgId");
|
||||
String sealId = jsonObjectCallback.getString("sealId");
|
||||
|
||||
SealManage sealManage = new SealManage();
|
||||
DeptIdentify deptIdentify1 = new DeptIdentify();
|
||||
deptIdentify1.setOrgId(orgId);
|
||||
List<DeptIdentify> deptIdentifies = deptIdentifyMapper.selectDeptIdentify(deptIdentify1);
|
||||
if (deptIdentifies != null && deptIdentifies.size() > 0) {
|
||||
Long iddeptIdent = deptIdentifies.get(0).getId();
|
||||
SealManage sealManageSel = new SealManage();
|
||||
sealManageSel.setIdentifyId(iddeptIdent);
|
||||
sealManageSel.setSealId(sealId);
|
||||
List<String> sealIdList = new ArrayList<>();
|
||||
List<SealManage> selectSealList = sealManageMapper.selectSealList(sealManageSel);
|
||||
if (selectSealList != null && selectSealList.size() > 0) {
|
||||
sealManage = selectSealList.get(0);
|
||||
}
|
||||
}
|
||||
|
||||
if("SEAL_AUDIT".equals(action) && auditStatus==1){
|
||||
EsignHttpResponse response = SignAward.getOrgSeal(orgId, sealId);
|
||||
JSONObject jsonObject = JSONObject.parseObject(response.getBody());
|
||||
int code = jsonObject.getIntValue("code");
|
||||
if (code == 0) {
|
||||
JSONObject data = jsonObject.getJSONObject("data");
|
||||
int sealStatus = data.getIntValue("sealStatus");
|
||||
if (sealStatus == 1) {//印章状态 1已启用,2待审核,3审核不通过,4 挂起
|
||||
//已启用证明审核通过,下载到数据库
|
||||
String sealImageDownloadUrl = data.getString("sealImageDownloadUrl");
|
||||
LocalDate now = LocalDate.now();
|
||||
String year = Integer.toString(now.getYear());
|
||||
String month = String.format("%02d", now.getMonthValue());
|
||||
String day = String.format("%02d", now.getDayOfMonth());
|
||||
String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
|
||||
String fileName = UUID.randomUUID().toString().replace("-", "") + ".jpg";
|
||||
String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
||||
String savePath = "/home/ruoyi/uploadPath/upload/";
|
||||
// 创建日期目录
|
||||
File saveFolder = new File(saveFolderPath);
|
||||
if (!saveFolder.exists()) {
|
||||
saveFolder.mkdirs();
|
||||
}
|
||||
String resultFilePath = saveFolderPath + "/" + fileName;
|
||||
File resultFilePathFile = new File(resultFilePath);
|
||||
if (!resultFilePathFile.exists()) {
|
||||
resultFilePathFile.createNewFile();
|
||||
}
|
||||
boolean downLoadFile = FileTransformation.downLoadFileByUrl(sealImageDownloadUrl, resultFilePath);
|
||||
if (downLoadFile) {
|
||||
MsCaseAttach caseAttach = new MsCaseAttach();
|
||||
caseAttach.setAnnexType(AnnexTypeEnum.SEAL_PICTURE.getCode()); //10代表印章图片
|
||||
caseAttach.setAnnexPath(savePath);
|
||||
caseAttach.setAnnexName(saveName);
|
||||
int i1 = caseAttachMapper.save(caseAttach);
|
||||
if (i1 > 0) {
|
||||
//将附件id保存到公章管理表里
|
||||
Long annexId1 = caseAttach.getAnnexId();
|
||||
sealManage.setAnnexId(annexId1);
|
||||
sealManage.setSealStatus(1);
|
||||
sealManage.setIsUse(0);
|
||||
sealManageMapper.updateSealManage(sealManage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
return AjaxResult.error("error");
|
||||
}
|
||||
return AjaxResult.success("success");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过邮件发送裁决书文件
|
||||
*
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
<if test="sealStatus != null">
|
||||
AND seal_status = #{sealStatus}
|
||||
</if>
|
||||
<if test="sealId != null and sealId != ''">
|
||||
AND seal_id = #{sealId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user