master
喻忠伟 2 years ago
parent 43200f64b4
commit a1aff53bf3
  1. 30
      ant-design-vue-jeecg/src/views/zyWorkorderManagement/ZyProductionOrderList.vue
  2. 2
      jeecg-boot/jeecg-boot-module-orderbymakeclothplan/src/main/java/org/jeecg/modules/orderbymakeclothplan/controller/ZyOrderController.java
  3. 16
      jeecg-boot/jeecg-boot-module-orderbymakeclothplan/src/main/java/org/jeecg/modules/orderbymakeclothplan/service/impl/ZyOrderServiceImpl.java
  4. 4
      jeecg-boot/jeecg-boot-module-shop/src/main/java/org/jeecg/modules/shop/Service/impl/ZyShopServiceImpl.java
  5. 6
      jeecg-boot/jeecg-boot-module-shop/src/main/java/org/jeecg/modules/shop/mapper/xml/ZyShopMapper.xml
  6. 14
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/entity/ZyOrders.java
  7. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/mapper/xml/ZyOrdersMapper.xml
  8. 12
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/service/impl/ZyOrdersServiceImpl.java
  9. 27
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/largeScreen/LargeScreenController.java

@ -294,16 +294,16 @@
// align:"center",
// dataIndex: 'zipCode'
// },
{
title:'收货人',
align:"center",
dataIndex: 'receiver_dictText'
},
{
title:'联系电话',
align:"center",
dataIndex: 'mobile'
},
// {
// title:'',
// align:"center",
// dataIndex: 'receiver_dictText'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'mobile'
// },
// {
// title:'',
// align:"center",
@ -344,11 +344,11 @@
align:"center",
dataIndex: 'salesEnterpriseId_dictText'
},
{
title:'销售员',
align:"center",
dataIndex: 'salespersonId_dictText'
},
// {
// title:'',
// align:"center",
// dataIndex: 'salespersonId_dictText'
// },
// {
// title:'',
// align:"center",

