Commit fc19f116 authored by 韩桐桐's avatar 韩桐桐

bug 27817 监管业务系统,针对同一个使用登记证可以发起补证申请和单位变更流程,未做流程中校验

parent c12fa142
......@@ -127,4 +127,7 @@ public class JgUseRegistrationManageDto extends BaseDto {
@ApiModelProperty("补证日期")
private Date reissueDate;
@ApiModelProperty("是否在流程中,值:true / false ")
private String certInBusinessFlag;
}
......@@ -141,6 +141,9 @@
<if test="dto.carNumber != null and dto.carNumber != ''">
and tjurm.car_number LIKE CONCAT('%', #{dto.carNumber}, '%')
</if>
<if test="dto.certInBusinessFlag != null and dto.certInBusinessFlag != '' and dto.certInBusinessFlag == 'false'">
and NOT EXISTS ( <include refid="useRegCertInBusiness"/> )
</if>
ORDER BY
<if test="sort != null">
tjurm.${sort.field} ${sort.sortType},
......@@ -148,6 +151,52 @@
tjurm.rec_date DESC
</where>
</select>
<sql id="useRegCertInBusiness">
SELECT 1
FROM (SELECT use_registration_code
FROM tzs_jg_certificate_replenish
WHERE is_delete = 0
AND apply_status NOT IN ('6610', '6614', '6615', '6617', '6616')
UNION ALL
SELECT use_registration_code
FROM tzs_jg_change_registration_reform
WHERE is_delete = 0
AND status NOT IN ('使用单位待提交', '一级受理已驳回', '使用单位已撤回', '已作废', '已完成')
UNION ALL
SELECT use_registration_code
FROM tzs_jg_change_registration_transfer
WHERE is_delete = 0
AND audit_status NOT IN ('使用单位待提交', '一级受理已驳回', '使用单位已撤回', '已作废', '已完成')
UNION ALL
SELECT use_registration_code
FROM tzs_jg_enable_disable
WHERE is_delete = 0
AND audit_status NOT IN ('待提交', '已驳回', '已撤回', '已作废', '已完成')
UNION ALL
SELECT use_registration_code
FROM tzs_jg_over_design_service_life
WHERE is_delete = 0
AND status NOT IN ('使用单位待提交', '一级受理已驳回', '使用单位已撤回', '已作废', '已完成')
UNION ALL
SELECT use_registration_code
FROM tzs_jg_scrap_cancel
WHERE is_delete = 0
AND audit_status NOT IN ('使用单位待提交', '一级受理已驳回', '使用单位已撤回', '已作废', '已完成')
UNION ALL
SELECT use_registration_code
FROM tzs_jg_use_registration
WHERE is_delete = 0
AND status NOT IN ('使用单位待提交', '一级受理已驳回', '使用单位已撤回', '已作废', '已完成')
UNION ALL
SELECT use_registration_code
FROM tzs_jg_vehicle_information
WHERE is_delete = 0
AND status NOT IN ('使用单位待提交', '一级受理已驳回', '使用单位已撤回', '已作废', '已完成')) A
WHERE tjurm.use_registration_code = A.use_registration_code
</sql>
<select id="countCertificateByReginCode" resultType="java.lang.Long">
select
count(1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment