|
|
@@ -77,6 +77,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="isMedicalDevice3ExpiryPermanent" column="is_medical_device3_expiry_permanent" />
|
|
|
<result property="isFoodLicenseExpiryPermanent" column="is_food_license_expiry_permanent" />
|
|
|
<result property="isMedicalLicenseExpiryPermanent" column="is_medical_license_expiry_permanent" />
|
|
|
+ <result property="titleNameOne" column="title_Name_one" />
|
|
|
+ <result property="titleNameTwo" column="title_Name_two" />
|
|
|
+ <result property="titleNameThree" column="title_Name_three" />
|
|
|
+ <result property="isEffectivePermanent1" column="is_effective_permanent1" />
|
|
|
+ <result property="isEffectivePermanent2" column="is_effective_permanent2" />
|
|
|
+ <result property="isEffectivePermanent3" column="is_effective_permanent3" />
|
|
|
+ <result property="settlementAgreementFileName" column="settlement_agreement_file_name" />
|
|
|
+ <result property="qualityAssuranceAgreementFileName" column="quality_assurance_agreement_fileName" />
|
|
|
+ <result property="otherSpecialQualificationFileName" column="other_special_qualification_fileName" />
|
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
@@ -94,7 +103,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
other_special_qualification_start,other_special_qualification_end,is_business_license_permanent,store_seq,merchant_id,business_code,
|
|
|
drug_code,medical_device1_code,medical_device2_code,medical_device3_code,food_code,medical_code,other_special_qualification_code,
|
|
|
quality_assurance_agreement_code,settlement_agreement_code,is_medical_device1_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
|
|
|
+ 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,
|
|
|
+ is_effective_permanent1,is_effective_permanent2,is_effective_permanent3
|
|
|
from fs_store_scrm
|
|
|
</sql>
|
|
|
|
|
|
@@ -205,6 +216,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="isFoodLicenseExpiryPermanent !=null ">is_food_license_expiry_permanent , </if>
|
|
|
<if test="isMedicalLicenseExpiryPermanent !=null ">is_medical_license_expiry_permanent , </if>
|
|
|
<if test="qualificationUpdateTime !=null ">qualification_update_time , </if>
|
|
|
+ <if test="titleNameOne !=null ">title_Name_one , </if>
|
|
|
+ <if test="titleNameTwo !=null ">title_Name_two , </if>
|
|
|
+ <if test="titleNameThree !=null ">title_Name_three , </if>
|
|
|
+ <if test="isEffectivePermanent1 !=null ">is_effective_permanent1 , </if>
|
|
|
+ <if test="isEffectivePermanent2 !=null ">is_effective_permanent2 , </if>
|
|
|
+ <if test="isEffectivePermanent3 !=null ">is_effective_permanent3 , </if>
|
|
|
+ <if test="settlementAgreementFileName !=null ">settlement_agreement_file_name , </if>
|
|
|
+ <if test="qualityAssuranceAgreementFileName !=null ">quality_assurance_agreement_fileName , </if>
|
|
|
+ <if test="otherSpecialQualificationFileName !=null ">other_special_qualification_fileName , </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="cityIds != null">#{cityIds},</if>
|
|
|
@@ -290,6 +310,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="isFoodLicenseExpiryPermanent !=null ">#{isFoodLicenseExpiryPermanent} , </if>
|
|
|
<if test="isMedicalLicenseExpiryPermanent !=null ">#{isMedicalLicenseExpiryPermanent} , </if>
|
|
|
<if test="qualificationUpdateTime !=null ">#{qualificationUpdateTime} , </if>
|
|
|
+ <if test="titleNameOne !=null ">#{titleNameOne} , </if>
|
|
|
+ <if test="titleNameTwo !=null ">#{titleNameTwo} , </if>
|
|
|
+ <if test="titleNameThree !=null ">#{titleNameThree} , </if>
|
|
|
+ <if test="isEffectivePermanent1 !=null ">#{isEffectivePermanent1} , </if>
|
|
|
+ <if test="isEffectivePermanent2 !=null ">#{isEffectivePermanent2} , </if>
|
|
|
+ <if test="isEffectivePermanent3 !=null ">#{isEffectivePermanent3} , </if>
|
|
|
+ <if test="settlementAgreementFileName !=null ">#{settlementAgreementFileName} , </if>
|
|
|
+ <if test="qualityAssuranceAgreementFileName !=null ">#{qualityAssuranceAgreementFileName} , </if>
|
|
|
+ <if test="otherSpecialQualificationFileName !=null ">#{otherSpecialQualificationFileName} , </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
@@ -377,6 +406,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="isFoodLicenseExpiryPermanent !=null ">is_food_license_expiry_permanent = #{isFoodLicenseExpiryPermanent} , </if>
|
|
|
<if test="isMedicalLicenseExpiryPermanent !=null ">is_medical_license_expiry_permanent = #{isMedicalLicenseExpiryPermanent} , </if>
|
|
|
<if test="qualificationUpdateTime !=null ">qualification_update_time = #{qualificationUpdateTime} , </if>
|
|
|
+ <if test="titleNameOne !=null ">title_name_one = #{titleNameOne} , </if>
|
|
|
+ <if test="titleNameTwo !=null ">title_Name_two = #{titleNameTwo} , </if>
|
|
|
+ <if test="titleNameThree !=null ">title_Name_three = #{titleNameThree} , </if>
|
|
|
+ <if test="isEffectivePermanent1 !=null ">is_effective_permanent1 = #{isEffectivePermanent1} , </if>
|
|
|
+ <if test="isEffectivePermanent2 !=null ">is_effective_permanent2 = #{isEffectivePermanent2} , </if>
|
|
|
+ <if test="isEffectivePermanent3 !=null ">is_effective_permanent3 = #{isEffectivePermanent3} , </if>
|
|
|
+ <if test="settlementAgreementFileName !=null ">settlement_agreement_file_name = #{settlementAgreementFileName} , </if>
|
|
|
+ <if test="qualityAssuranceAgreementFileName !=null ">quality_assurance_agreement_fileName = #{qualityAssuranceAgreementFileName} , </if>
|
|
|
+ <if test="otherSpecialQualificationFileName !=null ">other_special_qualification_fileName = #{otherSpecialQualificationFileName} , </if>
|
|
|
</trim>
|
|
|
where store_id = #{storeId}
|
|
|
</update>
|
|
|
@@ -889,7 +927,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
quality_assurance_agreement,quality_assurance_agreement_start,quality_assurance_agreement_end,other_special_qualification,
|
|
|
other_special_qualification_start,other_special_qualification_end,is_business_license_permanent,store_seq,merchant_id,business_code,
|
|
|
drug_code,medical_device1_code,medical_device2_code,medical_device3_code,food_code,medical_code,other_special_qualification_code,
|
|
|
- quality_assurance_agreement_code,settlement_agreement_code,
|
|
|
+ quality_assurance_agreement_code,settlement_agreement_code,title_name_one,title_Name_two,title_Name_three,
|
|
|
( SELECT COUNT(*) FROM fs_store_product_scrm sps WHERE sps.store_id = ss.store_id ) AS productCount
|
|
|
FROM
|
|
|
fs_store_scrm ss
|
|
|
@@ -907,14 +945,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<select id="qualificationReminder" resultType="com.fs.hisStore.domain.FsStoreScrm">
|
|
|
SELECT
|
|
|
- store_id
|
|
|
+ store_id,
|
|
|
+ status,
|
|
|
+ TIMESTAMPDIFF(DAY, CURDATE(), DATE_ADD(qualification_update_time, INTERVAL 6 MONTH)) AS remain_days
|
|
|
FROM
|
|
|
fs_store_scrm
|
|
|
WHERE
|
|
|
store_id = #{storeId}
|
|
|
- AND `status` = 1
|
|
|
- AND is_audit IN (- 1, 1 )
|
|
|
- AND qualification_update_time <= DATE_SUB(CURDATE() , INTERVAL 6 MONTH )
|
|
|
+ AND is_audit IN (-1, 1)
|
|
|
+ AND qualification_update_time IS NOT NULL
|
|
|
+ AND DATE_ADD(qualification_update_time, INTERVAL 6 MONTH) <= DATE_ADD(CURDATE(), INTERVAL 30 DAY)
|
|
|
</select>
|
|
|
|
|
|
<select id="getStoreInfo" resultType="com.fs.hisStore.dto.FsStoreProductScrmInfoDTO">
|