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

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

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

@ -91,7 +91,7 @@ public class ZyShopServiceImpl implements ZyShopService {
@Override @Override
public String selectOrderBetweenThisW() { public String selectOrderBetweenThisW() {
String start_time = GetTime.getLastSevenDay(7); 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); return zyShopMapper.selectOrderBetweenThisW(start_time, end_time);
} }
@ -103,7 +103,7 @@ public class ZyShopServiceImpl implements ZyShopService {
@Override @Override
public Double selectSalesVolumeBetweenThisW() { public Double selectSalesVolumeBetweenThisW() {
String start_time = GetTime.getLastSevenDay(7); 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); return zyShopMapper.selectSalesVolumeBetweenThisW(start_time, end_time);
} }

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

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

@ -16,6 +16,6 @@
FROM FROM
zy_orders zy_orders
WHERE 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> </select>
</mapper> </mapper>

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

@ -1,5 +1,6 @@
package org.jeecg.modules.largeScreen; package org.jeecg.modules.largeScreen;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; 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.demo.zyorders.service.IZyOrdersService;
import org.jeecg.modules.orderbymakeclothplan.vo.TodayOrderAndQIriVo; import org.jeecg.modules.orderbymakeclothplan.vo.TodayOrderAndQIriVo;
import org.jeecg.modules.shop.vo.OrderSales; 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.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
@ -28,6 +32,9 @@ public class LargeScreenController {
@Autowired @Autowired
private IZyOrdersService zyOrdersService; 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