日志注解简单开发

This commit is contained in:
18792927508
2023-10-10 22:41:40 +08:00
parent 0c6b0a2bae
commit fd4a156e25
6 changed files with 213 additions and 12 deletions
@@ -3,6 +3,7 @@ package com.ruoyi.wisdomarbitrate.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import com.ruoyi.common.annotation.CaseLog;
import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.constant.CaseApplicationConstants;
import com.ruoyi.common.core.domain.entity.SysDept;
@@ -113,9 +114,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
caseAttach.setCaseAppliId(caseApplication.getId());
caseAttachMapper.updateCaseAttach(caseAttach);
}
}
return rows;
}
@@ -156,10 +155,38 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
int rows = caseApplicationMapper.updataCaseApplication(caseApplication);
List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
if(caseAffiliates!=null&&caseAffiliates.size()>0){
// 查询所有的组织机构,组装成map
List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept());
if (CollectionUtil.isEmpty(deptList)) {
deptList = new ArrayList<>();
}
Map<String, Long> deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getDeptName, SysDept::getDeptId,(oldV,newV)->newV));
for (CaseAffiliate caseAffiliate : caseAffiliates){
caseAffiliate.setCaseAppliId(caseApplication.getId());
if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getName())) {
// 将组织机构id设为申请人名称
if (deptMap.containsKey(caseApplication.getName())) {
caseAffiliate.setName(String.valueOf(deptMap.get(caseAffiliate.getName())));
} else {
// 如果不存在则新增
SysDept dept = new SysDept();
dept.setParentId(0L);
dept.setDeptName(caseAffiliate.getName());
dept.setAncestors("0");
dept.setOrderNum(1);
dept.setStatus("0");
dept.setDelFlag("0");
dept.setCreateBy(getUsername());
dept.setUpdateBy(getUsername());
sysDeptMapper.insertDept(dept);
deptMap.put(dept.getDeptName(), dept.getDeptId());
caseAffiliate.setName(String.valueOf(dept.getDeptId()));
}
}
caseAffiliateMapper.updataCaseAffiliate(caseAffiliate);
}
}
List<CaseAttach> caseAttachList = caseApplication.getCaseAttachList();
if(caseAttachList!=null&&caseAttachList.size()>0){
@@ -458,11 +485,22 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
caseAffiliate.setCaseAppliId(caseApplication.getId());
List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
if(caseAffiliatListeselect!=null){
// 查询组织机构
List<SysDept> sysDepts = sysDeptMapper.selectDeptList(new SysDept());
Map<String,String> deptMap=new HashMap<>();
if(CollectionUtil.isNotEmpty(sysDepts)){
for (SysDept sysDept : sysDepts) {
deptMap.put(String.valueOf(sysDept.getDeptId()),sysDept.getDeptName());
}
}
StringBuffer applicantName = new StringBuffer();
for (int i = 0; i < caseAffiliatListeselect.size(); i++){
CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(i);
int identityType = caseAffiliateselect.getIdentityType();
if(identityType==1){
if(StrUtil.isNotEmpty(caseAffiliateselect.getName())&&deptMap.containsKey(caseAffiliateselect.getName())){
caseAffiliateselect.setName(deptMap.get(caseAffiliateselect.getName()));
}
applicantName.append(caseAffiliateselect.getName()).append(",");;
}
}
@@ -543,9 +581,23 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
caseAffiliate.setCaseAppliId(caseApplication.getId());
List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
if(caseAffiliatListeselect!=null) {
// 查询组织机构
List<SysDept> sysDepts = sysDeptMapper.selectDeptList(new SysDept());
Map<String,String> deptMap=new HashMap<>();
if(CollectionUtil.isNotEmpty(sysDepts)){
for (SysDept sysDept : sysDepts) {
deptMap.put(String.valueOf(sysDept.getDeptId()),sysDept.getDeptName());
}
}
for (int j = 0; j < caseAffiliatListeselect.size(); j++) {
CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(j);
int identityType = caseAffiliateselect.getIdentityType();
if(identityType==1){
if(StrUtil.isNotEmpty(caseAffiliateselect.getName())&&deptMap.containsKey(caseAffiliateselect.getName())){
caseAffiliateselect.setName(deptMap.get(caseAffiliateselect.getName()));
}
caseAffiliateselect.setName(caseAffiliateselect.getName());;
}
//给申请人、被申请人发送短信通知
request.setPhone(caseAffiliateselect.getContactTelphone());
// 1947342 普通短信 开庭日期通知 尊敬的{1}用户,您的{2}仲裁案件,开庭日期已确定为{3},请知晓,如非本人操作,请忽略本短信。
@@ -34,21 +34,50 @@ public class CaseLogRecordServiceImpl implements ICaseLogRecordService {
contentBuilder.append("提交立案申请");
break;
case 2:
contentBuilder.append("提交立案审查");
contentBuilder.append("同意立案申请");
break;
case 3:
contentBuilder.append("创建立案申请");
contentBuilder.append("缴费成功");
break;
case 4:
contentBuilder.append("缴费成功");
contentBuilder.append("已确认缴费");
case 5:
contentBuilder.append("缴费成功");
contentBuilder.append("进行案件质证");
case 6:
contentBuilder.append("缴费成功");
contentBuilder.append("同意组庭审核");
case 7:
contentBuilder.append("缴费成功");
contentBuilder.append("组庭确认成功");
case 8:
contentBuilder.append("缴费成功");
contentBuilder.append("同意待开庭审理");
case 9:
contentBuilder.append("同意书面审理");
break;
case 10:
contentBuilder.append("已完成书面审理");
break;
case 11:
contentBuilder.append("已生成仲裁文书");
break;
case 12:
contentBuilder.append("已核查仲裁文书");
break;
case 13:
contentBuilder.append("已同意仲裁文书");
break;
case 14:
contentBuilder.append("已完成仲裁文书签名");
break;
case 15:
contentBuilder.append("已完成仲裁文书用印");
break;
case 16:
contentBuilder.append("已送达仲裁文书");
break;
case 17:
contentBuilder.append("已完成案件归档");
break;
case 26:
contentBuilder.append("已完成证据确认");
break;
}