Merge branch 'dev' of SH-Arbitrate/Mediation-Backend into prod
This commit was merged in pull request #130.
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 com.ruoyi.wisdomarbitrate.domain.dto.dept.DeptIdentify;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import tk.mybatis.mapper.entity.Example;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -24,4 +25,5 @@ public interface DeptIdentifyMapper {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
String selectById(@Param("id") Long identifyId);
|
String selectById(@Param("id") Long identifyId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -37,4 +37,6 @@ public interface MsSignSealService {
|
|||||||
AjaxResult msCaseSignUrlResAPP(MsSignSealDTO dto) throws EsignDemoException;
|
AjaxResult msCaseSignUrlResAPP(MsSignSealDTO dto) throws EsignDemoException;
|
||||||
|
|
||||||
AjaxResult signSeaalCaseApplicaCallback(String reqbodystr) throws EsignDemoException, IOException;
|
AjaxResult signSeaalCaseApplicaCallback(String reqbodystr) throws EsignDemoException, IOException;
|
||||||
|
|
||||||
|
AjaxResult sealCheckCallback(String reqbodystr) throws EsignDemoException, IOException;
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-1
@@ -235,7 +235,8 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|||||||
if (CollectionUtil.isNotEmpty(list)) {
|
if (CollectionUtil.isNotEmpty(list)) {
|
||||||
// 判断调解员签名按钮权限,0-显示,1-不显示
|
// 判断调解员签名按钮权限,0-显示,1-不显示
|
||||||
for (MsCaseApplicationVO vo : list) {
|
for (MsCaseApplicationVO vo : list) {
|
||||||
if (isMediatorRole && vo.getMediaResult()!=null && vo.getMediaResult()==5) {
|
// 如果是调解员并且是和解协议并且是代签名状态,不显示
|
||||||
|
if (isMediatorRole && vo.getMediaResult()!=null && vo.getMediaResult()==5 && vo.getCaseStatusName().equals("待签名")) {
|
||||||
// 是调解员并且是和解协议,不显示
|
// 是调解员并且是和解协议,不显示
|
||||||
vo.setSignButtonFlag(1);
|
vo.setSignButtonFlag(1);
|
||||||
|
|
||||||
@@ -2965,6 +2966,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|||||||
* @param req
|
* @param req
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@Transactional
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult confirmMeetingResult(MsCaseApplicationReq req) {
|
public AjaxResult confirmMeetingResult(MsCaseApplicationReq req) {
|
||||||
// 查询案件是否存在
|
// 查询案件是否存在
|
||||||
@@ -2989,6 +2991,9 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
AjaxResult result = caseApplicationService.generateApplication(req);
|
AjaxResult result = caseApplicationService.generateApplication(req);
|
||||||
|
// 修改案件结果
|
||||||
|
application.setMediaResult(req.getMediaResult());
|
||||||
|
msCaseApplicationMapper.updateByPrimaryKeySelective(application);
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+80
-2
@@ -1056,8 +1056,6 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
|||||||
MsCaseFlow currentFlow = caseFlowMapper.selectByPrimaryKey(caseApplicationselect.getCaseFlowId());
|
MsCaseFlow currentFlow = caseFlowMapper.selectByPrimaryKey(caseApplicationselect.getCaseFlowId());
|
||||||
Integer caseNode = currentFlow.getNodeId();
|
Integer caseNode = currentFlow.getNodeId();
|
||||||
String caseStatusName = currentFlow.getCaseStatusName();
|
String caseStatusName = currentFlow.getCaseStatusName();
|
||||||
|
|
||||||
|
|
||||||
if("SIGN_MISSON_COMPLETE".equals(action) && signResult==2){
|
if("SIGN_MISSON_COMPLETE".equals(action) && signResult==2){
|
||||||
if(mediaResult.intValue()==1){
|
if(mediaResult.intValue()==1){
|
||||||
//调解
|
//调解
|
||||||
@@ -1344,6 +1342,86 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
|||||||
return AjaxResult.success("success");
|
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">
|
<if test="sealStatus != null">
|
||||||
AND seal_status = #{sealStatus}
|
AND seal_status = #{sealStatus}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="sealId != null and sealId != ''">
|
||||||
|
AND seal_id = #{sealId}
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user