优化首页统计;更新sdk
This commit is contained in:
parent
0460c3157c
commit
d82ce4e052
|
|
@ -30,12 +30,13 @@ public class ReportController extends BaseController {
|
|||
public AjaxResult todayDaily()
|
||||
{
|
||||
Long shopCount = shopService.list().stream().count();
|
||||
Map<String,Double> result = new HashMap<>();
|
||||
Map<String,Object> result = new HashMap<>();
|
||||
// 今日销售
|
||||
SalesDailyVo todaySalesDaily = orderService.getTodaySalesDaily();
|
||||
// 查询库存
|
||||
Long allInventoryQuantity = inventoryService.getAllInventoryQuantity();
|
||||
result.put("inventory",allInventoryQuantity.doubleValue());
|
||||
// Long allInventoryQuantity = inventoryService.getAllInventoryQuantity();
|
||||
// result.put("inventory",allInventoryQuantity.doubleValue());
|
||||
result.put("waitShip",orderService.getWaitShipOrderAllCount());
|
||||
result.put("salesVolume",todaySalesDaily.getAmount());
|
||||
result.put("orderCount",todaySalesDaily.getCount().doubleValue());
|
||||
result.put("shopCount",shopCount.doubleValue());
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -89,7 +89,7 @@
|
|||
<artifactId>open-sdk</artifactId>
|
||||
<version>1.0.2</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/libs/open-sdk-1.4.20.jar</systemPath>
|
||||
<systemPath>${project.basedir}/libs/open-sdk-1.4.30.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import cn.qihangerp.module.order.domain.OOrder;
|
|||
import cn.qihangerp.module.order.domain.vo.OrderDiscountVo;
|
||||
import cn.qihangerp.module.order.domain.vo.SalesDailyVo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -21,6 +22,7 @@ public interface OOrderMapper extends BaseMapper<OOrder> {
|
|||
|
||||
List<SalesDailyVo> salesDaily();
|
||||
SalesDailyVo getTodaySalesDaily();
|
||||
Integer getWaitShipOrderAllCount();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -39,11 +39,12 @@ public interface OOrderService extends IService<OOrder> {
|
|||
|
||||
/**
|
||||
* 手动添加订单
|
||||
* @param bo
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
// int insertErpOrder(OrderCreateBo bo,String createBy);
|
||||
|
||||
List<SalesDailyVo> salesDaily();
|
||||
SalesDailyVo getTodaySalesDaily();
|
||||
Integer getWaitShipOrderAllCount();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1455,6 +1455,11 @@ public class OOrderServiceImpl extends ServiceImpl<OOrderMapper, OOrder>
|
|||
return orderMapper.getTodaySalesDaily();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getWaitShipOrderAllCount() {
|
||||
return orderMapper.getWaitShipOrderAllCount();
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 新增订单
|
||||
// *
|
||||
|
|
|
|||
|
|
@ -99,5 +99,11 @@
|
|||
|
||||
WHERE DATE(`order_time`) = CURDATE();
|
||||
</select>
|
||||
|
||||
<select id="getWaitShipOrderAllCount" resultType="int">
|
||||
SELECT
|
||||
COUNT(*) AS count
|
||||
FROM
|
||||
o_order as o
|
||||
WHERE order_status=1
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -33,9 +33,9 @@
|
|||
</div>
|
||||
<div class="card-panel-description">
|
||||
<div class="card-panel-text">
|
||||
当前库存
|
||||
待发货
|
||||
</div>
|
||||
<count-to :start-val="0" :end-val="chartData.inventory" :duration="3000" class="card-panel-num" />
|
||||
<count-to :start-val="0" :end-val="chartData.waitShip" :duration="3000" class="card-panel-num" />
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ export default {
|
|||
]
|
||||
},
|
||||
report:{
|
||||
inventory:50,
|
||||
waitShip:0,
|
||||
salesVolume:5989.98,
|
||||
orderCount:302,
|
||||
shopCount:8
|
||||
|
|
|
|||
|
|
@ -60,7 +60,16 @@
|
|||
@click="handlePull"
|
||||
>API拉取商品数据</el-button>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-refresh"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handlePushOms"
|
||||
>推送到商品库&一键关联</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
|
|
@ -143,6 +152,7 @@ export default {
|
|||
goodsList:[],
|
||||
shopList:[],
|
||||
skuList:[],
|
||||
|
||||
// 是否显示弹出层
|
||||
detailOpen:false,
|
||||
skuListLoading:false,
|
||||
|
|
|
|||
Loading…
Reference in New Issue