导入新增日志
This commit is contained in:
@@ -29,6 +29,18 @@ public class CaseApplication extends BaseEntity {
|
|||||||
private Date registerDate;
|
private Date registerDate;
|
||||||
/** 仲裁方式 */
|
/** 仲裁方式 */
|
||||||
private Integer arbitratMethod;
|
private Integer arbitratMethod;
|
||||||
|
/**
|
||||||
|
* 是否导入,0手动录入,1导入,默认0
|
||||||
|
*/
|
||||||
|
private Integer importFlag;
|
||||||
|
|
||||||
|
public Integer getImportFlag() {
|
||||||
|
return importFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImportFlag(Integer importFlag) {
|
||||||
|
this.importFlag = importFlag;
|
||||||
|
}
|
||||||
|
|
||||||
public String getSelectCaseStatus() {
|
public String getSelectCaseStatus() {
|
||||||
return selectCaseStatus;
|
return selectCaseStatus;
|
||||||
|
|||||||
+40
-22
@@ -44,6 +44,7 @@ import org.springframework.web.multipart.MultipartFile;
|
|||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.math.RoundingMode;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.nio.file.StandardCopyOption;
|
import java.nio.file.StandardCopyOption;
|
||||||
@@ -905,8 +906,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
public int editCaseApplication(CaseApplication caseApplication) {
|
public int editCaseApplication(CaseApplication caseApplication) {
|
||||||
//根据仲裁费用计费规则计算应缴费用
|
//根据仲裁费用计费规则计算应缴费用
|
||||||
//暂时设置计费比率为0.01
|
//暂时设置计费比率为0.01
|
||||||
BigDecimal feeRate = new BigDecimal(0.01);
|
BigDecimal feeRate = new BigDecimal("0.01");
|
||||||
BigDecimal feePayable = caseApplication.getCaseSubjectAmount().multiply(feeRate).setScale(2,BigDecimal.ROUND_HALF_UP);
|
BigDecimal feePayable = caseApplication.getCaseSubjectAmount().multiply(feeRate).setScale(2, RoundingMode.HALF_UP);
|
||||||
caseApplication.setFeePayable(feePayable);
|
caseApplication.setFeePayable(feePayable);
|
||||||
caseApplication.setUpdateBy(getUsername());
|
caseApplication.setUpdateBy(getUsername());
|
||||||
|
|
||||||
@@ -969,6 +970,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
return rows;
|
return rows;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 组装申请代理人信息
|
* 组装申请代理人信息
|
||||||
* @param caseAffiliate
|
* @param caseAffiliate
|
||||||
@@ -1176,37 +1178,24 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
CaseApplication caseApplication = caseApplicationList.get(i);
|
CaseApplication caseApplication = caseApplicationList.get(i);
|
||||||
|
|
||||||
// 导入校验
|
// 导入校验
|
||||||
importValid(caseApplication);
|
importValid(caseApplication,deptMap);
|
||||||
// 校验成功的数据
|
// 校验成功的数据
|
||||||
if(StrUtil.isEmpty(caseApplication.getErrorMsg())) {
|
if(StrUtil.isEmpty(caseApplication.getErrorMsg())) {
|
||||||
//根据仲裁费用计费规则计算应缴费用
|
//根据仲裁费用计费规则计算应缴费用
|
||||||
//暂时设置计费比率为0.01
|
//暂时设置计费比率为0.01
|
||||||
BigDecimal feeRate = new BigDecimal(0.01);
|
BigDecimal feeRate = new BigDecimal("0.01");
|
||||||
BigDecimal feePayable = caseApplication.getCaseSubjectAmount().multiply(feeRate).setScale(2, BigDecimal.ROUND_HALF_UP);
|
BigDecimal feePayable = caseApplication.getCaseSubjectAmount().multiply(feeRate).setScale(2, RoundingMode.HALF_UP);
|
||||||
caseApplication.setFeePayable(feePayable);
|
caseApplication.setFeePayable(feePayable);
|
||||||
|
|
||||||
//赋值CaseApplication的案件关联人信息
|
//赋值CaseApplication的案件关联人信息
|
||||||
List<CaseAffiliate> caseAffiliatesnew = new ArrayList<>();
|
List<CaseAffiliate> caseAffiliatesnew = new ArrayList<>();
|
||||||
// 组装案件关联人信息
|
// 组装案件关联人信息
|
||||||
assignmentCaseAffiliates(caseApplication, caseAffiliatesnew, deptMap,roleId);
|
assignmentCaseAffiliates(caseApplication, caseAffiliatesnew, deptMap,roleId);
|
||||||
|
caseApplication.setImportFlag(1);
|
||||||
// int caseApplicationCount = selectCaseApplicationCount(caseApplication);
|
|
||||||
// if(caseApplicationCount>0){
|
|
||||||
// failureNum++;
|
|
||||||
// failureMsg.append("<br/>" + failureNum + "、立案编号 " + caseApplication.getCaseNum() + " 已存在");
|
|
||||||
// }else {
|
|
||||||
// caseApplicationListinsert.add(caseApplication);
|
|
||||||
// }
|
|
||||||
if(StrUtil.isEmpty(caseApplication.getErrorMsg())) {
|
|
||||||
caseApplicationListinsert.add(caseApplication);
|
caseApplicationListinsert.add(caseApplication);
|
||||||
}else {
|
}else {
|
||||||
// 拼接错误信息
|
// 拼接错误信息
|
||||||
failureMsg.append("<br/>").append("第").append(i+2).append("行:").append(caseApplication.getErrorMsg().toString());
|
failureMsg.append("<br/>").append("第").append(i+2).append("行:").append(caseApplication.getErrorMsg().toString());
|
||||||
|
|
||||||
}
|
|
||||||
}else {
|
|
||||||
// 拼接错误信息
|
|
||||||
failureMsg.append("<br/>").append("第").append(i+2).append("行:").append(caseApplication.getErrorMsg().toString());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(caseApplicationListinsert.size()>0){
|
if(caseApplicationListinsert.size()>0){
|
||||||
@@ -1283,7 +1272,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
* @param caseApplication
|
* @param caseApplication
|
||||||
* @param
|
* @param
|
||||||
*/
|
*/
|
||||||
private void importValid(CaseApplication caseApplication) {
|
private void importValid(CaseApplication caseApplication,Map<String, Long> deptMap) {
|
||||||
StringBuilder failureMsg=new StringBuilder();
|
StringBuilder failureMsg=new StringBuilder();
|
||||||
caseApplication.setErrorMsg(failureMsg);
|
caseApplication.setErrorMsg(failureMsg);
|
||||||
// 校验基本字段
|
// 校验基本字段
|
||||||
@@ -1291,7 +1280,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
// 校验申请人信息
|
// 校验申请人信息
|
||||||
validApplicationColumn(caseApplication,failureMsg);
|
validApplicationColumn(caseApplication,failureMsg);
|
||||||
// 校验申请人代理信息
|
// 校验申请人代理信息
|
||||||
validApplicationAgentColumn(caseApplication,failureMsg);
|
validApplicationAgentColumn(caseApplication,failureMsg,deptMap);
|
||||||
// 校验被申请人信息
|
// 校验被申请人信息
|
||||||
validDebtorApplicationColumn(caseApplication,failureMsg);
|
validDebtorApplicationColumn(caseApplication,failureMsg);
|
||||||
// 校验被申请人代理信息
|
// 校验被申请人代理信息
|
||||||
@@ -1382,7 +1371,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
* @param caseApplication
|
* @param caseApplication
|
||||||
* @param failureMsg
|
* @param failureMsg
|
||||||
*/
|
*/
|
||||||
private void validApplicationAgentColumn(CaseApplication caseApplication, StringBuilder failureMsg) {
|
private void validApplicationAgentColumn(CaseApplication caseApplication, StringBuilder failureMsg,Map<String, Long> deptMap) {
|
||||||
if( StrUtil.isEmpty(caseApplication.getNameAgent())){
|
if( StrUtil.isEmpty(caseApplication.getNameAgent())){
|
||||||
failureMsg.append("【申请人主体信息-代理人姓名】字段不能为空;");
|
failureMsg.append("【申请人主体信息-代理人姓名】字段不能为空;");
|
||||||
}else if(caseApplication.getNameAgent().length()>50){
|
}else if(caseApplication.getNameAgent().length()>50){
|
||||||
@@ -1393,6 +1382,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
}else if(caseApplication.getIdentityNumAgent().length()>50){
|
}else if(caseApplication.getIdentityNumAgent().length()>50){
|
||||||
failureMsg.append("【申请人主体信息-代理人身份证号】字段超出指定长度,最大长度为50;");
|
failureMsg.append("【申请人主体信息-代理人身份证号】字段超出指定长度,最大长度为50;");
|
||||||
}
|
}
|
||||||
|
validAgentInfo(caseApplication,failureMsg,deptMap);
|
||||||
String contactTelphoneAgent = caseApplication.getContactTelphoneAgent();
|
String contactTelphoneAgent = caseApplication.getContactTelphoneAgent();
|
||||||
if( StrUtil.isEmpty(contactTelphoneAgent)){
|
if( StrUtil.isEmpty(contactTelphoneAgent)){
|
||||||
failureMsg.append("【申请人主体信息-代理人联系电话】字段不能为空;");
|
failureMsg.append("【申请人主体信息-代理人联系电话】字段不能为空;");
|
||||||
@@ -1405,7 +1395,34 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
failureMsg.append("【申请人主体信息-代理人联系地址】字段超出指定长度,最大长度为50;");
|
failureMsg.append("【申请人主体信息-代理人联系地址】字段超出指定长度,最大长度为50;");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 校验代理人与组织机构关系
|
||||||
|
* @param caseApplication
|
||||||
|
* @param failureMsg
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private void validAgentInfo(CaseApplication caseApplication, StringBuilder failureMsg,Map<String, Long> deptMap) {
|
||||||
|
// 申请机构与代理人都不为空,校验代理人与组织机构关系(代理人必须在该部门下)
|
||||||
|
if (StrUtil.isNotEmpty(caseApplication.getName())&&StrUtil.isNotEmpty(caseApplication.getNameAgent())) {
|
||||||
|
String applicationOrganId="";
|
||||||
|
// 申请机构已经存在
|
||||||
|
if(deptMap.containsKey(caseApplication.getName())){
|
||||||
|
applicationOrganId=String.valueOf(deptMap.get(caseApplication.getName()));
|
||||||
|
}
|
||||||
|
// 根据代理人身份证去用户表查询
|
||||||
|
SysUser agentUser = sysUserMapper.selectUserByIdCard(caseApplication.getIdentityNumAgent());
|
||||||
|
// 代理人的部门和申请机构不匹配
|
||||||
|
if (null != agentUser.getDeptId() && !String.valueOf(agentUser.getDeptId()).equals(applicationOrganId)) {
|
||||||
|
// return "该申请代理人已在"+agentUser.getDeptName()+"申请机构下存在,请检查填写信息是否正确";
|
||||||
|
if (null != agentUser.getDept() && StrUtil.isNotEmpty(agentUser.getDept().getDeptName())) {
|
||||||
|
failureMsg.append("该申请代理人已在【").append(agentUser.getDept().getDeptName()).append("】申请机构下存在,请检查填写信息是否正确");
|
||||||
|
} else {
|
||||||
|
failureMsg.append( "该申请代理人已存在,与申请机构不匹配,请检查填写信息是否正确");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 校验申请人主题信息
|
* 校验申请人主题信息
|
||||||
* @param caseApplication
|
* @param caseApplication
|
||||||
@@ -2073,6 +2090,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
caseApplication.setFilearbitraUrl(filearbitraUrl);
|
caseApplication.setFilearbitraUrl(filearbitraUrl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return caseApplication;
|
return caseApplication;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,10 @@ public class CaseLogUtils
|
|||||||
operLog.setCreateBy(sysUser.getUserName());
|
operLog.setCreateBy(sysUser.getUserName());
|
||||||
operLog.setCreateNickName(sysUser.getNickName());
|
operLog.setCreateNickName(sysUser.getNickName());
|
||||||
operLog.setUpdateBy(sysUser.getUserName());
|
operLog.setUpdateBy(sysUser.getUserName());
|
||||||
|
}else {
|
||||||
|
operLog.setCreateBy("admin");
|
||||||
|
operLog.setCreateNickName("管理员");
|
||||||
|
operLog.setUpdateBy("admin");
|
||||||
}
|
}
|
||||||
operLog.setCaseAppliId(caseAppliId);
|
operLog.setCaseAppliId(caseAppliId);
|
||||||
operLog.setCaseNode(caseNode);
|
operLog.setCaseNode(caseNode);
|
||||||
|
|||||||
@@ -402,6 +402,7 @@
|
|||||||
<if test="properPreser != null ">proper_preser,</if>
|
<if test="properPreser != null ">proper_preser,</if>
|
||||||
|
|
||||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
|
<if test="importFlag != null ">import_flag,</if>
|
||||||
create_time
|
create_time
|
||||||
)values(
|
)values(
|
||||||
<if test="caseNum != null and caseNum != ''">#{caseNum},</if>
|
<if test="caseNum != null and caseNum != ''">#{caseNum},</if>
|
||||||
@@ -428,6 +429,7 @@
|
|||||||
<if test="properPreser != null ">#{properPreser},</if>
|
<if test="properPreser != null ">#{properPreser},</if>
|
||||||
|
|
||||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
|
<if test="importFlag != null ">#{importFlag},</if>
|
||||||
sysdate()
|
sysdate()
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|||||||
Reference in New Issue
Block a user