Explorar el Código

商家入驻总后台协议提醒质保,其它协议上传,商家端展示所有信息,只允许修改文字,图片修改后必须重新审核

yjwang hace 1 semana
padre
commit
a644a7c86e
Se han modificado 22 ficheros con 887 adiciones y 16 borrados
  1. 26 0
      fs-admin/src/main/java/com/fs/web/controller/system/SysUserController.java
  2. 2 2
      fs-admin/src/main/resources/application.yml
  3. 31 0
      fs-service/src/main/java/com/fs/hisStore/domain/FsStoreScrm.java
  4. 7 0
      fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreProductScrmMapper.java
  5. 15 0
      fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreScrmMapper.java
  6. 177 0
      fs-service/src/main/java/com/fs/hisStore/param/FsStoreScrmInfoParam.java
  7. 24 0
      fs-service/src/main/java/com/fs/hisStore/service/IFsStoreScrmService.java
  8. 86 4
      fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreScrmServiceImpl.java
  9. 183 0
      fs-service/src/main/java/com/fs/hisStore/vo/FsStoreDetailsScrmVo.java
  10. 4 3
      fs-service/src/main/java/com/fs/hisStore/vo/FsStoreProductListQueryVO.java
  11. 8 0
      fs-service/src/main/java/com/fs/system/mapper/SysUserMapper.java
  12. 7 0
      fs-service/src/main/java/com/fs/system/service/ISysUserService.java
  13. 5 0
      fs-service/src/main/java/com/fs/system/service/impl/SysUserServiceImpl.java
  14. 1 0
      fs-service/src/main/resources/application-config-dev-yjb.yml
  15. 49 0
      fs-service/src/main/resources/mapper/hisStore/FsStoreProductScrmMapper.xml
  16. 2 0
      fs-service/src/main/resources/mapper/hisStore/FsStoreRecommendScrmMapper.xml
  17. 99 1
      fs-service/src/main/resources/mapper/hisStore/FsStoreScrmMapper.xml
  18. 15 1
      fs-service/src/main/resources/mapper/system/SysUserMapper.xml
  19. 86 0
      fs-store/src/main/java/com/fs/his/controller/FsCityController.java
  20. 14 4
      fs-store/src/main/java/com/fs/hisStore/controller/store/FsStoreScrmController.java
  21. 45 0
      fs-store/src/main/java/com/fs/system/controller/SysConfigController.java
  22. 1 1
      fs-user-app/src/main/resources/application.yml

+ 26 - 0
fs-admin/src/main/java/com/fs/web/controller/system/SysUserController.java

@@ -10,6 +10,8 @@ import com.fs.common.core.domain.model.LoginUser;
 import com.fs.common.core.page.PageDomain;
 import com.fs.common.core.page.TableSupport;
 import com.fs.common.utils.ServletUtils;
+import com.fs.framework.web.service.TokenService;
+import com.fs.hisStore.service.IFsStoreScrmService;
 import org.apache.commons.lang3.ArrayUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -56,6 +58,12 @@ public class SysUserController extends BaseController
     @Autowired
     private ISysPostService postService;
 
+    @Autowired
+    private TokenService tokenService;
+
+    @Autowired
+    private IFsStoreScrmService storeScrmService;
+
     /**
      * 获取用户列表
      */
@@ -263,4 +271,22 @@ public class SysUserController extends BaseController
         Boolean isAdmin= SecurityUtils.isAdmin(loginUser.getUser().getUserId());
         return R.ok().put("data",isAdmin);
     }
+
+    /**
+     * 通知
+     * **/
+    @GetMapping("/noticeInfo")
+    public R noticeInfo(){
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        //判断是否有权限
+        if(userService.checkUserAuthority(loginUser.getUserId())){
+            //有权限则进入判断是否协议过期
+            List<String> promptList=storeScrmService.getStoreAgreementExpiryTips();
+            if(!promptList.isEmpty()){
+                //拼接提示语句
+                return R.ok().put("code",200).put("data",promptList);
+            }
+        }
+        return R.ok().put("code",0);
+    }
 }

+ 2 - 2
fs-admin/src/main/resources/application.yml

@@ -4,11 +4,11 @@ server:
 # Spring配置
 spring:
   profiles:
-    active: druid-jnmy-test
+#    active: druid-jnmy-test
 #    active: druid-hdt
 #    active: druid-yzt
 #    active: druid-sxjz
 #    active: druid-sft
 #    active: druid-fby
-#    active: dev
+    active: dev-yjb
 

+ 31 - 0
fs-service/src/main/java/com/fs/hisStore/domain/FsStoreScrm.java

@@ -194,4 +194,35 @@ public class FsStoreScrm extends BaseEntity
     /** 医疗机构执业许可证有效期结束 */
     private LocalDate medicalLicenseExpiryEnd;
 
+    /**
+     *营业执照是否长期有效(1长期有效、0非长期有效)
+     **/
+    private Byte isBusinessLicensePermanent;
+
+    /** 其它资质-入驻协议 */
+    private String settlementAgreement;
+
+    /** 其它资质-入驻协议有效期开始 */
+    private LocalDate settlementAgreementStart;
+
+    /** 其它资质-入驻协议有效期结束 */
+    private LocalDate settlementAgreementEnd;
+
+    /** 质量保证协议 */
+    private String qualityAssuranceAgreement;
+
+    /** 质量保证协议有效期开始 */
+    private LocalDate qualityAssuranceAgreementStart;
+
+    /** 质量保证协议有效期结束 */
+    private LocalDate qualityAssuranceAgreementEnd;
+
+    /** 其它特殊资质 */
+    private String otherSpecialQualification;
+
+    /** 其它特殊资质有效期开始 */
+    private LocalDate otherSpecialQualificationStart;
+
+    /** 其它特殊资质有效期结束 */
+    private LocalDate otherSpecialQualificationEnd;
 }

