Commit 37808869 by 邹磊浩

修改代码

parent 0d3813e8
......@@ -3,6 +3,7 @@ package com.pz.web.controller.system;
import java.util.List;
import java.util.Arrays;
import cn.hutool.core.util.RandomUtil;
import lombok.RequiredArgsConstructor;
import javax.servlet.http.HttpServletResponse;
import javax.validation.constraints.*;
......
......@@ -25,6 +25,7 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.PostConstruct;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
......@@ -187,6 +188,11 @@ public class InsertTestOrderTask {
zyphOrder.setHid(hid);
zyphOrder.setStatus(status);
zyphOrder.setVisitor(vid);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
String formattedDate = sdf.format(date);
String format = sdf.format(dateStr);
zyphOrder.setStartDay(formattedDate);
zyphOrder.setEndDay(format);
zyphOrder.setOverTime(dateStr);
zyphOrder.setCreateTime(date);
zyphOrderMapper.insert(zyphOrder);
......@@ -200,6 +206,7 @@ public class InsertTestOrderTask {
dbmyOrder.setPzShr(element.getName());
dbmyOrder.setPzShPhone(element.getPhone());
dbmyOrder.setCreateTime(date);
dbmyOrder.setIsRefrigerate(RandomUtil.randomInt(0, 2));
dbmyOrderMapper.insert(dbmyOrder);
break;
case 6:
......@@ -217,6 +224,7 @@ public class InsertTestOrderTask {
}
}
public Date randomTime() {
Calendar calendar = new GregorianCalendar();
calendar.set(Calendar.HOUR_OF_DAY, 9); // 设置开始时间为早上9点
......@@ -265,13 +273,9 @@ public class InsertTestOrderTask {
employeesDivide.setOrderId(totalOrder.getId().intValue());
employeesDivide.setOrderPrice(totalOrder.getPayMoney() + "");
double money = 0;
if (services.getFenmo() == 0) {
money = totalOrder.getPayMoney();
} else if (services.getFenmo() != 0) {
double fenmo = (double) services.getFenmo() / 100;
double fenmo = (double) 20 / 100;
double v = totalOrder.getPayMoney() * fenmo;
money = totalOrder.getPayMoney() - v;
}
Company company = companyMapper.selectById(companyId);
company.setTotalRevenue((Double.parseDouble(company.getTotalRevenue()) + money) + "");
......
......@@ -75,4 +75,13 @@ public class DbghOrderBo extends BaseEntity {
private Long userId;
/**
* 开始时间
*/
private String startTime;
/**
* 结束时间
*/
private String endTime;
}
......@@ -122,4 +122,14 @@ public class DbmyOrderBo extends BaseEntity {
private String orderSn;
private Long userId;
/**
* 开始时间
*/
private String startTime;
/**
* 结束时间
*/
private String endTime;
}
......@@ -107,4 +107,14 @@ public class DbwzOrderBo extends BaseEntity {
private String orderSn;
private Long userId;
/**
* 开始时间
*/
private String startTime;
/**
* 结束时间
*/
private String endTime;
}
......@@ -80,4 +80,14 @@ public class YypzOrderBo extends BaseEntity {
private String remark;
private Long userId;
/**
* 开始时间
*/
private String startTime;
/**
* 结束时间
*/
private String endTime;
}
......@@ -83,4 +83,14 @@ public class ZqghOrderBo extends BaseEntity {
* 预约时间段
*/
private List<String> timeOfAppointmentArr;
/**
* 开始时间
*/
private String startTime;
/**
* 结束时间
*/
private String endTime;
}
......@@ -86,4 +86,5 @@ public class ZyphOrderBo extends BaseEntity {
private String orderSn;
private Long userId;
}
......@@ -177,5 +177,7 @@ public class DbmyOrderVo {
private String isSatisfaction;
private Date createTime;
private String evaluationContent;
}
......@@ -55,6 +55,9 @@
<if test="bo.userId != null">
and co.uid = #{bo.userId}
</if>
<if test="bo.startTime != null and bo.startTime != '' and bo.endTime != null and bo.endTime != ''">
and yyod.create_time &gt; = #{bo.startTime} and yyod.create_time &lt; = #{bo.endTime}
</if>
</where>
order by yyod.visit_time desc
</select>
......
......@@ -43,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
tlo.`status` AS tStatus,
tlo.is_satisfaction AS isSatisfaction,
tlo.evaluation_content AS evaluationContent,
yyod.*
yyod.createTime as createTime
FROM
dbmy_order AS yyod
LEFT JOIN total_order AS tlo ON yyod.order_id = tlo.id
......@@ -58,6 +58,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="bo.userId != null">
and co.uid = #{bo.userId}
</if>
<if test="bo.startTime != null and bo.startTime != '' and bo.endTime != null and bo.endTime != ''">
and yyod.create_time &gt; = #{bo.startTime} and yyod.create_time &lt; = #{bo.endTime}
</if>
</where>
order by tlo.create_time desc
</select>
......
......@@ -59,6 +59,9 @@
<if test="bo.userId != null">
and co.uid = #{bo.userId}
</if>
<if test="bo.startTime != null and bo.startTime != '' and bo.endTime != null and bo.endTime != ''">
and yyod.create_time &gt; = #{bo.startTime} and yyod.create_time &lt; = #{bo.endTime}
</if>
</where>
order by yyod.visit_time desc
</select>
......
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.pz.system.mapper.YypzOrderMapper">
<resultMap type="com.pz.system.domain.YypzOrder" id="YypzOrderResult">
......@@ -57,6 +57,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="bo.userId != null">
and co.uid = #{bo.userId}
</if>
<if test="bo.startTime != null and bo.startTime != '' and bo.endTime != null and bo.endTime != ''">
and yyod.create_time &gt; = #{bo.startTime} and yyod.create_time &lt; = #{bo.endTime}
</if>
</where>
order by yyod.visit_time desc
</select>
......@@ -89,8 +92,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
total_order.is_satisfaction as evaluation_flag,
total_order.remark as description,
yypz_order.voucher,
CONVERT((1 - services.fenmo / 100), decimal(10, 2)) *
CONVERT(services.price, decimal(10, 2)) as commission,
CONVERT((1 - services.fenmo / 100), decimal (10, 2)) *
CONVERT(services.price, decimal (10, 2)) as commission,
user_vsitor.name as userName,
hospital.name as hospital,
yypz_order.did_name as department,
......@@ -109,7 +112,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectFinishTime" resultType="java.lang.String">
select visit_time
from total_order t left join yypz_order d on d.order_id = t.id
from total_order t
left join yypz_order d on d.order_id = t.id
where t.id = #{id}
</select>
</mapper>
......@@ -51,6 +51,9 @@
<if test="bo.orderSn != null and bo.orderSn != ''">
where tlo.order_sn LIKE CONCAT('%', #{bo.orderSn}, '%')
</if>
<if test="bo.startTime != null and bo.startTime != '' and bo.endTime != null and bo.endTime != ''">
and yyod.create_time &gt; = #{bo.startTime} and yyod.create_time &lt; = #{bo.endTime}
</if>
order by tlo.create_time desc
</select>
......
......@@ -61,8 +61,11 @@
<if test="bo.userId != null">
and co.uid = #{bo.userId}
</if>
<if test="bo.startTime != null and bo.startTime != '' and bo.endTime != null and bo.endTime != ''">
and yyod.create_time &gt; = #{bo.startTime} and yyod.create_time &lt; = #{bo.endTime}
</if>
</where>
order by tlo.create_time desc
order by yyod.create_time desc
</select>
<select id="selectSonOrderInfoByTotalId" resultType="com.pz.merchant.domain.vo.SonOrderVo">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment