Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into hjb
This commit is contained in:
@@ -9,9 +9,10 @@ public enum UpdateSubmitStatus
|
||||
{
|
||||
UNCOMMITTED(0, "未提交"),
|
||||
COMMITTED(1, "已提交"),
|
||||
AGREE(2, "同意已修改的案件"),
|
||||
REFUSE(3, "拒绝已修改的案件"),
|
||||
REVOKE(4, "撤销"),
|
||||
REVOKE(2, "撤销"),
|
||||
AGREE(3, "同意已修改的案件"),
|
||||
REFUSE(4, "拒绝已修改的案件"),
|
||||
|
||||
AGREE_REVOKE(5, "同意撤销修改"),
|
||||
REFUSE_REVOKE(6, "拒绝撤销修改"),
|
||||
;
|
||||
|
||||
@@ -22,13 +22,17 @@ public class UpdateSubmitVO {
|
||||
*/
|
||||
private Integer version;
|
||||
/**
|
||||
* 修改案件的提交状态,0-未提交,1-已提交,2-同意已修改的案件,3-拒绝已修改的案件,4-撤销,5-同意撤销,6-拒绝撤销
|
||||
* 修改案件的提交状态,0-未提交,1-已提交,2-撤销,3-同意已修改的案件,4-拒绝已修改的案件,5-同意撤销,6-拒绝撤销
|
||||
*/
|
||||
private Integer updateSubmitStatus;
|
||||
/**
|
||||
* 是否同意,0-否,1-是
|
||||
*/
|
||||
private Integer isAgree;
|
||||
/**
|
||||
* 拒絕原因
|
||||
*/
|
||||
private String reason;
|
||||
|
||||
|
||||
}
|
||||
|
||||
+57
-38
@@ -61,10 +61,21 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
|
||||
caseApplicationLogMapper.updateStatus(vo);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public AjaxResult revoke(UpdateSubmitVO vo) {
|
||||
vo.setUpdateSubmitStatus(UpdateSubmitStatus.REVOKE.getCode());
|
||||
// 根据案件id和版本号查询改案件
|
||||
CaseApplication caseApplication = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion());
|
||||
if(caseApplication == null){
|
||||
return AjaxResult.error("案件不存在");
|
||||
}
|
||||
// 如果秘书没有审核,将撤销状态改为同意撤销,否则改为撤销
|
||||
if(caseApplication.getUpdateSubmitStatus()!=null && caseApplication.getUpdateSubmitStatus()>UpdateSubmitStatus.REVOKE.getCode()){
|
||||
agreeRevoke(vo);
|
||||
|
||||
}else {
|
||||
vo.setUpdateSubmitStatus(UpdateSubmitStatus.REVOKE.getCode());
|
||||
}
|
||||
// 修改日志表提交状态
|
||||
caseApplicationLogMapper.updateStatus(vo);
|
||||
return AjaxResult.success();
|
||||
@@ -108,48 +119,56 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
|
||||
// 拒绝,将日志表改版本的状态改为拒绝
|
||||
vo.setUpdateSubmitStatus(UpdateSubmitStatus.REFUSE.getCode());
|
||||
caseApplicationLogMapper.updateStatus(vo);
|
||||
// todo 给申请人发送短信
|
||||
// 修改案件表的版本号
|
||||
// caseApplicationMapper.updateVersionById(vo.getCaseId(),vo.getVersion());
|
||||
|
||||
}
|
||||
return AjaxResult.success();
|
||||
} else if (Objects.equals(vo.getUpdateSubmitStatus(), UpdateSubmitStatus.REVOKE.getCode())) {
|
||||
// 如果版本号为1,则直接返回
|
||||
if(vo.getVersion() <= 1){
|
||||
return AjaxResult.success();
|
||||
}
|
||||
// 审核修改撤销状态
|
||||
if (Objects.equals(vo.getIsAgree(), YesOrNoEnum.YES.getCode())) {
|
||||
agreeRevoke(vo);
|
||||
// 同意撤销,查询日志记录表上个版本数据,将数据更新到主表,并将日志表改版本的状态改为同意撤销
|
||||
|
||||
} else {
|
||||
// 拒绝撤销,将日志表改版本的状态改为拒绝撤销
|
||||
vo.setUpdateSubmitStatus(UpdateSubmitStatus.REFUSE_REVOKE.getCode());
|
||||
caseApplicationLogMapper.updateStatus(vo);
|
||||
// 修改案件表的版本号
|
||||
// caseApplicationMapper.updateVersionById(vo.getCaseId(),vo.getVersion());
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
// todo 需确定
|
||||
// else if (Objects.equals(vo.getUpdateSubmitStatus(), UpdateSubmitStatus.REVOKE.getCode())) {
|
||||
// // 如果版本号为1,则直接返回
|
||||
// if(vo.getVersion() <= 1){
|
||||
// return AjaxResult.success();
|
||||
// }
|
||||
// // 审核修改撤销状态
|
||||
// if (Objects.equals(vo.getIsAgree(), YesOrNoEnum.YES.getCode())) {
|
||||
// // 同意撤销,查询日志记录表上个版本数据,将数据更新到主表,并将日志表改版本的状态改为同意撤销
|
||||
// // 查询日志记录表上个版本未被拒绝数据
|
||||
// CaseApplication caseApplicationLog = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion()-1);
|
||||
// if (caseApplicationLog == null) {
|
||||
// return AjaxResult.error("未找到该案件");
|
||||
// }
|
||||
// // 将日志表改版本的状态改为拒绝
|
||||
// vo.setUpdateSubmitStatus(UpdateSubmitStatus.AGREE_REVOKE.getCode());
|
||||
// caseApplicationLogMapper.updateStatus(vo);
|
||||
// // 根据caseLogId查询相关人员表
|
||||
// CaseAffiliate caseAffiliate = new CaseAffiliate();
|
||||
// caseAffiliate.setCaseAppliLogId(caseApplicationLog.getCaseLogId());
|
||||
// List<CaseAffiliate> affiliateLogList = caseAffiliateLogMapper.selectCaseAffiliate(caseAffiliate);
|
||||
// caseApplicationLog.setId(caseApplicationLog.getCaseAppliId());
|
||||
// // 更新案件主表
|
||||
// caseApplicationMapper.updataCaseApplication(caseApplicationLog);
|
||||
//
|
||||
// // 更新相关人员主表
|
||||
// caseAffiliateMapper.updataCaseAffiliateByCaseId(caseApplicationLog.getCaseAppliId(), affiliateLogList);
|
||||
// } else {
|
||||
// // 拒绝撤销,将日志表改版本的状态改为拒绝撤销
|
||||
// vo.setUpdateSubmitStatus(UpdateSubmitStatus.REFUSE_REVOKE.getCode());
|
||||
// caseApplicationLogMapper.updateStatus(vo);
|
||||
// // 修改案件表的版本号
|
||||
// // caseApplicationMapper.updateVersionById(vo.getCaseId(),vo.getVersion());
|
||||
// }
|
||||
// return AjaxResult.success();
|
||||
// }
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 同意撤销
|
||||
* @param vo
|
||||
*/
|
||||
private void agreeRevoke(UpdateSubmitVO vo) {
|
||||
// 查询日志记录表上个版本未被拒绝数据
|
||||
CaseApplication caseApplicationLog = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion()-1);
|
||||
if (caseApplicationLog == null) {
|
||||
return;
|
||||
}
|
||||
// 将日志表改版本的状态改为拒绝
|
||||
vo.setUpdateSubmitStatus(UpdateSubmitStatus.AGREE_REVOKE.getCode());
|
||||
caseApplicationLogMapper.updateStatus(vo);
|
||||
// 根据caseLogId查询相关人员表
|
||||
CaseAffiliate caseAffiliate = new CaseAffiliate();
|
||||
caseAffiliate.setCaseAppliLogId(caseApplicationLog.getCaseLogId());
|
||||
List<CaseAffiliate> affiliateLogList = caseAffiliateLogMapper.selectCaseAffiliate(caseAffiliate);
|
||||
caseApplicationLog.setId(caseApplicationLog.getCaseAppliId());
|
||||
// 更新案件主表
|
||||
caseApplicationMapper.updataCaseApplication(caseApplicationLog);
|
||||
|
||||
// 更新相关人员主表
|
||||
caseAffiliateMapper.updataCaseAffiliateByCaseId(caseApplicationLog.getCaseAppliId(), affiliateLogList);
|
||||
}
|
||||
}
|
||||
|
||||
+18
-3
@@ -1007,7 +1007,16 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
BigDecimal feePayable = caseApplication.getCaseSubjectAmount().multiply(feeRate).setScale(2, RoundingMode.HALF_UP);
|
||||
caseApplication.setFeePayable(feePayable);
|
||||
caseApplication.setUpdateBy(getUsername());
|
||||
// int rows = caseApplicationMapper.updataCaseApplication(caseApplication);
|
||||
// 立案申请状态直接修改主表信息
|
||||
if(caseApplication.getCaseStatus()!=null && caseApplication.getCaseStatus().equals(CaseApplicationConstants.CASE_APPLICATION)) {
|
||||
|
||||
caseApplicationMapper.updataCaseApplication(caseApplication);
|
||||
// 修改记录表状态为同意提交修改的内容
|
||||
caseApplication.setUpdateSubmitStatus(UpdateSubmitStatus.AGREE.getCode());
|
||||
}else {
|
||||
// 修改记录表状态为已提交修改的内容
|
||||
caseApplication.setUpdateSubmitStatus(UpdateSubmitStatus.COMMITTED.getCode());
|
||||
}
|
||||
// if(rows==0){
|
||||
// return rows;
|
||||
// }
|
||||
@@ -1052,8 +1061,11 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
}
|
||||
|
||||
}
|
||||
// 立案申请状态直接修改主表信息
|
||||
if(caseApplication.getCaseStatus()!=null && caseApplication.getCaseStatus().equals(CaseApplicationConstants.CASE_APPLICATION)) {
|
||||
|
||||
// caseAffiliateMapper.updataCaseAffiliate(caseAffiliate);
|
||||
caseAffiliateMapper.updataCaseAffiliate(caseAffiliate);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1253,7 +1265,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
}
|
||||
caseApplicationselect.setCaseAttachList(caseAttachList);
|
||||
CaseAffiliate caseAffiliateLog = new CaseAffiliate();
|
||||
caseAffiliateLog.setCaseAppliLogId(caseApplication.getCaseLogId());
|
||||
caseAffiliateLog.setCaseAppliLogId(caseApplicationselect.getCaseLogId());
|
||||
List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateLogMapper.selectCaseAffiliate(caseAffiliateLog);
|
||||
if (caseAffiliatListeselect != null) {
|
||||
// 查询组织机构
|
||||
@@ -2749,6 +2761,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
/**
|
||||
* 生成房间号
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public String createRoomId(Long caseId) {
|
||||
String roomId = generateRoomId();
|
||||
@@ -2756,6 +2769,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
ReservedConference conference = new ReservedConference(caseId, roomId,
|
||||
null, null,0);
|
||||
reservedConferenceMapper.insert(conference);
|
||||
// 绑定案件与房间号
|
||||
caseApplicationMapper.bindCaseId(caseId, roomId);
|
||||
return roomId;
|
||||
}
|
||||
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
and l.version=(SELECT
|
||||
max( version ) version
|
||||
FROM
|
||||
case_application_log where case_appli_id = c.id)
|
||||
case_application_log where case_appli_id = c.id and update_submit_status not in(4,5))
|
||||
<if test="applicationOrganId != null and applicationOrganId != ''">
|
||||
AND ca.application_organ_id = #{applicationOrganId}
|
||||
</if>
|
||||
@@ -293,14 +293,14 @@
|
||||
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,4) 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
|
||||
FROM
|
||||
case_application_log
|
||||
WHERE case_appli_id = c.id
|
||||
and update_submit_status not IN ( 1, 4 ))
|
||||
and update_submit_status not IN ( 1, 2 ))
|
||||
WHERE
|
||||
ca.identity_type=1 and c.case_status in (1,5,11,15,16,17,31)
|
||||
<if test="deptIds != null and deptIds.size() > 0">
|
||||
@@ -406,7 +406,7 @@
|
||||
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, 4 ) and ca.identity_type=1
|
||||
l.update_submit_status IN ( 1, 2 ) and ca.identity_type=1
|
||||
<if test="deptIds != null and deptIds.size() > 0">
|
||||
and ca.application_organ_id in
|
||||
<foreach item="item" collection="deptIds" open="(" separator="," close=")">
|
||||
@@ -435,7 +435,7 @@
|
||||
FROM
|
||||
case_application_log
|
||||
WHERE
|
||||
update_submit_status IN ( 1, 4 ) and c.id = l.case_appli_id)
|
||||
update_submit_status IN ( 1, 2 ) and c.id = l.case_appli_id)
|
||||
</if>
|
||||
</trim>
|
||||
) t1
|
||||
@@ -713,7 +713,7 @@
|
||||
and l.version=(SELECT
|
||||
max( version ) version
|
||||
FROM
|
||||
case_application_log where case_appli_id = c.id)
|
||||
case_application_log where case_appli_id = c.id and update_submit_status not in(4,5))
|
||||
<if test="applicationOrganId != null and applicationOrganId != ''">
|
||||
AND ca.application_organ_id = #{applicationOrganId}
|
||||
</if>
|
||||
@@ -1032,7 +1032,7 @@
|
||||
FROM
|
||||
case_application_log
|
||||
WHERE case_appli_id = t.id
|
||||
update_submit_status IN ( 1, 4 ))
|
||||
update_submit_status IN ( 1, 2 ))
|
||||
order by c.create_time desc,c.case_num desc
|
||||
</select>
|
||||
<select id="selectSecretaryCase" parameterType="CaseApplication" resultMap="CaseApplicationResult">
|
||||
@@ -1149,13 +1149,13 @@
|
||||
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,4) 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
|
||||
FROM
|
||||
case_application_log
|
||||
WHERE case_appli_id = c.id
|
||||
update_submit_status IN ( 1, 4 ))
|
||||
update_submit_status IN ( 1, 2 ))
|
||||
WHERE
|
||||
ca.identity_type=1 and c.case_status in (1,5)
|
||||
<if test="deptIds != null and deptIds.size() > 0">
|
||||
@@ -1262,7 +1262,7 @@
|
||||
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, 4 ) and ca.identity_type=1
|
||||
l.update_submit_status IN ( 1, 2 ) and ca.identity_type=1
|
||||
<if test="deptIds != null and deptIds.size() > 0">
|
||||
and ca.application_organ_id in
|
||||
<foreach item="item" collection="deptIds" open="(" separator="," close=")">
|
||||
@@ -1291,7 +1291,7 @@
|
||||
FROM
|
||||
case_application_log
|
||||
WHERE
|
||||
update_submit_status IN ( 1, 4 ))
|
||||
update_submit_status IN ( 1, 2 ))
|
||||
) t
|
||||
GROUP BY
|
||||
t.id,
|
||||
@@ -1459,7 +1459,9 @@
|
||||
update case_application set lock_status=#{lockStatus} where id = #{id}
|
||||
</update>
|
||||
<update id="bindCaseId">
|
||||
update case_application set room_id=#{roomId} where id = #{caseId}
|
||||
<!-- update case_application set room_id=#{roomId} where id = #{caseId} -->
|
||||
|
||||
update case_application set room_id= CONCAT(room_id,',',#{roomId}) where id =#{caseId}
|
||||
</update>
|
||||
<update id="updateVersionById">
|
||||
update case_application set version = #{version} where id = #{id}
|
||||
@@ -1574,7 +1576,7 @@ order by c.create_time desc limit 1
|
||||
</select>
|
||||
<select id="selectCaseIdByRoomId" resultType="java.lang.Long">
|
||||
select id
|
||||
from case_application where room_id=#{roomId} limit 1
|
||||
from case_application where room_id like concat('%', #{roomId}, '%') limit 1
|
||||
</select>
|
||||
|
||||
<select id="selectMaxRoomId" resultType="java.lang.Integer">
|
||||
|
||||
Reference in New Issue
Block a user