Kaynağa Gözat

添加生产许可,卫生许可,税务许可,医疗器械经营许可,营业执照

Duan_xu 3 yıl önce
ebeveyn
işleme
4d37c52f74

+ 8 - 0
src/main/java/com/caimei/www/mapper/SupplierDao.java

@@ -20,5 +20,13 @@ public interface SupplierDao {
      * @return
      */
     SupplierDetail getSupplierById(Integer supplierId);
+    /**
+     * 公司资质照片
+     */
+    List<String> getShopCertById(Integer shopId, int shopCertTypeId);
+    /**
+     * 医疗器械经营许可
+     */
+    String medicalPracticeLicense(Integer shopId);
 
 }

+ 16 - 0
src/main/java/com/caimei/www/pojo/page/SupplierDetail.java

@@ -38,6 +38,22 @@ public class SupplierDetail implements Serializable {
     private String productDesc;
     /** 网站 */
     private String site;
+    /**
+     * 医疗器械经营许可
+     */
+    private String medicalPracticeLicense;
+    /**
+     * 公司资质照片1
+     */
+    private String medicalPracticeLicenseImg1;
+    /**
+     * 公司资质照片2
+     */
+    private String medicalPracticeLicenseImg2;
+    /**
+     * 公司资质照片3
+     */
+    private String medicalPracticeLicenseImg3;
 
     private static final long serialVersionUID = 1L;
 }

+ 15 - 0
src/main/java/com/caimei/www/service/page/impl/SupplierServiceImpl.java

@@ -9,6 +9,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.util.StringUtils;
 
 import javax.annotation.Resource;
+import java.util.List;
 
 /**
  * Description
@@ -36,6 +37,20 @@ public class SupplierServiceImpl implements SupplierService {
         if (!StringUtils.isEmpty(supplier.getBusinessScope())) {
             String[] businessScope = supplier.getBusinessScope().split("/");
             supplier.setBusinessScopeArr(businessScope);
+            supplier.setMedicalPracticeLicense(supplierDao.medicalPracticeLicense(supplierId));
+        }
+        //公司资质照片
+        List<String> productionLicence = supplierDao.getShopCertById(supplierId, 2);
+        if (null != productionLicence && productionLicence.size() > 0) {
+            supplier.setMedicalPracticeLicenseImg1(productionLicence.get(0));
+        }
+        List<String> hygienicLicense = supplierDao.getShopCertById(supplierId, 5);
+        if (null != hygienicLicense && hygienicLicense.size() > 0) {
+            supplier.setMedicalPracticeLicenseImg2(hygienicLicense.get(0));
+        }
+        List<String> taxLicense = supplierDao.getShopCertById(supplierId, 6);
+        if (null != taxLicense && taxLicense.size() > 0) {
+            supplier.setMedicalPracticeLicenseImg3(taxLicense.get(0));
         }
         return supplier;
     }

+ 6 - 0
src/main/resources/mapper/SupplierMapper.xml

@@ -18,5 +18,11 @@
         from shop s
         where shopID = #{supplierId}
     </select>
+    <select id="getShopCertById" resultType="java.lang.String">
+        SELECT image FROM shopcert WHERE shopID = #{shopId} AND shopCertTypeID = #{shopCertTypeId}
+    </select>
+    <select id="medicalPracticeLicense" resultType="java.lang.String">
+        SELECT medicalPracticeLicenseImg1 FROM shop WHERE shopID = #{shopId}
+    </select>
 
 </mapper>