@ -238,7 +238,7 @@ public class ZyOrderController {
@ApiOperation(value = "获取完成订单的百分比", notes = "获取完成订单的百分比")
@GetMapping("/percentageProduction")
public Result<?> percentageProduction() {
Double percent = orderService.percentageProduction();
Double percent = orderService.percentageProduction();
return Result.OK(percent);
}

@ -66,11 +66,8 @@ public class ZyOrderServiceImpl implements ZyOrderService {
String endTime;
Date date = new Date();
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
String todayStr = formatter.format(date);//今天
System.out.println(todayStr);
//System.out.println(todayStr);
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
//把日期往后增加一天.整数往后推,负数往前移动(1:表示明天、-1:表示昨天,0:表示今天)
@ -78,16 +75,11 @@ public class ZyOrderServiceImpl implements ZyOrderService {
//这个时间就是日期往后推一天的结果,明天
date = calendar.getTime();
String tomorrowStr = formatter.format(date);
System.out.println(tomorrowStr);
//System.out.println(tomorrowStr);
starTime = todayStr + " 00:00:00";
endTime = tomorrowStr + " 00:00:00";
System.out.println(starTime);
System.out.println(endTime);
// System.out.println(starTime);
// System.out.println(endTime);
QueryWrapper<ZyOrder> wrapper = new QueryWrapper<>();
wrapper.ge("create_time", starTime).le("create_time", endTime).eq("pay_status", 1);

@ -91,7 +91,7 @@ public class ZyShopServiceImpl implements ZyShopService {
@Override
public String selectOrderBetweenThisW() {
String start_time = GetTime.getLastSevenDay(7);
String end_time = String.format("%tF", date);
String end_time = String.format("%tF", date)+" 23:59:59";
return zyShopMapper.selectOrderBetweenThisW(start_time, end_time);
}
@ -103,7 +103,7 @@ public class ZyShopServiceImpl implements ZyShopService {
@Override
public Double selectSalesVolumeBetweenThisW() {
String start_time = GetTime.getLastSevenDay(7);
String end_time = String.format("%tF", date);
String end_time = String.format("%tF", date)+" 23:59:59";;
return zyShopMapper.selectSalesVolumeBetweenThisW(start_time, end_time);
}

@ -15,7 +15,7 @@
</select>
<!-- 查询该店铺当天所有销售额 -->
<select id="selectSalesVolumeByThisD" resultType="Integer">
<select id="selectSalesVolumeByThisD" resultType="Double">
SELECT total_money
FROM zy_order
WHERE shop_id = #{id}
@ -23,14 +23,14 @@
</select>
<!-- 查询近七日订单数 -->
<select id="selectOrderBetweenThisW" resultType="String">
<select id="selectOrderBetweenThisW" resultType="Integer">
select count(*)
from zy_orders
where payment_time BETWEEN #{start_time} AND #{end_time} AND ischild=0
</select>
<!-- 查询近七日销售额 -->
<select id="selectSalesVolumeBetweenThisW" resultType="Integer">
<select id="selectSalesVolumeBetweenThisW" resultType="Double">
SELECT sum(money) as total_money
FROM zy_orders
WHERE payment_time between #{start_time} and #{end_time} AND ischild=0

@ -65,9 +65,9 @@ public class ZyOrders implements Serializable {
@ApiModelProperty(value = "原订单id")
private java.lang.String orderId;
/**下单时间*/
@Excel(name = "下单时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@Excel(name = "下单时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "下单时间")
private java.util.Date orderTime;
/**订单编号*/
@ -101,7 +101,7 @@ public class ZyOrders implements Serializable {
private java.lang.Integer ordersType;
/**顾客id*/
@Excel(name = "顾客id", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "id")
@ApiModelProperty(value = "顾客id")
private java.lang.String userId;
/**商品条目数量*/
@ -127,9 +127,9 @@ public class ZyOrders implements Serializable {
@ApiModelProperty(value = "开户银行")
private java.lang.String bankDeposit;
/**支付时间*/
@Excel(name = "支付时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@Excel(name = "支付时间", width = 15, format = "yyyy-MM-dd hh:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "支付时间")
private java.util.Date paymentTime;
/**城市*/

@ -16,6 +16,6 @@
FROM
zy_orders
WHERE
DATE_SUB( CURDATE(), INTERVAL 7 DAY ) &lt;= DATE( create_time ) and payment_status=1 and ischild=0 ) b)
DATE_SUB( CURDATE(), INTERVAL 7 DAY ) &lt;= DATE( payment_time ) and payment_status=1 and ischild=0 ) b)
</select>
</mapper>

@ -103,11 +103,7 @@ public class ZyOrdersServiceImpl extends ServiceImpl<ZyOrdersMapper, ZyOrders> i
String endTime;
Date date = new Date();
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
String todayStr = formatter.format(date);//今天
//System.out.println(todayStr);
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
//把日期往后增加一天.整数往后推,负数往前移动(1:表示明天、-1:表示昨天,0:表示今天)
@ -116,15 +112,9 @@ public class ZyOrdersServiceImpl extends ServiceImpl<ZyOrdersMapper, ZyOrders> i
date = calendar.getTime();
String tomorrowStr = formatter.format(date);
//System.out.println(tomorrowStr);
starTime = todayStr + " 00:00:00";
endTime = tomorrowStr + " 00:00:00";
// System.out.println(starTime);
// System.out.println(endTime);
QueryWrapper<ZyOrders> wrapper = new QueryWrapper<>();
wrapper.ge("create_time", starTime).le("create_time", endTime).eq("payment_status", 1);
@ -216,6 +206,8 @@ public class ZyOrdersServiceImpl extends ServiceImpl<ZyOrdersMapper, ZyOrders> i
zyOrders.setSalespersonId(zyOrdersJk.getSalespersonId());
zyOrders.setLogisticsEnterprisesId(zyOrdersJk.getLogisticsEnterprisesId());
zyOrders.setDeliveryStatus(0);
zyOrders.setPaymentStatus(1);
zyOrders.setPaymentTime(new Date());
baseMapper.insert(zyOrders);
for(int j = 0 ; j < orderGoodsJkList.size() ; j++){
ZyGoods zyGoods = zyGoodsMapper.selectById(orderGoodsJkList.get(j).getGoodsId());

@ -1,5 +1,6 @@
package org.jeecg.modules.largeScreen;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
@ -9,9 +10,12 @@ import org.jeecg.modules.demo.zyorders.entity.ZyOrders;
import org.jeecg.modules.demo.zyorders.service.IZyOrdersService;
import org.jeecg.modules.orderbymakeclothplan.vo.TodayOrderAndQIriVo;
import org.jeecg.modules.shop.vo.OrderSales;
import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.service.ISysDepartService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
/**
@ -28,6 +32,9 @@ public class LargeScreenController {
@Autowired
private IZyOrdersService zyOrdersService;
@Autowired
private ISysDepartService sysDepartService;
/********************************************订单大数据监控系统********************************************/
@ -88,4 +95,24 @@ public class LargeScreenController {
}
}
//店铺list
@AutoLog(value = "获取今日订单及七日订单")
@ApiOperation(value = "获取今日订单及七日订单", notes = "获取今日订单及七日订单")
@GetMapping("/getShopList")
public Result<?> getShopList() {
QueryWrapper<SysDepart> qw=new QueryWrapper();
//查询店铺和网店
List<String> data=new ArrayList<>();
data.add("5");
data.add("4");
qw.in("org_category",data);
List<SysDepart> list = sysDepartService.list(qw);
if (list.isEmpty()){
return Result.OK("未查询到店铺信息");
}
return Result.OK(list);
}
}

Loading…
Cancel
Save