|
|
@@ -85,6 +85,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="gmpAuthStart" column="gmp_auth_start"/>
|
|
|
<result property="gmpAuthEnd" column="gmp_auth_end"/>
|
|
|
<result property="businessLink" column="business_link"/>
|
|
|
+
|
|
|
+ <result property="isBusinessPermanent" column="is_business_permanent"/>
|
|
|
+ <result property="isLicensePermanent" column="is_license_permanent"/>
|
|
|
+ <result property="isCertificatePermanent" column="is_certificate_permanent"/>
|
|
|
+ <result property="isGmpAuthPermanent" column="is_gmp_auth_permanent"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectFsStoreProductVo">
|
|
|
@@ -100,7 +105,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
license, license_start, license_end,
|
|
|
certificate, certificate_start, certificate_end,
|
|
|
voucher, voucher_start, voucher_end,
|
|
|
- gmp_auth, gmp_auth_start, gmp_auth_end,business_link
|
|
|
+ gmp_auth, gmp_auth_start, gmp_auth_end,business_link,
|
|
|
+ is_business_permanent,is_license_permanent,is_certificate_permanent,is_gmp_auth_permanent
|
|
|
from fs_store_product_scrm
|
|
|
</sql>
|
|
|
|
|
|
@@ -112,7 +118,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
p.integral, p.product_type, p.prescribe_code, p.prescribe_spec, p.prescribe_factory, p.prescribe_name,
|
|
|
p.is_display,p.tui_cate_id,p.company_ids,p.is_drug,p.drug_image,p.drug_reg_cert_no,p.common_name,p.dosage_form,
|
|
|
p.unit_price,p.batch_number,p.mah,p.mah_address,p.manufacturer,p.manufacturer_address,p.indications,p.dosage,
|
|
|
- p.adverse_reactions,p.contraindications,p.precautions,p.is_audit,p.store_id
|
|
|
+ p.adverse_reactions,p.contraindications,p.precautions,p.is_audit,p.store_id,
|
|
|
+ p.is_business_permanent,p.is_license_permanent,p.is_certificate_permanent,p.is_gmp_auth_permanent
|
|
|
from fs_store_product_scrm p
|
|
|
select product_id, video, image, slider_image, product_name, product_info, keyword, bar_code, cate_id, price, vip_price, ot_price, agent_price, postage, unit_name, sort, sales, stock, is_show, is_hot, is_benefit, is_best, is_new, description, create_time, update_time, is_postage, is_del, give_integral, cost, is_good, browse, code_path, temp_id, spec_type, is_integral, integral, product_type, prescribe_code, prescribe_spec, prescribe_factory, prescribe_name, is_display, tui_cate_id, company_ids, store_id, is_drug, drug_image, drug_reg_cert_no, common_name, dosage_form, unit_price, batch_number, mah, mah_address, manufacturer, manufacturer_address, indications, dosage, adverse_reactions, contraindications, precautions, is_audit from fs_store_product_scrm
|
|
|
</sql>
|
|
|
@@ -298,6 +305,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="gmpAuthStart != null">gmp_auth_start ,</if>
|
|
|
<if test="gmpAuthEnd != null">gmp_auth_end ,</if>
|
|
|
<if test="businessLink != null">business_link ,</if>
|
|
|
+
|
|
|
+ <if test="isBusinessPermanent != null">is_business_permanent ,</if>
|
|
|
+ <if test="isLicensePermanent != null">is_license_permanent ,</if>
|
|
|
+ <if test="isCertificatePermanent != null">is_certificate_permanent ,</if>
|
|
|
+ <if test="isGmpAuthPermanent != null">is_gmp_auth_permanent ,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="image != null and image != ''">#{image},</if>
|
|
|
@@ -383,6 +395,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="gmpAuthStart != null">#{gmpAuthStart} ,</if>
|
|
|
<if test="gmpAuthEnd != null">#{gmpAuthEnd} ,</if>
|
|
|
<if test="businessLink != null">#{businessLink} ,</if>
|
|
|
+ <if test="isBusinessPermanent != null">#{isBusinessPermanent} ,</if>
|
|
|
+ <if test="isLicensePermanent != null">#{isLicensePermanent} ,</if>
|
|
|
+ <if test="isCertificatePermanent != null">#{isCertificatePermanent} ,</if>
|
|
|
+ <if test="isGmpAuthPermanent != null">#{isGmpAuthPermanent} ,</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
@@ -472,6 +488,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="gmpAuthStart != null">gmp_auth_start = #{gmpAuthStart} ,</if>
|
|
|
<if test="gmpAuthEnd != null">gmp_auth_end = #{gmpAuthEnd} ,</if>
|
|
|
<if test="businessLink != null">business_link = #{businessLink} ,</if>
|
|
|
+
|
|
|
+ <if test="isBusinessPermanent != null">is_business_permanent = #{isBusinessPermanent} ,</if>
|
|
|
+ <if test="isLicensePermanent != null">is_license_permanent = #{isLicensePermanent} ,</if>
|
|
|
+ <if test="isCertificatePermanent != null">is_certificate_permanent = #{isCertificatePermanent} ,</if>
|
|
|
+ <if test="isGmpAuthPermanent != null">is_gmp_auth_permanent = #{isGmpAuthPermanent} ,</if>
|
|
|
</trim>
|
|
|
where product_id = #{productId}
|
|
|
</update>
|
|
|
@@ -683,6 +704,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
FROM fs_store_product_scrm
|
|
|
WHERE business_end IS NOT NULL
|
|
|
AND business_end <= DATE_ADD(CURDATE(), INTERVAL 15 DAY)
|
|
|
+ AND is_business_permanent != 1
|
|
|
<if test="storeId != null">AND store_id = #{storeId}</if>
|
|
|
|
|
|
UNION ALL
|
|
|
@@ -700,6 +722,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
FROM fs_store_product_scrm
|
|
|
WHERE license_end IS NOT NULL
|
|
|
AND license_end <= DATE_ADD(CURDATE(), INTERVAL 15 DAY)
|
|
|
+ AND is_license_permanent != 1
|
|
|
<if test="storeId != null">AND store_id = #{storeId}</if>
|
|
|
|
|
|
UNION ALL
|
|
|
@@ -717,32 +740,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
FROM fs_store_product_scrm
|
|
|
WHERE certificate_end IS NOT NULL
|
|
|
AND certificate_end <= DATE_ADD(CURDATE(), INTERVAL 15 DAY)
|
|
|
+ AND is_certificate_permanent != 1
|
|
|
<if test="storeId != null">AND store_id = #{storeId}</if>
|
|
|
|
|
|
UNION ALL
|
|
|
-
|
|
|
- SELECT
|
|
|
- CONCAT(
|
|
|
- product_name,
|
|
|
- '商品的',
|
|
|
- '备案证书有效期',
|
|
|
- CASE
|
|
|
- WHEN voucher_end < CURDATE() THEN '已过期'
|
|
|
- ELSE '即将15天内过期'
|
|
|
- END
|
|
|
- ) AS status_text
|
|
|
- FROM fs_store_product_scrm
|
|
|
- WHERE voucher_end IS NOT NULL
|
|
|
- AND voucher_end <= DATE_ADD(CURDATE(), INTERVAL 15 DAY)
|
|
|
- <if test="storeId != null">AND store_id = #{storeId}</if>
|
|
|
-
|
|
|
- UNION ALL
|
|
|
-
|
|
|
SELECT
|
|
|
CONCAT(
|
|
|
product_name,
|
|
|
'商品的',
|
|
|
- 'GMP认证有效期',
|
|
|
+ 'GMP/GSP认证证书有效期',
|
|
|
CASE
|
|
|
WHEN gmp_auth_end < CURDATE() THEN '已过期'
|
|
|
ELSE '即将15天内过期'
|
|
|
@@ -751,6 +757,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
FROM fs_store_product_scrm
|
|
|
WHERE gmp_auth_end IS NOT NULL
|
|
|
AND gmp_auth_end <= DATE_ADD(CURDATE(), INTERVAL 15 DAY)
|
|
|
+ AND is_gmp_auth_permanent != 1
|
|
|
<if test="storeId != null">AND store_id = #{storeId}</if>
|
|
|
</select>
|
|
|
<select id="getDrugExportList" resultType="com.fs.hisStore.vo.FsDrugExportVO">
|