Explorar el Código

店铺管理修改添加校验逻辑

wangxy hace 1 semana
padre
commit
2417e6865c

+ 7 - 6
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreScrmServiceImpl.java

@@ -185,13 +185,14 @@ public class FsStoreScrmServiceImpl implements IFsStoreScrmService {
 
         //验证资质日期是否正常
         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.getStatus() == 0) {
-            fsStore.setStatus(0);
-        } else {
-            fsStore.setStatus(1);
+        if (Objects.equals(String.valueOf(fsStore.getIsBusinessLicensePermanent()), "0")) {
+            if (fsStore.getBusinessLicenseExpireEnd().isBefore(today) || fsStore.getDrugLicenseExpiryEnd().isBefore(today)
+                    || fsStore.getMedicalDevice2ExpiryEnd().isBefore(today) || fsStore.getMedicalLicenseExpiryEnd().isBefore(today) || fsStore.getStatus() == 0) {
+                fsStore.setStatus(0);
+            } else {
+                fsStore.setStatus(1);
+            }
         }
-
         return fsStoreMapper.updateFsStore(fsStore);
     }