Merge branch 'wq1' of SH-Arbitrate/Mediation-Backend into dev
This commit was merged in pull request #39.
This commit is contained in:
+4
@@ -76,5 +76,9 @@ public class MsCaseApplicationReq {
|
|||||||
* 是否在线开庭,空-书面
|
* 是否在线开庭,空-书面
|
||||||
*/
|
*/
|
||||||
private Integer hearDateFlag ;
|
private Integer hearDateFlag ;
|
||||||
|
/**
|
||||||
|
* 是否小程序,1-是
|
||||||
|
*/
|
||||||
|
private Integer miniProgressFlag ;
|
||||||
|
|
||||||
}
|
}
|
||||||
+1
-1
@@ -95,7 +95,7 @@ public interface MsCaseApplicationMapper extends Mapper<MsCaseApplication> {
|
|||||||
" AND a1.application_organ_id = #{req.applicationOrganId} " +
|
" AND a1.application_organ_id = #{req.applicationOrganId} " +
|
||||||
"</if> "
|
"</if> "
|
||||||
+ "<if test=\"req.respondentIdentityNum != null and req.respondentIdentityNum != ''\">" +
|
+ "<if test=\"req.respondentIdentityNum != null and req.respondentIdentityNum != ''\">" +
|
||||||
" AND a.respondent_identity_num = #{req.respondentIdentityNum} AND c1.case_flow_id=#{req.caseFlowId}" +
|
" AND a.respondent_identity_num = #{req.respondentIdentityNum} " +
|
||||||
"</if> "
|
"</if> "
|
||||||
+
|
+
|
||||||
"<if test=\"req.hearDateFlag != null \">" +
|
"<if test=\"req.hearDateFlag != null \">" +
|
||||||
|
|||||||
+9
@@ -1,10 +1,19 @@
|
|||||||
package com.ruoyi.wisdomarbitrate.mapper.mscase;
|
package com.ruoyi.wisdomarbitrate.mapper.mscase;
|
||||||
|
|
||||||
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseMediator;
|
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseMediator;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
import tk.mybatis.mapper.common.Mapper;
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 案件预约表
|
* 案件预约表
|
||||||
*/
|
*/
|
||||||
public interface MsCaseMediatorMapper extends Mapper<MsCaseMediator> {
|
public interface MsCaseMediatorMapper extends Mapper<MsCaseMediator> {
|
||||||
|
/**
|
||||||
|
* 查询最新一条申请人的预约信息
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Select("SELECT id,case_appli_id caseAppliId,mediator_id mediatorId, mediator_name mediatorName,hear_date hearDate from ms_case_mediator where case_appli_id=#{id} and type is null order by id desc limit 1")
|
||||||
|
MsCaseMediator selectLastApplicant(@Param("id") Long id);
|
||||||
}
|
}
|
||||||
+27
-31
@@ -143,7 +143,17 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<MsCaseApplicationVO> list(MsCaseApplicationReq req) {
|
public List<MsCaseApplicationVO> list(MsCaseApplicationReq req) {
|
||||||
|
// admin查询所有案件
|
||||||
|
if (StrUtil.equals(SecurityUtils.getUsername(), "admin")) {
|
||||||
|
|
||||||
|
if(req.getHearDateFlag()!=null){
|
||||||
|
// todo 暂时写死
|
||||||
|
req.setCaseFlowId(9);
|
||||||
|
}
|
||||||
|
startPage();
|
||||||
|
|
||||||
|
return msCaseApplicationMapper.list(req, null);
|
||||||
|
}
|
||||||
// 根据用户查询角色
|
// 根据用户查询角色
|
||||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||||
// 根据id查询用户
|
// 根据id查询用户
|
||||||
@@ -168,22 +178,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|||||||
throw new ServiceException("该角色为绑定案件流程");
|
throw new ServiceException("该角色为绑定案件流程");
|
||||||
}
|
}
|
||||||
Map<String, MsCaseFlow> flowMap = caseFlows.stream().collect(Collectors.toMap(MsCaseFlow::getButtonAuthFlag, Function.identity()));
|
Map<String, MsCaseFlow> flowMap = caseFlows.stream().collect(Collectors.toMap(MsCaseFlow::getButtonAuthFlag, Function.identity()));
|
||||||
// admin查询所有案件
|
List<String> caseStatusNames = caseFlows.stream().map(MsCaseFlow::getCaseStatusName).collect(Collectors.toList());
|
||||||
if (StrUtil.equals(SecurityUtils.getUsername(), "admin")) {
|
|
||||||
MsCaseFlow caseFlow =null;
|
|
||||||
if(req.getHearDateFlag()!=null){
|
|
||||||
caseFlow = flowMap.get("caseManagement:list:mediate");
|
|
||||||
}else {
|
|
||||||
// 根据按钮权限标识符查询待选择调解员流程id
|
|
||||||
caseFlow = flowMap.get("caseManagement:list:selectmediator");
|
|
||||||
}
|
|
||||||
if(caseFlow!=null) {
|
|
||||||
req.setCaseFlowId(caseFlow.getId());
|
|
||||||
}
|
|
||||||
startPage();
|
|
||||||
|
|
||||||
return msCaseApplicationMapper.list(req, null);
|
|
||||||
}
|
|
||||||
for (SysRole role : roles) {
|
for (SysRole role : roles) {
|
||||||
if(StrUtil.isNotEmpty(role.getRoleName())&&StrUtil.equals(role.getRoleName(),"申请人")){
|
if(StrUtil.isNotEmpty(role.getRoleName())&&StrUtil.equals(role.getRoleName(),"申请人")){
|
||||||
if(sysUser.getDeptId()!=null) {
|
if(sysUser.getDeptId()!=null) {
|
||||||
@@ -194,25 +189,30 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
if(StrUtil.isNotEmpty(role.getRoleName())&&StrUtil.equals(role.getRoleName(),"被申请人")){
|
if(StrUtil.isNotEmpty(role.getRoleName())&&StrUtil.equals(role.getRoleName(),"被申请人")){
|
||||||
|
caseStatusNames=new ArrayList<>();
|
||||||
// todo 被申请人案件根据被申请人身份证号查询案件列表
|
// todo 被申请人案件根据被申请人身份证号查询案件列表
|
||||||
req.setRespondentIdentityNum(sysUser.getIdCard());
|
req.setRespondentIdentityNum(sysUser.getIdCard());
|
||||||
MsCaseFlow caseFlow =null;
|
MsCaseFlow caseFlow =null;
|
||||||
// 查询待调解流程id
|
// todo 查询待调解流程id被申请人暂时写死
|
||||||
if(req.getHearDateFlag()!=null){
|
if(req.getMiniProgressFlag()!=null) {
|
||||||
caseFlow = flowMap.get("caseManagement:list:mediate");
|
if (req.getHearDateFlag() != null) {
|
||||||
|
// caseFlow = flowMap.get("caseManagement:list:mediate");
|
||||||
|
caseStatusNames.add("待调解");
|
||||||
|
} else {
|
||||||
|
// 待选择调解员
|
||||||
|
caseStatusNames.add("待选择调解员");
|
||||||
|
}
|
||||||
}else {
|
}else {
|
||||||
// 根据按钮权限标识符查询待选择调解员流程id
|
// PC端
|
||||||
caseFlow = flowMap.get("caseManagement:list:selectmediator");
|
caseStatusNames.add("待被申请人签收");
|
||||||
}
|
|
||||||
if(caseFlow!=null) {
|
|
||||||
req.setCaseFlowId(caseFlow.getId());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
startPage();
|
startPage();
|
||||||
// 查询案件列表
|
// 查询案件列表
|
||||||
List<MsCaseApplicationVO> caseApplicationList = msCaseApplicationMapper.list(req, caseFlows.stream().map(MsCaseFlow::getCaseStatusName).collect(Collectors.toList()));
|
List<MsCaseApplicationVO> caseApplicationList = msCaseApplicationMapper.list(req, caseStatusNames);
|
||||||
return caseApplicationList;
|
return caseApplicationList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -599,7 +599,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|||||||
if(templateManage==null||StrUtil.isEmpty(templateManage.getTemOrigPath())){
|
if(templateManage==null||StrUtil.isEmpty(templateManage.getTemOrigPath())){
|
||||||
throw new ServiceException("未找到模板");
|
throw new ServiceException("未找到模板");
|
||||||
}
|
}
|
||||||
String templatePath = "/home/ruoyi/" + templateManage.getTemOrigPath();
|
String templatePath = "/home/ruoyi" + templateManage.getTemOrigPath();
|
||||||
templatePath=templatePath.replace("/profile","/uploadPath");
|
templatePath=templatePath.replace("/profile","/uploadPath");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -1057,12 +1057,8 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|||||||
|
|
||||||
// MsCaseApplication caseApplication = msCaseApplicationMapper.selectByPrimaryKey(id);
|
// MsCaseApplication caseApplication = msCaseApplicationMapper.selectByPrimaryKey(id);
|
||||||
// todo 返回申请人预约信息,预约信息查预约表
|
// todo 返回申请人预约信息,预约信息查预约表
|
||||||
Example example = new Example(MsCaseMediator.class);
|
|
||||||
Example.Criteria criteria = example.createCriteria();
|
|
||||||
criteria.andIsNull("type");
|
|
||||||
criteria.andEqualTo("caseAppliId", id);
|
|
||||||
// criteria.andEqualTo("mediatorId", SecurityUtils.getUserId());
|
// criteria.andEqualTo("mediatorId", SecurityUtils.getUserId());
|
||||||
MsCaseMediator msCaseMediator = msCaseMediatorMapper.selectOneByExample(example);
|
MsCaseMediator msCaseMediator = msCaseMediatorMapper.selectLastApplicant(id);
|
||||||
if(msCaseMediator==null){
|
if(msCaseMediator==null){
|
||||||
return AjaxResult.success(result);
|
return AjaxResult.success(result);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user