+ 7 - 0
fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreProductScrmMapper.java

@@ -248,6 +248,12 @@ public interface FsStoreProductScrmMapper
             " where product_id=#{productId}")
     int incStockDecSales( @Param("num")Long num, @Param("productId")Long productId);
 
+    List<FsStoreProductListQueryVO> selectFsStoreProductNewQuery(@Param("count") int count,@Param("config") MedicalMallConfig  config);
+
+    List<FsStoreProductListQueryVO> selectFsStoreProductHotQuery(
+            @Param("count") int count,
+            @Param("config") MedicalMallConfig config);
+
     List<FsStoreProductListQueryVO> selectFsStoreProductNewQuery(Map<String, Object> params);
 
     List<FsStoreProductListQueryVO> selectFsStoreProductHotQuery(Map<String, Object> params);
@@ -263,6 +269,7 @@ public interface FsStoreProductScrmMapper
             "and  p.is_good=1 and p.is_display=1 order by p.sort desc limit #{count}")
     List<FsStoreProductListQueryVO> selectFsStoreProductGoodQuery(int count,@Param("config") MedicalMallConfig  config);
     List<FsStoreProductListQueryVO> selectFsStoreProductTuiListQuery(@Param("config") MedicalMallConfig  config);
+
     List<FsStoreProductListQueryVO> selectFsStoreProductGoodListQuery(@Param("config") MedicalMallConfig  config);
     @Select({"<script> " +
             "select count(1) from fs_store_product_scrm  " +

+ 15 - 0
fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreScrmMapper.java

@@ -1,6 +1,7 @@
 package com.fs.hisStore.mapper;
 
 import com.fs.hisStore.domain.FsStoreScrm;
+import com.fs.hisStore.vo.FsStoreDetailsScrmVo;
 import com.fs.hisStore.vo.FsStoreRecommendListVO;
 import com.fs.hisStore.vo.FsStoreScrmVO;
 import org.apache.ibatis.annotations.Param;
@@ -102,4 +103,18 @@ public interface FsStoreScrmMapper
 
     @Select("SELECT store_id,store_name from fs_store_scrm ")
     List<FsStoreScrm> selectFsStoreListOption(FsStoreScrm fsStore);
+
+    /**
+     * 获取店铺协议提示数据
+     * @return list
+     * **/
+    List<String> queryValidStoreAgreementExpiryTips();
+
+    /**
+     * 获取商铺信息
+     * @param storeId
+     * @return 对象
+     * **/
+    @Select("SELECT * FROM fs_store_scrm WHERE store_id=#{storeId}")
+    FsStoreDetailsScrmVo selectStoreInfoByStoreId(@Param("storeId") Long storeId);
 }

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

@@ -0,0 +1,177 @@
+package com.fs.hisStore.param;
+
+import com.fs.common.core.domain.BaseEntity;
+import lombok.Data;
+
+import java.time.LocalDate;
+
+/**
+ * 店铺管理对象 fs_store
+ *
+ * @author fs
+ * @date 2025-10-11
+ */
+@Data
+public class FsStoreScrmInfoParam extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** ID */
+    private Long storeId;
+
+//    /** 所属城市ids */
+//    private String cityIds;
+//
+//    /** 店铺名称 */
+//    private String storeName;
+//
+//    /** 店铺介绍 */
+//    private String descs;
+
+    /** 店铺LOGO */
+    private String logoUrl;
+
+//    /** 地址 */
+//    private String address;
+//
+//    /** 经度 */
+//    private String lng;
+//
+//    /** 维度 */
+//    private String lat;
+//
+//    /** 店铺电话 */
+//    private String phone;
+
+//    /** 资质证书 */
+//    private String licenseImages;
+//
+//    /** 商品总数 */
+//    private Long productCount;
+//
+//    /** 状态 */
+//    private Integer status;
+//
+//    /** 销量 */
+//    private Long salesCount;
+
+//    /** 余额 */
+//    private BigDecimal balance;
+
+//    /** 累计金额 */
+//    private BigDecimal totalMoney;
+
+    /** 审核状态 */
+    private Integer isAudit;
+
+//    /** 登录帐号 */
+//    private String account;
+//
+//    /** 登录密码 */
+//    private String password;
+//
+//    /** 配送方式 1=配送 ,2=到店自提 */
+//    private String shippingType;
+//
+//
+//    /** 佣金类型 */
+//    private Integer brokerageType;
+//
+//    /** 佣金比例 */
+//    private Integer brokerageRate;
+//
+//    /** 店铺全称 */
+//    private String fullName;
+//
+//    /** 退货联系电话 */
+//    private String refundPhone;
+//
+//    /** 退货地址 */
+//    private String refundAddress;
+//
+//    /** 退货联系人 */
+//    private String refundConsignee;
+//
+//    /** 配送方式 */
+//    private Integer deliveryType;
+//
+//    /** 发货联系电话 */
+//    private String sendPhone;
+//
+//    /** 企业注册地址 */
+//    private String enterpriseAddress;
+//
+//    /** 法人代表姓名 */
+//    private String legalPersonName;
+//
+//    /** 统一社会信用代码 */
+//    private String unifiedSocialCreditCode;
+//    /** 统一社会信用代码失效日期 */
+//    private String unifiedSocialCreditCodeExpireEnd;
+//
+//    /** 经营范围 */
+//    private String businessScope;
+
+    /** 营业执照图片 */
+    private String businessLicense;
+
+    /** 营业执照有效期开始 */
+    private LocalDate businessLicenseExpireStart;
+
+    /** 营业执照有效期结束 */
+    private LocalDate businessLicenseExpireEnd;
+
+    /** 药品经营许可证 */
+    private String drugLicense;
+
+    /** 药品经营许可证有效期开始 */
+    private LocalDate drugLicenseExpiryStart;
+
+    /** 药品经营许可证有效期结束 */
+    private LocalDate drugLicenseExpiryEnd;
+
+    /** 1类器械生产备案 */
+    private String medicalDevice1;
+
+    /** 1类器械生产备案有效期开始 */
+    private LocalDate medicalDevice1ExpiryStart;
+
+    /** 1类器械生产备案有效期结束 */
+    private LocalDate medicalDevice1ExpiryEnd;
+
+    /** 2类医疗器械备案 */
+    private String medicalDevice2;
+
+    /** 2类医疗器械备案有效期开始 */
+    private LocalDate medicalDevice2ExpiryStart;
+
+    /** 2类医疗器械备案有效期结束 */
+    private LocalDate medicalDevice2ExpiryEnd;
+
+    /** 3类器械经营许可证 */
+    private String medicalDevice3;
+
+    /** 3类器械经营许可证有效期开始 */
+    private LocalDate medicalDevice3ExpiryStart;
+
+    /** 3类器械经营许可证有效期结束 */
+    private LocalDate medicalDevice3ExpiryEnd;
+
+    /** 食品经营许可证 */
+    private String foodLicense;
+
+    /** 食品经营许可证有效期开始 */
+    private LocalDate foodLicenseExpiryStart;
+
+    /** 食品经营许可证有效期结束 */
+    private LocalDate foodLicenseExpiryEnd;
+
+    /** 医疗机构执业许可证 */
+    private String medicalLicense;
+
+    /** 医疗机构执业许可证有效期开始 */
+    private LocalDate medicalLicenseExpiryStart;
+
+    /** 医疗机构执业许可证有效期结束 */
+    private LocalDate medicalLicenseExpiryEnd;
+}

