代码合并
This commit is contained in:
@ -4,6 +4,7 @@ import com.aliyun.vod20170321.models.GetPlayInfoResponseBody;
|
||||
import com.aliyun.vod20170321.models.GetVideoInfoResponseBody;
|
||||
import com.stdiet.common.core.controller.BaseController;
|
||||
import com.stdiet.common.core.domain.AjaxResult;
|
||||
import com.stdiet.common.core.domain.entity.SysDictData;
|
||||
import com.stdiet.common.core.page.TableDataInfo;
|
||||
import com.stdiet.common.exception.file.FileNameLengthLimitExceededException;
|
||||
import com.stdiet.common.utils.AliyunVideoUtils;
|
||||
@ -19,6 +20,7 @@ import com.stdiet.custom.dto.response.MessageNoticeResponse;
|
||||
import com.stdiet.custom.dto.response.NutritionalVideoResponse;
|
||||
import com.stdiet.custom.page.WxLogInfo;
|
||||
import com.stdiet.custom.service.*;
|
||||
import com.stdiet.system.service.ISysDictTypeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
@ -50,15 +52,18 @@ public class WechatAppletController extends BaseController {
|
||||
private ISysAskNutritionQuestionService sysAskNutritionQuestionService;
|
||||
@Autowired
|
||||
private ISysCustomerService iSysCustomerService;
|
||||
|
||||
@Autowired
|
||||
private ISysMessageNoticeService sysMessageNoticeService;
|
||||
|
||||
@Autowired
|
||||
private ISysCustomerService sysCustomerService;
|
||||
|
||||
@Autowired
|
||||
private ISysNutritionalVideoService sysNutritionalVideoService;
|
||||
@Autowired
|
||||
private ISysRecipesPlanService sysRecipesPlanService;
|
||||
@Autowired
|
||||
private ISysOrderPauseService sysOrderPauseService;
|
||||
@Autowired
|
||||
private ISysDictTypeService iSysDictTypeService;
|
||||
|
||||
/**
|
||||
* 查询微信小程序中展示的客户案例
|
||||
@ -445,17 +450,23 @@ public class WechatAppletController extends BaseController {
|
||||
return AjaxResult.error(5003, "未查到用户信息,请联系销售顾问");
|
||||
}
|
||||
|
||||
sysWxUserInfo.setCusId(sysCustomer.getId());
|
||||
if (StringUtils.isNull(curWxUserInfo)) {
|
||||
// 新增sys_wx_user_info
|
||||
sysWxUserInfo.setCusId(sysCustomer.getId());
|
||||
sysWxUserInfo.setCreateTime(DateUtils.getNowDate());
|
||||
sysWxUserInfoService.insertSysWxUserInfo(sysWxUserInfo);
|
||||
} else {
|
||||
// 更新sys_wx_user_info数据,
|
||||
curWxUserInfo.setCusId(sysCustomer.getId());
|
||||
curWxUserInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
sysWxUserInfoService.updateSysWxUserInfo(curWxUserInfo);
|
||||
sysWxUserInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
sysWxUserInfoService.updateSysWxUserInfo(sysWxUserInfo);
|
||||
}
|
||||
// 更新对象
|
||||
curWxUserInfo = sysWxUserInfo;
|
||||
}
|
||||
|
||||
// 更新时间超过7天,重新登录获取最新信息
|
||||
if (StringUtils.isEmpty(curWxUserInfo.getAvatarUrl()) || ChronoUnit.DAYS.between(DateUtils.dateToLocalDate(curWxUserInfo.getUpdateTime()), LocalDate.now()) >= 7) {
|
||||
return AjaxResult.error(5001, "信息缺失或者过期需要重新登录");
|
||||
}
|
||||
|
||||
curWxUserInfo.setCustomerId(AesUtils.encrypt(curWxUserInfo.getCusId().toString()));
|
||||
@ -463,4 +474,38 @@ public class WechatAppletController extends BaseController {
|
||||
// 并返回一系列登录后的数据
|
||||
return AjaxResult.success(curWxUserInfo);
|
||||
}
|
||||
|
||||
@GetMapping("/getRecipesPlans")
|
||||
public AjaxResult getRecipesPlans(@RequestParam String customerId) {
|
||||
Long cusId = StringUtils.isNotEmpty(customerId) ? Long.parseLong(AesUtils.decrypt(customerId)) : 0L;
|
||||
|
||||
List<SysRecipesPlan> plans = sysRecipesPlanService.selectPlanListByCusId(cusId);
|
||||
|
||||
SysOrderPause orderPause = new SysOrderPause();
|
||||
orderPause.setCusId(cusId);
|
||||
List<SysOrderPause> pauses = sysOrderPauseService.selectSysOrderPauseList(orderPause);
|
||||
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
result.put("plans", plans);
|
||||
result.put("pauses", pauses);
|
||||
|
||||
return AjaxResult.success(result);
|
||||
}
|
||||
|
||||
@GetMapping("/getDicts")
|
||||
public AjaxResult getDicts() {
|
||||
|
||||
List<SysDictData> unitDict = iSysDictTypeService.selectDictDataByType("cus_cus_unit");
|
||||
List<SysDictData> weightDict = iSysDictTypeService.selectDictDataByType("cus_cus_weight");
|
||||
List<SysDictData> menuTypeDict = iSysDictTypeService.selectDictDataByType("cus_dishes_type");
|
||||
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
result.put("unitDict", unitDict);
|
||||
result.put("weightDict", weightDict);
|
||||
result.put("menuTypeDict", menuTypeDict);
|
||||
|
||||
return AjaxResult.success(result);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -280,6 +280,8 @@ public class SysOrder extends BaseEntity {
|
||||
//订单查询时的订单类型二维数组
|
||||
private JSONArray searchOrderTypeArray;
|
||||
|
||||
private Integer counted;
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
package com.stdiet.custom.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.stdiet.common.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
@ -25,8 +26,10 @@ public class SysOrderPause {
|
||||
/**
|
||||
* 订单id
|
||||
*/
|
||||
@JsonIgnore
|
||||
private Long orderId;
|
||||
|
||||
@JsonIgnore
|
||||
private Long cusId;
|
||||
|
||||
private String outId;
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.stdiet.custom.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.stdiet.common.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
@ -24,6 +25,7 @@ public class SysRecipesPlan {
|
||||
* 订单ID
|
||||
*/
|
||||
//@Excel(name = "订单ID")
|
||||
@JsonIgnore
|
||||
private Long orderId;
|
||||
|
||||
private Long cusId;
|
||||
@ -116,7 +118,9 @@ public class SysRecipesPlan {
|
||||
*/
|
||||
private Integer reviewStatus;
|
||||
|
||||
/** 该食谱计划中暂停日期,使用 | 隔开 */
|
||||
/**
|
||||
* 该食谱计划中暂停日期,使用 | 隔开
|
||||
*/
|
||||
//@Excel(name = "该食谱计划中暂停日期,使用 | 隔开")
|
||||
private String pauseDate;
|
||||
|
||||
|
@ -141,7 +141,7 @@ public class SysRecipesPlanServiceImpl implements ISysRecipesPlanService {
|
||||
}
|
||||
//判断是否提成单,拆分单中的副单,体验单,定金单
|
||||
if (sysOrder.getAfterSaleCommissOrder().intValue() == 1 || ("1".equals(sysOrder.getOrderType()) && sysOrder.getMainOrderId().intValue() != 0) ||
|
||||
"2".equals(sysOrder.getOrderType()) || "1".equals(sysOrder.getOrderMoneyType())){
|
||||
"2".equals(sysOrder.getOrderType()) || "1".equals(sysOrder.getOrderMoneyType()) || sysOrder.getCounted() == 1) {
|
||||
System.out.println("---------------------" + sysOrder.getOrderId() + "不生成食谱------------------------");
|
||||
continue;
|
||||
}
|
||||
@ -177,6 +177,7 @@ public class SysRecipesPlanServiceImpl implements ISysRecipesPlanService {
|
||||
|
||||
/**
|
||||
* 更新食谱计划,删除旧食谱中多余的,添加新食谱中多的
|
||||
*
|
||||
* @param oldRecipesPlanList
|
||||
* @param newRecipesPlanList
|
||||
*/
|
||||
@ -298,6 +299,7 @@ public class SysRecipesPlanServiceImpl implements ISysRecipesPlanService {
|
||||
|
||||
/**
|
||||
* 根据食谱开始时间、结束时间、暂停列表获取在食谱计划范围内的暂停天数,以及返回调整之后的计划开始、结束时间,以及暂停日期
|
||||
*
|
||||
* @param planStartDate 原先的计划开始时间
|
||||
* @param planEndDate 原先计划结束时间
|
||||
* @param pauseList 暂停列表集合
|
||||
@ -349,6 +351,7 @@ public class SysRecipesPlanServiceImpl implements ISysRecipesPlanService {
|
||||
|
||||
/**
|
||||
* 根据暂停时间范围获取范围内的日期
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private Set<String> getPauseDateString(LocalDate pauseStartDate, LocalDate pauseEndDate) {
|
||||
@ -360,17 +363,6 @@ public class SysRecipesPlanServiceImpl implements ISysRecipesPlanService {
|
||||
return pauseDateList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 集合排序key值比较器
|
||||
* */
|
||||
class MyComparator implements Comparator<String>{
|
||||
|
||||
@Override
|
||||
public int compare(String o1, String o2) {
|
||||
return Integer.parseInt(o1) - Integer.parseInt(o2);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据订单ID删除所有食谱安排计划
|
||||
*
|
||||
@ -406,6 +398,7 @@ public class SysRecipesPlanServiceImpl implements ISysRecipesPlanService {
|
||||
|
||||
/**
|
||||
* 根据客户ID查询最后一天食谱计划
|
||||
*
|
||||
* @param customerId 客户ID
|
||||
* @return
|
||||
*/
|
||||
@ -432,4 +425,15 @@ public class SysRecipesPlanServiceImpl implements ISysRecipesPlanService {
|
||||
return sysRecipesPlanMapper.selectRecipesModelList(sysRecipesPlan);
|
||||
}
|
||||
|
||||
/**
|
||||
* 集合排序key值比较器
|
||||
*/
|
||||
class MyComparator implements Comparator<String> {
|
||||
|
||||
@Override
|
||||
public int compare(String o1, String o2) {
|
||||
return Integer.parseInt(o1) - Integer.parseInt(o2);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -49,6 +49,7 @@
|
||||
<result property="afterSaleCommissOrder" column="after_sale_commiss_order"/>
|
||||
<result property="commissStartTime" column="commiss_start_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="counted" column="counted"/>
|
||||
|
||||
<!-- 非持久化字段 -->
|
||||
<result property="afterSale" column="afterSale_name"></result><!-- 售后名称 -->
|
||||
@ -61,7 +62,7 @@
|
||||
o.serve_time_id, o.pay_type_id, pay.dict_label as pay_type, o.pre_sale_id, o.create_by, o.create_time, o.after_sale_id, o.update_by, o.update_time,
|
||||
o.nutritionist_id, o.remark, o.nutri_assis_id, o.account_id, acc.dict_label as account, o.planner_id, o.planner_assis_id, o.operator_id, o.operator_assis_id,
|
||||
o.recommender, o.order_time,o.give_serve_day,o.conditioning_project_id,cp.dict_label as conditioning_project,o.server_end_time,
|
||||
o.on_sale_id,o.order_type,o.order_count_type,o.order_money_type,o.main_order_id,o.after_sale_commiss_order,o.commiss_start_time
|
||||
o.on_sale_id,o.order_type,o.order_count_type,o.order_money_type,o.main_order_id,o.after_sale_commiss_order,o.commiss_start_time, o.counted
|
||||
from sys_order o
|
||||
LEFT JOIN sys_customer sc ON sc.id = o.cus_id
|
||||
LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'cus_pay_type') AS pay ON pay.dict_value = o.pay_type_id
|
||||
@ -243,6 +244,7 @@
|
||||
<if test="afterSaleCommissOrder != null">after_sale_commiss_order,</if>
|
||||
<if test="commissStartTime != null">commiss_start_time,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="counted != null">counted,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">#{orderId},</if>
|
||||
@ -285,6 +287,7 @@
|
||||
<if test="afterSaleCommissOrder != null">#{afterSaleCommissOrder},</if>
|
||||
<if test="commissStartTime != null">#{commissStartTime},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="counted != null">#{counted},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -330,6 +333,7 @@
|
||||
<if test="afterSaleCommissOrder != null">after_sale_commiss_order = #{afterSaleCommissOrder},</if>
|
||||
<if test="commissStartTime != null">commiss_start_time = #{commissStartTime},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="counted != null">counted = #{counted},</if>
|
||||
</trim>
|
||||
where order_id = #{orderId}
|
||||
</update>
|
||||
|
@ -70,7 +70,7 @@
|
||||
LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'fan_channel') AS cn ON cn.dict_value = wd.account_id
|
||||
LEFT JOIN sys_user AS su ON su.user_id = wd.user_id
|
||||
WHERE wd.del_flag = 0
|
||||
ORDER BY wd.sale_group_id, wd.user_id ASC
|
||||
ORDER BY wd.sale_group_id, wd.user_id, wd.wechat_account ASC
|
||||
</select>
|
||||
|
||||
<!-- 查询总进粉数量 -->
|
||||
|
@ -107,6 +107,7 @@ export default {
|
||||
title: "既往病史/用药史评估",
|
||||
content: [
|
||||
{ title: "病史体征", value: "physicalSigns" },
|
||||
{ title: "忌口过敏食物", value: "dishesIngredient" },
|
||||
{ title: "湿气数据", value: "moistureDate" },
|
||||
{ title: "气血数据", value: "bloodData" },
|
||||
{ title: "家族疾病史", value: "familyIllnessHistory" },
|
||||
@ -118,7 +119,16 @@ export default {
|
||||
{ title: "是否出现过过敏症状", value: "allergyFlag" },
|
||||
{ title: "过敏症状", value: "allergySituation" },
|
||||
{ title: "过敏源", value: "allergen" },
|
||||
{ title: "忌口过敏食物", value: "dishesIngredient" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "运动习惯评估",
|
||||
content: [
|
||||
{ title: "每周运动次数", value: "motionNum" },
|
||||
{ title: "每次运动的时长", value: "motionDuration" },
|
||||
{ title: "每天运动的时间", value: "motionTime" },
|
||||
{ title: "运动", value: "motion" },
|
||||
{ title: "运动场地", value: "motionField" },
|
||||
],
|
||||
},
|
||||
{
|
||||
@ -193,16 +203,7 @@ export default {
|
||||
{ title: "排便的颜色", value: "defecationColor" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "运动习惯评估",
|
||||
content: [
|
||||
{ title: "每周运动次数", value: "motionNum" },
|
||||
{ title: "每次运动的时长", value: "motionDuration" },
|
||||
{ title: "每天运动的时间", value: "motionTime" },
|
||||
{ title: "运动", value: "motion" },
|
||||
{ title: "运动场地", value: "motionField" },
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
title: "睡眠质量评估",
|
||||
content: [
|
||||
|
@ -147,7 +147,7 @@
|
||||
label="创建时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
width="100"
|
||||
width="110"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div v-for="time in scope.row.createTime.split(' ')" :key="time">
|
||||
|
Reference in New Issue
Block a user