xuhy
2025-10-28 0f6a0e1e6b29445ff4cb416afd6a70b50aa79b48
bug修改
9个文件已修改
60 ■■■■■ 已修改文件
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TSysGoodsController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/model/TErpProcurementGoods.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TErpProcurementServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TSysActivityServiceImpl.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TSysEducationalInfoServiceImpl.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TSysLiveServiceImpl.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TSysProductIntroductionServiceImpl.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TErpProcurementMapper.xml 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TSysOrderMapper.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TSysGoodsController.java
@@ -120,6 +120,11 @@
            TCrmSupplier crmSupplier = crmSupplierService.getOne(Wrappers.lambdaQuery(TCrmSupplier.class)
                    .eq(TCrmSupplier::getUserId, user.getUserId())
                    .last("LIMIT 1"));
            if(crmSupplier.getIsAddPointsGoods() == 2){
                return R.fail("当前供应商已禁止添加积分商品");
            }
            goods.setSupplierId(crmSupplier.getId());
            sysGoodsService.save(goods);
            return R.ok(goods.getId());
ruoyi-system/src/main/java/com/ruoyi/system/model/TErpProcurementGoods.java
@@ -65,7 +65,7 @@
    @ApiModelProperty(value = "采购数量")
    @TableField("purchase_count")
    private Integer purchaseCount;
    private Integer purchaseCount=0;
    @ApiModelProperty(value = "总价")
    @TableField("total_price")
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TErpProcurementServiceImpl.java
@@ -459,7 +459,9 @@
            // 获取上一条最新的数据
            TErpProcurement tErpProcurement1 = this.baseMapper.selectOne(new QueryWrapper<TErpProcurement>().orderByDesc("create_time").orderByDesc("procurement_code").last("limit 1"));
            TErpProcurement tErpProcurement1 = this.baseMapper.selectOne(new QueryWrapper<TErpProcurement>()
                    .orderByDesc("create_time")
                    .orderByDesc("procurement_code").last("limit 1"));
            if(tErpProcurement1==null){
                tErpProcurement.setProcurementCode("C" + DateUtils.dateTimeNow()+"00001");
            }else {
@@ -485,6 +487,7 @@
            try {
                this.save(tErpProcurement);
            }catch (Exception e){
                e.printStackTrace();
                throw new RuntimeException("网络繁忙,请重试");
            }
            tErpProcurementGoods1.forEach(e -> e.setProcurementId(tErpProcurement.getId()));
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TSysActivityServiceImpl.java
@@ -10,6 +10,7 @@
import com.ruoyi.system.query.TSysActivityQuery;
import com.ruoyi.system.service.TSysActivityService;
import com.ruoyi.system.vo.TSysActivityVO;
import com.ruoyi.system.vo.TSysEducationalInfoVO;
import com.ruoyi.system.vo.TSysProductIntroductionVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -18,10 +19,7 @@
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.temporal.ChronoUnit;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.*;
import java.util.stream.Collectors;
/**
@@ -57,12 +55,7 @@
        pageInfo.setTotal(list.size());
        // 排序是否已读,未读的排前面,false排前面 true排后面
        list.stream().sorted((o1, o2) -> {
            if(o1.getIsView()){
                return 1;
            }
            return -1;
        }).collect(Collectors.toList());
        list.sort(Comparator.comparing(TSysActivityVO::getIsView));
        if (pageInfo.getTotal() > index) {
            //此时存在数据
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TSysEducationalInfoServiceImpl.java
@@ -10,11 +10,13 @@
import com.ruoyi.system.service.TSysEducationalInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.system.vo.TSysEducationalInfoVO;
import com.ruoyi.system.vo.TSysLiveVO;
import com.ruoyi.system.vo.TSysProductIntroductionVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.Comparator;
import java.util.List;
import java.util.Objects;
import java.util.Set;
@@ -53,12 +55,7 @@
        pageInfo.setTotal(list.size());
        // 排序是否已读,未读的排前面,false排前面 true排后面
        list.stream().sorted((o1, o2) -> {
            if(o1.getIsView()){
                return 1;
            }
            return -1;
        }).collect(Collectors.toList());
        list.sort(Comparator.comparing(TSysEducationalInfoVO::getIsView));
        if (pageInfo.getTotal() > index) {
            //此时存在数据
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TSysLiveServiceImpl.java
@@ -20,6 +20,7 @@
import com.ruoyi.system.utils.util.TemplateMessageSendUtil;
import com.ruoyi.system.vo.TSysActivityVO;
import com.ruoyi.system.vo.TSysLiveVO;
import com.ruoyi.system.vo.TSysProductIntroductionVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Service;
@@ -95,12 +96,7 @@
        pageInfo.setTotal(list.size());
        // 排序是否已读,未读的排前面,false排前面 true排后面
        list.stream().sorted((o1, o2) -> {
            if(o1.getIsView()){
                return 1;
            }
            return -1;
        }).collect(Collectors.toList());
        list.sort(Comparator.comparing(TSysLiveVO::getIsView));
        if (pageInfo.getTotal() > index) {
            //此时存在数据
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TSysProductIntroductionServiceImpl.java
@@ -55,7 +55,8 @@
        pageInfo.setTotal(list.size());
        // 排序是否已读,未读的排前面,false排前面 true排后面
//        list.sort(Comparator.comparing(TSysProductIntroductionVO::isView));
        // 排序:未读的排前面,已读的排后面
        list.sort(Comparator.comparing(TSysProductIntroductionVO::getIsView));
        if (pageInfo.getTotal() > index) {
            //此时存在数据
ruoyi-system/src/main/resources/mapper/system/TErpProcurementMapper.xml
@@ -158,14 +158,13 @@
        group by date_format(t1.pay_time, '%m.%d')
    </select>
    <select id="supplierSalesStatisticsTypeCount" resultType="java.lang.Integer">
        select count(1)
        select count(DISTINCT teg.type_id)
        from t_erp_procurement tep
        left join t_erp_procurement_goods tepg on tep.id = tepg.procurement_id
        left join t_erp_goods teg on tepg.goods_id = teg.id
        where tep.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        and tep.status in (3,4,5)
        and tep.supplier_id = #{supplierId}
        group by teg.type_id
    </select>
    <select id="supplierSalesStatisticsCount" resultType="java.lang.Integer">
        select count(1)
@@ -184,15 +183,16 @@
    </select>
    <select id="supplierSalesStatisticsGoodsType"
            resultType="com.ruoyi.system.vo.SupplierSalesStatisticsGoodsTypeVO">
        select count(1), tegt.goods_name
        select count(1) as goodsCount, tepg.goods_name
        from t_erp_procurement tep
                 left join t_erp_procurement_goods tepg on tep.id = tepg.procurement_id
                 left join t_erp_goods teg on tepg.goods_id = teg.id
                 left join t_erp_goods_type tegt on teg.type_id = tegt.id
        where tep.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
          and tep.status in (3,4,5)
          and tep.pay_time between #{startTime} and #{endTime}
          and tep.supplier_id = #{supplierId}
          and tepg.goods_name is not null
        group by tepg.goods_name
        having count(1) > 0
        order by count(1) desc
    </select>
    <select id="supplierSalesStatisticsGoodsCount"
ruoyi-system/src/main/resources/mapper/system/TSysOrderMapper.xml
@@ -70,12 +70,15 @@
    </select>
    <select id="clinicSalesStatisticsGoodsType"
            resultType="com.ruoyi.system.vo.ClinicSalesStatisticsGoodsTypeVO">
        select count(1), tsog.goods_name
        select count(1) as goodsCount, tsog.goods_name
        from t_sys_order tso
                 left join t_sys_order_goods tsog on tso.id = tsog.order_id
        where tso.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
          and tso.pay_time between #{startTime} and #{endTime}
          and tso.clinic_id = #{clinicId}
          and tsog.goods_name is not null
        group by tsog.goods_name
        having count(1) > 0
        order by count(1) desc
    </select>
    <select id="clinicSalesStatisticsGoodsCount"