+ 24 - 0
fs-service/src/main/java/com/fs/hisStore/service/IFsStoreScrmService.java

@@ -2,6 +2,8 @@ package com.fs.hisStore.service;
 
 import com.fs.his.param.FsStoreAuditParam;
 import com.fs.hisStore.domain.FsStoreScrm;
+import com.fs.hisStore.param.FsStoreScrmInfoParam;
+import com.fs.hisStore.vo.FsStoreDetailsScrmVo;
 import com.fs.hisStore.vo.FsStoreRecommendListVO;
 import com.fs.hisStore.vo.FsStoreScrmVO;
 
@@ -89,4 +91,26 @@ public interface IFsStoreScrmService
     List<Map<String, String>> getStoreColumns();
 
     List<FsStoreScrm> selectFsStoreListOption(FsStoreScrm fsStore);
+
+    /**
+     * 获取店铺协议提示数据
+     * @return list
+     * **/
+    List<String> getStoreAgreementExpiryTips();
+
+    /**
+     * 查询店铺管理
+     *
+     * @param storeId 店铺管理主键
+     * @return 店铺管理
+     */
+    public FsStoreDetailsScrmVo getStoreInfoByStoreId(Long storeId);
+
+    /**
+     * 修改店铺端接口
+     *
+     * @param fsStore 店铺管理
+     * @return 结果
+     */
+    public int updateStoreInfo(FsStoreScrmInfoParam fsStore);
 }

+ 86 - 4
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreScrmServiceImpl.java

@@ -1,29 +1,31 @@
 package com.fs.hisStore.service.impl;
 
 import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
 import com.fs.common.exception.CustomException;
 import com.fs.common.utils.DateUtils;
 import com.fs.common.utils.StringUtils;
 import com.fs.his.param.FsStoreAuditParam;
 import com.fs.his.utils.ConfigUtil;
 import com.fs.his.utils.StoreMD5PasswordEncoder;
-import com.fs.hisStore.domain.FsStoreProductCategoryScrm;
 import com.fs.hisStore.domain.FsStoreProductScrm;
 import com.fs.hisStore.domain.FsStoreScrm;
-import com.fs.hisStore.mapper.FsStoreProductCategoryScrmMapper;
 import com.fs.hisStore.mapper.FsStoreProductScrmMapper;
 import com.fs.hisStore.mapper.FsStoreScrmMapper;
-import com.fs.hisStore.service.IFsHisStoreAuditLogScrmService;
+import com.fs.hisStore.param.FsStoreScrmInfoParam;
 import com.fs.hisStore.service.IFsStoreScrmService;
 import com.fs.hisStore.utils.StoreAuditLogUtil;
+import com.fs.hisStore.vo.FsStoreDetailsScrmVo;
 import com.fs.hisStore.vo.FsStoreRecommendListVO;
 import com.fs.hisStore.vo.FsStoreScrmVO;
 import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.BeanWrapper;
+import org.springframework.beans.BeanWrapperImpl;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.beans.PropertyDescriptor;
 import java.lang.reflect.Field;
 import java.math.BigDecimal;
 import java.util.*;
@@ -296,6 +298,86 @@ public class FsStoreScrmServiceImpl implements IFsStoreScrmService
         return fsStoreMapper.selectFsStoreListOption(fsStore);
     }
 
