diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/h5controller/H5HealthCheckupController.java b/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/h5controller/H5HealthCheckupController.java index 0bf56c1d..96c5c308 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/h5controller/H5HealthCheckupController.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/h5controller/H5HealthCheckupController.java @@ -272,7 +272,7 @@ public class H5HealthCheckupController { Sql sql = Sqls.create(""" select cu.id,cu.projectId,cu.userId,cu.userName,cu.sex, cu.loginName,cu.phone,cu.card,cu.marriage, - u.personType + cu.personType from health_checkup_user cu left join sys_user u on cu.userId=u.id $condition diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/service/impl/HealthCheckupProjectServiceImpl.java b/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/service/impl/HealthCheckupProjectServiceImpl.java index b2438cb0..0875d417 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/service/impl/HealthCheckupProjectServiceImpl.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/healthCheckup/service/impl/HealthCheckupProjectServiceImpl.java @@ -99,8 +99,10 @@ public class HealthCheckupProjectServiceImpl extends BaseServiceImpl=", start.toString()).and("selectTime", "<=", end.toString()); - lastYearCndSelection.where().andNotIsNull("selectTime"); - lastYearCndSelection.desc("selectTime"); - List lastYearSelections = dao().query(HealthCheckupUserSelection.class, lastYearCndSelection); - if(CollectionUtil.isNotEmpty(lastYearSelections)) { - Cnd cnd = Cnd.NEW(); - cnd.and("id","=",lastYearSelections.get(0).getSubjectId()); - HealthCheckupProjectSubject projectSubject = dao().fetch(HealthCheckupProjectSubject.class, cnd); - if(ObjectUtil.isNotEmpty(projectSubject)) { - return projectSubject.getOptionName(); - } + Date selectTime = new Date(); + if(ObjectUtil.isNotEmpty(selectTime)) { + Calendar instance = Calendar.getInstance(); + instance.setTime(selectTime); + int year = instance.get(Calendar.YEAR); + LocalDate start = LocalDate.of(year - 1, 1, 1); + LocalDate end = LocalDate.of(year - 1, 12, 31); + Cnd lastYearCndSelection = Cnd.NEW(); + lastYearCndSelection.and("selectUserId","=",healthCheckupUserSelection.getSelectUserId()); + lastYearCndSelection.and("selectTime", ">=", start.toString()).and("selectTime", "<=", end.toString()); + lastYearCndSelection.where().andNotIsNull("selectTime"); + lastYearCndSelection.desc("selectTime"); + List lastYearSelections = dao().query(HealthCheckupUserSelection.class, lastYearCndSelection); + if(CollectionUtil.isNotEmpty(lastYearSelections)) { + Cnd cnd = Cnd.NEW(); + cnd.and("id","=",lastYearSelections.get(0).getSubjectId()); + HealthCheckupProjectSubject projectSubject = dao().fetch(HealthCheckupProjectSubject.class, cnd); + if(ObjectUtil.isNotEmpty(projectSubject)) { + return projectSubject.getOptionName(); } } } diff --git a/src/main/resources/views/platform/zhghh5/dayofficework/healthCheckup/projectManageForm/index.html b/src/main/resources/views/platform/zhghh5/dayofficework/healthCheckup/projectManageForm/index.html index bfb73806..12cb639f 100644 --- a/src/main/resources/views/platform/zhghh5/dayofficework/healthCheckup/projectManageForm/index.html +++ b/src/main/resources/views/platform/zhghh5/dayofficework/healthCheckup/projectManageForm/index.html @@ -18,7 +18,7 @@ layout("/layouts/platform_h5.html"){ v-model="formData.idCard" :rules="[{ required: true, message: '请输入身份证号' }]"> - {{formData.userState}} + {{userBaseMessage.personType}} + v-model="formData.phone"> + v-model="formData.card"> {{formData.personType}} @@ -58,10 +56,7 @@ layout("/layouts/platform_h5.html"){
- 返回 + 返回
@@ -117,26 +112,27 @@ layout("/layouts/platform_h5.html"){ }, // 执行提交 async doSubmit() { - const formData = clone(this.formData); - this.$dialog.confirm({ - title: '温馨提示', - message: '您确定要提交吗?', - }).then(() => { - const toast = this.$toast.loading({ - duration: 0, - forbidClick: true, - message: '提交中....', - }); - this.$axios.post('/platform/healthCheckup/h5/doSubmitUserBaseMessage', formData).then(resp => { - if (resp.code === 0) { - toast.clear(); - this.$toast.success(resp.msg) - this.historyBack() - } - }) - }).catch(() => { - - }); + // const formData = clone(this.formData); + // this.$dialog.confirm({ + // title: '温馨提示', + // message: '您确定要提交吗?', + // }).then(() => { + // const toast = this.$toast.loading({ + // duration: 0, + // forbidClick: true, + // message: '提交中....', + // }); + // this.$axios.post('/platform/healthCheckup/h5/doSubmitUserBaseMessage', formData).then(resp => { + // if (resp.code === 0) { + // toast.clear(); + // this.$toast.success(resp.msg) + // this.historyBack() + // } + // }) + // }).catch(() => { + // + // }); + this.historyBack(); }, async selectInfo(projectId,userId) { const resp = await this.$axios.post('/platform/healthCheckup/h5/findUserBaseMessageData', {projectId,userId});