2 Commits
Author SHA1 Message Date
qitz 21b93a7cfe Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into qtz3
# Conflicts:
#	ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java
2023-12-13 10:14:26 +08:00
qitz 34e9faafe2 优化仲裁员驳回功能 2023-12-13 10:04:09 +08:00
@@ -926,7 +926,6 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
} }
caseApplication.setCreateBy(getUsername()); caseApplication.setCreateBy(getUsername());
caseApplication.setVersion(1); caseApplication.setVersion(1);
caseApplication.setId(IdWorkerUtil.getId());
// 新增立案信息 // 新增立案信息
int rows = caseApplicationMapper.insertCaseApplication(caseApplication); int rows = caseApplicationMapper.insertCaseApplication(caseApplication);
if (rows == 0) { if (rows == 0) {
@@ -1011,11 +1010,10 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
// 新增案件日志表 // 新增案件日志表
caseApplication.setCaseAppliId(caseApplication.getId()); caseApplication.setCaseAppliId(caseApplication.getId());
caseApplication.setUpdateSubmitStatus(UpdateSubmitStatus.UNCOMMITTED.getCode()); caseApplication.setUpdateSubmitStatus(UpdateSubmitStatus.UNCOMMITTED.getCode());
caseApplication.setCaseLogId(IdWorkerUtil.getId());
int insertRow = caseApplicationLogMapper.insert(caseApplication); int insertRow = caseApplicationLogMapper.insert(caseApplication);
// 插入案件相关人员表日志 // 插入案件相关人员表日志
if (insertRow != 0 && CollectionUtil.isNotEmpty(caseAffiliates)) { if (insertRow != 0 && CollectionUtil.isNotEmpty(caseAffiliates)) {
caseAffiliates.forEach(caseAffiliate -> caseAffiliate.setCaseAppliLogId(caseApplication.getCaseLogId())); caseAffiliates.forEach(caseAffiliate -> caseAffiliate.setCaseAppliLogId(caseApplication.getId()));
caseAffiliateLogMapper.batchCaseAffiliate(caseAffiliates); caseAffiliateLogMapper.batchCaseAffiliate(caseAffiliates);
} }
@@ -1027,7 +1025,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
for (CaseAttach caseAttach : filterList) { for (CaseAttach caseAttach : filterList) {
// 查询附件表 // 查询附件表
CaseAttach attach = caseAttachMapper.queryAnnexById(caseAttach.getAnnexId()); CaseAttach attach = caseAttachMapper.queryAnnexById(caseAttach.getAnnexId());
attach.setCaseAppliLogId(caseApplication.getCaseLogId()); attach.setCaseAppliLogId(caseApplication.getId());
caseAttachLogMapper.save(attach); caseAttachLogMapper.save(attach);
} }
} }
@@ -1035,7 +1033,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
} }
// 插入columnValueLog自定义字段日志表 // 插入columnValueLog自定义字段日志表
if (CollectionUtil.isNotEmpty(columnValueList)) { if (CollectionUtil.isNotEmpty(columnValueList)) {
columnValueList.forEach(caseAffiliate -> caseAffiliate.setCaseAppliLogId(caseApplication.getCaseLogId())); columnValueList.forEach(caseAffiliate -> caseAffiliate.setCaseAppliLogId(caseApplication.getId()));
columnValueLogMapper.batchSave(columnValueList); columnValueLogMapper.batchSave(columnValueList);
} }
@@ -1170,11 +1168,10 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
ThreadPoolUtil.execute(() -> { ThreadPoolUtil.execute(() -> {
try { try {
caseApplication.setCaseAppliId(caseApplication.getId()); caseApplication.setCaseAppliId(caseApplication.getId());
caseApplication.setCaseLogId(IdWorkerUtil.getId());
int insertRow = caseApplicationLogMapper.insert(caseApplication); int insertRow = caseApplicationLogMapper.insert(caseApplication);
if (insertRow != 0) { if (insertRow != 0) {
if (CollectionUtil.isNotEmpty(caseAffiliates)) { if (CollectionUtil.isNotEmpty(caseAffiliates)) {
caseAffiliates.forEach(caseAffiliate -> caseAffiliate.setCaseAppliLogId(caseApplication.getCaseLogId())); caseAffiliates.forEach(caseAffiliate -> caseAffiliate.setCaseAppliLogId(caseApplication.getId()));
// 插入案件日志人员相关表 // 插入案件日志人员相关表
caseAffiliateLogMapper.batchCaseAffiliate(caseAffiliates); caseAffiliateLogMapper.batchCaseAffiliate(caseAffiliates);
} }
@@ -1185,7 +1182,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
for (CaseAttach caseAttach : filterList) { for (CaseAttach caseAttach : filterList) {
// 查询附件表 // 查询附件表
CaseAttach attach = caseAttachMapper.queryAnnexById(caseAttach.getAnnexId()); CaseAttach attach = caseAttachMapper.queryAnnexById(caseAttach.getAnnexId());
attach.setCaseAppliLogId(caseApplication.getCaseLogId()); attach.setCaseAppliLogId(caseApplication.getId());
caseAttachLogMapper.save(attach); caseAttachLogMapper.save(attach);
} }
} }
@@ -1193,7 +1190,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
} }
// 插入案件columnValueLog自定义字段表 // 插入案件columnValueLog自定义字段表
if (CollectionUtil.isNotEmpty(caseApplication.getColumnValues())) { if (CollectionUtil.isNotEmpty(caseApplication.getColumnValues())) {
caseApplication.getColumnValues().forEach(columnValue -> columnValue.setCaseAppliLogId(caseApplication.getCaseLogId())); caseApplication.getColumnValues().forEach(columnValue -> columnValue.setCaseAppliLogId(caseApplication.getId()));
columnValueLogMapper.batchSave(caseApplication.getColumnValues()); columnValueLogMapper.batchSave(caseApplication.getColumnValues());
} }
@@ -1537,7 +1534,6 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
caseApplicationItera.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION); caseApplicationItera.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
caseApplicationItera.setCreateBy(getUsername()); caseApplicationItera.setCreateBy(getUsername());
caseApplicationItera.setImportFlag(1); caseApplicationItera.setImportFlag(1);
caseApplicationItera.setId(IdWorkerUtil.getId());
int rows = caseApplicationMapper.insertCaseApplication(caseApplicationItera); int rows = caseApplicationMapper.insertCaseApplication(caseApplicationItera);
if (rows == 0) { if (rows == 0) {
continue; continue;
@@ -1557,7 +1553,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
caseApplicationItera.setCaseAppliId(caseApplicationItera.getId()); caseApplicationItera.setCaseAppliId(caseApplicationItera.getId());
caseApplicationItera.setUpdateSubmitStatus(UpdateSubmitStatus.UNCOMMITTED.getCode()); caseApplicationItera.setUpdateSubmitStatus(UpdateSubmitStatus.UNCOMMITTED.getCode());
caseApplicationItera.setVersion(1); caseApplicationItera.setVersion(1);
caseApplicationItera.setCaseLogId(IdWorkerUtil.getId());
int insertRow = caseApplicationLogMapper.insert(caseApplicationItera); int insertRow = caseApplicationLogMapper.insert(caseApplicationItera);
if (insertRow > 0) { if (insertRow > 0) {
caseAffiliates.forEach(caseAffiliate -> caseAffiliate.setCaseAppliLogId(caseApplicationItera.getId())); caseAffiliates.forEach(caseAffiliate -> caseAffiliate.setCaseAppliLogId(caseApplicationItera.getId()));
@@ -1660,8 +1656,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
@Transactional @Transactional
public AjaxResult checkArbitrateRecord(CaseApplication caseApplication) { public AjaxResult checkArbitrateRecord(CaseApplication caseApplication) {
int rows = 0; int rows = 0;
ArbitrateRecord arbitrateRecord = caseApplication.getArbitrateRecord();
arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord);
Integer agreeOrNotCheck = caseApplication.getAgreeOrNotCheck(); Integer agreeOrNotCheck = caseApplication.getAgreeOrNotCheck();
if (agreeOrNotCheck.intValue() == 1) {//同意审核 if (agreeOrNotCheck.intValue() == 1) {//同意审核
try { try {
@@ -1849,13 +1844,12 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
rows = caseApplicationMapper.submitCaseApplication(caseApplication); rows = caseApplicationMapper.submitCaseApplication(caseApplication);
} else if (agreeOrNotCheck.intValue() == 2) {//拒绝审核 } else if (agreeOrNotCheck.intValue() == 2) {//拒绝审核
caseApplication.setCaseStatus(CaseApplicationConstants.HEAD_CHECK_ARBITRATION); ArbitrateRecord arbitrateRecord = caseApplication.getArbitrateRecord();
String notes=""; arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord);
if(caseApplication.getArbitrateRecord()!=null&&StrUtil.isNotEmpty(caseApplication.getArbitrateRecord().getDeptorReject())){
notes="部门长驳回仲裁文书,驳回原因:"+caseApplication.getArbitrateRecord().getDeptorReject(); caseApplication.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
}
// 新增日志 // 新增日志
insertCaseLog(caseApplication.getId(), CaseApplicationConstants.HEAD_CHECK_ARBITRATION, notes); insertCaseLog(caseApplication.getId(), CaseApplicationConstants.VERPRIF_ARBITRATION, "");
rows = caseApplicationMapper.submitCaseApplication(caseApplication); rows = caseApplicationMapper.submitCaseApplication(caseApplication);
} }
@@ -1873,30 +1867,25 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
public AjaxResult arbitratorCheckArbitrateRecord(CaseApplication caseApplication) { public AjaxResult arbitratorCheckArbitrateRecord(CaseApplication caseApplication) {
// 同意后状态改为待部门长审核仲裁文书(CHECK_ARBITRATION = 12),拒绝改为待秘书核验仲裁文书(VERPRIF_ARBITRATION = 11) // 同意后状态改为待部门长审核仲裁文书(CHECK_ARBITRATION = 12),拒绝改为待秘书核验仲裁文书(VERPRIF_ARBITRATION = 11)
int rows = 0; int rows = 0;
ArbitrateRecord arbitrateRecord = caseApplication.getArbitrateRecord();
if(arbitrateRecord.getId()!=null){
arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord);
}else {
arbitrateRecordMapper.insertArbitrateRecord(arbitrateRecord);
}
Integer agreeOrNotCheck = caseApplication.getAgreeOrNotCheck(); Integer agreeOrNotCheck = caseApplication.getAgreeOrNotCheck();
if (agreeOrNotCheck.intValue() == 1) { if (agreeOrNotCheck.intValue() == 1) {
caseApplication.setCaseStatus(CaseApplicationConstants.CHECK_ARBITRATION); caseApplication.setCaseStatus(CaseApplicationConstants.CHECK_ARBITRATION);
rows = caseApplicationMapper.submitCaseApplication(caseApplication);
// 新增日志 // 新增日志
insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CHECK_ARBITRATION, ""); insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CHECK_ARBITRATION, "");
} else if (agreeOrNotCheck.intValue() == 2) {//拒绝审核
caseApplication.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
rows = caseApplicationMapper.submitCaseApplication(caseApplication); rows = caseApplicationMapper.submitCaseApplication(caseApplication);
String notes=""; } else if (agreeOrNotCheck.intValue() == 2) {//拒绝审核
if(caseApplication.getArbitrateRecord()!=null&&StrUtil.isNotEmpty(caseApplication.getArbitrateRecord().getArbitrateReject())){ ArbitrateRecord arbitrateRecord = caseApplication.getArbitrateRecord();
notes="仲裁员驳回仲裁文书,驳回原因:"+caseApplication.getArbitrateRecord().getArbitrateReject(); arbitrateRecord.setCaseAppliId(caseApplication.getId());
if(arbitrateRecord.getId()!=null){
arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord);
}else {
arbitrateRecordMapper.insertArbitrateRecord(arbitrateRecord);
} }
caseApplication.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
// 新增日志 // 新增日志
insertCaseLog(caseApplication.getId(), CaseApplicationConstants.VERPRIF_ARBITRATION, notes); insertCaseLog(caseApplication.getId(), CaseApplicationConstants.VERPRIF_ARBITRATION, "");
rows = caseApplicationMapper.submitCaseApplication(caseApplication);
} }
return success(); return success();
} }
@@ -1909,7 +1898,6 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
//提交立案审查 //提交立案审查
int rows = 0; int rows = 0;
for (Long id : ids) { for (Long id : ids) {
String notes="";
CaseApplication caseApplication = new CaseApplication(); CaseApplication caseApplication = new CaseApplication();
caseApplication.setId(id); caseApplication.setId(id);
caseApplication.setAgreeOrNotCheck(agreeOrNotCheck); caseApplication.setAgreeOrNotCheck(agreeOrNotCheck);
@@ -1917,7 +1905,6 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
caseApplication.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT); caseApplication.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT);
rows += caseApplicationMapper.submitCaseApplication(caseApplication); rows += caseApplicationMapper.submitCaseApplication(caseApplication);
} else if (agreeOrNotCheck == 2) {//拒绝审核 } else if (agreeOrNotCheck == 2) {//拒绝审核
notes="驳回立案申请,驳回原因:"+caseCheckReject;
caseApplication.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION); caseApplication.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
rows += caseApplicationMapper.submitCaseApplication(caseApplication); rows += caseApplicationMapper.submitCaseApplication(caseApplication);
ArbitrateRecord arbitrateRecordsel = new ArbitrateRecord(); ArbitrateRecord arbitrateRecordsel = new ArbitrateRecord();
@@ -1928,15 +1915,13 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecordnew); arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecordnew);
}else { }else {
arbitrateRecordsel.setCaseCheckReject(caseCheckReject); arbitrateRecordsel.setCaseCheckReject(caseCheckReject);
arbitrateRecordMapper.insertArbitrateRecord(arbitrateRecordsel); arbitrateRecordMapper.insertArbitrateRecord(arbitrateRecordsel);
} }
} }
// 新增日志 // 新增日志
insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_PAYMENT, notes); insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_PAYMENT, "");
} }
@@ -2871,8 +2856,15 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
@Transactional @Transactional
@Override @Override
public AjaxResult uploadCaseZipFile(MultipartFile file, Long templateId) { public AjaxResult uploadCaseZipFile(MultipartFile file, Long templateId) {
CaseApplication caseApplication=null;
AjaxResult ajaxResult = caseZipImportImpl.zipImport( file, templateId); AjaxResult ajaxResult = caseZipImportImpl.zipImport( file, templateId);
return ajaxResult; if(ajaxResult.isSuccess()&&caseApplication!=null) {
// 新增案件基本信息表
this.insertcaseApplication(caseApplication);
return success("导入成功");
}else {
return ajaxResult;
}
} }