+    @Override
+    public List<String> getStoreAgreementExpiryTips() {
+        return fsStoreMapper.queryValidStoreAgreementExpiryTips();
+    }
+    @Override
+    public FsStoreDetailsScrmVo getStoreInfoByStoreId(Long storeId) {
+        return fsStoreMapper.selectStoreInfoByStoreId(storeId);
+    }
+
+    /**
+     * 修改店铺管理
+     *
+     * @param fsStore 店铺管理
+     * @return 结果
+     */
+    @Override
+    public int updateStoreInfo(FsStoreScrmInfoParam fsStore) {
+        storeAuditLogUtil.addOperLog(fsStore.getStoreId());
+        FsStoreScrm oldFsStore = fsStoreMapper.selectFsStoreByStoreId(fsStore.getStoreId());
+        fsStore.setIsAudit(oldFsStore.getIsAudit());
+        // 获取审核开关配置
+        Boolean isAuditEnabled = configUtil.generateConfigByKey("medicalMall.func.switch").getBoolean("isAudit");
+        try {
+            // 仅当开启审核功能时才进行判断
+            if (Boolean.TRUE.equals(isAuditEnabled) && oldFsStore.getIsAudit() == 1) {
+                if(getFullDiff(oldFsStore, fsStore)){
+                    fsStore.setIsAudit(0);
+                }
+            } else {
+                fsStore.setIsAudit(1);
+            }
+        } catch (Exception e) {
+            log.error("处理审核状态出错", e);
+        }
+
+        FsStoreScrm updateStore = new FsStoreScrm();
+        BeanUtils.copyProperties(fsStore, updateStore);
+        updateStore.setUpdateTime(DateUtils.getNowDate());
+        return fsStoreMapper.updateFsStore(updateStore);
+    }
+
+    /**
+     * 获取两个对象的所有差异字段(基于旧对象的所有字段,以新对象字段值为准进行对比)
+     * 只要新旧值不同就视为差异
+     */
+    private Boolean getFullDiff(FsStoreScrm oldObj, FsStoreScrmInfoParam newObj) throws IllegalAccessException {
+        Field[] newFields = newObj.getClass().getDeclaredFields();
+        for (Field oldField : newFields) {
+            oldField.setAccessible(true);
+            String fieldName = oldField.getName();
+//            if (isExcludedField(fieldName)) {
+//                continue;
+//            }
+            Object newValue = oldField.get(newObj);
+            Object oldValue = getFieldValue(oldObj, fieldName);
+            if (!Objects.equals(oldValue, newValue)) {
+              return true;
+            }
+        }
+        return false;
+    }
+
+    private Object getFieldValue(FsStoreScrm obj, String fieldName) {
+        try {
+            Field field = obj.getClass().getDeclaredField(fieldName);
+            field.setAccessible(true);
+            return field.get(obj);
+        } catch (NoSuchFieldException e) {
+            return null;
+        } catch (IllegalAccessException e) {
+            log.error("获取字段值失败: " + fieldName, e);
+            return null;
+        }
+    }
 
+//    private boolean isExcludedField(String fieldName) {
+//        Set<String> excludedFields = new HashSet<>(Arrays.asList(
+//                "balance", "createTime", "storeId","",""
+//        ));
+//        return excludedFields.contains(fieldName);
+//    }
 }
 

+ 183 - 0
fs-service/src/main/java/com/fs/hisStore/vo/FsStoreDetailsScrmVo.java

@@ -0,0 +1,183 @@
+package com.fs.hisStore.vo;
+
+import com.fs.common.core.domain.BaseEntity;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.time.LocalDate;
+
+/**
+ * 店铺管理对象 fs_store
+ *
+ * @author fs
+ * @date 2025-10-11
+ */
+@Data
+public class FsStoreDetailsScrmVo extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** ID */
+    private Long storeId;
+
+    /** 所属城市ids */
+    private String cityIds;
+
+    /** 店铺名称 */
+    private String storeName;
+
+    /** 店铺介绍 */
+    private String descs;
+
+    /** 店铺LOGO */
+    private String logoUrl;
+
+    /** 地址 */
+    private String address;
+
+    /** 经度 */
+    private String lng;
+
+    /** 维度 */
+    private String lat;
+
+    /** 店铺电话 */
+    private String phone;
+
+    /** 资质证书 */
+    private String licenseImages;
+
+    /** 商品总数 */
+    private Long productCount;
+
+    /** 状态 */
+    private Integer status;
+
+    /** 销量 */
+    private Long salesCount;
+
+    /** 余额 */
+    private BigDecimal balance;
+
+    /** 累计金额 */
+    private BigDecimal totalMoney;
+
+    /** 审核状态 */
+    private Integer isAudit;
+
+    /** 登录帐号 */
+    private String account;
+
+    /** 登录密码 */
+    private String password;
+
+    /** 配送方式 1=配送 ,2=到店自提 */
+    private String shippingType;
+
+
+    /** 佣金类型 */
+    private Integer brokerageType;
+
+    /** 佣金比例 */
+    private Integer brokerageRate;
+
+    /** 店铺全称 */
+    private String fullName;
+
+    /** 退货联系电话 */
+    private String refundPhone;
+
+    /** 退货地址 */
+    private String refundAddress;
+
+    /** 退货联系人 */
+    private String refundConsignee;
+
+    /** 配送方式 */
+    private Integer deliveryType;
+
+    /** 发货联系电话 */
+    private String sendPhone;
+
+    /** 企业注册地址 */
+    private String enterpriseAddress;
+
+    /** 法人代表姓名 */
+    private String legalPersonName;
+
+    /** 统一社会信用代码 */
+    private String unifiedSocialCreditCode;
+    /** 统一社会信用代码失效日期 */
+    private String unifiedSocialCreditCodeExpireEnd;
+
+    /** 经营范围 */
+    private String businessScope;
+
+    /** 营业执照图片 */
+    private String businessLicense;
+
+    /** 营业执照有效期开始 */
+    private LocalDate businessLicenseExpireStart;
+
+    /** 营业执照有效期结束 */
+    private LocalDate businessLicenseExpireEnd;
+
+    /** 药品经营许可证 */
+    private String drugLicense;
+
+    /** 药品经营许可证有效期开始 */
+    private LocalDate drugLicenseExpiryStart;
+
+    /** 药品经营许可证有效期结束 */
+    private LocalDate drugLicenseExpiryEnd;
+
+    /** 1类器械生产备案 */
+    private String medicalDevice1;
+
+    /** 1类器械生产备案有效期开始 */
+    private LocalDate medicalDevice1ExpiryStart;
+
+    /** 1类器械生产备案有效期结束 */
+    private LocalDate medicalDevice1ExpiryEnd;
+
+    /** 2类医疗器械备案 */
+    private String medicalDevice2;
+
+    /** 2类医疗器械备案有效期开始 */
+    private LocalDate medicalDevice2ExpiryStart;
+
+    /** 2类医疗器械备案有效期结束 */
+    private LocalDate medicalDevice2ExpiryEnd;
+
+    /** 3类器械经营许可证 */
+    private String medicalDevice3;
+
+    /** 3类器械经营许可证有效期开始 */
+    private LocalDate medicalDevice3ExpiryStart;
+
+    /** 3类器械经营许可证有效期结束 */
+    private LocalDate medicalDevice3ExpiryEnd;
+
+    /** 食品经营许可证 */
+    private String foodLicense;
+
+    /** 食品经营许可证有效期开始 */
+    private LocalDate foodLicenseExpiryStart;
+
+    /** 食品经营许可证有效期结束 */
+    private LocalDate foodLicenseExpiryEnd;
+
+    /** 医疗机构执业许可证 */
+    private String medicalLicense;
+
+    /** 医疗机构执业许可证有效期开始 */
+    private LocalDate medicalLicenseExpiryStart;
+
+    /** 医疗机构执业许可证有效期结束 */
+    private LocalDate medicalLicenseExpiryEnd;
+
+    /**
+     *营业执照是否长期有效(1长期有效、0非长期有效)
+     **/
+    private Byte isBusinessLicensePermanent;
+}

