Commit 37808869 by 邹磊浩

修改代码

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