| | |
| | | // 其余的添加到其他 |
| | | List<SupplierSalesStatisticsGoodsTypeVO> otherList = supplierSalesStatisticsGoodsTypeVOS.subList(9, supplierSalesStatisticsGoodsTypeVOS.size()); |
| | | SupplierSalesStatisticsGoodsTypeVO other = new SupplierSalesStatisticsGoodsTypeVO(); |
| | | other.setTypeName("其他"); |
| | | other.setGoodsName("其他"); |
| | | other.setGoodsCount(otherList.stream().mapToInt(SupplierSalesStatisticsGoodsTypeVO::getGoodsCount).sum()); |
| | | supplierSalesStatisticsGoodsTypeVOS.add(other); |
| | | supplierSalesStatisticsGoodsTypeVOS = supplierSalesStatisticsGoodsTypeVOS.subList(0, 9); |
| | |
| | | // 其余的添加到其他 |
| | | List<ClinicSalesStatisticsGoodsTypeVO> otherList = clinicSalesStatisticsGoodsTypeVOS.subList(9, clinicSalesStatisticsGoodsTypeVOS.size()); |
| | | ClinicSalesStatisticsGoodsTypeVO other = new ClinicSalesStatisticsGoodsTypeVO(); |
| | | other.setTypeName("其他"); |
| | | other.setGoodsName("其他"); |
| | | other.setGoodsCount(otherList.stream().mapToInt(ClinicSalesStatisticsGoodsTypeVO::getGoodsCount).sum()); |
| | | clinicSalesStatisticsGoodsTypeVOS.add(other); |
| | | clinicSalesStatisticsGoodsTypeVOS = clinicSalesStatisticsGoodsTypeVOS.subList(0, 9); |
| | |
| | | private String payTimeStr; |
| | | @Excel(name = "采购金额", width = 20) |
| | | private BigDecimal payMoney; |
| | | @Excel(name = "供应商获得金额", width = 20) |
| | | private BigDecimal money; |
| | | @Excel(name = "平台分佣金额", width = 20) |
| | | private BigDecimal money; |
| | | @Excel(name = "供应商获得金额", width = 20) |
| | | private BigDecimal supplierMoney; |
| | | private LocalDateTime payTime; |
| | | |
| | |
| | | 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; |
| | |
| | | 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(TSysProductIntroductionVO::isView)); |
| | | |
| | | if (pageInfo.getTotal() > index) { |
| | | //此时存在数据 |
| | |
| | | @Data |
| | | @ApiModel(value = "诊所销售统计销售前十占比ClinicSalesStatisticsGoodsTypeVO") |
| | | public class ClinicSalesStatisticsGoodsTypeVO implements Serializable { |
| | | @ApiModelProperty(value = "类型名称") |
| | | private String typeName; |
| | | @ApiModelProperty(value = "商品名称") |
| | | private String goodsName; |
| | | @ApiModelProperty(value = "商品数量") |
| | | private Integer goodsCount; |
| | | |
| | |
| | | @Data |
| | | @ApiModel(value = "供应商销售统计销售前十占比SupplierSalesStatisticsGoodsTypeVO") |
| | | public class SupplierSalesStatisticsGoodsTypeVO implements Serializable { |
| | | @ApiModelProperty(value = "类型名称") |
| | | private String typeName; |
| | | @ApiModelProperty(value = "商品名称") |
| | | private String goodsName; |
| | | @ApiModelProperty(value = "商品数量") |
| | | private Integer goodsCount=0; |
| | | |
| | |
| | | </select> |
| | | <select id="supplierSalesStatisticsGoodsType" |
| | | resultType="com.ruoyi.system.vo.SupplierSalesStatisticsGoodsTypeVO"> |
| | | select count(1), tegt.type_name |
| | | select count(1), tegt.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 |
| | |
| | | and tep.status in (3,4,5) |
| | | and tep.pay_time between #{startTime} and #{endTime} |
| | | and tep.supplier_id = #{supplierId} |
| | | group by teg.type_id |
| | | order by count(1) desc |
| | | </select> |
| | | <select id="supplierSalesStatisticsGoodsCount" |
| | |
| | | </select> |
| | | <select id="clinicSalesStatisticsGoodsType" |
| | | resultType="com.ruoyi.system.vo.ClinicSalesStatisticsGoodsTypeVO"> |
| | | select count(1), tegt.type_name |
| | | select count(1), tsog.goods_name |
| | | from t_sys_order tso |
| | | left join t_sys_order_goods tsog on tso.id = tsog.order_id |
| | | left join t_erp_goods teg on tsog.goods_id = teg.id |
| | | left join t_erp_goods_type tegt on teg.type_id = tegt.id |
| | | where tso.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | and tso.pay_time between #{startTime} and #{endTime} |
| | | and tso.clinic_id = #{clinicId} |
| | | group by teg.type_id |
| | | order by count(1) desc |
| | | </select> |
| | | <select id="clinicSalesStatisticsGoodsCount" |