Browse Source

Merge remote-tracking branch 'origin/ScrmStores' into ScrmStores

吴树波 4 days ago
parent
commit
b9fd3f9222

+ 12 - 0
fs-admin/src/main/java/com/fs/hisStore/controller/FsStoreProductScrmController.java

@@ -292,4 +292,16 @@ public class FsStoreProductScrmController extends BaseController {
     public R auditLog(@PathVariable Long storeId){
         return R.ok().put("auditLog",storeAuditLogUtil.selectOperLogByMainId(storeId,"商品"));
     }
+
+    /**
+     * 商品复制
+     * @param product 商品对象
+     * @return R
+     * */
+    @PreAuthorize("@ss.hasPermi('his:storeProduct:copyProduct')")
+    @PostMapping("/copyProduct")
+    @Log(title = "复制商品", businessType = BusinessType.INSERT, isStoreLog = true, logParam = {"商品", "复制商品"})
+    public R copyProduct(@RequestBody FsStoreProductScrm product) {
+        return fsStoreProductService.copyProduct(product);
+    }
 }

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

@@ -461,4 +461,22 @@ public class FsStoreScrm extends BaseEntity {
      * **/
     private LocalDate qualificationUpdateTime;
 
+    //标题名称
+    private String titleNameOne;
+    private String titleNameTwo;
+    private String titleNameThree;
+    //协议是否有效
+    private Byte isEffectivePermanent1;
+    private Byte isEffectivePermanent2;
+    private Byte isEffectivePermanent3;
+
+    private String settlementAgreementFileName;
+    private String qualityAssuranceAgreementFileName;
+    private String otherSpecialQualificationFileName;
+
+    /**
+     * 到期天数
+     * **/
+    @TableField(exist = false)
+    private Integer remainDays;
 }

+ 18 - 0
fs-service/src/main/java/com/fs/hisStore/dto/ForbiddenDrugItemDTO.java

@@ -0,0 +1,18 @@
+package com.fs.hisStore.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 禁止药品项
+ * **/
+@Data
+public class ForbiddenDrugItemDTO implements Serializable {
+    private Long id; // 唯一标识
+    private String name; // 禁止品种名称
+    private String type; // 类型(1=政策禁止,2=单方制剂禁止,3=剂型禁止,4=兴奋剂禁止)
+    private Integer sortNum; // 排序号
+    private String exceptionKey; // 例外关键词
+    private String remark; // 备注
+}

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

@@ -162,4 +162,9 @@ public interface IFsStoreProductScrmService
      * @return R
      * **/
     List<String> getProductNoticeInfo(Long storeId);
+
+    /**
+     * 复制商品
+     * **/
+    R copyProduct(FsStoreProductScrm product);
 }

+ 61 - 16
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreProductScrmServiceImpl.java

@@ -31,10 +31,12 @@ import com.fs.his.vo.FsStoreProductListSVO;
 import com.fs.his.vo.OptionsVO;
 import com.fs.hisStore.config.MedicalMallConfig;
 import com.fs.hisStore.domain.*;
+import com.fs.hisStore.dto.ForbiddenDrugItemDTO;
 import com.fs.hisStore.dto.FsStoreProductScrmInfoDTO;
 import com.fs.hisStore.mapper.*;
 import com.fs.hisStore.param.FsStoreCartCountParam;
 import com.fs.hisStore.service.IFsStoreProductCategoryScrmService;
+import com.fs.hisStore.util.ForbiddenDrugListManager;
 import com.fs.hisStore.utils.StoreAuditLogUtil;
 import com.fs.hisStore.util.BusinessScopeProductTypeUtil;
 import com.fs.statis.dto.ModifyMoreDTO;
@@ -111,6 +113,12 @@ public class FsStoreProductScrmServiceImpl implements IFsStoreProductScrmService
     @Autowired
     private IFsStoreProductCategoryScrmService fsStoreProductCategoryService;
 
