bug修复

This commit is contained in:
18792927508
2024-02-27 15:25:03 +08:00
parent 1ddfff3e51
commit 694a7667f4
8 changed files with 70 additions and 16 deletions
@@ -5,7 +5,9 @@ import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.system.mapper.SysRoleMapper;
import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.wisdomarbitrate.domain.dto.miniprogress.IdentityAuthentication;
import com.ruoyi.wisdomarbitrate.domain.vo.miniprogress.WeChatUserVO;
import com.ruoyi.wisdomarbitrate.service.miniprogress.WeChatUserService;
@@ -26,6 +28,8 @@ public class WeChatUserController extends BaseController {
private WeChatUserService weChatUserService;
@Autowired
private SysRoleMapper roleMapper;
@Autowired
private SysUserMapper userMapper;
/**
* 小程序端获取手机验证码
* @param userVO
@@ -67,5 +71,16 @@ public class WeChatUserController extends BaseController {
logger.info("调用小程序注册==="+ientityAuthentication.toString());
return weChatUserService.registerUser(ientityAuthentication);
}
@Anonymous
@GetMapping("/verifyUserName")
public AjaxResult verifyUserName(@RequestParam("userName") String userName)
{
SysUser sysUser = userMapper.checkUserNameUnique(userName);
if(sysUser==null){
return AjaxResult.success();
}else {
return AjaxResult.error("用户名已存在!");
}
}
}
@@ -99,7 +99,7 @@ public class MsCaseApplication {
private String payType;
/**
* 调解结果,1达成调解,2未达成调解,3未达成调解但不再争议,4未达成调解但同意引入仲裁
* 调解结果,1达成调解,2未达成调解,3未达成调解但不再争议,4未达成调解但同意引入仲裁,5-达成和解
*/
@Column(name = "media_result")
private Integer mediaResult;
@@ -73,6 +73,10 @@ public class MsCaseApplicationVO extends MsCaseApplication {
* 缴费拒绝原因
*/
private String reason;
/**
* 签名按钮显示,0-显示,1-不显示
*/
private Integer signButtonFlag;
}
@@ -34,7 +34,7 @@ public interface MsCaseApplicationMapper extends Mapper<MsCaseApplication> {
* @param caseStatusNames
* @return
*/
@Select("<script> select t.* from (select c.id,c.room_id roomId,c.mediation_method mediationMethod," +
@Select("<script> select t.* from (select c.media_result mediaResult,c.id,c.room_id roomId,c.mediation_method mediationMethod," +
" CASE c.mediation_method when 1 then '线上调解' when 2 then '线下调解' ELSE '' END mediationMethodName,"
+
"0 AS pendingStatus,c.case_flow_id caseFlowId,c.batch_number batchNumber,c.case_num caseNum,c.case_subject_amount caseSubjectAmount," +
@@ -80,7 +80,7 @@ public interface MsCaseApplicationMapper extends Mapper<MsCaseApplication> {
"<if test=\"req.endTime != null and req.endTime != ''\">" +
"and c.create_time &lt;= #{req.endTime}</if>" +
" </where> " +
"union select c.id id,c.room_id roomId,c.mediation_method mediationMethod,"
"union select c.media_result mediaResult,c.id id,c.room_id roomId,c.mediation_method mediationMethod,"
+
" CASE c.mediation_method when 1 then '线上调解' when 2 then '线下调解' ELSE '' END mediationMethodName,"
+
@@ -42,4 +42,11 @@ public interface MsCaseAttachMapper {
* @param ids
*/
void batchDelete(@Param("ids")List<Long> ids);
/**
* 根据附件名查找数量
* @param fileName
* @return
*/
int countByfileName(@Param("annexName") String fileName,@Param("caseAppliId") Long caseAppliId);
}
@@ -185,6 +185,8 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
}
// Map<String, MsCaseFlow> flowMap = caseFlows.stream().collect(Collectors.toMap(MsCaseFlow::getButtonAuthFlag, Function.identity()));
List<String> caseStatusNames = caseFlows.stream().map(MsCaseFlow::getCaseStatusName).collect(Collectors.toList());
// 是否调解员
boolean isMediatorRole=false;
// 如果是申请人,可以看见申请人为自己(即自然人)或者委托代理人为自己的案件(即机构)
for (SysRole role : roles) {
if(StrUtil.isNotEmpty(role.getRoleName())){
@@ -209,6 +211,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
break;
}
if(StrUtil.equals(role.getRoleName(),"调解员")) {
isMediatorRole=true;
req.setMediatorId(String.valueOf(sysUser.getUserId()));
break;
}
@@ -220,7 +223,21 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
}
startPage();
// 查询案件列表
return msCaseApplicationMapper.list(req, caseStatusNames);
List<MsCaseApplicationVO> list = msCaseApplicationMapper.list(req, caseStatusNames);
if (CollectionUtil.isNotEmpty(list)) {
// 判断调解员签名按钮权限,0-显示,1-不显示
for (MsCaseApplicationVO vo : list) {
if (isMediatorRole && vo.getMediaResult()!=null && vo.getMediaResult()==5) {
// 是调解员并且是和解协议,不显示
vo.setSignButtonFlag(1);
}else {
vo.setSignButtonFlag(0);
}
}
}
return list;
}
@Override
@@ -2027,6 +2044,9 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
if(caseFlow != null){
application.setCaseFlowId(caseFlow.getId());
application.setCaseStatusName(caseFlow.getCaseStatusName());
// 新增日志
CaseLogUtils.insertCaseLog(application.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(),"");
}
application.setMediaResult(mediaResult);
@@ -53,8 +53,7 @@ import java.util.Map;
import java.util.stream.Collectors;
import static com.ruoyi.common.core.domain.AjaxResult.success;
import static com.ruoyi.common.utils.file.FileUploadUtils.getAbsoluteFile;
import static com.ruoyi.common.utils.file.FileUploadUtils.getPathFileName;
import static com.ruoyi.common.utils.file.FileUploadUtils.*;
/**
* @author wangqiong
@@ -454,15 +453,20 @@ public class VideoConferenceServiceImpl implements VideoConferenceService {
String fileName = fileUrl.substring(fileUrl.lastIndexOf("/"));
fileName = fileName.replace("/", "");
fileName=fileId+fileName;
String absPath = getAbsoluteFile(RuoYiConfig.getVideoUploadPath(), fileName).getAbsolutePath();
String annexName=System.currentTimeMillis()+fileName;
String absPath = getAbsoluteFile(RuoYiConfig.getVideoUploadPath(), annexName).getAbsolutePath();
staticAndMksDir = Paths.get(absPath).toFile().toString();
long downloadFile = HttpUtil.downloadFile(fileUrl, staticAndMksDir);
if(downloadFile>0) {
Example example = new Example(MsCaseApplication.class);
example.createCriteria().andEqualTo("roomId", roomId);
MsCaseApplication caseApplication = caseApplicationMapper.selectOneByExample(example);
if(caseApplication != null) {
String annexName = getPathFileName(RuoYiConfig.getVideoUploadPath(), fileName);
// 根据文件名称查询附件,如果该视频已存在则不存入数据库
int count= caseAttachMapper.countByfileName(fileName,caseApplication.getId());
if(count<1) {
annexName = getPathFileName(RuoYiConfig.getVideoUploadPath(), annexName);
// 存入数据库
MsCaseAttach caseAttach = MsCaseAttach.builder().caseAppliId(caseApplication.getId())
.annexName(fileName)
@@ -474,6 +478,7 @@ public class VideoConferenceServiceImpl implements VideoConferenceService {
}
}
}
}
return "";
}
@@ -104,6 +104,9 @@
</if>
</where>
</select>
<select id="countByfileName" resultType="java.lang.Integer">
select count(1) from ms_case_attach where case_appli_id=#{caseAppliId} and annex_name=#{annexName}
</select>
<update id="updateCaseAttach" parameterType="com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach">
update ms_case_attach