申请人用手机号关联
This commit is contained in:
@@ -148,6 +148,12 @@ public interface SysUserMapper
|
||||
* @return
|
||||
*/
|
||||
SysUser selectUserByIdCard(@Param("idCard")String identityNo);
|
||||
/**
|
||||
* 根据手机号查询用户信息
|
||||
* @param phone
|
||||
* @return
|
||||
*/
|
||||
SysUser selectUserByPhone(@Param("phone")String phone);
|
||||
|
||||
/**
|
||||
* 根据部门和角色查询用户
|
||||
@@ -158,4 +164,6 @@ public interface SysUserMapper
|
||||
List<SysUser> selectByDeptIdAndRole(@Param("deptId")String applicationOrganId, @Param("roleName")String roleName);
|
||||
|
||||
List<SysUser> selectRoleUserByDeptId(@Param("deptId")Long deptId,@Param("roleId") Long roleId );
|
||||
|
||||
|
||||
}
|
||||
|
||||
+76
-71
@@ -50,6 +50,13 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
|
||||
private SmsRecordMapper smsRecordMapper;
|
||||
@Autowired
|
||||
private ICaseApplicationService caseApplicationService;
|
||||
// 对比两个版本修改的字段,基本字段对比
|
||||
private static final String[] columns = {"caseName","caseSubjectAmount","loanStartDate", "loanEndDate","contractNumber","claimInterestOwed","claimLiquidDamag",
|
||||
"claimPrinciOwed","arbitratClaims","properPreser","requestRule"};
|
||||
// 人员字段对比
|
||||
private static final String[] affiliateColumns = {"name", "identityNum","contactTelphone","contactAddress","workTelphone","workAddress","email",
|
||||
"nameAgent", "identityNumAgent","contactTelphoneAgent","contactAddressAgent","residenAffili","compLegalPerson",
|
||||
"compLegalperPost","responSex","responBirth"};
|
||||
@Override
|
||||
public int insert(CaseApplication caseApplicationLog) {
|
||||
return caseApplicationLogMapper.insert(caseApplicationLog);
|
||||
@@ -146,40 +153,28 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
|
||||
List<CaseAttach> attachLogList = caseAttachLogMapper.queryCaseAttachList(caseApplication);
|
||||
// 更新记录附件表
|
||||
if(CollectionUtil.isNotEmpty(attachLogList)){
|
||||
// caseAttachMapper.deleteByCasedIdAndType(vo.getCaseId(), 2,0);
|
||||
for (CaseAttach caseAttach : attachLogList) {
|
||||
caseAttach.setCaseAppliId(vo.getCaseId());
|
||||
caseAttachMapper.updateCaseAttach(caseAttach);
|
||||
}
|
||||
}
|
||||
// caseAffiliateMapper.updateCaseAffiliateByCaseId(caseApplicationLog.getCaseAppliId(), affiliateLogList);
|
||||
} else {
|
||||
// 拒绝,将日志表改版本的状态改为拒绝
|
||||
vo.setUpdateSubmitStatus(UpdateSubmitStatus.REFUSE.getCode());
|
||||
caseApplicationLogMapper.updateStatus(vo);
|
||||
return sendAuditMessage(vo);
|
||||
|
||||
|
||||
// 修改案件表的版本号
|
||||
// caseApplicationMapper.updateVersionById(vo.getCaseId(),vo.getVersion());
|
||||
|
||||
}
|
||||
return AjaxResult.success();
|
||||
} else if (Objects.equals(vo.getUpdateSubmitStatus(), UpdateSubmitStatus.REVOKE.getCode())) {
|
||||
// 如果版本号为1,则直接返回
|
||||
|
||||
// 审核修改撤销状态
|
||||
if (Objects.equals(vo.getIsAgree(), YesOrNoEnum.YES.getCode())) {
|
||||
// 同意撤销
|
||||
agreeRevoke(vo);
|
||||
// 同意撤销,查询日志记录表上个版本数据,将数据更新到主表,并将日志表改版本的状态改为同意撤销
|
||||
|
||||
} else {
|
||||
// 拒绝撤销,将日志表改版本的状态改为拒绝撤销
|
||||
vo.setUpdateSubmitStatus(UpdateSubmitStatus.REFUSE_REVOKE.getCode());
|
||||
caseApplicationLogMapper.updateStatus(vo);
|
||||
return sendAuditMessage(vo);
|
||||
// 修改案件表的版本号
|
||||
// caseApplicationMapper.updateVersionById(vo.getCaseId(),vo.getVersion());
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
@@ -231,34 +226,43 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
|
||||
|
||||
@Override
|
||||
public AjaxResult selectCompareCase(UpdateSubmitVO vo) {
|
||||
// 查询当前版本号和上一个版本号的案件
|
||||
// 查询当前版本号和主表的案件
|
||||
CaseApplication afterCase = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion());
|
||||
// CaseApplication beforeCase = caseApplicationLogMapper.selectBeforeCase(vo.getCaseId(), vo.getVersion());
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setCaseAppliId(vo.getCaseId());
|
||||
caseApplication.setId(vo.getCaseId());
|
||||
CaseApplication beforeCase= caseApplicationService.selectCaseApplication(caseApplication);
|
||||
|
||||
// 查询案件关联人员
|
||||
// beforeCase.setCaseAffiliates(caseAffiliateLogMapper.selectCaseAffiliate(beforeCase.getCaseLogId()));
|
||||
afterCase.setCaseAffiliates(caseAffiliateLogMapper.selectCaseAffiliate(afterCase.getCaseLogId()));
|
||||
// 查询附件
|
||||
CaseAttach caseAttach = new CaseAttach();
|
||||
caseAttach.setCaseAppliLogId(beforeCase.getCaseLogId());
|
||||
caseAttach.setAnnexType(2);
|
||||
caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach);
|
||||
// beforeCase.setCaseAttachList(caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach));
|
||||
caseAttach.setCaseAppliLogId(afterCase.getCaseLogId());
|
||||
afterCase.setCaseAttachList(caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach));
|
||||
List<CaseAttach> afterAttachList = caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach);
|
||||
if(CollectionUtil.isNotEmpty(afterAttachList)){
|
||||
for (CaseAttach attach : afterAttachList) {
|
||||
String annexName = attach.getAnnexName();
|
||||
String prefix = "/profile";
|
||||
int startIndex = annexName.indexOf(prefix);
|
||||
startIndex += prefix.length();
|
||||
String annexPath = "/uploadPath" + annexName.substring(startIndex);
|
||||
attach.setAnnexPath(annexPath);
|
||||
int startIndexnew = annexName.lastIndexOf("/");
|
||||
if (startIndexnew != -1) {
|
||||
String annexNamenew = annexName.substring(startIndexnew + 1);
|
||||
attach.setAnnexName(annexNamenew);
|
||||
}
|
||||
}
|
||||
afterCase.setCaseAttachList(afterAttachList);
|
||||
}
|
||||
afterCase.setCaseAttachList(afterAttachList);
|
||||
CompareCaseVO compareCaseVO = new CompareCaseVO();
|
||||
compareCaseVO.setBeforeCase(beforeCase);
|
||||
compareCaseVO.setAfterCase(afterCase);
|
||||
// 对比两个版本修改的字段
|
||||
String[] columns = {"caseName","caseSubjectAmount","loanStartDate", "loanEndDate","contractNumber","claimInterestOwed","claimLiquidDamag",
|
||||
"claimPrinciOwed","arbitratClaims","properPreser","requestRule"};
|
||||
String[] affiliateColumns = {"name", "identityNum","contactTelphone","contactAddress","workTelphone","workAddress","email",
|
||||
"nameAgent", "identityNumAgent","contactTelphoneAgent","contactAddressAgent","residenAffili","compLegalPerson",
|
||||
"compLegalperPost","responSex","responBirth"};
|
||||
|
||||
StringBuilder changeColumn = new StringBuilder();
|
||||
// 对比基本字段
|
||||
for (String column : columns) {
|
||||
@@ -279,6 +283,54 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
|
||||
}
|
||||
|
||||
}
|
||||
// 对比案件人员字段
|
||||
compareAffilate(beforeCase,afterCase);
|
||||
// 对比申请人证据资料
|
||||
compareCaseVO.setChangeColumn(compareApplicantFile(beforeCase,afterCase,changeColumn).toString());
|
||||
|
||||
return AjaxResult.success(compareCaseVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 对比申请人证据资料
|
||||
* @param beforeCase
|
||||
* @param afterCase
|
||||
* @param changeColumn
|
||||
* @return
|
||||
*/
|
||||
private StringBuilder compareApplicantFile(CaseApplication beforeCase, CaseApplication afterCase, StringBuilder changeColumn) {
|
||||
List<CaseAttach> beforeAttachFilter =new ArrayList<>();
|
||||
List<CaseAttach> afterAttachFilter =new ArrayList<>();
|
||||
if(CollectionUtil.isNotEmpty(beforeCase.getCaseAttachList())){
|
||||
beforeAttachFilter = beforeCase.getCaseAttachList().stream().filter(n -> n.getAnnexType() == 2).collect(Collectors.toList());
|
||||
}
|
||||
if(CollectionUtil.isNotEmpty(afterCase.getCaseAttachList())){
|
||||
afterAttachFilter = afterCase.getCaseAttachList().stream().filter(n -> n.getAnnexType() == 2).collect(Collectors.toList());
|
||||
}
|
||||
if(CollectionUtil.isNotEmpty(beforeAttachFilter)&& CollectionUtil.isNotEmpty(afterAttachFilter)){
|
||||
if(beforeAttachFilter.size()!=afterAttachFilter.size()){
|
||||
changeColumn.append("fileColumn");
|
||||
}else {
|
||||
Map<String, CaseAttach> afterAttachMap = afterAttachFilter.stream().collect(Collectors.toMap(CaseAttach::getAnnexPath, Function.identity(), (n1, n2) -> n2));
|
||||
for (CaseAttach beforeCaseAttach : beforeAttachFilter) {
|
||||
if(!afterAttachMap.containsKey(beforeCaseAttach.getAnnexPath())) {
|
||||
changeColumn.append("fileColumn");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return changeColumn;
|
||||
}
|
||||
|
||||
/**
|
||||
* 对比案件人员字段
|
||||
* @param beforeCase
|
||||
* @param afterCase
|
||||
*/
|
||||
private void compareAffilate(CaseApplication beforeCase, CaseApplication afterCase) {
|
||||
// 对比人员字段
|
||||
List<CaseAffiliate> beforeCaseCaseAffiliates = beforeCase.getCaseAffiliates();
|
||||
List<CaseAffiliate> afterCaseCaseAffiliates = afterCase.getCaseAffiliates();
|
||||
@@ -341,51 +393,6 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
|
||||
|
||||
|
||||
}
|
||||
List<CaseAttach> beforeAttachFilter =new ArrayList<>();
|
||||
List<CaseAttach> afterAttachFilter =new ArrayList<>();
|
||||
if(CollectionUtil.isNotEmpty(beforeCase.getCaseAttachList())){
|
||||
beforeAttachFilter = beforeCase.getCaseAttachList().stream().filter(n -> n.getAnnexType() == 2).collect(Collectors.toList());
|
||||
}
|
||||
if(CollectionUtil.isNotEmpty(beforeCase.getCaseAttachList())){
|
||||
afterAttachFilter = afterCase.getCaseAttachList().stream().filter(n -> n.getAnnexType() == 2).collect(Collectors.toList());
|
||||
}
|
||||
if(CollectionUtil.isNotEmpty(beforeAttachFilter)&& CollectionUtil.isNotEmpty(afterAttachFilter)){
|
||||
if(beforeAttachFilter.size()!=afterAttachFilter.size()){
|
||||
changeColumn.append("fileColumn");
|
||||
}else {
|
||||
Map<String, CaseAttach> afterAttachMap = afterAttachFilter.stream().collect(Collectors.toMap(CaseAttach::getAnnexPath, Function.identity(), (n1, n2) -> n2));
|
||||
for (CaseAttach beforeCaseAttach : beforeAttachFilter) {
|
||||
if(!afterAttachMap.containsKey(beforeCaseAttach.getAnnexPath())) {
|
||||
changeColumn.append("fileColumn");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
compareCaseVO.setChangeColumn(changeColumn.toString());
|
||||
if(CollectionUtil.isNotEmpty(afterCase.getCaseAttachList())){
|
||||
List<CaseAttach> caseAttachList = afterCase.getCaseAttachList();
|
||||
for (CaseAttach attach : caseAttachList) {
|
||||
String annexName = attach.getAnnexName();
|
||||
String prefix = "/profile";
|
||||
int startIndex = annexName.indexOf(prefix);
|
||||
startIndex += prefix.length();
|
||||
String annexPath = "/uploadPath" + annexName.substring(startIndex);
|
||||
attach.setAnnexPath(annexPath);
|
||||
int startIndexnew = annexName.lastIndexOf("/");
|
||||
if (startIndexnew != -1) {
|
||||
String annexNamenew = annexName.substring(startIndexnew + 1);
|
||||
attach.setAnnexName(annexNamenew);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
afterCase.setCaseAttachList(caseAttachList);
|
||||
}
|
||||
|
||||
return AjaxResult.success(compareCaseVO);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -430,12 +437,10 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
|
||||
List<CaseAttach> attachLogList = caseAttachLogMapper.queryCaseAttachList(caseApplication);
|
||||
// 更新记录附件表
|
||||
if(CollectionUtil.isNotEmpty(attachLogList)){
|
||||
// caseAttachMapper.deleteByCasedIdAndType(vo.getCaseId(), 2,0);
|
||||
for (CaseAttach caseAttach : attachLogList) {
|
||||
caseAttach.setCaseAppliId(vo.getCaseId());
|
||||
caseAttachMapper.updateCaseAttach(caseAttach);
|
||||
}
|
||||
}
|
||||
// caseAffiliateMapper.updateCaseAffiliateByCaseId(caseApplicationLog.getCaseAppliId(), affiliateLogList);
|
||||
}
|
||||
}
|
||||
|
||||
+10
-5
@@ -1189,13 +1189,13 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
if (caseAffiliate.getIdentityType() == 1 && StrUtil.isNotEmpty(caseAffiliate.getNameAgent())) {
|
||||
|
||||
// 组装申请机构代理人信息,用户表新增并且和部门关联
|
||||
// 根据代理人身份证去用户表查询,有修改,么有新增
|
||||
SysUser agentUser = sysUserMapper.selectUserByIdCard(caseAffiliate.getIdentityNumAgent());
|
||||
// 根据代理人手机号去用户表查询,有修改,么有新增
|
||||
SysUser agentUser = sysUserMapper.selectUserByPhone(caseAffiliate.getContactTelphoneAgent());
|
||||
if (agentUser == null) {
|
||||
agentUser = new SysUser();
|
||||
agentUser.setIdCard(caseAffiliate.getIdentityNumAgent());
|
||||
agentUser.setNickName(caseAffiliate.getNameAgent());
|
||||
agentUser.setUserName(caseAffiliate.getIdentityNumAgent());
|
||||
agentUser.setUserName(caseAffiliate.getContactTelphoneAgent());
|
||||
agentUser.setPhonenumber(caseAffiliate.getContactTelphoneAgent());
|
||||
// agentUser.setPassword(SecurityUtils.encryptPassword(Constants.DEFAULT_PASSWORD));
|
||||
agentUser.setDeptId(Long.valueOf(caseAffiliate.getApplicationOrganId()));
|
||||
@@ -1248,6 +1248,11 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
caseAffiliate.setContactTelphoneAgent(agentUser.getPhonenumber());
|
||||
caseAffiliate.setNameAgent(agentUser.getNickName());
|
||||
caseAffiliate.setApplicantAgentUserId(String.valueOf(agentUser.getUserId()));
|
||||
if(StrUtil.isNotEmpty(agentUser.getIdCard())){
|
||||
caseAffiliate.setIdentityNumAgent(agentUser.getIdCard());
|
||||
}else {
|
||||
caseAffiliate.setIdentityNumAgent(caseAffiliate.getIdentityNumAgent());
|
||||
}
|
||||
List<Long> longList = new ArrayList<>();
|
||||
// 新增角色为申请人
|
||||
if (CollectionUtil.isNotEmpty(agentUser.getRoles())) {
|
||||
@@ -2985,12 +2990,12 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
caseAffiliate.setIdentityNum(map.get("统一社会信用代码").get(0));
|
||||
caseAffiliate.setCompLegalPerson(map.get("负责人").get(0));
|
||||
caseAffiliate.setNameAgent(map.get("委托代理人").get(0));
|
||||
caseAffiliate.setContactTelphone(map.get("联系电话").get(0));
|
||||
caseAffiliate.setContactTelphoneAgent(map.get("联系电话").get(0));
|
||||
caseAffiliate.setResidenAffili(map.get("住所").get(0));
|
||||
caseAffiliate.setContactAddress(map.get("联系地址").get(0));
|
||||
caseAffiliate.setEmail(map.get("电子邮件").get(0).replaceAll("\\s", ""));
|
||||
//设置默认代理人的身份证号码,暂时写死 要不然新增方法报错
|
||||
caseAffiliate.setIdentityNumAgent("610423199603171716");
|
||||
// caseAffiliate.setIdentityNumAgent("610423199603171716");
|
||||
caseAffiliates.add(caseAffiliate);
|
||||
CaseAffiliate caseAffiliate1 = new CaseAffiliate();
|
||||
caseAffiliate1.setIdentityType(2);
|
||||
|
||||
+1
-1
@@ -329,7 +329,7 @@ public class VideoServiceImpl implements VideoService {
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
String htmlContent = "<html><body style=\"font-size:12.0pt; font-family:SimSun;\">" +reservedConferenceVO.getHtmlContent()+"</body></html>";
|
||||
String htmlContent = "<html><head> <title>庭审笔录</title></head><body style=\"font-size:12.0pt; font-family:SimSun;\"><h1 align=\"center\">庭审笔录</h1>" +reservedConferenceVO.getHtmlContent()+"</body></html>";
|
||||
// html转pdf并上传到服务器
|
||||
boolean convertFlag = PdfUtils.htmlStringConvertToPDF(RuoYiConfig.getHtml2PDFPath() +"/"+ currentFileName, htmlContent);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user