+ 4 - 3
fs-service/src/main/java/com/fs/hisStore/vo/FsStoreProductListQueryVO.java

@@ -61,8 +61,9 @@ public class FsStoreProductListQueryVO implements Serializable
 
     private Long storeId;
 
+    /** 商品类型:1非处方 2处方 */
+    private Integer productType;
 
-
-
-
+    /**包装规格**/
+    private String prescribeSpec;
 }

+ 8 - 0
fs-service/src/main/java/com/fs/system/mapper/SysUserMapper.java

@@ -130,4 +130,12 @@ public interface SysUserMapper
      * @return 结果
      */
     public SysUser checkEmailUnique(String email);
+
+    /**
+     * 校验用户是否存在设置的权限his:store:AgreementSigned
+     * @param userId
+     * @return  integer
+     * **/
+    int checkUserAuthorityByUserId(@Param("userId") Long userId);
+
 }

+ 7 - 0
fs-service/src/main/java/com/fs/system/service/ISysUserService.java

@@ -214,4 +214,11 @@ public interface ISysUserService
     public String importUser(List<SysUser> userList, Boolean isUpdateSupport, String operName);
 
     int updateUserInfo(SysUser sysuser);
+
+    /**
+     * 获取用户权限
+     * @param userId
+     * @return boolean
+     * **/
+    Boolean checkUserAuthority(Long userId);
 }

+ 5 - 0
fs-service/src/main/java/com/fs/system/service/impl/SysUserServiceImpl.java

@@ -586,4 +586,9 @@ public class SysUserServiceImpl implements ISysUserService
     public int updateUserInfo(SysUser sysuser) {
         return userMapper.updateUser(sysuser);
     }
+
+    @Override
+    public Boolean checkUserAuthority(Long userId) {
+        return userMapper.checkUserAuthorityByUserId(userId) > 0;
+    }
 }

+ 1 - 0
fs-service/src/main/resources/application-config-dev-yjb.yml

@@ -106,6 +106,7 @@ headerImg:
 ipad:
   ipadUrl: http://ipad.cdwjyyh.com
   aiApi: http://152.136.202.157:3000/api
+  commonApi: xxxx
   voiceApi:
 wx_miniapp_temp:
   pay_order_temp_id:

+ 49 - 0
fs-service/src/main/resources/mapper/hisStore/FsStoreProductScrmMapper.xml

@@ -487,4 +487,53 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </if>
         and  p.is_good=1 and p.is_display=1 order by p.sort desc
     </select>
+
+    <select id="selectFsStoreProductNewQuery" resultType="com.fs.hisStore.vo.FsStoreProductListQueryVO">
+        select p.* from fs_store_product_scrm p
+        <!-- 新增审核状态及所属店铺审核状态 -->
+        <if test="config.isAudit == '1'">
+            inner join fs_store_scrm fs on fs.store_id = p.store_id and fs.is_audit = 1
+        </if>
+        where p.is_del = 0
+        and p.is_show = 1
+        <if test="config.isAudit == '1'">
+            and p.is_audit = '1'
+        </if>
+        and p.is_new = 1
+        and p.is_display = 1
+        order by p.sort desc
+        limit #{count}
+    </select>
+    <select id="selectFsStoreProductHotQuery" resultType="com.fs.hisStore.vo.FsStoreProductListQueryVO">
+        select p.* from fs_store_product_scrm p
+        <!-- 新增审核状态及所属店铺店铺审核状态 -->
+        <if test="config.isAudit == '1'">
+            inner join fs_store_scrm fs on fs.store_id = p.store_id and fs.is_audit = 1
+        </if>
+        where p.is_del = 0
+        and p.is_show = 1
+        <if test="config.isAudit == '1'">
+            and p.is_audit = '1'
+        </if>
+        and p.is_hot = 1
+        and p.is_display = 1
+        order by p.sort desc
+        limit #{count}
+    </select>
+
+    <select id="selectFsStoreProductGoodListQuery" resultType="com.fs.hisStore.vo.FsStoreProductListQueryVO">
+        select p.* from fs_store_product_scrm p
+        <!-- 新增审核状态及所属店铺审核状态 -->
+        <if test="config.isAudit == '1'">
+            inner join fs_store_scrm fs on fs.store_id = p.store_id and fs.is_audit = 1
+        </if>
+        where p.is_del = 0
+        and p.is_show = 1
+        <if test="config.isAudit == '1'">
+            and p.is_audit = '1'
+        </if>
+        and p.is_good = 1
+        and p.is_display = 1
+        order by p.sort desc
+    </select>
 </mapper>

