新增人脸核身解密功能 #60
+2
-4
@@ -1,5 +1,6 @@
|
||||
package com.ruoyi.web.controller.wisdomarbitrate;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.ruoyi.common.annotation.Anonymous;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
@@ -47,10 +48,7 @@ public class CaseApplicationController extends BaseController {
|
||||
@PostMapping("/addCaseApplication")
|
||||
public AjaxResult addCaseApplication(@Validated @RequestBody CaseApplication caseApplication)
|
||||
{
|
||||
int caseApplicationCount = caseApplicationService.selectCaseApplicationCount(caseApplication);
|
||||
if(caseApplicationCount>0){
|
||||
return error("新增立案申请'" + caseApplication.getCaseNum() + "'案件编号已存在");
|
||||
}
|
||||
|
||||
caseApplication.setCreateBy(getUsername());
|
||||
return toAjax(caseApplicationService.insertcaseApplication(caseApplication));
|
||||
}
|
||||
|
||||
+26
-15
@@ -72,25 +72,24 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
|
||||
Map<String, Long> deptMap =new HashMap<>();
|
||||
if (caseAffiliates != null && caseAffiliates.size() > 0) {
|
||||
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));
|
||||
}
|
||||
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(caseApplication.getName())) {
|
||||
if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getName())) {
|
||||
// 将组织机构id设为申请人名称
|
||||
if (deptMap.containsKey(caseApplication.getName())) {
|
||||
caseAffiliate.setName(String.valueOf(deptMap.get(caseApplication.getName())));
|
||||
caseAffiliate.setName(String.valueOf(deptMap.get(caseAffiliate.getName())));
|
||||
} else {
|
||||
// 如果不存在则新增
|
||||
SysDept dept = new SysDept();
|
||||
dept.setParentId(0L);
|
||||
dept.setDeptName(caseApplication.getName());
|
||||
dept.setDeptName(caseAffiliate.getName());
|
||||
dept.setAncestors("0");
|
||||
dept.setOrderNum(1);
|
||||
dept.setStatus("0");
|
||||
@@ -227,12 +226,23 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
|
||||
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();
|
||||
StringBuffer respondentName = 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(",");;
|
||||
}else if(identityType==2){
|
||||
respondentName.append(caseAffiliateselect.getName()).append(",");;
|
||||
@@ -256,6 +266,10 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
if(caseApplicationList!=null&&caseApplicationList.size()>0){
|
||||
// 1,查询所有的组织机构,组装成map
|
||||
List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept());
|
||||
Map<String, Long> deptMap =new HashMap<>();
|
||||
if(CollectionUtil.isNotEmpty(deptList)) {
|
||||
deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getDeptName, SysDept::getDeptId,(oldV,newV)->newV));
|
||||
}
|
||||
List<CaseApplication> caseApplicationListinsert = new ArrayList<>();
|
||||
for (int i = 0; i < caseApplicationList.size(); i++){
|
||||
CaseApplication caseApplication = caseApplicationList.get(i);
|
||||
@@ -268,7 +282,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
//赋值CaseApplication的案件关联人信息
|
||||
List<CaseAffiliate> caseAffiliatesnew = new ArrayList<>();
|
||||
// 组装案件关联人信息
|
||||
assignmentCaseAffiliates(caseApplication,caseAffiliatesnew,deptList);
|
||||
assignmentCaseAffiliates(caseApplication,caseAffiliatesnew,deptMap);
|
||||
|
||||
// int caseApplicationCount = selectCaseApplicationCount(caseApplication);
|
||||
// if(caseApplicationCount>0){
|
||||
@@ -579,7 +593,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
|
||||
|
||||
|
||||
private void assignmentCaseAffiliates(CaseApplication caseApplication, List<CaseAffiliate> caseAffiliatesnew,List<SysDept> deptList) {
|
||||
private void assignmentCaseAffiliates(CaseApplication caseApplication, List<CaseAffiliate> caseAffiliatesnew, Map<String, Long> deptMap) {
|
||||
// 申请人信息
|
||||
CaseAffiliate caseAffiliate = new CaseAffiliate();
|
||||
|
||||
@@ -588,7 +602,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
caseAffiliate.setIdentityType(1);
|
||||
// 申请人(机构),需要判断部门中是否存在,不存在则新增,当身份类型为1的时候,查询时需要根据名称查询组织机构
|
||||
if(StrUtil.isNotEmpty(caseApplication.getName())){
|
||||
setApplicantOrganization(caseAffiliate, caseApplication, deptList);
|
||||
setApplicantOrganization(caseAffiliate, caseApplication, deptMap);
|
||||
}
|
||||
caseAffiliatesnew.add(caseAffiliate);
|
||||
|
||||
@@ -603,10 +617,10 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
* @param caseApplication
|
||||
*/
|
||||
@DataScope(deptAlias = "d")
|
||||
private void setApplicantOrganization(CaseAffiliate caseAffiliate, CaseApplication caseApplication, List<SysDept> deptList ) {
|
||||
private void setApplicantOrganization(CaseAffiliate caseAffiliate, CaseApplication caseApplication, Map<String, Long> deptMap ) {
|
||||
|
||||
|
||||
|
||||
if(CollectionUtil.isNotEmpty(deptList)){
|
||||
Map<String, Long> deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getDeptName, SysDept::getDeptId));
|
||||
// 将组织机构id设为申请人名称
|
||||
if(deptMap.containsKey(caseApplication.getName())){
|
||||
caseAffiliate.setName(String.valueOf(deptMap.get(caseApplication.getName())));
|
||||
@@ -626,9 +640,6 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
caseAffiliate.setName(String.valueOf(dept.getDeptId()));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -55,10 +55,10 @@
|
||||
c.hear_date ,c.arbitrat_claims ,
|
||||
c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
|
||||
c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
|
||||
c.update_by ,c.update_time , c.arbitrator_name,d.dept_name as name
|
||||
c.update_by ,c.update_time , c.arbitrator_name,d.dept_name as applicantName
|
||||
from case_application c
|
||||
LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1
|
||||
LEFT JOIN sys_dept d ON ca.NAME = d.dept_id
|
||||
LEFT JOIN sys_dept d ON ca.NAME = d.dept_id and ca.name=d.dept_id
|
||||
<where>
|
||||
<if test="caseStatus != null">
|
||||
AND c.case_status = #{caseStatus}
|
||||
@@ -206,8 +206,10 @@
|
||||
c.hear_date ,c.arbitrat_claims ,
|
||||
c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
|
||||
c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
|
||||
c.update_by ,c.update_time,c.arbitrator_id,c.arbitrator_name
|
||||
c.update_by ,c.update_time,c.arbitrator_id,c.arbitrator_name,d.dept_name as applicantName
|
||||
from case_application c
|
||||
LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1
|
||||
LEFT JOIN sys_dept d ON ca.NAME = d.dept_id and ca.name=d.dept_id
|
||||
<where>
|
||||
<if test="id != null ">
|
||||
AND c.id = #{id}
|
||||
@@ -236,8 +238,10 @@
|
||||
p.payment_status ,
|
||||
CASE p.payment_status when 1 then '已支付' when 0 then '未支付'
|
||||
ELSE '无支付状态'
|
||||
END paymentStatusName
|
||||
END paymentStatusName,d.dept_name as applicantName
|
||||
from case_application c left join case_payment_record p on c.id = p.case_id
|
||||
LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1
|
||||
LEFT JOIN sys_dept d ON ca.NAME = d.dept_id and ca.name=d.dept_id
|
||||
where c.case_status = 3 and p.payment_status = 1
|
||||
AND c.id = #{id}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user