yjwang 1 неделя назад
Родитель
Сommit
a94224a869

+ 5 - 0
fs-service/src/main/java/com/fs/hisStore/param/FsStoreScrmInfoParam.java

@@ -112,6 +112,11 @@ public class FsStoreScrmInfoParam extends BaseEntity
 //    /** 经营范围 */
 //    private String businessScope;
 
+    /**
+     *营业执照是否长期有效(1长期有效、0非长期有效)
+     **/
+    private Byte isBusinessLicensePermanent;
+
     /** 营业执照图片 */
     private String businessLicense;
 

+ 19 - 0
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreScrmServiceImpl.java

@@ -143,6 +143,16 @@ public class FsStoreScrmServiceImpl implements IFsStoreScrmService
         } catch (IllegalAccessException e) {
             log.error("获取diff出错", e);
         }
+
+        //验证资质日期是否正常
+        LocalDate today = LocalDate.now(ZoneId.of("Asia/Shanghai"));
+        if(fsStore.getBusinessLicenseExpireEnd().isBefore(today) || fsStore.getDrugLicenseExpiryEnd().isBefore(today)
+                || fsStore.getMedicalDevice2ExpiryEnd().isBefore(today) || fsStore.getMedicalLicenseExpiryEnd().isBefore(today)) {
+            fsStore.setStatus(0);
+        }else {
+            fsStore.setStatus(1);
+        }
+
         return fsStoreMapper.updateFsStore(fsStore);
     }
 
@@ -353,6 +363,15 @@ public class FsStoreScrmServiceImpl implements IFsStoreScrmService
         FsStoreScrm updateStore = new FsStoreScrm();
         BeanUtils.copyProperties(fsStore, updateStore);
         updateStore.setUpdateTime(DateUtils.getNowDate());
+        //验证资质日期是否正常
+        LocalDate today = LocalDate.now(ZoneId.of("Asia/Shanghai"));
+        if(fsStore.getBusinessLicenseExpireEnd().isBefore(today) || fsStore.getDrugLicenseExpiryEnd().isBefore(today)
+                || fsStore.getMedicalDevice2ExpiryEnd().isBefore(today) || fsStore.getMedicalLicenseExpiryEnd().isBefore(today)) {
+            updateStore.setStatus(0);
+        }else {
+            updateStore.setStatus(1);
+        }
+
         return fsStoreMapper.updateFsStore(updateStore);
     }