Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into bgy
This commit is contained in:
+4
-1
@@ -1,5 +1,6 @@
|
|||||||
package com.ruoyi.web.controller.wisdomarbitrate;
|
package com.ruoyi.web.controller.wisdomarbitrate;
|
||||||
|
|
||||||
|
import com.ruoyi.common.annotation.Anonymous;
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
@@ -18,6 +19,7 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.annotation.security.PermitAll;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -221,8 +223,9 @@ public class CaseApplicationController extends BaseController {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 确认缴费查询立案信息
|
* 发送房间号短信
|
||||||
*/
|
*/
|
||||||
|
@Anonymous
|
||||||
@PostMapping("/sendRoomNoMessage")
|
@PostMapping("/sendRoomNoMessage")
|
||||||
public AjaxResult sendRoomNoMessage(@Validated @RequestBody SendRoomNoMessageVO messageVO)
|
public AjaxResult sendRoomNoMessage(@Validated @RequestBody SendRoomNoMessageVO messageVO)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.ruoyi.common.utils.file;
|
package com.ruoyi.common.utils.file;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
import com.ruoyi.common.config.EsignDemoConfig;
|
import com.ruoyi.common.config.EsignDemoConfig;
|
||||||
import com.ruoyi.common.constant.EsignHeaderConstant;
|
import com.ruoyi.common.constant.EsignHeaderConstant;
|
||||||
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
|
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
|
||||||
@@ -16,8 +17,6 @@ public class SaaSAPIFileUtils {
|
|||||||
private static String eSignAppSecret=EsignDemoConfig.EsignAppSecret;
|
private static String eSignAppSecret=EsignDemoConfig.EsignAppSecret;
|
||||||
/**
|
/**
|
||||||
* 获取文件上传地址
|
* 获取文件上传地址
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public static EsignHttpResponse getUploadUrl(String filePath) throws EsignDemoException {
|
public static EsignHttpResponse getUploadUrl(String filePath) throws EsignDemoException {
|
||||||
//自定义的文件封装类,传入文件地址可以获取文件的名称大小,文件流等数据
|
//自定义的文件封装类,传入文件地址可以获取文件的名称大小,文件流等数据
|
||||||
@@ -38,6 +37,47 @@ public class SaaSAPIFileUtils {
|
|||||||
//发起接口请求
|
//发起接口请求
|
||||||
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, true);
|
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, true);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 上传文件流
|
||||||
|
*/
|
||||||
|
public static EsignHttpResponse uploadFile(String uploadUrl,String filePath) throws EsignDemoException {
|
||||||
|
//根据文件地址获取文件contentMd5
|
||||||
|
EsignFileBean esignFileBean = new EsignFileBean(filePath);
|
||||||
|
//请求方法
|
||||||
|
EsignRequestType requestType= EsignRequestType.PUT;
|
||||||
|
return EsignHttpHelper.doUploadHttp(uploadUrl,requestType,esignFileBean.getFileBytes(),esignFileBean.getFileContentMD5(), EsignHeaderConstant.CONTENTTYPE_STREAM.VALUE(),true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取文件上传状态
|
||||||
|
*/
|
||||||
|
public static EsignHttpResponse getFileStatus(String fileId) throws EsignDemoException {
|
||||||
|
String apiaddr="/v3/files/"+fileId;
|
||||||
|
|
||||||
|
//请求参数body体,json格式。get或者delete请求时jsonString传空json:"{}"或者null
|
||||||
|
String jsonParm=null;
|
||||||
|
//请求方法
|
||||||
|
EsignRequestType requestType= EsignRequestType.GET;
|
||||||
|
//生成签名鉴权方式的的header
|
||||||
|
Map<String, String> header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId,eSignAppSecret,jsonParm,requestType.name(),apiaddr,true);
|
||||||
|
//发起接口请求
|
||||||
|
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr,requestType , jsonParm, header,true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* public static void main(String[] args) throws EsignDemoException {
|
||||||
|
String filePath = "D:\\home\\ruoyi\\uploadPath\\upload\\2023\\10\\07\\6babb8e261454fffbacf6d9fd1589b9b.docx";
|
||||||
|
EsignHttpResponse uploadUrl = getUploadUrl(filePath);
|
||||||
|
String body = uploadUrl.getBody();
|
||||||
|
JSONObject jsonObject = new JSONObject(body);
|
||||||
|
JSONObject dataObj = jsonObject.getJSONObject("data");
|
||||||
|
String fileUploadUrl = dataObj.get("fileUploadUrl").toString();
|
||||||
|
System.out.println("这是fileUploadUrl:"+fileUploadUrl);
|
||||||
|
String fileId = dataObj.get("fileId").toString();
|
||||||
|
System.out.println("这是fileId:"+fileId);
|
||||||
|
EsignHttpResponse esignHttpResponse = uploadFile(fileUploadUrl, filePath);
|
||||||
|
System.out.println("这是上传文件流的结果:"+esignHttpResponse.getBody());
|
||||||
|
EsignHttpResponse fileStatus = getFileStatus(fileId);
|
||||||
|
System.out.println("这是获取文件上传状态的结果:"+fileStatus.getBody());
|
||||||
|
getFileStatus("95d0c307d91e4985bdb8874f6f84daa5");
|
||||||
|
}*/
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -3,6 +3,7 @@ package com.ruoyi.wisdomarbitrate.domain.vo;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.validation.constraints.NotEmpty;
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -13,7 +14,7 @@ import java.io.Serializable;
|
|||||||
@Data
|
@Data
|
||||||
public class SendRoomNoMessageVO implements Serializable {
|
public class SendRoomNoMessageVO implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@NotEmpty(message = "案件id不能为空")
|
@NotNull(message = "案件id不能为空")
|
||||||
private Long id;
|
private Long id;
|
||||||
@NotEmpty(message = "房间号不能为空")
|
@NotEmpty(message = "房间号不能为空")
|
||||||
private String roomNo;
|
private String roomNo;
|
||||||
|
|||||||
@@ -8,12 +8,4 @@ import java.util.List;
|
|||||||
public interface ArbitratorMapper {
|
public interface ArbitratorMapper {
|
||||||
List<Arbitrator> selectArbitratorList(Arbitrator arbitrator);
|
List<Arbitrator> selectArbitratorList(Arbitrator arbitrator);
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据案件id和身份类型查询案件关联人
|
|
||||||
* @param caseAppliId
|
|
||||||
* @param identityType
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Arbitrator selectArbitratorById(@Param("caseAppliId") Long caseAppliId,@Param("identityType") Integer identityType);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.ruoyi.wisdomarbitrate.mapper;
|
|||||||
|
|
||||||
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
|
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -15,6 +16,7 @@ public interface CaseAffiliateMapper {
|
|||||||
|
|
||||||
|
|
||||||
List<CaseAffiliate> selectCaseAffiliate(CaseAffiliate caseAffiliate);
|
List<CaseAffiliate> selectCaseAffiliate(CaseAffiliate caseAffiliate);
|
||||||
|
CaseAffiliate selectCaseAffiliateByIdentityType(@Param("caseAppliId") Long caseAppliId, @Param("identityType")int identityType);
|
||||||
|
|
||||||
int updataCaseAffiliate(CaseAffiliate caseAffiliate);
|
int updataCaseAffiliate(CaseAffiliate caseAffiliate);
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-5
@@ -461,8 +461,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String sendRoomNoMessage(SendRoomNoMessageVO messageVO) {
|
public String sendRoomNoMessage(SendRoomNoMessageVO messageVO) {
|
||||||
Arbitrator arbitrator = arbitratorMapper.selectArbitratorById(messageVO.getId(), 2);
|
CaseAffiliate caseAffiliate = caseAffiliateMapper.selectCaseAffiliateByIdentityType(messageVO.getId(), 2);
|
||||||
if(null==arbitrator){
|
if(null==caseAffiliate){
|
||||||
return "被申请人不存在";
|
return "被申请人不存在";
|
||||||
}
|
}
|
||||||
CaseApplication caseApplication = new CaseApplication();
|
CaseApplication caseApplication = new CaseApplication();
|
||||||
@@ -473,9 +473,9 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
||||||
request.setTemplateId("1948332");
|
request.setTemplateId("1948332");
|
||||||
// 1948332 普通短信 开庭审理房间号通知 尊敬的{1}用户,您的{2}仲裁案件,开庭审理房间号为{3},请知晓,如非本人操作,请忽略本短信。
|
// 1948332 普通短信 开庭审理房间号通知 尊敬的{1}用户,您的{2}仲裁案件,开庭审理房间号为{3},请知晓,如非本人操作,请忽略本短信。
|
||||||
request.setPhone(arbitrator.getTelephone());
|
request.setPhone(caseAffiliate.getContactTelphone());
|
||||||
request.setTemplateParamSet(new String[]{arbitrator.getArbitratorName(), caseApplicationselect.getCaseNum(), messageVO.getRoomNo()});
|
request.setTemplateParamSet(new String[]{caseAffiliate.getName(), caseApplicationselect.getCaseNum(), messageVO.getRoomNo()});
|
||||||
|
SmsUtils.sendSms(request);
|
||||||
|
|
||||||
return "短信发送成功";
|
return "短信发送成功";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,21 +36,5 @@
|
|||||||
|
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
<select id="selectArbitratorById" resultMap="ArbitratorResult">
|
|
||||||
select a.id ,a.arbitrator_name ,a.title ,a.career ,a.professi_classifi ,
|
|
||||||
a.education ,a.area ,a.telephone ,a.current_case_num ,a.closed_case_num
|
|
||||||
from arbitrator a
|
|
||||||
<where>
|
|
||||||
<if test="caseAppliId != null and caseAppliId != ''">
|
|
||||||
AND ca.ase_appliId=#{caseAppliId}
|
|
||||||
</if>
|
|
||||||
|
|
||||||
<if test="identityType != null and identityType != ''">
|
|
||||||
a.identity_type=#{identityType}
|
|
||||||
</if>
|
|
||||||
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -33,6 +33,20 @@
|
|||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectCaseAffiliateByIdentityType" resultMap="CaseAffiliateResult">
|
||||||
|
select c.id ,c.case_appli_id ,c.identity_type ,c.name ,c.identity_num ,c.contact_telphone ,c.contact_address ,
|
||||||
|
c.work_address ,c.work_telphone ,c.name_agent, c.identity_num_agent ,c.contact_telphone_agent ,c.contact_address_agent,
|
||||||
|
c.track_num
|
||||||
|
from case_affiliate c
|
||||||
|
<where>
|
||||||
|
<if test="caseAppliId != null ">
|
||||||
|
AND c.case_appli_id = #{caseAppliId}
|
||||||
|
</if>
|
||||||
|
<if test="caseAppliId != null ">
|
||||||
|
AND c.identity_type = #{identityType}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<insert id="batchCaseAffiliate">
|
<insert id="batchCaseAffiliate">
|
||||||
|
|||||||
Reference in New Issue
Block a user