+    private ForbiddenDrugListManager forbiddenListManager = new ForbiddenDrugListManager();
+
+    public void init() {
+        forbiddenListManager.initDefaultList();
+    }
+
     /**
      * 查询商品
      *
@@ -453,7 +461,13 @@ public class FsStoreProductScrmServiceImpl implements IFsStoreProductScrmService
         }
 
         product.setBusinessLink(param.getBusinessLink());
-        //校验店铺资质信息
+
+        //校验是否药品网络销售禁止清单
+        if(product.getIsDrug().equals("1")){//药品进入校验
+
+
+        }
+
         //获取店铺
         FsStoreScrm store = fsStoreScrmService.selectFsStoreByStoreId(product.getStoreId());
         if (store == null || 1 != store.getStatus()) {
@@ -1398,6 +1412,52 @@ public class FsStoreProductScrmServiceImpl implements IFsStoreProductScrmService
         return fsStoreProductMapper.getProductNoticeInfo(storeId);
     }
 
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public R copyProduct(FsStoreProductScrm product) {
+        //获取复制商品信息
+        FsStoreProductScrm copyProductInfo = fsStoreProductMapper.selectFsStoreProductById(product.getProductId());
+        if(copyProductInfo==null){
+            return R.error("复制,商品数据不存在!");
+        }
+
+        copyProductInfo.setProductId(null);
+        copyProductInfo.setCreateTime(new Date());
+        copyProductInfo.setUpdateTime(new Date());
+        copyProductInfo.setIsAudit("0");
+
+        //插入复制商品
+        if(fsStoreProductMapper.insertFsStoreProduct(copyProductInfo) < 1){
+            return R.error("操作失败,复制信息异常!");
+        }
+
+        Long productId = copyProductInfo.getProductId();
+        //获取项目属性
+        List<FsStoreProductAttrScrm> attrScrmList = fsStoreProductAttrMapper.selectFsStoreProductAttrByProductId(product.getProductId());
+        if(!attrScrmList.isEmpty()){
+            attrScrmList.stream().forEach(a->{
+                a.setId(null);
+                a.setProductId(productId);
+                fsStoreProductAttrMapper.insertFsStoreProductAttr(a);
+            });
+        }
+
+        //获取对应的属性信息
+        List<FsStoreProductAttrValueScrm> attrValueScrmList = fsStoreProductAttrValueMapper.selectFsStoreProductAttrValueByProductId(product.getProductId());
+        if(!attrValueScrmList.isEmpty()){
+            attrValueScrmList.stream().forEach(a->{
+                a.setId(null);
+                a.setProductId(productId);
+                a.setCreateTime(new Date());
+                a.setUpdateTime(new Date());
+                fsStoreProductAttrValueMapper.insertFsStoreProductAttrValue(a);
+            });
+        }
+
+        storeAuditLogUtil.addOperLog(copyProductInfo.getProductId());
+        return R.ok().put("msg",new StringBuilder().append("一键复制商品/").append("商品名称:").append(product.getProductName()));
+    }
+
     @Override
     public List<Map<String, String>> getStoreProductColumns() {
         List<Map<String, String> > list = fsStoreProductMapper.getStoreProductColumns();
@@ -1441,21 +1501,6 @@ public class FsStoreProductScrmServiceImpl implements IFsStoreProductScrmService
             }
         }
         return productTypeName;
-//        if (productType == null) {
-//            return "";
-//        }
-//        switch (productType) {
-//            case 1:
-//                return "乙类非处方药";
-//            case 2:
-//                return "处方药";
-//            case 3:
-//                return "保健食品";
-//            case 4:
-//                return "III类医疗器械";
-//            default:
-//                return "";
-//        }
     }
 
     /**

+ 12 - 1
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreScrmServiceImpl.java

@@ -325,6 +325,7 @@ public class FsStoreScrmServiceImpl implements IFsStoreScrmService {
         if(fsStore.getIsAudit() != null && fsStore.getIsAudit() == 1){
             updateStore.setQualificationUpdateTime(LocalDate.now());
         }
+        updateStore.setStatus(1);
         fsStoreMapper.updateFsStore(updateStore);
         //更新日志
         storeAuditLogUtil.addAudit(fsStore.getStoreId(), fsStore.getReason(), fsStore.getAttachImage());
@@ -479,7 +480,17 @@ public class FsStoreScrmServiceImpl implements IFsStoreScrmService {
 
     @Override
     public R qualificationReminder(Long storeId) {
-        return R.ok().put("check",fsStoreMapper.qualificationReminder(storeId) != null);
+        FsStoreScrm storeScrm = fsStoreMapper.qualificationReminder(storeId);
+        if (storeScrm != null) {
+            if(storeScrm.getStatus().equals(1) && storeScrm.getRemainDays() < 0){
+                //更新店铺状态
+                FsStoreScrm fsStoreScrm =new FsStoreScrm();
+                fsStoreScrm.setStoreId(storeId);
+                fsStoreScrm.setStatus(0);
+                fsStoreMapper.updateFsStore(fsStoreScrm);
+            }
+        }
+        return R.ok().put("data",storeScrm);
     }
 
     /**

+ 112 - 0
fs-service/src/main/java/com/fs/hisStore/util/ForbiddenDrugListManager.java

@@ -0,0 +1,112 @@
+package com.fs.hisStore.util;
+
+import com.fs.hisStore.dto.ForbiddenDrugItemDTO;
+
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class ForbiddenDrugListManager {
+    private List<ForbiddenDrugItemDTO> forbiddenDrugList = new ArrayList<>();
+    private Long nextId = 1L;
+
+    /**
+     * 添加禁止药品(类似节目单添加节目)
+     * @param name 禁止品种名称
+     * @param type 类型1-4
+     * @param exceptionKey 关键字
+     * @param remark 备注
+     */
+    public void addItem(String name, String type, String exceptionKey, String remark) {
+        ForbiddenDrugItemDTO item = new ForbiddenDrugItemDTO();
+        item.setId(nextId++);
+        item.setName(name);
+        item.setType(type);
+        item.setExceptionKey(exceptionKey);
+        item.setRemark(remark);
+        int maxSort = forbiddenDrugList.stream().mapToInt(ForbiddenDrugItemDTO::getSortNum).max().orElse(0);
+        item.setSortNum(maxSort + 1);
+        forbiddenDrugList.add(item);
+        sortList();
+    }
+
+    /**
+     * 删除禁止药品
+     * @param id 禁止项ID
+     */
+    public boolean removeItem(Long id) {
+        return forbiddenDrugList.removeIf(item -> id.equals(item.getId()));
+    }
+
+    /**
+     * 调整排序
+     * @param id 禁止项ID
+     * @param direction 方向
+     */
+    public void adjustSort(Long id, String direction) {
+        ForbiddenDrugItemDTO target = forbiddenDrugList.stream()
+                .filter(item -> id.equals(item.getId()))
+                .findFirst()
+                .orElse(null);
+        if (target == null) return;
+
+        int targetIndex = forbiddenDrugList.indexOf(target);
+        int swapIndex = "up".equals(direction) ? targetIndex - 1 : targetIndex + 1;
+        if (swapIndex < 0 || swapIndex >= forbiddenDrugList.size()) return;
+        ForbiddenDrugItemDTO swapItem = forbiddenDrugList.get(swapIndex);
+        int tempSort = target.getSortNum();
+        target.setSortNum(swapItem.getSortNum());
+        swapItem.setSortNum(tempSort);
+        sortList();
+    }
+
+    /**
+     * 按排序号升序排列清单
+     */
+    private void sortList() {
+        forbiddenDrugList = forbiddenDrugList.stream()
+                .sorted(Comparator.comparingInt(ForbiddenDrugItemDTO::getSortNum))
+                .collect(Collectors.toList());
+    }
+
+    /**
+     * 获取按顺序排列的禁止清单
+     */
+    public List<ForbiddenDrugItemDTO> getSortedForbiddenList() {
+        return new ArrayList<>(forbiddenDrugList);
+    }
+
+    /**
+     * 初始化默认禁止清单
+     */
+    public void initDefaultList() {
+        //政策禁止类
+        addItem("疫苗", "1", "", "政策明确禁止");
+        addItem("血液制品", "1", "", "政策明确禁止");
+        addItem("麻醉药品", "1", "", "政策明确禁止");
+        addItem("精神药品", "1", "", "政策明确禁止");
+        addItem("医疗用毒性药品", "1", "", "政策明确禁止");
+        addItem("放射性药品", "1", "", "政策明确禁止");
+        addItem("药品类易制毒化学品", "1", "", "政策明确禁止");
+        addItem("医疗机构制剂", "1", "", "政策明确禁止");
+        addItem("中药配方颗粒", "1", "", "政策明确禁止");
+
+        //剂型禁止类
+        addItem("注射剂", "3", "降糖", "降糖类注射剂例外");
+        addItem("含麻黄碱类复方制剂", "3", "麻黄", "含麻黄中成药例外");
+        addItem("含麻醉药品口服复方制剂", "3", "", "无例外");
+        addItem("含曲马多口服复方制剂", "3", "", "无例外");
+        addItem("右美沙芬口服单方制剂", "3", "", "无例外");
+
+        //兴奋剂禁止类
+        addItem("蛋白同化制剂", "4", "胰岛素", "胰岛素例外");
+        addItem("肽类激素", "4", "胰岛素", "胰岛素例外");
+
+        //外用剂型
+        String[] singleDrugs = {"地高辛", "丙吡胺", "奎尼丁", "哌唑嗪", "普鲁卡因胺", "普罗帕酮", "胺碘酮", "奎宁"};
+        for (String drug : singleDrugs) {
+            addItem(drug, "2", "外用", "外用剂型例外");
+        }
+    }
+}

