bug调整>体检管理移动端:
1:上年度体检医院显示不出来 2:人员类型改成人员类别
This commit is contained in:
+1
-1
@@ -272,7 +272,7 @@ public class H5HealthCheckupController {
|
|||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
select cu.id,cu.projectId,cu.userId,cu.userName,cu.sex,
|
select cu.id,cu.projectId,cu.userId,cu.userName,cu.sex,
|
||||||
cu.loginName,cu.phone,cu.card,cu.marriage,
|
cu.loginName,cu.phone,cu.card,cu.marriage,
|
||||||
u.personType
|
cu.personType
|
||||||
from health_checkup_user cu
|
from health_checkup_user cu
|
||||||
left join sys_user u on cu.userId=u.id
|
left join sys_user u on cu.userId=u.id
|
||||||
$condition
|
$condition
|
||||||
|
|||||||
+23
-27
@@ -99,8 +99,10 @@ public class HealthCheckupProjectServiceImpl extends BaseServiceImpl<HealthCheck
|
|||||||
manyAddOrRenewUtil.asyncExecuteFastInsert(needInsertSelectionUsers, null);
|
manyAddOrRenewUtil.asyncExecuteFastInsert(needInsertSelectionUsers, null);
|
||||||
Sql updateSql = Sqls.create("""
|
Sql updateSql = Sqls.create("""
|
||||||
update health_checkup_user cu
|
update health_checkup_user cu
|
||||||
left join sys_user u on cu.userId=u.id\s
|
left join health_checkup_project p on cu.projectId=p.id
|
||||||
set cu.phone=u.mobile,cu.card=u.idCard,cu.marriage=u.marriage,cu.personType=u.personType
|
left join sys_user u on cu.userId=u.id
|
||||||
|
set cu.phone=u.mobile,cu.card=u.idCard,cu.marriage=u.marriage
|
||||||
|
,cu.personType=(case when p.name like '%在职教职工%' then '在职教职工' when p.name like '%校聘高知%' then '校聘高知保健对象' else '' end)
|
||||||
where cu.projectId=@projectId2 and cu.confirmStatus!='1'
|
where cu.projectId=@projectId2 and cu.confirmStatus!='1'
|
||||||
""");
|
""");
|
||||||
updateSql.setParam("projectId2", healthCheckupProject.getId());
|
updateSql.setParam("projectId2", healthCheckupProject.getId());
|
||||||
@@ -135,31 +137,25 @@ public class HealthCheckupProjectServiceImpl extends BaseServiceImpl<HealthCheck
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String findLastYearHospital(HealthCheckupUserSelection healthCheckupUserSelection){
|
public String findLastYearHospital(HealthCheckupUserSelection healthCheckupUserSelection){
|
||||||
Cnd cndSelection = Cnd.NEW();
|
Date selectTime = new Date();
|
||||||
cndSelection.and("selectUserId","=",healthCheckupUserSelection.getSelectUserId());
|
if(ObjectUtil.isNotEmpty(selectTime)) {
|
||||||
cndSelection.and("projectId","=",healthCheckupUserSelection.getProjectId());
|
Calendar instance = Calendar.getInstance();
|
||||||
List<HealthCheckupUserSelection> checkupUserSelections = dao().query(HealthCheckupUserSelection.class, cndSelection);
|
instance.setTime(selectTime);
|
||||||
if(CollectionUtil.isNotEmpty(checkupUserSelections)){
|
int year = instance.get(Calendar.YEAR);
|
||||||
Date selectTime = checkupUserSelections.get(0).getSelectTime();
|
LocalDate start = LocalDate.of(year - 1, 1, 1);
|
||||||
if(ObjectUtil.isNotEmpty(selectTime)){
|
LocalDate end = LocalDate.of(year - 1, 12, 31);
|
||||||
Calendar instance = Calendar.getInstance();
|
Cnd lastYearCndSelection = Cnd.NEW();
|
||||||
instance.setTime(selectTime);
|
lastYearCndSelection.and("selectUserId","=",healthCheckupUserSelection.getSelectUserId());
|
||||||
int year = instance.get(Calendar.YEAR);
|
lastYearCndSelection.and("selectTime", ">=", start.toString()).and("selectTime", "<=", end.toString());
|
||||||
LocalDate start = LocalDate.of(year - 1, 1, 1);
|
lastYearCndSelection.where().andNotIsNull("selectTime");
|
||||||
LocalDate end = LocalDate.of(year - 1, 12, 31);
|
lastYearCndSelection.desc("selectTime");
|
||||||
Cnd lastYearCndSelection = Cnd.NEW();
|
List<HealthCheckupUserSelection> lastYearSelections = dao().query(HealthCheckupUserSelection.class, lastYearCndSelection);
|
||||||
lastYearCndSelection.and("selectUserId","=",healthCheckupUserSelection.getSelectUserId());
|
if(CollectionUtil.isNotEmpty(lastYearSelections)) {
|
||||||
lastYearCndSelection.and("selectTime", ">=", start.toString()).and("selectTime", "<=", end.toString());
|
Cnd cnd = Cnd.NEW();
|
||||||
lastYearCndSelection.where().andNotIsNull("selectTime");
|
cnd.and("id","=",lastYearSelections.get(0).getSubjectId());
|
||||||
lastYearCndSelection.desc("selectTime");
|
HealthCheckupProjectSubject projectSubject = dao().fetch(HealthCheckupProjectSubject.class, cnd);
|
||||||
List<HealthCheckupUserSelection> lastYearSelections = dao().query(HealthCheckupUserSelection.class, lastYearCndSelection);
|
if(ObjectUtil.isNotEmpty(projectSubject)) {
|
||||||
if(CollectionUtil.isNotEmpty(lastYearSelections)) {
|
return projectSubject.getOptionName();
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-3
@@ -18,7 +18,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
v-model="formData.idCard"
|
v-model="formData.idCard"
|
||||||
:rules="[{ required: true, message: '请输入身份证号' }]">
|
:rules="[{ required: true, message: '请输入身份证号' }]">
|
||||||
</van-field>
|
</van-field>
|
||||||
<van-cell title="人员类型">{{formData.userState}}</van-cell>
|
<van-cell title="人员类型">{{userBaseMessage.personType}}</van-cell>
|
||||||
<van-field
|
<van-field
|
||||||
input-align="right"
|
input-align="right"
|
||||||
readonly
|
readonly
|
||||||
@@ -354,13 +354,12 @@ layout("/layouts/platform_h5.html"){
|
|||||||
let projectId = GetQueryString("projectId")
|
let projectId = GetQueryString("projectId")
|
||||||
await this.findSubject(projectId);
|
await this.findSubject(projectId);
|
||||||
if (projectId) {
|
if (projectId) {
|
||||||
const {id, personType, birthday, unit} = this.$store.state.user
|
const {id, birthday, unit} = this.$store.state.user
|
||||||
await this.selectInfo(projectId);
|
await this.selectInfo(projectId);
|
||||||
await this.findUserBaseMessage(projectId, id);
|
await this.findUserBaseMessage(projectId, id);
|
||||||
await this.findLastYearHospital(projectId, id);
|
await this.findLastYearHospital(projectId, id);
|
||||||
this.$set(this.formData, 'projectId', projectId)
|
this.$set(this.formData, 'projectId', projectId)
|
||||||
this.$set(this.formData, 'idCard', this.userBaseMessage?.card)
|
this.$set(this.formData, 'idCard', this.userBaseMessage?.card)
|
||||||
this.$set(this.formData, 'userState', personType)
|
|
||||||
this.$set(this.formData, 'marriage', this.userBaseMessage?.marriage)
|
this.$set(this.formData, 'marriage', this.userBaseMessage?.marriage)
|
||||||
this.$set(this.formData, 'birthday', birthday)
|
this.$set(this.formData, 'birthday', birthday)
|
||||||
this.$set(this.formData, 'unitName', unit.name)
|
this.$set(this.formData, 'unitName', unit.name)
|
||||||
|
|||||||
+24
-28
@@ -33,8 +33,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
name="phone"
|
name="phone"
|
||||||
readonly
|
readonly
|
||||||
required
|
required
|
||||||
v-model="formData.phone"
|
v-model="formData.phone">
|
||||||
:rules="[{ required: false, message: '手机号码',trigger: ['blur', 'change'] },{ pattern: /^1[3456789]\d{9}$/, message: '输入正确的手机号码'}]">
|
|
||||||
</van-field>
|
</van-field>
|
||||||
<van-field
|
<van-field
|
||||||
input-align="right"
|
input-align="right"
|
||||||
@@ -43,8 +42,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
readonly
|
readonly
|
||||||
required
|
required
|
||||||
placeholder="请联系输入身份证号"
|
placeholder="请联系输入身份证号"
|
||||||
v-model="formData.card"
|
v-model="formData.card">
|
||||||
:rules="[{ required: true, message: '请输入子女身份证号', trigger: 'blur' }, {pattern: /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/, message: '请输入正确的身份证号码', trigger: 'blur'}]">
|
|
||||||
</van-field>
|
</van-field>
|
||||||
<van-cell title="人员类型">{{formData.personType}}</van-cell>
|
<van-cell title="人员类型">{{formData.personType}}</van-cell>
|
||||||
<van-cell title="婚姻状态">
|
<van-cell title="婚姻状态">
|
||||||
@@ -58,10 +56,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<!-- 按钮区域 -->
|
<!-- 按钮区域 -->
|
||||||
<div class="form-actions">
|
<div class="form-actions">
|
||||||
<van-button class="buttonClass"
|
<van-button class="buttonClass">返回</van-button>
|
||||||
@click-left="historyBack"
|
|
||||||
block
|
|
||||||
native-type="submit">返回</van-button>
|
|
||||||
</div>
|
</div>
|
||||||
</van-form>
|
</van-form>
|
||||||
</div>
|
</div>
|
||||||
@@ -117,26 +112,27 @@ layout("/layouts/platform_h5.html"){
|
|||||||
},
|
},
|
||||||
// 执行提交
|
// 执行提交
|
||||||
async doSubmit() {
|
async doSubmit() {
|
||||||
const formData = clone(this.formData);
|
// const formData = clone(this.formData);
|
||||||
this.$dialog.confirm({
|
// this.$dialog.confirm({
|
||||||
title: '温馨提示',
|
// title: '温馨提示',
|
||||||
message: '您确定要提交吗?',
|
// message: '您确定要提交吗?',
|
||||||
}).then(() => {
|
// }).then(() => {
|
||||||
const toast = this.$toast.loading({
|
// const toast = this.$toast.loading({
|
||||||
duration: 0,
|
// duration: 0,
|
||||||
forbidClick: true,
|
// forbidClick: true,
|
||||||
message: '提交中....',
|
// message: '提交中....',
|
||||||
});
|
// });
|
||||||
this.$axios.post('/platform/healthCheckup/h5/doSubmitUserBaseMessage', formData).then(resp => {
|
// this.$axios.post('/platform/healthCheckup/h5/doSubmitUserBaseMessage', formData).then(resp => {
|
||||||
if (resp.code === 0) {
|
// if (resp.code === 0) {
|
||||||
toast.clear();
|
// toast.clear();
|
||||||
this.$toast.success(resp.msg)
|
// this.$toast.success(resp.msg)
|
||||||
this.historyBack()
|
// this.historyBack()
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
}).catch(() => {
|
// }).catch(() => {
|
||||||
|
//
|
||||||
});
|
// });
|
||||||
|
this.historyBack();
|
||||||
},
|
},
|
||||||
async selectInfo(projectId,userId) {
|
async selectInfo(projectId,userId) {
|
||||||
const resp = await this.$axios.post('/platform/healthCheckup/h5/findUserBaseMessageData', {projectId,userId});
|
const resp = await this.$axios.post('/platform/healthCheckup/h5/findUserBaseMessageData', {projectId,userId});
|
||||||
|
|||||||
Reference in New Issue
Block a user