+ 2 - 0
fs-service/src/main/resources/mapper/hisStore/FsStoreRecommendScrmMapper.xml

@@ -58,6 +58,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         LEFT JOIN fs_store_scrm ss ON srs.store_id = ss.store_id
         <where>
             srs.status = 1
+            AND ss.`status`=1
+            AND ss.is_audit=1
             and (srs.begin_time is null or srs.begin_time &lt;= now())
             and (srs.end_time is null or srs.end_time &gt;= now())
             <if test="recommendType != null  and recommendType != ''"> and srs.recommend_type = #{recommendType}</if>

+ 99 - 1
fs-service/src/main/resources/mapper/hisStore/FsStoreScrmMapper.xml

@@ -59,6 +59,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="medicalLicense"	column="medical_license" />
         <result property="medicalLicenseExpiryStart"	column="medical_license_expiry_start" />
         <result property="medicalLicenseExpiryEnd"	column="medical_license_expiry_end" />
+
+        <result property="settlementAgreement"	column="settlement_agreement" />
+        <result property="settlementAgreementStart"	column="settlement_agreement_start" />
+        <result property="settlementAgreementEnd"	column="settlement_agreement_end" />
+        <result property="qualityAssuranceAgreement"	column="quality_assurance_agreement" />
+        <result property="qualityAssuranceAgreementStart"	column="quality_assurance_agreement_start" />
+        <result property="qualityAssuranceAgreementEnd"	column="quality_assurance_agreement_end" />
+        <result property="otherSpecialQualification"	column="other_special_qualification" />
+        <result property="otherSpecialQualificationStart"	column="other_special_qualification_start" />
+        <result property="otherSpecialQualificationEnd"	column="other_special_qualification_end" />
     </resultMap>
 
     <sql id="selectFsStoreVo">
@@ -70,7 +80,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                drug_license_expiry_start,drug_license_expiry_end,medical_device1,medical_device1_expiry_start,medical_device1_expiry_end,
                medicalDevice2,medical_device2_expiry_start,medical_device2_expiry_end,medicalDevice3,medical_device3_expiry_start,
                medical_device3_expiry_end,food_license,food_license_expiry_start,food_license_expiry_end,medical_license,
-               medical_license_expiry_start,medical_license_expiry_end
+               medical_license_expiry_start,medical_license_expiry_end,settlement_agreement,settlement_agreement_start,settlement_agreement_end,
+               quality_assurance_agreement,quality_assurance_agreement_start,quality_assurance_agreement_end,other_special_qualification,
+               other_special_qualification_start,other_special_qualification_end
         from fs_store_scrm
     </sql>
 
@@ -148,6 +160,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="medicalLicense !=null">medical_license , </if>
             <if test="medicalLicenseExpiryStart !=null ">medical_license_expiry_start , </if>
             <if test="medicalLicenseExpiryEnd !=null ">medical_license_expiry_end , </if>
+            <if test="settlementAgreement !=null ">settlement_agreement , </if>
+            <if test="settlementAgreementStart !=null ">settlement_agreement_start , </if>
+            <if test="settlementAgreementEnd !=null ">settlement_agreement_end , </if>
+            <if test="qualityAssuranceAgreement !=null ">quality_assurance_agreement , </if>
+            <if test="qualityAssuranceAgreementStart !=null ">quality_assurance_agreement_start , </if>
+            <if test="qualityAssuranceAgreementEnd !=null ">quality_assurance_agreement_end , </if>
+            <if test="otherSpecialQualification !=null ">other_special_qualification , </if>
+            <if test="otherSpecialQualificationStart !=null ">other_special_qualification_start , </if>
+            <if test="otherSpecialQualificationEnd !=null ">other_special_qualification_end , </if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="cityIds != null">#{cityIds},</if>
@@ -203,6 +224,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="medicalLicense !=null">#{medicalLicense}, </if>
             <if test="medicalLicenseExpiryStart !=null ">#{medicalLicenseExpiryStart}, </if>
             <if test="medicalLicenseExpiryEnd !=null ">#{medicalLicenseExpiryEnd}, </if>
+            <if test="isBusinessLicensePermanent !=null ">#{isBusinessLicensePermanent}, </if>
+            <if test="settlementAgreement !=null ">#{settlementAgreement} , </if>
+            <if test="settlementAgreementStart !=null ">#{settlementAgreementStart} , </if>
+            <if test="settlementAgreementEnd !=null ">#{settlementAgreementEnd} , </if>
+            <if test="qualityAssuranceAgreement !=null ">#{qualityAssuranceAgreement} , </if>
+            <if test="qualityAssuranceAgreementStart !=null ">#{qualityAssuranceAgreementStart} , </if>
+            <if test="qualityAssuranceAgreementEnd !=null ">#{qualityAssuranceAgreementEnd} , </if>
+            <if test="otherSpecialQualification !=null ">#{otherSpecialQualification} , </if>
+            <if test="otherSpecialQualificationStart !=null ">#{otherSpecialQualificationStart} , </if>
+            <if test="otherSpecialQualificationEnd !=null ">#{otherSpecialQualificationEnd} , </if>
         </trim>
     </insert>
 