+ 14 - 9
fs-service/src/main/resources/application-config-druid-bnkc.yml

@@ -22,14 +22,14 @@ wx:
         secret: N3S6FsLjcbBFnLJ4zlHEqwKy1SbWvBi43vWacuGM89k
         token: PPKOdAlCoMO
         aesKey: PKvaxtpSv8NGpfTDm7VUHIK8Wok2ESyYX24qpXJAdMP
-#  pay:
-#    appId:  #微信公众号或者小程序等的appid
-#    mchId:  #微信支付商户号
-#    mchKey:  #微信支付商户密钥
-#    subAppId:  #服务商模式下的子商户公众账号ID
-#    subMchId:  #服务商模式下的子商户号
-#    keyPath: c:\\cert\\apiclient_cert.p12 # p12证书的位置,可以指定绝对路径,也可以指定类路径(以classpath:开头)
-#    notifyUrl: https://userapp.his.runtzh.com/app/wxpay/wxPayNotify
+  #  pay:
+  #    appId:  #微信公众号或者小程序等的appid
+  #    mchId:  #微信支付商户号
+  #    mchKey:  #微信支付商户密钥
+  #    subAppId:  #服务商模式下的子商户公众账号ID
+  #    subMchId:  #服务商模式下的子商户号
+  #    keyPath: c:\\cert\\apiclient_cert.p12 # p12证书的位置,可以指定绝对路径,也可以指定类路径(以classpath:开头)
+  #    notifyUrl: https://userapp.his.runtzh.com/app/wxpay/wxPayNotify
   mp:
     useRedis: false
     redisConfig:
