修改
This commit is contained in:
@@ -9,9 +9,10 @@ public enum UpdateSubmitStatus
|
|||||||
{
|
{
|
||||||
UNCOMMITTED(0, "未提交"),
|
UNCOMMITTED(0, "未提交"),
|
||||||
COMMITTED(1, "已提交"),
|
COMMITTED(1, "已提交"),
|
||||||
AGREE(2, "同意已修改的案件"),
|
REVOKE(2, "撤销"),
|
||||||
REFUSE(3, "拒绝已修改的案件"),
|
AGREE(3, "同意已修改的案件"),
|
||||||
REVOKE(4, "撤销"),
|
REFUSE(4, "拒绝已修改的案件"),
|
||||||
|
|
||||||
AGREE_REVOKE(5, "同意撤销修改"),
|
AGREE_REVOKE(5, "同意撤销修改"),
|
||||||
REFUSE_REVOKE(6, "拒绝撤销修改"),
|
REFUSE_REVOKE(6, "拒绝撤销修改"),
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -22,13 +22,17 @@ public class UpdateSubmitVO {
|
|||||||
*/
|
*/
|
||||||
private Integer version;
|
private Integer version;
|
||||||
/**
|
/**
|
||||||
* 修改案件的提交状态,0-未提交,1-已提交,2-同意已修改的案件,3-拒绝已修改的案件,4-撤销,5-同意撤销,6-拒绝撤销
|
* 修改案件的提交状态,0-未提交,1-已提交,2-撤销,3-同意已修改的案件,4-拒绝已修改的案件,5-同意撤销,6-拒绝撤销
|
||||||
*/
|
*/
|
||||||
private Integer updateSubmitStatus;
|
private Integer updateSubmitStatus;
|
||||||
/**
|
/**
|
||||||
* 是否同意,0-否,1-是
|
* 是否同意,0-否,1-是
|
||||||
*/
|
*/
|
||||||
private Integer isAgree;
|
private Integer isAgree;
|
||||||
|
/**
|
||||||
|
* 拒絕原因
|
||||||
|
*/
|
||||||
|
private String reason;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+57
-38
@@ -61,10 +61,21 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
|
|||||||
caseApplicationLogMapper.updateStatus(vo);
|
caseApplicationLogMapper.updateStatus(vo);
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
@Transactional
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult revoke(UpdateSubmitVO vo) {
|
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);
|
caseApplicationLogMapper.updateStatus(vo);
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
@@ -108,48 +119,56 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
|
|||||||
// 拒绝,将日志表改版本的状态改为拒绝
|
// 拒绝,将日志表改版本的状态改为拒绝
|
||||||
vo.setUpdateSubmitStatus(UpdateSubmitStatus.REFUSE.getCode());
|
vo.setUpdateSubmitStatus(UpdateSubmitStatus.REFUSE.getCode());
|
||||||
caseApplicationLogMapper.updateStatus(vo);
|
caseApplicationLogMapper.updateStatus(vo);
|
||||||
|
// todo 给申请人发送短信
|
||||||
// 修改案件表的版本号
|
// 修改案件表的版本号
|
||||||
// caseApplicationMapper.updateVersionById(vo.getCaseId(),vo.getVersion());
|
// caseApplicationMapper.updateVersionById(vo.getCaseId(),vo.getVersion());
|
||||||
|
|
||||||
}
|
}
|
||||||
return AjaxResult.success();
|
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();
|
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);
|
BigDecimal feePayable = caseApplication.getCaseSubjectAmount().multiply(feeRate).setScale(2, RoundingMode.HALF_UP);
|
||||||
caseApplication.setFeePayable(feePayable);
|
caseApplication.setFeePayable(feePayable);
|
||||||
caseApplication.setUpdateBy(getUsername());
|
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){
|
// if(rows==0){
|
||||||
// return rows;
|
// 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);
|
caseApplicationselect.setCaseAttachList(caseAttachList);
|
||||||
CaseAffiliate caseAffiliateLog = new CaseAffiliate();
|
CaseAffiliate caseAffiliateLog = new CaseAffiliate();
|
||||||
caseAffiliateLog.setCaseAppliLogId(caseApplication.getCaseLogId());
|
caseAffiliateLog.setCaseAppliLogId(caseApplicationselect.getCaseLogId());
|
||||||
List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateLogMapper.selectCaseAffiliate(caseAffiliateLog);
|
List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateLogMapper.selectCaseAffiliate(caseAffiliateLog);
|
||||||
if (caseAffiliatListeselect != null) {
|
if (caseAffiliatListeselect != null) {
|
||||||
// 查询组织机构
|
// 查询组织机构
|
||||||
@@ -2749,6 +2761,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
/**
|
/**
|
||||||
* 生成房间号
|
* 生成房间号
|
||||||
*/
|
*/
|
||||||
|
@Transactional
|
||||||
@Override
|
@Override
|
||||||
public String createRoomId(Long caseId) {
|
public String createRoomId(Long caseId) {
|
||||||
String roomId = generateRoomId();
|
String roomId = generateRoomId();
|
||||||
@@ -2756,6 +2769,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
ReservedConference conference = new ReservedConference(caseId, roomId,
|
ReservedConference conference = new ReservedConference(caseId, roomId,
|
||||||
null, null,0);
|
null, null,0);
|
||||||
reservedConferenceMapper.insert(conference);
|
reservedConferenceMapper.insert(conference);
|
||||||
|
// 绑定案件与房间号
|
||||||
|
caseApplicationMapper.bindCaseId(caseId, roomId);
|
||||||
return roomId;
|
return roomId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -187,7 +187,7 @@
|
|||||||
and l.version=(SELECT
|
and l.version=(SELECT
|
||||||
max( version ) version
|
max( version ) version
|
||||||
FROM
|
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 != ''">
|
<if test="applicationOrganId != null and applicationOrganId != ''">
|
||||||
AND ca.application_organ_id = #{applicationOrganId}
|
AND ca.application_organ_id = #{applicationOrganId}
|
||||||
</if>
|
</if>
|
||||||
@@ -293,14 +293,14 @@
|
|||||||
FROM
|
FROM
|
||||||
case_application c
|
case_application c
|
||||||
JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type = 1
|
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
|
SELECT
|
||||||
max( version ) version
|
max( version ) version
|
||||||
FROM
|
FROM
|
||||||
case_application_log
|
case_application_log
|
||||||
WHERE case_appli_id = c.id
|
WHERE case_appli_id = c.id
|
||||||
and update_submit_status not IN ( 1, 4 ))
|
and update_submit_status not IN ( 1, 2 ))
|
||||||
WHERE
|
WHERE
|
||||||
ca.identity_type=1 and c.case_status in (1,5,11,15,16,17,31)
|
ca.identity_type=1 and c.case_status in (1,5,11,15,16,17,31)
|
||||||
<if test="deptIds != null and deptIds.size() > 0">
|
<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
|
JOIN case_affiliate_log ca ON ca.case_appli_log_id = l.id
|
||||||
AND ca.identity_type = 1
|
AND ca.identity_type = 1
|
||||||
WHERE
|
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">
|
<if test="deptIds != null and deptIds.size() > 0">
|
||||||
and ca.application_organ_id in
|
and ca.application_organ_id in
|
||||||
<foreach item="item" collection="deptIds" open="(" separator="," close=")">
|
<foreach item="item" collection="deptIds" open="(" separator="," close=")">
|
||||||
@@ -435,7 +435,7 @@
|
|||||||
FROM
|
FROM
|
||||||
case_application_log
|
case_application_log
|
||||||
WHERE
|
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>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
) t1
|
) t1
|
||||||
@@ -713,7 +713,7 @@
|
|||||||
and l.version=(SELECT
|
and l.version=(SELECT
|
||||||
max( version ) version
|
max( version ) version
|
||||||
FROM
|
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 != ''">
|
<if test="applicationOrganId != null and applicationOrganId != ''">
|
||||||
AND ca.application_organ_id = #{applicationOrganId}
|
AND ca.application_organ_id = #{applicationOrganId}
|
||||||
</if>
|
</if>
|
||||||
@@ -1032,7 +1032,7 @@
|
|||||||
FROM
|
FROM
|
||||||
case_application_log
|
case_application_log
|
||||||
WHERE case_appli_id = t.id
|
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
|
order by c.create_time desc,c.case_num desc
|
||||||
</select>
|
</select>
|
||||||
<select id="selectSecretaryCase" parameterType="CaseApplication" resultMap="CaseApplicationResult">
|
<select id="selectSecretaryCase" parameterType="CaseApplication" resultMap="CaseApplicationResult">
|
||||||
@@ -1149,13 +1149,13 @@
|
|||||||
FROM
|
FROM
|
||||||
case_application c
|
case_application c
|
||||||
JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type = 1
|
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
|
SELECT
|
||||||
max( version ) version
|
max( version ) version
|
||||||
FROM
|
FROM
|
||||||
case_application_log
|
case_application_log
|
||||||
WHERE case_appli_id = c.id
|
WHERE case_appli_id = c.id
|
||||||
update_submit_status IN ( 1, 4 ))
|
update_submit_status IN ( 1, 2 ))
|
||||||
WHERE
|
WHERE
|
||||||
ca.identity_type=1 and c.case_status in (1,5)
|
ca.identity_type=1 and c.case_status in (1,5)
|
||||||
<if test="deptIds != null and deptIds.size() > 0">
|
<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
|
JOIN case_affiliate_log ca ON ca.case_appli_log_id = l.id
|
||||||
AND ca.identity_type = 1
|
AND ca.identity_type = 1
|
||||||
WHERE
|
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">
|
<if test="deptIds != null and deptIds.size() > 0">
|
||||||
and ca.application_organ_id in
|
and ca.application_organ_id in
|
||||||
<foreach item="item" collection="deptIds" open="(" separator="," close=")">
|
<foreach item="item" collection="deptIds" open="(" separator="," close=")">
|
||||||
@@ -1291,7 +1291,7 @@
|
|||||||
FROM
|
FROM
|
||||||
case_application_log
|
case_application_log
|
||||||
WHERE
|
WHERE
|
||||||
update_submit_status IN ( 1, 4 ))
|
update_submit_status IN ( 1, 2 ))
|
||||||
) t
|
) t
|
||||||
GROUP BY
|
GROUP BY
|
||||||
t.id,
|
t.id,
|
||||||
@@ -1459,7 +1459,9 @@
|
|||||||
update case_application set lock_status=#{lockStatus} where id = #{id}
|
update case_application set lock_status=#{lockStatus} where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
<update id="bindCaseId">
|
<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>
|
||||||
<update id="updateVersionById">
|
<update id="updateVersionById">
|
||||||
update case_application set version = #{version} where id = #{id}
|
update case_application set version = #{version} where id = #{id}
|
||||||
@@ -1574,7 +1576,7 @@ order by c.create_time desc limit 1
|
|||||||
</select>
|
</select>
|
||||||
<select id="selectCaseIdByRoomId" resultType="java.lang.Long">
|
<select id="selectCaseIdByRoomId" resultType="java.lang.Long">
|
||||||
select id
|
select id
|
||||||
from case_application where room_id=#{roomId} limit 1
|
from case_application where room_id like concat('%', #{roomId}, '%') limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectMaxRoomId" resultType="java.lang.Integer">
|
<select id="selectMaxRoomId" resultType="java.lang.Integer">
|
||||||
|
|||||||
Reference in New Issue
Block a user