@@ -262,6 +293,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="medicalLicense !=null and medicalLicense !=''"> medical_license = #{medicalLicense} ,</if>
             <if test="medicalLicenseExpiryStart !=null "> medical_license_expiry_start = #{medicalLicenseExpiryStart} ,</if>
             <if test="medicalLicenseExpiryEnd !=null "> medical_license_expiry_end = #{medicalLicenseExpiryEnd} ,</if>
+            <if test="isBusinessLicensePermanent !=null ">is_business_license_permanent = #{isBusinessLicensePermanent}, </if>
+            <if test="settlementAgreement !=null ">settlement_agreement = #{settlementAgreement} , </if>
+            <if test="settlementAgreementStart !=null ">settlement_agreement_start = #{settlementAgreementStart} , </if>
+            <if test="settlementAgreementEnd !=null ">settlement_agreement_end = #{settlementAgreementEnd} , </if>
+            <if test="qualityAssuranceAgreement !=null ">quality_assurance_agreement = #{qualityAssuranceAgreement} , </if>
+            <if test="qualityAssuranceAgreementStart !=null ">quality_assurance_agreement_start = #{qualityAssuranceAgreementStart} , </if>
+            <if test="qualityAssuranceAgreementEnd !=null ">quality_assurance_agreement_end = #{qualityAssuranceAgreementEnd} , </if>
+            <if test="otherSpecialQualification !=null ">other_special_qualification = #{otherSpecialQualification} , </if>
+            <if test="otherSpecialQualificationStart !=null ">other_special_qualification_start = #{otherSpecialQualificationStart} , </if>
+            <if test="otherSpecialQualificationEnd !=null ">other_special_qualification_end = #{otherSpecialQualificationEnd} , </if>
         </trim>
         where store_id = #{storeId}
     </update>
@@ -317,4 +358,61 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         order by store_id desc
         </where>
     </select>
+
+    <select id="queryValidStoreAgreementExpiryTips" resultType="String">
+        SELECT
+            CONCAT(
+                    store_name,
+                    '的',
+                    CASE
+                        WHEN (settlement_agreement IS NOT NULL AND settlement_agreement_end BETWEEN NOW() AND DATE_ADD(NOW(), INTERVAL 15 DAY))
+                            AND (quality_assurance_agreement IS NOT NULL AND quality_assurance_agreement_end BETWEEN NOW() AND DATE_ADD(NOW(), INTERVAL 15 DAY))
+                            THEN '结算协议和质量保证协议即将在15天内过期'
+
+                        WHEN (settlement_agreement IS NOT NULL AND settlement_agreement_end &lt; NOW())
+                            AND (quality_assurance_agreement IS NOT NULL AND quality_assurance_agreement_end &lt; NOW())
+                            THEN '结算协议和质量保证协议已过期'
+
+                        WHEN settlement_agreement IS NOT NULL AND settlement_agreement_end BETWEEN NOW() AND DATE_ADD(NOW(), INTERVAL 15 DAY)
+                            THEN '结算协议即将在15天内过期'
+
+                        WHEN settlement_agreement IS NOT NULL AND settlement_agreement_end &lt; NOW()
+                            THEN '结算协议已过期'
+
+                        WHEN quality_assurance_agreement IS NOT NULL AND quality_assurance_agreement_end BETWEEN NOW() AND DATE_ADD(NOW(), INTERVAL 15 DAY)
+                            THEN '质量保证协议即将在15天内过期'
+
+                        WHEN quality_assurance_agreement IS NOT NULL AND quality_assurance_agreement_end &lt; NOW()
+                            THEN '质量保证协议已过期'
+
+                        WHEN (settlement_agreement IS NOT NULL AND settlement_agreement_end BETWEEN NOW() AND DATE_ADD(NOW(), INTERVAL 15 DAY))
+                            AND (quality_assurance_agreement IS NOT NULL AND quality_assurance_agreement_end &lt; NOW())
+                            THEN '结算协议即将在15天内过期,质量保证协议已过期'
+
+                        WHEN (settlement_agreement IS NOT NULL AND settlement_agreement_end &lt; NOW())
+                            AND (quality_assurance_agreement IS NOT NULL AND quality_assurance_agreement_end BETWEEN NOW() AND DATE_ADD(NOW(), INTERVAL 15 DAY))
+                            THEN '结算协议已过期,质量保证协议即将在15天内过期'
+                        END
+                ) AS agreement_status
+        FROM
+            fs_store_scrm
+        WHERE
+            STATUS = 1
+          AND (
+                (
+                        settlement_agreement IS NOT NULL
+                        AND (
+                                settlement_agreement_end BETWEEN NOW() AND DATE_ADD(NOW(), INTERVAL 15 DAY)
+                                OR settlement_agreement_end &lt; NOW()
+                            )
+                    )
+                OR (
+                        quality_assurance_agreement IS NOT NULL
+                        AND (
+                                quality_assurance_agreement_end BETWEEN NOW() AND DATE_ADD(NOW(), INTERVAL 15 DAY)
+                                OR quality_assurance_agreement_end &lt; NOW()
+                            )
+                    )
+            )
+    </select>
 </mapper>

+ 15 - 1
fs-service/src/main/resources/mapper/system/SysUserMapper.xml

@@ -320,5 +320,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			#{userId}
         </foreach> 
  	</delete>