@@ -55,6 +55,12 @@ watch:
   password3: v9xsKuqn_$d2y
 
 fs :
+  jwt:
+    # 加密秘钥
+    secret: 8d1e6a2f0d579f86b67cde581c0f9eb5
+    # token有效时长,7天,单位秒
+    expire: 31536000
+    header: AppToken
   commonApi: http://127.0.0.1:7771
   h5CommonApi: http://127.0.0.1:7771
 nuonuo:
@@ -90,4 +96,3 @@ wx_miniapp_temp:
   pay_order_temp_id:
   inquiry_temp_id:
 
-

+ 13 - 13
fs-service/src/main/resources/application-druid-bnkc.yml

@@ -23,25 +23,25 @@ spring:
                 # #连接池最大阻塞等待时间(使用负值表示没有限制)
                 max-wait: -1ms
     datasource:
-#        clickhouse:
-#            type: com.alibaba.druid.pool.DruidDataSource
-#            driverClassName: com.clickhouse.jdbc.ClickHouseDriver
-#            url: jdbc:clickhouse://1.14.104.71:8123/sop_test?compress=0&use_server_time_zone=true&use_client_time_zone=false&timezone=Asia/Shanghai
-#            username: rt_2024
-#            password: Yzx_19860213
-#            initialSize: 10
-#            maxActive: 100
-#            minIdle: 10
-#            maxWait: 6000
+        #        clickhouse:
+        #            type: com.alibaba.druid.pool.DruidDataSource
+        #            driverClassName: com.clickhouse.jdbc.ClickHouseDriver
+        #            url: jdbc:clickhouse://1.14.104.71:8123/sop_test?compress=0&use_server_time_zone=true&use_client_time_zone=false&timezone=Asia/Shanghai
+        #            username: rt_2024
+        #            password: Yzx_19860213
+        #            initialSize: 10
+        #            maxActive: 100
+        #            minIdle: 10
+        #            maxWait: 6000
         mysql:
             type: com.alibaba.druid.pool.DruidDataSource
             driverClassName: com.mysql.cj.jdbc.Driver
             druid:
                 # 主库数据源
                 master:
