Browse Source

修改和新增时候增加器械编码字段

Guos 1 tuần trước cách đây
mục cha
commit
3175106710

+ 5 - 0
fs-service/src/main/java/com/fs/hisStore/domain/FsStoreProductScrm.java

@@ -568,4 +568,9 @@ public class FsStoreProductScrm extends BaseEntity {
      * 添加的药品的成分
      * **/
     private String ingredient;
+
+    /**
+     * 器械编号
+     * **/
+    private String medicalDeviceCode;
 }

+ 0 - 23
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreProductScrmServiceImpl.java

@@ -453,29 +453,6 @@ public class FsStoreProductScrmServiceImpl implements IFsStoreProductScrmService
             if (store == null || 1 != store.getStatus()) {
                 return R.error("店铺不存在或未启用");
             }
-
-            //验证资质
-            switch (param.getProductType()) {
-                case 1://非处方
-                    break;
-                case 2://处方
-                    if (store.getIsDrugLicensePermanent() == 0 && StringUtils.isEmpty(store.getDrugLicense()) || "".equals(store.getDrugLicense()) && (store.getDrugLicenseExpiryEnd() == null ||  LocalDate.now().isAfter(store.getDrugLicenseExpiryEnd()))) {
-                        return R.error("店铺药品资质为空或已过期,请完善后再添加");
-                    }
-                    break;
-                case 3://食品
-                    if (store.getIsFoodLicenseExpiryPermanent() == 0 && StringUtils.isEmpty(store.getFoodLicense()) || "".equals(store.getFoodLicense()) && (store.getFoodLicenseExpiryEnd() == null ||  LocalDate.now().isAfter(store.getFoodLicenseExpiryEnd()))) {
-                        return R.error("店铺食品资质为空或已过期,请完善后再添加");
-                    }
-                    break;
-                case 4://器械
-                    if (store.getIsMedicalDevice3ExpiryPermanent() == 0 && StringUtils.isEmpty(store.getMedicalDevice3()) || "".equals(store.getMedicalDevice3()) && (store.getMedicalDevice3ExpiryEnd() == null ||  LocalDate.now().isAfter(store.getMedicalDevice3ExpiryEnd()))) {
-                        return R.error("店铺器械资质为空或已过期,请完善后再添加");
-                    }
-                    break;
-                default:
-                    return R.error("商品类型错误");
-            }
         }
 
         //基础信息

+ 6 - 5
fs-service/src/main/resources/mapper/hisStore/FsStoreProductScrmMapper.xml

@@ -86,7 +86,7 @@ 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="medicalDeviceCode" column="medical_device_code"/>
         <result property="isBusinessPermanent" column="is_business_permanent"/>
         <result property="isLicensePermanent" column="is_license_permanent"/>
         <result property="isCertificatePermanent" column="is_certificate_permanent"/>
@@ -106,7 +106,7 @@ 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,medical_device_code,
                is_business_permanent,is_license_permanent,is_certificate_permanent,is_gmp_auth_permanent
                from fs_store_product_scrm
     </sql>
@@ -119,7 +119,7 @@ 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.ingredient,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.medical_device_code,
                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
@@ -307,7 +307,7 @@ 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="medicalDeviceCode != null">medical_device_code ,</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>
@@ -398,6 +398,7 @@ 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="medicalDeviceCode != null">#{medicalDeviceCode},</if>
             <if test="isBusinessPermanent != null">#{isBusinessPermanent} ,</if>
             <if test="isLicensePermanent != null">#{isLicensePermanent} ,</if>
             <if test="isCertificatePermanent != null">#{isCertificatePermanent} ,</if>
@@ -492,7 +493,7 @@ 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="medicalDeviceCode != null">medical_device_code =#{medicalDeviceCode},</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>