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