This commit is contained in:
=
2026-06-10 10:00:43 +08:00
parent 753e4f800b
commit e39643bcd4
13 changed files with 177 additions and 9 deletions
@@ -94,6 +94,29 @@ public class EnrollmentRegistrationSummaryController {
return Result.success(); return Result.success();
} }
@At
@ApiOperation("设置解决状态")
@Aop(TransAop.READ_COMMITTED)
@SaCheckPermission("enrollmentRegistration.summary")
@SLog(tag = "子女入学-查询统计", type = "enrollmentRegistration", msg = "设置解决状态id: ${args[0]}")
public Result doUpdateSolved(String id, Boolean solved) {
if (StrUtil.isBlank(id) || solved == null) {
return Result.error("参数错误");
}
enrollmentRegistrationSummaryService.updateSolved(id, solved);
return Result.success();
}
@At
@ApiOperation("一键设置已解决")
@Aop(TransAop.READ_COMMITTED)
@SaCheckPermission("enrollmentRegistration.summary")
@SLog(tag = "子女入学-查询统计", type = "enrollmentRegistration", msg = "一键设置已解决")
public Result doBatchSetSolved(@Param("data") EnrollmentRegistrationPageForm pageForm) {
int count = enrollmentRegistrationSummaryService.batchSetSolved(pageForm);
return Result.success("已设置" + count + "条数据");
}
@At @At
@Ok("void") @Ok("void")
@@ -108,6 +131,7 @@ public class EnrollmentRegistrationSummaryController {
map.forEach(item -> { map.forEach(item -> {
Sys_dict dict = dictList.stream().filter(sys_dict -> sys_dict.getCode().equals(item.getString("registrationType"))).findFirst().orElse(null); Sys_dict dict = dictList.stream().filter(sys_dict -> sys_dict.getCode().equals(item.getString("registrationType"))).findFirst().orElse(null);
item.put("registrationTypeName", dict.getName()); item.put("registrationTypeName", dict.getName());
item.put("solvedName", item.getBoolean("solved", false) ? "已解决" : "未解决");
}); });
List<ExcelExportEntity> entityList = new ArrayList<>(); List<ExcelExportEntity> entityList = new ArrayList<>();
@@ -123,6 +147,7 @@ public class EnrollmentRegistrationSummaryController {
entityList.add(new ExcelExportEntity("手机号码", "mobile", 20)); entityList.add(new ExcelExportEntity("手机号码", "mobile", 20));
entityList.add(new ExcelExportEntity("登记类型", "registrationTypeName", 20)); entityList.add(new ExcelExportEntity("登记类型", "registrationTypeName", 20));
entityList.add(new ExcelExportEntity("填报时间", "applyTime", 20)); entityList.add(new ExcelExportEntity("填报时间", "applyTime", 20));
entityList.add(new ExcelExportEntity("是否解决", "solvedName", 20));
response.setContentType("application/octet-stream"); response.setContentType("application/octet-stream");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("子女信息登记汇总.xlsx", "UTF-8")); response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("子女信息登记汇总.xlsx", "UTF-8"));
@@ -139,6 +139,12 @@ public class EnrollmentRegistration extends BaseModel implements Serializable {
@Comment("子女出生证照片") @Comment("子女出生证照片")
private List<JSONObject> birthCertificateFiles; private List<JSONObject> birthCertificateFiles;
@Column
@ColDefine(type = ColType.BOOLEAN)
@Default("0")
@Comment("是否解决")
private Boolean solved;
} }
@@ -9,4 +9,20 @@ public interface EnrollmentRegistrationSummaryService extends BaseService {
Sql getSql(EnrollmentRegistrationPageForm pageForm,String searchKeyword); Sql getSql(EnrollmentRegistrationPageForm pageForm,String searchKeyword);
/**
* 更新单条登记记录的解决状态。
*
* @param id 登记记录id
* @param solved 是否解决
*/
void updateSolved(String id, Boolean solved);
/**
* 将当前筛选条件下的登记记录批量设置为已解决。
*
* @param pageForm 当前汇总列表筛选条件
* @return 实际更新条数
*/
int batchSetSolved(EnrollmentRegistrationPageForm pageForm);
} }
@@ -3,14 +3,19 @@ package com.budwk.app.zhgh.dayofficework.enrollmentRegistration.service.impl;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.service.impl.BaseServiceImpl; import com.budwk.app.base.service.impl.BaseServiceImpl;
import com.budwk.app.flow.enums.ProcessTaskStateEnum; import com.budwk.app.flow.enums.ProcessTaskStateEnum;
import com.budwk.app.zhgh.dayofficework.enrollmentRegistration.model.EnrollmentRegistration;
import com.budwk.app.zhgh.dayofficework.enrollmentRegistration.service.EnrollmentRegistrationSummaryService; import com.budwk.app.zhgh.dayofficework.enrollmentRegistration.service.EnrollmentRegistrationSummaryService;
import com.budwk.app.zhgh.dayofficework.enrollmentRegistration.vo.EnrollmentRegistrationPageForm; import com.budwk.app.zhgh.dayofficework.enrollmentRegistration.vo.EnrollmentRegistrationPageForm;
import org.nutz.dao.Chain;
import org.nutz.dao.Cnd; import org.nutz.dao.Cnd;
import org.nutz.dao.Dao; import org.nutz.dao.Dao;
import org.nutz.dao.Sqls; import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql; import org.nutz.dao.sql.Sql;
import org.nutz.dao.util.cri.SqlExpressionGroup; import org.nutz.dao.util.cri.SqlExpressionGroup;
import org.nutz.ioc.loader.annotation.IocBean; import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.util.NutMap;
import java.util.List;
/** /**
* @author zhf * @author zhf
@@ -53,11 +58,12 @@ public class EnrollmentRegistrationSummaryServiceImpl extends BaseServiceImpl im
$condition $condition
"""); """);
Cnd cnd = Cnd.NEW(); Cnd cnd = Cnd.NEW();
// 姓名和工号查询条件 // 统一处理列表、导出和批量设置的姓名/工号查询条件,保证各入口筛选范围一致。
if (StrUtil.isNotBlank(searchKeyword)) { String keyword = StrUtil.blankToDefault(searchKeyword, pageForm.getSearchKeyword());
if (StrUtil.isNotBlank(keyword)) {
SqlExpressionGroup seg = new SqlExpressionGroup(); SqlExpressionGroup seg = new SqlExpressionGroup();
seg.orLike("info.userName", "%" + searchKeyword + "%"); seg.orLike("info.userName", "%" + keyword + "%");
seg.orLike("info.loginName", "%" + searchKeyword + "%"); seg.orLike("info.loginName", "%" + keyword + "%");
cnd.and(seg); cnd.and(seg);
} }
cnd.andEX("YEAR(info.applyTime)", "=", pageForm.getYear()); cnd.andEX("YEAR(info.applyTime)", "=", pageForm.getYear());
@@ -65,7 +71,35 @@ public class EnrollmentRegistrationSummaryServiceImpl extends BaseServiceImpl im
cnd.andEX("info.unionId","=",pageForm.getUnionId()); cnd.andEX("info.unionId","=",pageForm.getUnionId());
cnd.andEX("info.unitId","=",pageForm.getUnitId()); cnd.andEX("info.unitId","=",pageForm.getUnitId());
cnd.andEX("info.registrationType","=",pageForm.getRegistrationType()); cnd.andEX("info.registrationType","=",pageForm.getRegistrationType());
if (pageForm.getSolved() != null) {
if (pageForm.getSolved()) {
cnd.and("info.solved", "=", true);
} else {
// 历史数据的解决状态可能为空,按业务默认值一并视为未解决。
cnd.and(Cnd.exps("info.solved", "=", false).or("info.solved", "is", null));
}
}
sql.setCondition(cnd); sql.setCondition(cnd);
return sql; return sql;
} }
@Override
public void updateSolved(String id, Boolean solved) {
if (StrUtil.isBlank(id) || solved == null) {
return;
}
dao().update(EnrollmentRegistration.class, Chain.make("solved", solved), Cnd.where("id", "=", id));
}
@Override
public int batchSetSolved(EnrollmentRegistrationPageForm pageForm) {
// 复用汇总列表查询条件,保证“一键设置已解决”的范围与当前列表筛选结果一致。
Sql sql = getSql(pageForm, null);
List<NutMap> list = listMap(sql);
List<String> idList = list.stream().map(item -> item.getString("id")).toList();
if (idList.isEmpty()) {
return 0;
}
return dao().update(EnrollmentRegistration.class, Chain.make("solved", true), Cnd.where("id", "in", idList));
}
} }
@@ -16,4 +16,5 @@ public class EnrollmentRegistrationPageForm extends PageForm {
private String unionId; private String unionId;
private String unitId; private String unitId;
private String registrationType; private String registrationType;
private Boolean solved;
} }
@@ -141,7 +141,7 @@ public class ProposalUnderTakeReplyController {
List<NutMap> list = pagination.getList(); List<NutMap> list = pagination.getList();
for (NutMap row : list) { for (NutMap row : list) {
if (row.getInt("taskIsMaster") == 1) { if (row.getInt("taskIsMaster") == 1) {
boolean b = Stream.of("master_reply", "slave_reply", "school_leader") boolean b = Stream.of("master_reply", "slave_reply", "feedback")
.anyMatch(a -> row.getString("curTaskKey").contains(a)); .anyMatch(a -> row.getString("curTaskKey").contains(a));
row.setv("canRevoke", b && row.getInt("taskState") == ProcessTaskStateEnum.FINISHED.getCode()); row.setv("canRevoke", b && row.getInt("taskState") == ProcessTaskStateEnum.FINISHED.getCode());
} else { } else {
@@ -115,6 +115,7 @@ public class LegalApplyController {
Cnd.where(LegalApply::getDoctorUser, "=", nutMap.getString("userId")) Cnd.where(LegalApply::getDoctorUser, "=", nutMap.getString("userId"))
.and(LegalApply::getStartTime, ">=", DateUtil.now()) .and(LegalApply::getStartTime, ">=", DateUtil.now())
.and(LegalApply::getUserId, "is", null) .and(LegalApply::getUserId, "is", null)
.asc(LegalApply::getStartTimeTs)
); );
nutMap.put("times", applyList); nutMap.put("times", applyList);
} }
@@ -114,6 +114,7 @@ public class PsychologyApplyController {
Cnd.where(PsychologyApply::getDoctorUser, "=", nutMap.getString("userId")) Cnd.where(PsychologyApply::getDoctorUser, "=", nutMap.getString("userId"))
.and(PsychologyApply::getStartTime, ">=", DateUtil.now()) .and(PsychologyApply::getStartTime, ">=", DateUtil.now())
.and(PsychologyApply::getUserId, "is", null) .and(PsychologyApply::getUserId, "is", null)
.asc(PsychologyApply::getStartTimeTs)
); );
nutMap.put("times", applyList); nutMap.put("times", applyList);
} }
Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 2.1 MiB

@@ -3,6 +3,12 @@
<el-form-item label="审批意见" prop="tf_opinion" :rules="[{required:true,message:'必填',trigger:['change','blur']}]"> <el-form-item label="审批意见" prop="tf_opinion" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea> <user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item> </el-form-item>
<el-form-item label="是否需要副主席审核" prop="select">
<el-radio-group v-model="formData.select" size="small">
<el-radio label="need" border>是</el-radio>
<el-radio label="notNeeded" border>否</el-radio>
</el-radio-group>
</el-form-item>
</el-form> </el-form>
<snaker-flow-task-form-action @task-action="handleTaskAction" @cancel="handleCancel"></snaker-flow-task-form-action> <snaker-flow-task-form-action @task-action="handleTaskAction" @cancel="handleCancel"></snaker-flow-task-form-action>
</div> </div>
@@ -18,8 +24,16 @@
}, },
} }
}, },
mounted() {
this.$set(this.formData, "select", "")
},
methods: { methods: {
handleTaskAction(val) { handleTaskAction(val) {
// 同意流转时必须带流程分支变量 select,供 HDBX 条件线判断是否进入副主席审核。
if (val.submitType === 1 && !this.formData.select) {
this.$message.warning("请选择是否需要副主席审核")
return
}
this.$refs.formRef.validate(valid => { this.$refs.formRef.validate(valid => {
if (valid) { if (valid) {
console.log(val) console.log(val)
@@ -127,6 +127,12 @@ layout("/layouts/platform.html"){
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"> :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<pc-signature v-model="formData.tf_userSign"></pc-signature> <pc-signature v-model="formData.tf_userSign"></pc-signature>
</el-form-item> </el-form-item>
<el-form-item label="是否需要副主席审核" prop="select">
<el-radio-group v-model="formData.select" size="small">
<el-radio label="need" border>是</el-radio>
<el-radio label="notNeeded" border>否</el-radio>
</el-radio-group>
</el-form-item>
</el-form> </el-form>
<el-row type="flex" justify="end"> <el-row type="flex" justify="end">
<el-button @click="$refs.guava.index()" size="small">取消</el-button> <el-button @click="$refs.guava.index()" size="small">取消</el-button>
@@ -194,11 +200,17 @@ layout("/layouts/platform.html"){
processTaskId: row.taskId, processTaskId: row.taskId,
taskName: row.curTaskName taskName: row.curTaskName
} }
this.$set(this.formData, "select", "")
this.$refs.infoRef.onOpen(row) this.$refs.infoRef.onOpen(row)
}) })
}, },
handleTaskAction(val) { handleTaskAction(val) {
// 同意流转时必须带流程分支变量 select,供 HDBX 条件线判断是否进入副主席审核。
if (val === 1 && !this.formData.select) {
this.$message.warning("请选择是否需要副主席审核")
return
}
this.$refs.formRef.validate((valid) => { this.$refs.formRef.validate((valid) => {
if (valid) { if (valid) {
this.$confirm("您确定要提交吗?", "提示", { this.$confirm("您确定要提交吗?", "提示", {
@@ -132,8 +132,7 @@ layout("/layouts/platform.html"){
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="户口簿照片" :span="2"> <el-descriptions-item label="户口簿照片" :span="2">
<el-form-item prop="huKouFiles" <el-form-item prop="huKouFiles">
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<file-upload :upload_number="10" :value.sync="formData.huKouFiles" <file-upload :upload_number="10" :value.sync="formData.huKouFiles"
upload_result_type="url" upload_result_type="url"
upload_text="请上传户口首页、户主页、父母和子女页" upload_text="请上传户口首页、户主页、父母和子女页"
@@ -41,14 +41,24 @@ layout("/layouts/platform.html"){
<el-option v-for="item in unitOptions" :label="item.name" :value="item.id"></el-option> <el-option v-for="item in unitOptions" :label="item.name" :value="item.id"></el-option>
</el-select> </el-select>
</search-item> </search-item>
<search-item label="是否解决">
<el-select clearable placeholder="请选择是否解决"
style="width: 100%;"
v-model="pageForm.solved">
<el-option label="已解决" :value="true"></el-option>
<el-option label="未解决" :value="false"></el-option>
</el-select>
</search-item>
</search> </search>
</el-card> </el-card>
<el-card shadow="never"> <el-card shadow="never">
<table-tool label="申请列表"> <table-tool label="申请列表">
<el-button @click="doExportExcel" size="mini" type="primary">导出汇总名单 <el-button @click="doBatchSetSolved" size="small" type="primary">一键设置已解决
</el-button> </el-button>
<el-button @click="doExportZip" size="mini" type="primary">导出附件zip <el-button @click="doExportExcel" icon="el-icon-download" size="small" type="primary">导出汇总名单
</el-button>
<el-button @click="doExportZip" icon="el-icon-download" size="small" type="primary">导出附件zip
</el-button> </el-button>
</table-tool> </table-tool>
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%"> <el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
@@ -66,9 +76,20 @@ layout("/layouts/platform.html"){
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="applyTime" label="填报时间"></el-table-column> <el-table-column prop="applyTime" label="填报时间"></el-table-column>
<el-table-column prop="solved" label="是否解决">
<template v-slot="{row}">
<el-tag :type="isSolved(row) ? 'success' : 'info'">
{{isSolved(row) ? '已解决' : '未解决'}}
</el-tag>
</template>
</el-table-column>
<el-table-column align="center" fixed="right" header-align="center" label="操作" <el-table-column align="center" fixed="right" header-align="center" label="操作"
width="300px"> width="300px">
<template scope="{row}"> <template scope="{row}">
<el-button @click="doUpdateSolved(row, !isSolved(row))" size="mini"
:type="isSolved(row) ? 'success' : 'info'">
{{isSolved(row) ? '已解决' : '未解决'}}
</el-button>
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button> <el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button @click="doDelete(row)" size="mini" type="danger" <el-button @click="doDelete(row)" size="mini" type="danger"
v-if="$auth.hasRoleOr(['SYSADMIN'])">删除 v-if="$auth.hasRoleOr(['SYSADMIN'])">删除
@@ -134,6 +155,44 @@ layout("/layouts/platform.html"){
data: JSON.stringify(this.pageForm) data: JSON.stringify(this.pageForm)
}) })
}, },
isSolved(row) {
return row.solved === true || row.solved === 1 || row.solved === "1"
},
// 切换单条记录解决状态,历史空值在页面上按未解决处理。
doUpdateSolved(row, solved) {
this.$confirm("确定要切换解决状态吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/platform/enrollmentRegistration/summary/doUpdateSolved", {
id: row.id,
solved: solved
}).then((resp) => {
if (resp.code === 0) {
this.$set(row, "solved", solved)
this.$message.success("操作成功")
}
})
})
},
// 按当前筛选条件批量设置,后端会更新符合条件的全部记录。
doBatchSetSolved() {
this.$confirm("确定将当前筛选条件下的数据全部设置为已解决吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/platform/enrollmentRegistration/summary/doBatchSetSolved", {
data: JSON.stringify(this.pageForm)
}).then((resp) => {
if (resp.code === 0) {
this.$message.success(resp.msg || "操作成功")
this.doSearch()
}
})
})
},
openView(row) { openView(row) {
this.$refs.guava.view(() => { this.$refs.guava.view(() => {
this.showApprovalForm = false this.showApprovalForm = false