Merge branch 'wq' of SH-Arbitrate/Arbitrate-Backend into dev
This commit was merged in pull request #50.
This commit is contained in:
-6
@@ -6,22 +6,16 @@ import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
|
||||
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.security.PermitAll;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
|
||||
@@ -25,6 +25,15 @@ public class CaseLogRecord extends BaseEntity {
|
||||
|
||||
/** 案件编号 */
|
||||
private String caseNum;
|
||||
/**
|
||||
* 展示的内容
|
||||
*/
|
||||
private String content;
|
||||
/**
|
||||
* 用户昵称
|
||||
*/
|
||||
private String nickName;
|
||||
|
||||
|
||||
public String getCaseNum() {
|
||||
return caseNum;
|
||||
@@ -73,4 +82,24 @@ public class CaseLogRecord extends BaseEntity {
|
||||
public void setNotes(String notes) {
|
||||
this.notes = notes;
|
||||
}
|
||||
|
||||
public void setCaseNode(Integer caseNode) {
|
||||
this.caseNode = caseNode;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getNickName() {
|
||||
return nickName;
|
||||
}
|
||||
|
||||
public void setNickName(String nickName) {
|
||||
this.nickName = nickName;
|
||||
}
|
||||
}
|
||||
|
||||
+32
-24
@@ -2,6 +2,7 @@ package com.ruoyi.wisdomarbitrate.service.impl;
|
||||
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.constant.CaseApplicationConstants;
|
||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||
@@ -69,34 +70,38 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
|
||||
int rows = caseApplicationMapper.insertCaseApplication(caseApplication);
|
||||
List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
|
||||
|
||||
Map<String, Long> deptMap =new HashMap<>();
|
||||
if (caseAffiliates != null && caseAffiliates.size() > 0) {
|
||||
// 查询所有的组织机构,组装成map
|
||||
List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept());
|
||||
if (CollectionUtil.isEmpty(deptList)) {
|
||||
deptList = new ArrayList<>();
|
||||
if(StrUtil.isNotEmpty(caseApplication.getName())) {
|
||||
// 查询所有的组织机构,组装成map
|
||||
List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept());
|
||||
if (CollectionUtil.isEmpty(deptList)) {
|
||||
deptList = new ArrayList<>();
|
||||
}
|
||||
deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getDeptName, SysDept::getDeptId));
|
||||
}
|
||||
Map<String, Long> deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getDeptName, SysDept::getDeptId));
|
||||
|
||||
for (CaseAffiliate caseAffiliate : caseAffiliates) {
|
||||
caseAffiliate.setCaseAppliId(caseApplication.getId());
|
||||
// 将组织机构id设为申请人名称
|
||||
if (deptMap.containsKey(caseApplication.getName())) {
|
||||
caseAffiliate.setName(String.valueOf(deptMap.get(caseApplication.getName())));
|
||||
} else {
|
||||
// 如果不存在则新增
|
||||
SysDept dept = new SysDept();
|
||||
dept.setParentId(0L);
|
||||
dept.setDeptName(caseApplication.getName());
|
||||
dept.setAncestors("0");
|
||||
dept.setOrderNum(1);
|
||||
dept.setStatus("0");
|
||||
dept.setDelFlag("0");
|
||||
dept.setCreateBy(getUsername());
|
||||
dept.setUpdateBy(getUsername());
|
||||
sysDeptMapper.insertDept(dept);
|
||||
caseAffiliate.setName(String.valueOf(dept.getDeptId()));
|
||||
if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseApplication.getName())) {
|
||||
// 将组织机构id设为申请人名称
|
||||
if (deptMap.containsKey(caseApplication.getName())) {
|
||||
caseAffiliate.setName(String.valueOf(deptMap.get(caseApplication.getName())));
|
||||
} else {
|
||||
// 如果不存在则新增
|
||||
SysDept dept = new SysDept();
|
||||
dept.setParentId(0L);
|
||||
dept.setDeptName(caseApplication.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()));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -582,7 +587,9 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
BeanUtils.copyBeanProp(caseAffiliate,caseApplication);
|
||||
caseAffiliate.setIdentityType(1);
|
||||
// 申请人(机构),需要判断部门中是否存在,不存在则新增,当身份类型为1的时候,查询时需要根据名称查询组织机构
|
||||
setApplicantOrganization(caseAffiliate,caseApplication,deptList);
|
||||
if(StrUtil.isNotEmpty(caseApplication.getName())){
|
||||
setApplicantOrganization(caseAffiliate, caseApplication, deptList);
|
||||
}
|
||||
caseAffiliatesnew.add(caseAffiliate);
|
||||
|
||||
// 组装被申请人信息
|
||||
@@ -615,6 +622,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
dept.setCreateBy(getUsername());
|
||||
dept.setUpdateBy(getUsername());
|
||||
sysDeptMapper.insertDept(dept);
|
||||
deptMap.put(dept.getDeptName(),dept.getDeptId());
|
||||
caseAffiliate.setName(String.valueOf(dept.getDeptId()));
|
||||
|
||||
}
|
||||
|
||||
+39
-1
@@ -1,5 +1,7 @@
|
||||
package com.ruoyi.wisdomarbitrate.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.CaseLogRecordMapper;
|
||||
import com.ruoyi.wisdomarbitrate.service.ICaseLogRecordService;
|
||||
@@ -16,7 +18,43 @@ public class CaseLogRecordServiceImpl implements ICaseLogRecordService {
|
||||
|
||||
@Override
|
||||
public List<CaseLogRecord> selectCaseLogRecordList(CaseLogRecord caseLogRecord) {
|
||||
return caseLogRecordMapper.selectCaseLogRecordList(caseLogRecord);
|
||||
List<CaseLogRecord> records = caseLogRecordMapper.selectCaseLogRecordList(caseLogRecord);
|
||||
if(CollectionUtil.isNotEmpty(records)){
|
||||
records.forEach(record->{
|
||||
StringBuilder contentBuilder = new StringBuilder();
|
||||
if(StrUtil.isNotEmpty(record.getNickName())) {
|
||||
contentBuilder.append(record.getNickName());
|
||||
}
|
||||
contentBuilder.append("于").append(record.getCaseNodeTime());
|
||||
switch(record.getCaseNode()){
|
||||
case 0:
|
||||
contentBuilder.append("创建立案申请");
|
||||
break;
|
||||
case 1:
|
||||
contentBuilder.append("提交立案申请");
|
||||
break;
|
||||
case 2:
|
||||
contentBuilder.append("提交立案审查");
|
||||
break;
|
||||
case 3:
|
||||
contentBuilder.append("创建立案申请");
|
||||
break;
|
||||
case 4:
|
||||
contentBuilder.append("缴费成功");
|
||||
case 5:
|
||||
contentBuilder.append("缴费成功");
|
||||
case 6:
|
||||
contentBuilder.append("缴费成功");
|
||||
case 7:
|
||||
contentBuilder.append("缴费成功");
|
||||
case 8:
|
||||
contentBuilder.append("缴费成功");
|
||||
break;
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
return records;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
<result property="caseNodeTime" column="case_node_time" />
|
||||
<result property="notes" column="notes" />
|
||||
<result property="caseNum" column="case_num" />
|
||||
<result property="nick_name" column="nickName" />
|
||||
<result property="nick_name" column="nickName" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
@@ -20,12 +22,17 @@
|
||||
</insert>
|
||||
|
||||
<select id="selectCaseLogRecordList" parameterType="CaseLogRecord" resultMap="CaseLogRecordResult">
|
||||
select cl.case_node ,cl.case_node_time ,cl.notes ,c.case_num ,cl.id ,cl.case_appli_id
|
||||
select cl.case_node ,cl.case_node_time ,cl.notes ,c.case_num ,cl.id ,cl.case_appli_id,
|
||||
u.nick_name
|
||||
from case_log_record cl left join case_application c on cl.case_appli_id = c.id
|
||||
join sys_user u on cl.create_by=u.user_id
|
||||
<where>
|
||||
<if test="caseNum != null and caseNum != ''">
|
||||
AND c.case_num = #{caseNum}
|
||||
</if>
|
||||
<if test="id != null and id != ''">
|
||||
AND c.case_appli_id = #{caseAppliId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user