|
@@ -93,6 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="reportUrl" column="report_url" />
|
|
<result property="reportUrl" column="report_url" />
|
|
|
<result property="filingUrl" column="filing_url" />
|
|
<result property="filingUrl" column="filing_url" />
|
|
|
<result property="permStatus" column="perm_status" />
|
|
<result property="permStatus" column="perm_status" />
|
|
|
|
|
+ <result property="hasErpInfo" column="has_erp_info" />
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
<sql id="selectFsStoreVo">
|
|
<sql id="selectFsStoreVo">
|
|
@@ -112,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,report_url,filing_url,perm_status
|
|
|
|
|
|
|
+ ,food_license_business_scope,drug_scope_has_frozen,report_url,filing_url,perm_status,has_erp_info
|
|
|
from fs_store_scrm
|
|
from fs_store_scrm
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
|
@@ -128,6 +129,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="queryStoreId != null "> or store_id = #{queryStoreId}</if>
|
|
<if test="queryStoreId != null "> or store_id = #{queryStoreId}</if>
|
|
|
<if test="storeSeq != null and storeSeq != ''"> and store_seq like concat('%', #{storeSeq}, '%')</if>
|
|
<if test="storeSeq != null and storeSeq != ''"> and store_seq like concat('%', #{storeSeq}, '%')</if>
|
|
|
<if test="merchantId != null and merchantId != ''"> and merchant_id like concat('%', #{merchantId}, '%')</if>
|
|
<if test="merchantId != null and merchantId != ''"> and merchant_id like concat('%', #{merchantId}, '%')</if>
|
|
|
|
|
+ <if test="hasErpInfo != null"> and ifnull(has_erp_info, 0) = #{hasErpInfo}</if>
|
|
|
</where>
|
|
</where>
|
|
|
order by store_id desc
|
|
order by store_id desc
|
|
|
</select>
|
|
</select>
|
|
@@ -447,6 +449,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="reportUrl !=null ">report_url = #{reportUrl}, </if>
|
|
<if test="reportUrl !=null ">report_url = #{reportUrl}, </if>
|
|
|
<if test="filingUrl !=null ">filing_url = #{filingUrl}, </if>
|
|
<if test="filingUrl !=null ">filing_url = #{filingUrl}, </if>
|
|
|
<if test="permStatus !=null ">perm_status = #{permStatus}, </if>
|
|
<if test="permStatus !=null ">perm_status = #{permStatus}, </if>
|
|
|
|
|
+ <if test="hasErpInfo !=null ">has_erp_info = #{hasErpInfo}, </if>
|
|
|
<if test="medicalDevice2 !=null and medicalDevice2 != ''">medical_device2 = #{medicalDevice2} ,</if>
|
|
<if test="medicalDevice2 !=null and medicalDevice2 != ''">medical_device2 = #{medicalDevice2} ,</if>
|
|
|
<if test="medicalDevice2BusinessScope !=null and medicalDevice2BusinessScope != ''">medical_device2_business_scope = #{medicalDevice2BusinessScope} ,</if>
|
|
<if test="medicalDevice2BusinessScope !=null and medicalDevice2BusinessScope != ''">medical_device2_business_scope = #{medicalDevice2BusinessScope} ,</if>
|
|
|
<if test="medicalDevice2Code !=null and medicalDevice2Code != ''">medical_device2_code = #{medicalDevice2Code} ,</if>
|
|
<if test="medicalDevice2Code !=null and medicalDevice2Code != ''">medical_device2_code = #{medicalDevice2Code} ,</if>
|
|
@@ -460,6 +463,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="foodLicense !=null and foodLicense != ''">food_license = #{foodLicense} ,</if>
|
|
<if test="foodLicense !=null and foodLicense != ''">food_license = #{foodLicense} ,</if>
|
|
|
<if test="foodLicenseExpiryStart !=null">food_license_expiry_start = #{foodLicenseExpiryStart} ,</if>
|
|
<if test="foodLicenseExpiryStart !=null">food_license_expiry_start = #{foodLicenseExpiryStart} ,</if>
|
|
|
<if test="foodLicenseExpiryEnd !=null">food_license_expiry_end = #{foodLicenseExpiryEnd} ,</if>
|
|
<if test="foodLicenseExpiryEnd !=null">food_license_expiry_end = #{foodLicenseExpiryEnd} ,</if>
|
|
|
|
|
+ <if test="hasErpInfo !=null">has_erp_info = #{hasErpInfo} ,</if>
|
|
|
</trim>
|
|
</trim>
|
|
|
where store_id = #{storeId}
|
|
where store_id = #{storeId}
|
|
|
</update>
|
|
</update>
|
|
@@ -890,7 +894,7 @@ 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,
|
|
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,
|
|
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,title_name_one,title_Name_two,title_Name_three,
|
|
quality_assurance_agreement_code,settlement_agreement_code,title_name_one,title_Name_two,title_Name_three,
|
|
|
- qualification_update_time,medical_device3,
|
|
|
|
|
|
|
+ qualification_update_time,medical_device3,ss.has_erp_info,
|
|
|
DATE_ADD(qualification_update_time, INTERVAL 6 MONTH) as next_qualification_update_time,
|
|
DATE_ADD(qualification_update_time, INTERVAL 6 MONTH) as next_qualification_update_time,
|
|
|
DATEDIFF(DATE_ADD(qualification_update_time, INTERVAL 6 MONTH), NOW()) AS days_diff,
|
|
DATEDIFF(DATE_ADD(qualification_update_time, INTERVAL 6 MONTH), NOW()) AS days_diff,
|
|
|
( SELECT COUNT(*) FROM fs_store_product_scrm sps WHERE sps.store_id = ss.store_id ) AS productCount
|
|
( SELECT COUNT(*) FROM fs_store_product_scrm sps WHERE sps.store_id = ss.store_id ) AS productCount
|
|
@@ -904,6 +908,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="isAudit != null "> and is_audit = #{isAudit}</if>
|
|
<if test="isAudit != null "> and is_audit = #{isAudit}</if>
|
|
|
<if test="account != null and account != ''"> and account like concat('%', #{account}, '%')</if>
|
|
<if test="account != null and account != ''"> and account like concat('%', #{account}, '%')</if>
|
|
|
<if test="queryStoreId != null "> or store_id = #{queryStoreId}</if>
|
|
<if test="queryStoreId != null "> or store_id = #{queryStoreId}</if>
|
|
|
|
|
+ <if test="hasErpInfo != null "> and has_erp_info = #{hasErpInfo}</if>
|
|
|
<if test="daysDiffMax != null">
|
|
<if test="daysDiffMax != null">
|
|
|
<!-- 判断剩余天数范围 -->
|
|
<!-- 判断剩余天数范围 -->
|
|
|
<if test="daysDiffMax == 0">
|
|
<if test="daysDiffMax == 0">
|