|
@@ -91,6 +91,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="drugLicenseBusinessScope" column="drug_license_business_scope" />
|
|
<result property="drugLicenseBusinessScope" column="drug_license_business_scope" />
|
|
|
<result property="foodLicenseBusinessScope" column="food_license_business_scope" />
|
|
<result property="foodLicenseBusinessScope" column="food_license_business_scope" />
|
|
|
<result property="drugScopeHasFrozen" column="drug_scope_has_frozen" />
|
|
<result property="drugScopeHasFrozen" column="drug_scope_has_frozen" />
|
|
|
|
|
+ <result property="reportUrl" column="report_url" />
|
|
|
|
|
+ <result property="filingUrl" column="filing_url" />
|
|
|
|
|
+ <result property="permStatus" column="perm_status" />
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
<sql id="selectFsStoreVo">
|
|
<sql id="selectFsStoreVo">
|
|
@@ -110,7 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
is_drug_license_permanent,is_medical_device2_expiry_permanent,is_medical_device3_expiry_permanent,is_food_license_expiry_permanent,is_medical_license_expiry_permanent,
|
|
is_drug_license_permanent,is_medical_device2_expiry_permanent,is_medical_device3_expiry_permanent,is_food_license_expiry_permanent,is_medical_license_expiry_permanent,
|
|
|
title_Name_one,title_Name_two,title_Name_three,settlement_agreement_file_name,quality_assurance_agreement_fileName,other_special_qualification_fileName,
|
|
title_Name_one,title_Name_two,title_Name_three,settlement_agreement_file_name,quality_assurance_agreement_fileName,other_special_qualification_fileName,
|
|
|
is_effective_permanent1,is_effective_permanent2,is_effective_permanent3,medical_device2_business_scope,medical_device3_business_scope,drug_license_business_scope
|
|
is_effective_permanent1,is_effective_permanent2,is_effective_permanent3,medical_device2_business_scope,medical_device3_business_scope,drug_license_business_scope
|
|
|
- ,food_license_business_scope,drug_scope_has_frozen
|
|
|
|
|
|
|
+ ,food_license_business_scope,drug_scope_has_frozen,report_url,filing_url,perm_status
|
|
|
from fs_store_scrm
|
|
from fs_store_scrm
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
|
@@ -235,6 +238,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="drugLicenseBusinessScope !=null ">drug_license_business_scope, </if>
|
|
<if test="drugLicenseBusinessScope !=null ">drug_license_business_scope, </if>
|
|
|
<if test="foodLicenseBusinessScope !=null ">food_license_business_scope, </if>
|
|
<if test="foodLicenseBusinessScope !=null ">food_license_business_scope, </if>
|
|
|
<if test="drugScopeHasFrozen !=null ">drug_scope_has_frozen, </if>
|
|
<if test="drugScopeHasFrozen !=null ">drug_scope_has_frozen, </if>
|
|
|
|
|
+ <if test="reportUrl !=null ">report_url, </if>
|
|
|
|
|
+ <if test="filingUrl !=null ">filing_url, </if>
|
|
|
|
|
+ <if test="permStatus !=null ">report_url, </if>
|
|
|
</trim>
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="cityIds != null">#{cityIds},</if>
|
|
<if test="cityIds != null">#{cityIds},</if>
|
|
@@ -334,6 +340,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="drugLicenseBusinessScope !=null ">#{drugLicenseBusinessScope}, </if>
|
|
<if test="drugLicenseBusinessScope !=null ">#{drugLicenseBusinessScope}, </if>
|
|
|
<if test="foodLicenseBusinessScope !=null ">#{foodLicenseBusinessScope}, </if>
|
|
<if test="foodLicenseBusinessScope !=null ">#{foodLicenseBusinessScope}, </if>
|
|
|
<if test="drugScopeHasFrozen !=null ">#{drugScopeHasFrozen}, </if>
|
|
<if test="drugScopeHasFrozen !=null ">#{drugScopeHasFrozen}, </if>
|
|
|
|
|
+ <if test="reportUrl !=null ">#{reportUrl}, </if>
|
|
|
|
|
+ <if test="filingUrl !=null ">#{filingUrl}, </if>
|
|
|
|
|
+ <if test="permStatus !=null ">#{permStatus}, </if>
|
|
|
</trim>
|
|
</trim>
|
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
|
@@ -435,6 +444,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="drugLicenseBusinessScope !=null ">drug_license_business_scope = #{drugLicenseBusinessScope} , </if>
|
|
<if test="drugLicenseBusinessScope !=null ">drug_license_business_scope = #{drugLicenseBusinessScope} , </if>
|
|
|
<if test="foodLicenseBusinessScope !=null ">food_license_business_scope = #{foodLicenseBusinessScope} , </if>
|
|
<if test="foodLicenseBusinessScope !=null ">food_license_business_scope = #{foodLicenseBusinessScope} , </if>
|
|
|
<if test="drugScopeHasFrozen !=null ">drug_scope_has_frozen = #{drugScopeHasFrozen}, </if>
|
|
<if test="drugScopeHasFrozen !=null ">drug_scope_has_frozen = #{drugScopeHasFrozen}, </if>
|
|
|
|
|
+ <if test="reportUrl !=null ">report_url = #{reportUrl}, </if>
|
|
|
|
|
+ <if test="filingUrl !=null ">filing_url = #{filingUrl}, </if>
|
|
|
|
|
+ <if test="permStatus !=null ">perm_status = #{permStatus}, </if>
|
|
|
</trim>
|
|
</trim>
|
|
|
where store_id = #{storeId}
|
|
where store_id = #{storeId}
|
|
|
</update>
|
|
</update>
|
|
@@ -687,23 +699,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
AND food_license_expiry_end BETWEEN CURDATE() AND DATE_ADD(CURDATE(), INTERVAL 3 MONTH)
|
|
AND food_license_expiry_end BETWEEN CURDATE() AND DATE_ADD(CURDATE(), INTERVAL 3 MONTH)
|
|
|
AND is_food_license_expiry_permanent != 1
|
|
AND is_food_license_expiry_permanent != 1
|
|
|
THEN '食品经营许可证3个月内过期,请注意更新;'
|
|
THEN '食品经营许可证3个月内过期,请注意更新;'
|
|
|
- ELSE ''
|
|
|
|
|
- END,
|
|
|
|
|
- -- 医疗机构执业许可证
|
|
|
|
|
- CASE
|
|
|
|
|
- WHEN medical_license IS NOT NULL
|
|
|
|
|
- AND medical_license_expiry_end IS NOT NULL
|
|
|
|
|
- AND medical_license_expiry_end < CURDATE()
|
|
|
|
|
- AND is_medical_license_expiry_permanent != 1
|
|
|
|
|
- THEN '医疗机构执业许可证已过期,需要商家更新;'
|
|
|
|
|
- ELSE ''
|
|
|
|
|
- END,
|
|
|
|
|
- CASE
|
|
|
|
|
- WHEN medical_license IS NOT NULL
|
|
|
|
|
- AND medical_license_expiry_end IS NOT NULL
|
|
|
|
|
- AND medical_license_expiry_end BETWEEN CURDATE() AND DATE_ADD(CURDATE(), INTERVAL 3 MONTH)
|
|
|
|
|
- AND is_medical_license_expiry_permanent != 1
|
|
|
|
|
- THEN '医疗机构执业许可证3个月内过期,请注意更新;'
|
|
|
|
|
ELSE ''
|
|
ELSE ''
|
|
|
END
|
|
END
|
|
|
) AS warning_message
|
|
) AS warning_message
|
|
@@ -735,11 +730,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
AND food_license_expiry_end IS NOT NULL
|
|
AND food_license_expiry_end IS NOT NULL
|
|
|
AND (food_license_expiry_end < CURDATE() OR food_license_expiry_end BETWEEN CURDATE() AND DATE_ADD(CURDATE(), INTERVAL 3 MONTH))
|
|
AND (food_license_expiry_end < CURDATE() OR food_license_expiry_end BETWEEN CURDATE() AND DATE_ADD(CURDATE(), INTERVAL 3 MONTH))
|
|
|
AND is_food_license_expiry_permanent != 1)
|
|
AND is_food_license_expiry_permanent != 1)
|
|
|
- -- 医疗机构执业许可证
|
|
|
|
|
- OR (medical_license IS NOT NULL
|
|
|
|
|
- AND medical_license_expiry_end IS NOT NULL
|
|
|
|
|
- AND (medical_license_expiry_end < CURDATE() OR medical_license_expiry_end BETWEEN CURDATE() AND DATE_ADD(CURDATE(), INTERVAL 3 MONTH))
|
|
|
|
|
- AND is_medical_license_expiry_permanent != 1)
|
|
|
|
|
)
|
|
)
|
|
|
HAVING warning_message != '';
|
|
HAVING warning_message != '';
|
|
|
</select>
|
|
</select>
|
|
@@ -848,23 +838,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
AND food_license_expiry_end BETWEEN CURDATE() AND DATE_ADD(CURDATE(), INTERVAL 3 MONTH)
|
|
AND food_license_expiry_end BETWEEN CURDATE() AND DATE_ADD(CURDATE(), INTERVAL 3 MONTH)
|
|
|
AND is_food_license_expiry_permanent != 1
|
|
AND is_food_license_expiry_permanent != 1
|
|
|
THEN '食品经营许可证3个月内过期,请注意更新;'
|
|
THEN '食品经营许可证3个月内过期,请注意更新;'
|
|
|
- ELSE ''
|
|
|
|
|
- END,
|
|
|
|
|
- -- 医疗机构执业许可证
|
|
|
|
|
- CASE
|
|
|
|
|
- WHEN medical_license IS NOT NULL
|
|
|
|
|
- AND medical_license_expiry_end IS NOT NULL
|
|
|
|
|
- AND medical_license_expiry_end < CURDATE()
|
|
|
|
|
- AND is_medical_license_expiry_permanent != 1
|
|
|
|
|
- THEN '医疗机构执业许可证已过期,需要商家更新;'
|
|
|
|
|
- ELSE ''
|
|
|
|
|
- END,
|
|
|
|
|
- CASE
|
|
|
|
|
- WHEN medical_license IS NOT NULL
|
|
|
|
|
- AND medical_license_expiry_end IS NOT NULL
|
|
|
|
|
- AND medical_license_expiry_end BETWEEN CURDATE() AND DATE_ADD(CURDATE(), INTERVAL 3 MONTH)
|
|
|
|
|
- AND is_medical_license_expiry_permanent != 1
|
|
|
|
|
- THEN '医疗机构执业许可证3个月内过期,请注意更新;'
|
|
|
|
|
ELSE ''
|
|
ELSE ''
|
|
|
END
|
|
END
|
|
|
) AS warning_message
|
|
) AS warning_message
|
|
@@ -902,11 +875,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
AND food_license_expiry_end IS NOT NULL
|
|
AND food_license_expiry_end IS NOT NULL
|
|
|
AND (food_license_expiry_end < CURDATE() OR food_license_expiry_end BETWEEN CURDATE() AND DATE_ADD(CURDATE(), INTERVAL 3 MONTH))
|
|
AND (food_license_expiry_end < CURDATE() OR food_license_expiry_end BETWEEN CURDATE() AND DATE_ADD(CURDATE(), INTERVAL 3 MONTH))
|
|
|
AND is_food_license_expiry_permanent != 1)
|
|
AND is_food_license_expiry_permanent != 1)
|
|
|
- -- 医疗机构执业许可证
|
|
|
|
|
- OR (medical_license IS NOT NULL
|
|
|
|
|
- AND medical_license_expiry_end IS NOT NULL
|
|
|
|
|
- AND (medical_license_expiry_end < CURDATE() OR medical_license_expiry_end BETWEEN CURDATE() AND DATE_ADD(CURDATE(), INTERVAL 3 MONTH))
|
|
|
|
|
- AND is_medical_license_expiry_permanent != 1)
|
|
|
|
|
)
|
|
)
|
|
|
HAVING warning_message != '';
|
|
HAVING warning_message != '';
|
|
|
</select>
|
|
</select>
|