From badf491694222931f266fdc4c94677a1b6b4fbcc Mon Sep 17 00:00:00 2001 From: xiezhijun <15270898033@163.com> Date: Wed, 27 Jan 2021 18:54:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E4=BD=93=E5=BE=81=E7=9B=B8?= =?UTF-8?q?=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../custom/domain/SysCustomerHealthy.java | 60 +++++++++ .../com/stdiet/custom/domain/SysOrder.java | 13 ++ .../custom/SysCustomerHealthyMapper.xml | 27 +++- .../mapper/custom/SysOrderMapper.xml | 29 ++++- stdiet-ui/src/utils/healthyData.js | 7 +- stdiet-ui/src/views/custom/healthy/index.vue | 30 ++++- stdiet-ui/src/views/custom/order/index.vue | 59 ++++++--- .../custom/subhealthy/investigation/index.vue | 122 ++++++++++++------ 8 files changed, 274 insertions(+), 73 deletions(-) diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysCustomerHealthy.java b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysCustomerHealthy.java index d99a1c138..2734f2107 100644 --- a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysCustomerHealthy.java +++ b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysCustomerHealthy.java @@ -5,6 +5,8 @@ import org.apache.commons.lang3.builder.ToStringStyle; import com.stdiet.common.annotation.Excel; import com.stdiet.common.core.domain.BaseEntity; +import java.util.List; + /** * 客户健康对象 sys_customer_healthy * @@ -410,6 +412,24 @@ public class SysCustomerHealthy extends BaseEntity @Excel(name = "饮食习惯") private Long makeFoodType; + /** 客户病史体征id,使用,隔开 */ + //@Excel(name = "客户病史体征id,使用,隔开") + private String physicalSignsId; + + /** 体征对象集合 **/ + private List signList; + + /** 其他病史体征 **/ + private String otherPhysicalSigns; + + /** 气血数据 */ + @Excel(name = "气血数据") + private String bloodData; + + /** 湿气数据 */ + @Excel(name = "湿气数据") + private String moistureDate; + /** 删除标识 0未删除 1已删除。默认0 */ private Long delFlag; @@ -1301,6 +1321,46 @@ public class SysCustomerHealthy extends BaseEntity this.tall = tall; } + public String getPhysicalSignsId() { + return physicalSignsId; + } + + public void setPhysicalSignsId(String physicalSignsId) { + this.physicalSignsId = physicalSignsId; + } + + public List getSignList() { + return signList; + } + + public void setSignList(List signList) { + this.signList = signList; + } + + public String getOtherPhysicalSigns() { + return otherPhysicalSigns; + } + + public void setOtherPhysicalSigns(String otherPhysicalSigns) { + this.otherPhysicalSigns = otherPhysicalSigns; + } + + public String getBloodData() { + return bloodData; + } + + public void setBloodData(String bloodData) { + this.bloodData = bloodData; + } + + public String getMoistureDate() { + return moistureDate; + } + + public void setMoistureDate(String moistureDate) { + this.moistureDate = moistureDate; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysOrder.java b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysOrder.java index b8305ad9d..e52c57998 100644 --- a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysOrder.java +++ b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysOrder.java @@ -224,6 +224,11 @@ public class SysOrder extends BaseEntity { * */ private List orderPauseList; + /** + * 订单金额状态 0订单金额大于等于0 1订单金额小于0 + */ + private Integer amountFlag; + @JsonFormat(pattern = "yyyy-MM-dd") public Date getStartTime() { return startTime; @@ -590,4 +595,12 @@ public class SysOrder extends BaseEntity { public void setConditioningProject(String conditioningProject) { this.conditioningProject = conditioningProject; } + + public Integer getAmountFlag() { + return amountFlag; + } + + public void setAmountFlag(Integer amountFlag) { + this.amountFlag = amountFlag; + } } \ No newline at end of file diff --git a/stdiet-custom/src/main/resources/mapper/custom/SysCustomerHealthyMapper.xml b/stdiet-custom/src/main/resources/mapper/custom/SysCustomerHealthyMapper.xml index 6b2fd2382..bceb64ec1 100644 --- a/stdiet-custom/src/main/resources/mapper/custom/SysCustomerHealthyMapper.xml +++ b/stdiet-custom/src/main/resources/mapper/custom/SysCustomerHealthyMapper.xml @@ -107,16 +107,23 @@ + + + + + + select sch.id, customer_id, conditioning_project_id, sex, age, weight, tall, condiment, other_condiment, cooking_style, cooking_style_rate, wash_vegetables_style, other_wash_vegetables_style, breakfast_type, breakfast_food, lunch_type, dinner, vegetable_rate, common_meat, dinner_time, supper_num, supper_food, diet_hot_and_cold, diet_flavor, vegetables_num, vegetables_rate_type, fruits_num, fruits_time, fruits_rate, rice_num, rice_full, eating_speed, snacks, other_snacks, health_products_flag, health_products_brand, health_products_name, health_products_week_rate, health_products_day_rate, water_num, water_type, water_habit, drinks_num, drink_wine_flag, drink_wine_classify, other_wine_classify, drink_wine_amount, smoke_flag, smoke_rate, second_smoke, work_industry, work_type, defecation_num, other_defecation_num, defecation_time, defecation_shape, defecation_smell, defecation_speed, defecation_color, motion_num, motion_duration, motion_time, aerobic_motion_classify, anaerobic_motion_classify, anaerobic_aerobic_motion_classify, other_motion_classify, motion_field, other_motion_field, sleep_time, sleep_quality, sleep_drug_flag, sleep_drug, stayup_late_flag, stayup_late_week_num, family_illness_history, other_family_illness_history, operation_history, other_operation_history, near_operation_flag, recoverye_situation, long_eat_drug_flag, long_eat_drug_classify, other_long_eat_drug_classify, allergy_flag, allergy_situation, allergen, other_allergen, medical_report, medical_report_name, - position,experience,rebound,difficulty,crux,dishes_ingredient,make_food_type,sch.create_time, sch.create_by,sch. update_time, sch.update_by, sch.del_flag + position,experience,rebound,difficulty,crux,dishes_ingredient,make_food_type,physical_signs_id,other_physical_signs,blood_data,moisture_date, + sch.create_time, sch.create_by,sch. update_time, sch.update_by, sch.del_flag @@ -239,6 +247,10 @@ crux, dishes_ingredient, make_food_type, + physical_signs_id, + other_physical_signs, + blood_data, + moisture_date, create_time, create_by, update_time, @@ -342,6 +354,10 @@ #{crux}, #{dishesIngredient}, #{makeFoodType}, + #{physicalSignsId}, + #{otherPhysicalSigns}, + #{bloodData}, + #{moistureDate}, #{createTime}, #{createBy}, #{updateTime}, @@ -448,6 +464,10 @@ crux = #{crux}, dishes_ingredient = #{dishesIngredient}, make_food_type = #{makeFoodType}, + physical_signs_id = #{physicalSignsId}, + other_physical_signs = #{otherPhysicalSigns}, + blood_data = #{bloodData}, + moisture_date = #{moistureDate}, create_time = #{createTime}, create_by = #{createBy}, update_time = #{updateTime}, @@ -468,6 +488,11 @@ + + + @@ -86,8 +95,10 @@ and order_id = #{orderId} - and customer = #{customer} - and phone = #{phone} + + and (customer like concat('%',#{customer},'%') or phone like concat('%',#{customer},'%')) + + and status = #{status} and pay_type_id = #{payTypeId} and pre_sale_id = #{preSaleId} @@ -104,6 +115,14 @@ and date_format(order_time,'%y%m%d') <= date_format(#{endTime},'%y%m%d') and serve_time_id = #{serveTimeId} and review_status = #{reviewStatus} + + + and amount >= 0 + + + and 0 > amount + + order by order_time desc diff --git a/stdiet-ui/src/utils/healthyData.js b/stdiet-ui/src/utils/healthyData.js index 893cfde4d..9084b028e 100644 --- a/stdiet-ui/src/utils/healthyData.js +++ b/stdiet-ui/src/utils/healthyData.js @@ -47,7 +47,7 @@ export const dinnerArray = [ ] export const dietHotAndColdArray = [ - {"name":"偏冷食","value":"1"},{"name":"偏冷食","value":"2"},{"name":"正常","value":"3"} + {"name":"偏冷食","value":"1"},{"name":"偏热食","value":"2"},{"name":"正常","value":"3"} ] export const dietFlavorArray = [ @@ -130,7 +130,7 @@ export const anaerobicAerobicMotionClassifyArray = [ ] export const motionFieldArray = [ - {"name":"居家","value": "1"},{"name":"健身房","value": "2"},{"name":"户外","value": "3"}, {"name":"健身房","value": "4"} + {"name":"居家","value": "1"},{"name":"健身房","value": "2"},{"name":"户外","value": "3"}, {"name":"瑜伽馆","value": "4"} ] export const sleepQualityArray = [ @@ -180,7 +180,8 @@ export const arrayName = [ "condiment","cookingStyle","cookingStyleRate", "washVegetablesStyle","lunchType","dinner","dietFlavor", "snacks","waterType","waterHabit","drinksNum","drinkWineClassify","drinkWineAmount","smokeRate", "workType","defecationTime","aerobicMotionClassify","anaerobicMotionClassify","anaerobicAerobicMotionClassify", - "motionField","sleepQuality", "familyIllnessHistory", "operationHistory", "longEatDrugClassify", "allergen", "medicalReport" + "motionField","sleepQuality", "physicalSignsId","moistureDate","bloodData","familyIllnessHistory", "operationHistory", "longEatDrugClassify", "allergen", + "medicalReport","medicalReportName" ] //需要将数字下标转成中文含义的属性名 diff --git a/stdiet-ui/src/views/custom/healthy/index.vue b/stdiet-ui/src/views/custom/healthy/index.vue index 869b5b5ce..d533585ef 100644 --- a/stdiet-ui/src/views/custom/healthy/index.vue +++ b/stdiet-ui/src/views/custom/healthy/index.vue @@ -607,6 +607,7 @@ ["辅助睡眠类药物名称","是否经常熬夜","熬夜频次"] ], [ + ["病史体征","湿气数据","气血数据"], ["家族疾病史","手术史","近期是否做过手术"], ["手术恢复情况","是否长期服用药物","长期服用的药物"], ["是否出现过过敏症状","过敏症状","过敏源"] @@ -642,6 +643,7 @@ ["sleepDrug","stayupLateFlag","stayupLateWeekNum"] ], [ + ["physicalSigns","moistureDate","bloodData"], ["familyIllnessHistory","operationHistory","nearOperationFlag"], ["recoveryeSituation","longEatDrugFlag","longEatDrugClassify"], ["allergyFlag","allergySituation","allergen"] @@ -757,12 +759,22 @@ motionStr += item ? ((motionStr != "" ? "," : "") + item) : ""; }); } - detailHealthy.motion = motionStr + (detailHealthy.otherMotionClassify ? ( ","+ detailHealthy.otherMotionClassify) : ""); + detailHealthy.motion = this.trimComma(motionStr + (detailHealthy.otherMotionClassify ? ( ","+ detailHealthy.otherMotionClassify) : "")); detailHealthy.motionField += detailHealthy.otherMotionField ? (","+detailHealthy.otherMotionField) : ""; detailHealthy.sleepDrugFlag = detailHealthy.sleepDrugFlag == 1 ? "有" : "无"; detailHealthy.stayupLateFlag = detailHealthy.stayupLateFlag == 1 ? "有" : "无"; detailHealthy.stayupLateWeekNum += "次/周"; + + let physicalSigns = ""; + if(detailHealthy.signList != null && detailHealthy.signList.length > 0){ + detailHealthy.signList.forEach(function (sign, index) { + physicalSigns += "," + sign.name; + }) + } + physicalSigns += "," + (detailHealthy.otherPhysicalSigns ? detailHealthy.otherPhysicalSigns : ""); + detailHealthy.physicalSigns = this.trimComma(physicalSigns); + detailHealthy.familyIllnessHistory += detailHealthy.otherFamilyIllnessHistory ? ("," + detailHealthy.otherFamilyIllnessHistory) : ""; detailHealthy.operationHistory += detailHealthy.otherOperationHistory ? ("," + detailHealthy.otherOperationHistory) : ""; detailHealthy.nearOperationFlag = detailHealthy.nearOperationFlag == 1 ? "有" : "无"; @@ -774,10 +786,11 @@ detailHealthy.allergen += detailHealthy.otherAllergen ? ("," +detailHealthy.otherAllergen) : ""; let medicalReportPathArray = detailHealthy.medicalReport ? detailHealthy.medicalReport.split(",") : []; + let medicalReportNameArray = detailHealthy.medicalReportName ? detailHealthy.medicalReportName.split(",") : []; this.medicalReportPathArray = medicalReportPathArray; - detailHealthy.medicalReport_one = medicalReportPathArray.length > 0 ? "体检报告(1)" : ""; - detailHealthy.medicalReport_two = medicalReportPathArray.length > 1 ? "体检报告(2)" : ""; - detailHealthy.medicalReport_three = medicalReportPathArray.length > 2 ? "体检报告(3)" : ""; + detailHealthy.medicalReport_one = medicalReportPathArray.length > 0 ? (medicalReportNameArray.length > 0 ? medicalReportNameArray[0] : "体检报告(1)") : ""; + detailHealthy.medicalReport_two = medicalReportPathArray.length > 1 ? (medicalReportNameArray.length > 1 ? medicalReportNameArray[1] : "体检报告(2)") : ""; + detailHealthy.medicalReport_three = medicalReportPathArray.length > 2 ? (medicalReportNameArray.length > 2 ? medicalReportNameArray[2] : "体检报告(3)") : ""; for(let i = 0; i < this.healthyTitleData.length; i++){ let stepArray = []; @@ -1017,6 +1030,15 @@ }, downloadFile(fileName){ this.downloadResource(fileName); + }, + trimComma(str){ + if(str.startsWith(",") || str.startsWith(",")){ + str = str.substring(1,str.length); + } + if(str.endsWith(",") || str.endsWith(",")){ + str = str.substring(0,str.length-1); + } + return str; } } }; diff --git a/stdiet-ui/src/views/custom/order/index.vue b/stdiet-ui/src/views/custom/order/index.vue index cf8a9b1e2..2cbf801f6 100644 --- a/stdiet-ui/src/views/custom/order/index.vue +++ b/stdiet-ui/src/views/custom/order/index.vue @@ -2,7 +2,7 @@
- + - + + + + + + + + + + { + response.data.splice(0,0,{dictValue: 0, dictLabel: '无', remark: null}) this.accountIdOptions = response.data; }); this.getDicts("cus_serve_time").then(response => { @@ -920,6 +932,7 @@ startTime: dayjs().add(3, 'day').format("YYYY-MM-DD"), pauseTime: null, payTypeId: defaultPayType ? parseInt(defaultPayType.dictValue) : null, + accountId: defaultAccount ? parseInt(defaultAccount.dictValue) : null, preSaleId: defaultPresale ? parseInt(defaultPresale.dictValue) : null, createBy: null, createTime: null, @@ -939,9 +952,7 @@ reviewStatus: this.review, giveServeDay: defaultGiveServeTime ? parseInt(defaultGiveServeTime.dictValue) : null, conditioningProjectId: defaultConditioningProjectIdOption ? parseInt(defaultConditioningProjectIdOption.dictValue) : null, - becomeFanTime: dayjs().format("YYYY-MM-DD"), - //收款账号的初始化放最后,使得可以watch中监听到变化,保证策划、策划助理、运营、运营助理初始化 - accountId: defaultAccount ? parseInt(defaultAccount.dictValue) : null + becomeFanTime: dayjs().format("YYYY-MM-DD") }; this.resetForm("form"); }, @@ -971,7 +982,8 @@ /** 修改按钮操作 */ handleUpdate(row) { this.reset(); - const orderId = row.orderId || this.ids + const orderId = row.orderId || this.ids; + this.form.accountId = "no"; getOrder(orderId).then(response => { this.form = response.data; this.form.giveServeDay = parseInt(this.form.giveServeDay+""); @@ -1054,22 +1066,31 @@ initPlanningAndOperation(){ if(this.form.accountId != null && this.form.accountId != undefined){ let planningAndOperationValue = this.orderDropdownCorrespondingOptions.find(opt => parseInt(opt.dictValue) === this.form.accountId); - let array = planningAndOperationValue.dictLabel.split("|"); - let plannerIdOption = this.plannerIdOptions.find(opt => opt.dictValue == array[0]); - this.form.plannerId = plannerIdOption ? parseInt(plannerIdOption.dictValue) : 0; - let plannerAssisIdOption = this.plannerAssisIdOptions.find(opt => opt.dictValue == array[1]); - this.form.plannerAssisId = plannerAssisIdOption ? parseInt(plannerAssisIdOption.dictValue) : 0; - let operatorIdOption = this.operatorIdOptions.find(opt => opt.dictValue == array[2]); - this.form.operatorId = operatorIdOption ? parseInt(operatorIdOption.dictValue) : 0; - let operatorAssisIdOption = this.operatorAssisIdOptions.find(opt => opt.dictValue == array[3]); - this.form.operatorAssisId = operatorAssisIdOption ? parseInt(operatorAssisIdOption.dictValue) : 0; + if(planningAndOperationValue){ + let array = planningAndOperationValue.dictLabel.split("|"); + let plannerIdOption = this.plannerIdOptions.find(opt => opt.dictValue == array[0]); + this.form.plannerId = plannerIdOption ? parseInt(plannerIdOption.dictValue) : 0; + let plannerAssisIdOption = this.plannerAssisIdOptions.find(opt => opt.dictValue == array[1]); + this.form.plannerAssisId = plannerAssisIdOption ? parseInt(plannerAssisIdOption.dictValue) : 0; + let operatorIdOption = this.operatorIdOptions.find(opt => opt.dictValue == array[2]); + this.form.operatorId = operatorIdOption ? parseInt(operatorIdOption.dictValue) : 0; + let operatorAssisIdOption = this.operatorAssisIdOptions.find(opt => opt.dictValue == array[3]); + this.form.operatorAssisId = operatorAssisIdOption ? parseInt(operatorAssisIdOption.dictValue) : 0; + }else{ + this.form.plannerId = 0; + this.form.plannerAssisId = 0; + this.form.operatorId = 0; + this.form.operatorAssisId = 0; + } } } }, watch:{ // 监听收款账号的变化 "form.accountId": function(newVal, oldVal){ - this.initPlanningAndOperation(); + if(oldVal != "no" && newVal != "no"){ + this.initPlanningAndOperation(); + } } } }; diff --git a/stdiet-ui/src/views/custom/subhealthy/investigation/index.vue b/stdiet-ui/src/views/custom/subhealthy/investigation/index.vue index 02351dcb5..ea329118c 100644 --- a/stdiet-ui/src/views/custom/subhealthy/investigation/index.vue +++ b/stdiet-ui/src/views/custom/subhealthy/investigation/index.vue @@ -409,7 +409,7 @@ {{item.name}}
-
有氧运动 +
无氧运动 {{item.name}} @@ -461,7 +461,40 @@

{{healthyData['titleArray'][7]}}

-

1、家族疾病史情况

+

1、本人病史情况

+ + + + + +
其他病史体征 + +
+
+

2、湿气、气血测试

+ + + {{ moistureItem.dictLabel }} + + + + + {{ moistureItem.dictLabel }} + + + +

3、家族疾病史情况

{{item.name}} @@ -477,7 +510,7 @@ >
-

2、手术情况

+

4、手术情况

{{item.name}} @@ -508,7 +541,7 @@ >
-

3、药物情况

+

5、药物情况

@@ -530,7 +563,7 @@ > -

4、过敏史

+

6、过敏史

@@ -585,8 +618,8 @@ :data="upload.data" :auto-upload="false"> 选取文件 - 重置 -
提示:最多可上传三份,且每份文件不超过5M
+ 移除文件 +
提示:最多可上传三份,且每份文件不超过20M
@@ -617,7 +650,7 @@