-                  url: jdbc:mysql://10.206.0.15:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-                  username: root
-                  password: Ylrz_1q2w3e4r5t6y
+                    url: jdbc:mysql://10.206.0.15:3306/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                    username: root
+                    password: Ylrz_1q2w3e4r5t6y
                 # 从库数据源
                 slave:
                     # 从数据源开关/默认关闭

+ 1 - 1
fs-service/src/main/resources/mapper/course/FsUserCoursePeriodDaysMapper.xml

@@ -42,7 +42,7 @@
                 </foreach>
             </if>
         </where>
-        order by a.day_date
+        order by c.course_sort
     </select>
     <select id="selectFsUserCoursePeriodDaysCount" parameterType="FsUserCoursePeriodDays" resultType="java.lang.Long">
         select count(a.id) from fs_user_course_period_days a

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

@@ -1590,8 +1590,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
         </if>
 
-        inner join fs_store_order_item_scrm oi on o.id = oi.order_id
-        inner join fs_store_product_scrm fsp on fsp.product_id = oi.product_id
+        left join fs_store_order_item_scrm oi on o.id = oi.order_id
+        left join fs_store_product_scrm fsp on fsp.product_id = oi.product_id
 
         LEFT JOIN (
         SELECT

+ 46 - 6
fs-service/src/main/resources/mapper/hisStore/FsStoreScrmMapper.xml

@@ -77,6 +77,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="isMedicalDevice3ExpiryPermanent" column="is_medical_device3_expiry_permanent" />
         <result property="isFoodLicenseExpiryPermanent" column="is_food_license_expiry_permanent" />
         <result property="isMedicalLicenseExpiryPermanent" column="is_medical_license_expiry_permanent" />
+        <result property="titleNameOne" column="title_Name_one" />
+        <result property="titleNameTwo" column="title_Name_two" />
+        <result property="titleNameThree" column="title_Name_three" />
+        <result property="isEffectivePermanent1" column="is_effective_permanent1" />
+        <result property="isEffectivePermanent2" column="is_effective_permanent2" />
+        <result property="isEffectivePermanent3" column="is_effective_permanent3" />
+        <result property="settlementAgreementFileName" column="settlement_agreement_file_name" />
+        <result property="qualityAssuranceAgreementFileName" column="quality_assurance_agreement_fileName" />
+        <result property="otherSpecialQualificationFileName" column="other_special_qualification_fileName" />
 
     </resultMap>
 
@@ -94,7 +103,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                other_special_qualification_start,other_special_qualification_end,is_business_license_permanent,store_seq,merchant_id,business_code,
                drug_code,medical_device1_code,medical_device2_code,medical_device3_code,food_code,medical_code,other_special_qualification_code,
                quality_assurance_agreement_code,settlement_agreement_code,is_medical_device1_expiry_permanent,
-               is_drug_license_permanent,is_medical_device2_expiry_permanent,is_medical_device3_expiry_permanent,is_food_license_expiry_permanent,is_medical_license_expiry_permanent
+               is_drug_license_permanent,is_medical_device2_expiry_permanent,is_medical_device3_expiry_permanent,is_food_license_expiry_permanent,is_medical_license_expiry_permanent,
+               title_Name_one,title_Name_two,title_Name_three,settlement_agreement_file_name,quality_assurance_agreement_fileName,other_special_qualification_fileName,
+               is_effective_permanent1,is_effective_permanent2,is_effective_permanent3
         from fs_store_scrm
     </sql>
 
@@ -205,6 +216,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isFoodLicenseExpiryPermanent !=null ">is_food_license_expiry_permanent , </if>
             <if test="isMedicalLicenseExpiryPermanent !=null ">is_medical_license_expiry_permanent , </if>
             <if test="qualificationUpdateTime !=null ">qualification_update_time , </if>
+            <if test="titleNameOne !=null ">title_Name_one , </if>
+            <if test="titleNameTwo !=null ">title_Name_two , </if>
+            <if test="titleNameThree !=null ">title_Name_three , </if>
+            <if test="isEffectivePermanent1 !=null ">is_effective_permanent1 , </if>
+            <if test="isEffectivePermanent2 !=null ">is_effective_permanent2 , </if>
+            <if test="isEffectivePermanent3 !=null ">is_effective_permanent3 , </if>
+            <if test="settlementAgreementFileName !=null ">settlement_agreement_file_name , </if>
+            <if test="qualityAssuranceAgreementFileName !=null ">quality_assurance_agreement_fileName , </if>
+            <if test="otherSpecialQualificationFileName !=null ">other_special_qualification_fileName , </if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="cityIds != null">#{cityIds},</if>
@@ -290,6 +310,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isFoodLicenseExpiryPermanent !=null ">#{isFoodLicenseExpiryPermanent} , </if>
             <if test="isMedicalLicenseExpiryPermanent !=null ">#{isMedicalLicenseExpiryPermanent} , </if>
             <if test="qualificationUpdateTime !=null ">#{qualificationUpdateTime} , </if>
+            <if test="titleNameOne !=null ">#{titleNameOne} , </if>
+            <if test="titleNameTwo !=null ">#{titleNameTwo} , </if>
+            <if test="titleNameThree !=null ">#{titleNameThree} , </if>
+            <if test="isEffectivePermanent1 !=null ">#{isEffectivePermanent1} , </if>
+            <if test="isEffectivePermanent2 !=null ">#{isEffectivePermanent2} , </if>
+            <if test="isEffectivePermanent3 !=null ">#{isEffectivePermanent3} , </if>
+            <if test="settlementAgreementFileName !=null ">#{settlementAgreementFileName} , </if>
+            <if test="qualityAssuranceAgreementFileName !=null ">#{qualityAssuranceAgreementFileName} , </if>
+            <if test="otherSpecialQualificationFileName !=null ">#{otherSpecialQualificationFileName} , </if>
         </trim>
     </insert>
 
@@ -377,6 +406,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isFoodLicenseExpiryPermanent !=null ">is_food_license_expiry_permanent = #{isFoodLicenseExpiryPermanent} , </if>
             <if test="isMedicalLicenseExpiryPermanent !=null ">is_medical_license_expiry_permanent = #{isMedicalLicenseExpiryPermanent} , </if>
             <if test="qualificationUpdateTime !=null ">qualification_update_time = #{qualificationUpdateTime} , </if>
+            <if test="titleNameOne !=null ">title_name_one = #{titleNameOne} , </if>
+            <if test="titleNameTwo !=null ">title_Name_two = #{titleNameTwo} , </if>
+            <if test="titleNameThree !=null ">title_Name_three = #{titleNameThree} , </if>
+            <if test="isEffectivePermanent1 !=null ">is_effective_permanent1 = #{isEffectivePermanent1} , </if>
+            <if test="isEffectivePermanent2 !=null ">is_effective_permanent2 = #{isEffectivePermanent2} , </if>
+            <if test="isEffectivePermanent3 !=null ">is_effective_permanent3 = #{isEffectivePermanent3} , </if>
+            <if test="settlementAgreementFileName !=null ">settlement_agreement_file_name = #{settlementAgreementFileName} , </if>
+            <if test="qualityAssuranceAgreementFileName !=null ">quality_assurance_agreement_fileName = #{qualityAssuranceAgreementFileName} , </if>
+            <if test="otherSpecialQualificationFileName !=null ">other_special_qualification_fileName = #{otherSpecialQualificationFileName} , </if>
         </trim>
         where store_id = #{storeId}
     </update>
@@ -889,7 +927,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         quality_assurance_agreement,quality_assurance_agreement_start,quality_assurance_agreement_end,other_special_qualification,
         other_special_qualification_start,other_special_qualification_end,is_business_license_permanent,store_seq,merchant_id,business_code,
         drug_code,medical_device1_code,medical_device2_code,medical_device3_code,food_code,medical_code,other_special_qualification_code,
-        quality_assurance_agreement_code,settlement_agreement_code,
+        quality_assurance_agreement_code,settlement_agreement_code,title_name_one,title_Name_two,title_Name_three,
         ( SELECT COUNT(*) FROM fs_store_product_scrm sps WHERE sps.store_id = ss.store_id ) AS productCount
         FROM
         fs_store_scrm ss
@@ -907,14 +945,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="qualificationReminder" resultType="com.fs.hisStore.domain.FsStoreScrm">
         SELECT
-        store_id
+        store_id,
+        status,
+        TIMESTAMPDIFF(DAY, CURDATE(), DATE_ADD(qualification_update_time, INTERVAL 6 MONTH)) AS remain_days
         FROM
         fs_store_scrm
         WHERE
         store_id = #{storeId}
-        AND `status` = 1
-        AND is_audit IN (- 1, 1 )
-        AND qualification_update_time &lt;= DATE_SUB(CURDATE() , INTERVAL 6 MONTH )
+        AND is_audit IN (-1, 1)
+        AND qualification_update_time IS NOT NULL
+        AND DATE_ADD(qualification_update_time, INTERVAL 6 MONTH) &lt;= DATE_ADD(CURDATE(), INTERVAL 30 DAY)
     </select>
 
     <select id="getStoreInfo" resultType="com.fs.hisStore.dto.FsStoreProductScrmInfoDTO">

+ 1 - 1
fs-service/src/main/resources/mapper/hospital580/Hospital580PrescriptionScrmMapper.xml

@@ -60,7 +60,7 @@
             fs_store_hospital580_prescription_scrm ps
                 LEFT JOIN fs_store_order_scrm sos ON ps.store_order_id = sos.id
         WHERE
-            TIMESTAMPDIFF(MINUTE, ps.create_time, NOW()) >= 4320
+            TIMESTAMPDIFF(HOUR, ps.create_time, NOW()) >= 72
           AND sos.`status` = 0
     </select>
 

+ 1 - 1
fs-service/src/main/resources/mapper/user/FsUserComplaintMapper.xml

@@ -70,7 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="images != null  and images != ''"> and c.images = #{images}</if>
             <if test="type != null "> and c.type = #{type}</if>
             <if test="linkId != null "> and c.link_id = #{linkId}</if>
-            <if test="complaintType != null "> and c.complaint_type = #{complaintType}</if>
+            <if test="complaintType != null and queryIdentifier == null"> and c.complaint_type = #{complaintType}</if>
             <if test="isHandleStore != null "> and c.is_handle_store = #{isHandleStore}</if>
             <if test="isHandlePlatform != null "> and c.is_handle_platform = #{isHandlePlatform}</if>
             <if test="isReadUser != null "> and c.is_read_user = #{isReadUser}</if>

+ 11 - 0
fs-store/src/main/java/com/fs/hisStore/controller/store/FsStoreProductScrmController.java

@@ -212,4 +212,15 @@ public TableDataInfo list(FsStoreProductScrm fsStoreProduct)
         return R.ok().put("auditLog",storeAuditLogUtil.selectOperLogByMainId(Long.valueOf(productId),"商品"));
     }
 
+    /**
+     * 商品复制
+     * @param product 商品对象
+     * @return R
+     * */
+    @PostMapping("/copyProduct")
+    @Log(title = "复制商品", businessType = BusinessType.INSERT, isStoreLog = true, logParam = {"商品", "复制商品"})
+    public R copyProduct(@RequestBody FsStoreProductScrm product) {
+        return fsStoreProductService.copyProduct(product);
+    }
+
 }