-	
+
+	<select id="checkUserAuthorityByUserId" resultType="Int">
+		SELECT count(*) from (SELECT
+								  sur.user_id
+							  FROM
+								  sys_user su
+									  INNER JOIN sys_user_role sur ON su.user_id = sur.user_id
+									  INNER JOIN sys_role sr ON sr.role_id = sur.role_id
+									  INNER JOIN sys_role_menu srm ON sr.role_id = srm.role_id
+									  INNER JOIN sys_menu sm ON srm.menu_id = sm.menu_id
+							  WHERE
+								  sm.menu_type = 'F'
+								AND sm.perms = 'his:store:AgreementSigned'
+								AND sur.user_id = #{userId}) a
+	</select>
 </mapper> 

+ 86 - 0
fs-store/src/main/java/com/fs/his/controller/FsCityController.java

@@ -0,0 +1,86 @@
+package com.fs.his.controller;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.domain.R;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.his.domain.FsCity;
+import com.fs.his.service.IFsCityService;
+import com.fs.his.utils.CityTreeUtil;
+import com.fs.his.vo.CityVO;
+import com.google.common.collect.Lists;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 城市Controller
+ *
+ * @author fs
+ * @date 2023-06-02
+ */
+@RestController
+@RequestMapping("/his/city")
+public class FsCityController extends BaseController
+{
+    @Autowired
+    private IFsCityService fsCityService;
+
+    /**
+     * 查询城市列表
+     */
+    @PreAuthorize("@ss.hasPermi('his:city:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsCity fsCity)
+    {
+        startPage();
+        List<FsCity> list = fsCityService.selectFsCityList(fsCity);
+        return getDataTable(list);
+    }
+
+
+    /**
+     * 获取城市详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('his:city:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(fsCityService.selectFsCityById(id));
+    }
+
+    @ApiOperation("获取城市数据")
+    @GetMapping("/getCitys")
+    public R getCitys(){
+        List<FsCity> list=fsCityService.selectFsCity();
+        List<CityVO> cityVOS = Lists.newArrayList();
+        for (FsCity city : list){
+            CityVO cityVO = new CityVO();
+            cityVO.setValue(Long.parseLong(city.getCityId()));
+            cityVO.setLabel(city.getCityName());
+            cityVO.setPid(Long.parseLong(city.getParentId()));
+            cityVOS.add(cityVO);
+        }
+        return R.ok().put("data", CityTreeUtil.list2TreeConverter(cityVOS, 0));
+    }
+    /**
+     * 获取区域
+     */
+    @GetMapping("/getCitysArea")
+    public R getCitysArea(){
+        return R.ok().put("data",fsCityService.getCitysArea());
+    }
+
+    @GetMapping("/getAllList")
+    public R getAllList(FsCity fsCity)
+    {
+        List<FsCity> list = fsCityService.selectFsCityList(fsCity);
+        return R.ok().put("data",list);
+    }
+}

+ 14 - 4
fs-store/src/main/java/com/fs/hisStore/controller/store/FsStoreScrmController.java

@@ -10,10 +10,11 @@ import com.fs.framework.service.TokenServiceScrm;
 import com.fs.his.param.FsStoreAuditParam;
 import com.fs.hisStore.domain.FsStoreScrm;
 import com.fs.hisStore.domain.StoreLoginUserScrm;
+import com.fs.hisStore.param.FsStoreScrmInfoParam;
 import com.fs.hisStore.service.IFsStoreScrmService;
 import com.fs.hisStore.utils.UserUtil;
+import com.fs.hisStore.vo.FsStoreDetailsScrmVo;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
@@ -83,9 +84,9 @@ public class FsStoreScrmController extends BaseController
 
     @Log(title = "店铺管理", businessType = BusinessType.UPDATE,logParam = {"店铺","修改店铺信息"},isStoreLog = true)
     @PutMapping
-    public AjaxResult edit(@RequestBody FsStoreScrm fsStore)
+    public AjaxResult edit(@RequestBody FsStoreScrmInfoParam fsStore)
     {
-        return toAjax(fsStoreService.updateFsStore(fsStore));
+        return toAjax(fsStoreService.updateStoreInfo(fsStore));
     }
     /**
      * 修改店铺logo
@@ -158,5 +159,14 @@ public class FsStoreScrmController extends BaseController
         return toAjax(fsStoreService.updateFsStoreAudit(fsStore));
     }
 
-
+    /**
+     * 获取店铺管理详细信息
+     */
+    @GetMapping("/getStoreInfo")
+    public AjaxResult getStoreInfo()
+    {
+        FsStoreScrm user = UserUtil.getLoginUser().getFsStore();
+        FsStoreDetailsScrmVo fsStore = fsStoreService.getStoreInfoByStoreId(user.getStoreId());
+        return AjaxResult.success(fsStore);
+    }
 }

+ 45 - 0
fs-store/src/main/java/com/fs/system/controller/SysConfigController.java

@@ -0,0 +1,45 @@
+package com.fs.system.controller;
+
+import cn.hutool.core.util.ObjectUtil;
+import com.fs.common.annotation.Log;
+import com.fs.common.annotation.RepeatSubmit;
+import com.fs.common.constant.UserConstants;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.domain.R;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.core.redis.RedisCache;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.SecurityUtils;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.system.domain.SysConfig;
+import com.fs.system.service.ISysConfigService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 参数配置 信息操作处理
+ *
+
+ */
+@RestController
+@RequestMapping("/system/config")
+public class SysConfigController extends BaseController
+{
+    @Autowired
+    private ISysConfigService configService;
+    @Autowired
+    public RedisCache redisCache;
+
+
+    @GetMapping(value = "/getConfigByKey/{configKey}")
+    public AjaxResult getConfigByKey(@PathVariable String configKey)
+    {
+        SysConfig config=configService.selectConfigByConfigKey(configKey);
+        return AjaxResult.success(config);
+    }
+}

+ 1 - 1
fs-user-app/src/main/resources/application.yml

@@ -13,4 +13,4 @@ spring:
 #    active: druid-sxjz
 #    active: druid-qdtst
 #    active: druid-yzt
-    active: druid-knt-test
+    active: dev-yjb