实现组庭审核时仲裁员待办案件数据显示 #308
@@ -10,6 +10,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||
import com.ruoyi.system.mapper.*;
|
||||
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -61,6 +62,9 @@ public class SysUserServiceImpl implements ISysUserService {
|
||||
@Autowired
|
||||
private ISysConfigService configService;
|
||||
|
||||
@Autowired
|
||||
private CaseApplicationMapper caseApplicationMapper;
|
||||
|
||||
@Autowired
|
||||
protected Validator validator;
|
||||
|
||||
@@ -78,7 +82,19 @@ public class SysUserServiceImpl implements ISysUserService {
|
||||
|
||||
@Override
|
||||
public List<SysUser> selectUserListByAdRole(Arbitrator arbitrator) {
|
||||
return userMapper.selectUserListByAdRole(arbitrator);
|
||||
List<SysUser> sysUsers = userMapper.selectUserListByAdRole(arbitrator);
|
||||
if(sysUsers!=null&&sysUsers.size()>0){
|
||||
for(SysUser sysUser: sysUsers){
|
||||
Long userId = sysUser.getUserId();
|
||||
int casenum = caseApplicationMapper.selectCasenum(userId.toString());
|
||||
String nickName = sysUser.getNickName();
|
||||
String nickNamenew = nickName + "(待办案件数量" + casenum + "个)";
|
||||
sysUser.setNickName(nickNamenew);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return sysUsers;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -131,4 +131,6 @@ public interface CaseApplicationMapper {
|
||||
* @return
|
||||
*/
|
||||
int batchSave(@Param("list")List<CaseApplication> caseApplications);
|
||||
|
||||
int selectCasenum(@Param("userId") String userId);
|
||||
}
|
||||
|
||||
+38
-2
@@ -1936,12 +1936,48 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecordnew);
|
||||
}else {
|
||||
arbitrateRecordsel.setCaseCheckReject(caseCheckReject);
|
||||
|
||||
|
||||
arbitrateRecordMapper.insertArbitrateRecord(arbitrateRecordsel);
|
||||
}
|
||||
//发短信给申请人
|
||||
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
||||
CaseAffiliate caseAffiliate = new CaseAffiliate();
|
||||
caseAffiliate.setCaseAppliId(caseApplication.getId());
|
||||
List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
|
||||
if (caseAffiliates != null && caseAffiliates.size() > 0) {
|
||||
for (CaseAffiliate affiliate : caseAffiliates) {
|
||||
//获取身份类型
|
||||
int identityType = affiliate.getIdentityType();
|
||||
//查询案件详细信息
|
||||
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||
String caseName = "仲裁";
|
||||
String caseNum = caseApplication1.getCaseNum();
|
||||
|
||||
if (identityType == 1) {
|
||||
request.setPhone(affiliate.getContactTelphone());
|
||||
request.setTemplateId("2018697");
|
||||
String name = affiliate.getName();
|
||||
request.setTemplateParamSet(new String[]{name, caseName, caseNum,caseCheckReject});
|
||||
Boolean aBoolean = SmsUtils.sendSms(request);
|
||||
//保存短信发送记录
|
||||
SmsSendRecord smsSendRecord = new SmsSendRecord();
|
||||
smsSendRecord.setCaseId(caseApplication.getId());
|
||||
smsSendRecord.setCaseNum(caseNum);
|
||||
smsSendRecord.setPhone(request.getPhone());
|
||||
smsSendRecord.setSendTime(new Date());
|
||||
String content = "尊敬的" + name + "用户,您的" + caseName + "案件" + caseNum + "已拒绝,拒接原因:" + caseCheckReject;
|
||||
smsSendRecord.setSendContent(content);
|
||||
smsSendRecord.setCreateBy(getUsername());
|
||||
if (aBoolean) {
|
||||
smsSendRecord.setSendStatus(1);
|
||||
} else {
|
||||
smsSendRecord.setSendStatus(0);
|
||||
}
|
||||
smsRecordMapper.saveSmsSendRecord(smsSendRecord);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
// 新增日志
|
||||
insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_PAYMENT, notes);
|
||||
|
||||
@@ -1254,6 +1254,14 @@
|
||||
<select id="selectArbitratorList" resultType="java.lang.String">
|
||||
select a.arbitrator_id id from case_application a where a.id=#{id}
|
||||
</select>
|
||||
|
||||
<select id="selectCasenum" resultType="java.lang.Integer">
|
||||
SELECT count(1)
|
||||
from case_application c
|
||||
where c.arbitrator_id = #{userId}
|
||||
and c.case_status in(8,9)
|
||||
</select>
|
||||
|
||||
<select id="selectCaseIdByRoomId" resultType="java.lang.Long">
|
||||
select id
|
||||
from case_application where room_id=#{roomId} limit 1
|
||||
|
||||
Reference in New Issue
Block a user