Merge branch 'wq' of SH-Arbitrate/Arbitrate-Backend into dev
This commit was merged in pull request #258.
This commit is contained in:
+10
-3
@@ -16,6 +16,7 @@ import com.ruoyi.wisdomarbitrate.domain.vo.CompareCaseVO;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.UpdateSubmitVO;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.*;
|
||||
import com.ruoyi.wisdomarbitrate.service.CaseApplicationLogService;
|
||||
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -50,6 +51,8 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
|
||||
private CaseAttachLogMapper caseAttachLogMapper;
|
||||
@Autowired
|
||||
private SmsRecordMapper smsRecordMapper;
|
||||
@Autowired
|
||||
private ICaseApplicationService caseApplicationService;
|
||||
@Override
|
||||
public int insert(CaseApplication caseApplicationLog) {
|
||||
return caseApplicationLogMapper.insert(caseApplicationLog);
|
||||
@@ -233,16 +236,20 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
|
||||
public AjaxResult selectCompareCase(UpdateSubmitVO vo) {
|
||||
// 查询当前版本号和上一个版本号的案件
|
||||
CaseApplication afterCase = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion());
|
||||
CaseApplication beforeCase = caseApplicationLogMapper.selectBeforeCase(vo.getCaseId(), vo.getVersion());
|
||||
// CaseApplication beforeCase = caseApplicationLogMapper.selectBeforeCase(vo.getCaseId(), vo.getVersion());
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setCaseAppliId(vo.getCaseId());
|
||||
CaseApplication beforeCase= caseApplicationService.selectCaseApplication(caseApplication);
|
||||
|
||||
// 查询案件关联人员
|
||||
beforeCase.setCaseAffiliates(caseAffiliateLogMapper.selectCaseAffiliate(beforeCase.getCaseLogId()));
|
||||
// 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));
|
||||
// beforeCase.setCaseAttachList(caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach));
|
||||
caseAttach.setCaseAppliLogId(afterCase.getCaseLogId());
|
||||
afterCase.setCaseAttachList(caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach));
|
||||
CompareCaseVO compareCaseVO = new CompareCaseVO();
|
||||
|
||||
@@ -782,7 +782,8 @@
|
||||
FROM
|
||||
case_application c
|
||||
JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type = 1
|
||||
JOIN case_application_log l on l.case_appli_id=c.id and l.update_submit_status not in(1,2) and l.version
|
||||
JOIN case_application_log l on l.case_appli_id=c.id and l.update_submit_status not in(1, 2) and
|
||||
l.version
|
||||
= (
|
||||
SELECT
|
||||
max( version ) version
|
||||
@@ -791,7 +792,9 @@
|
||||
WHERE case_appli_id = c.id
|
||||
)
|
||||
WHERE
|
||||
ca.identity_type=1 and c.case_status in (1,5,8,9,14,15,16,17,31)
|
||||
ca.identity_type=1
|
||||
|
||||
and c.case_status in (1,5,8,9,14,15,16,17,31)
|
||||
<!-- <if test="deptIds != null and deptIds.size() > 0">
|
||||
and ca.application_organ_id in
|
||||
<foreach item="item" collection="deptIds" open="(" separator="," close=")">
|
||||
@@ -805,8 +808,24 @@
|
||||
<if test="nameId != null and nameId != ''">
|
||||
AND ca.application_organ_id=#{nameId} AND ca.identity_type=1
|
||||
</if>
|
||||
|
||||
|
||||
union
|
||||
select c.id ,
|
||||
c.case_status,ca.application_organ_id,
|
||||
c.arbitrator_id,ca.identity_num , ca.identity_type
|
||||
FROM
|
||||
case_application c
|
||||
JOIN case_application_log l ON c.id = l.case_appli_id
|
||||
JOIN case_affiliate_log ca ON ca.case_appli_log_id = l.id
|
||||
AND ca.identity_type = 1
|
||||
WHERE
|
||||
l.update_submit_status IN ( 1, 2 ) and ca.identity_type=1
|
||||
AND l.version = (
|
||||
SELECT
|
||||
max( version ) version
|
||||
FROM
|
||||
case_application_log
|
||||
WHERE
|
||||
c.id = case_appli_id)
|
||||
</if>
|
||||
</trim>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user