Merge remote-tracking branch 'origin/main'

This commit is contained in:
@jyuhsin
2026-03-20 11:03:27 +08:00
23 changed files with 577 additions and 299 deletions
@@ -77,6 +77,7 @@ public class CondolenceBranchUnionApprovalController {
t.finishTime, t.finishTime,
t.taskParentId, t.taskParentId,
t.variable taskVariable, t.variable taskVariable,
GROUP_CONCAT(DISTINCT ta.actorName, '(', ta.actorAccount, ')' ) AS auditUser,
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName, IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
IF(rt.id IS NOT NULL, 1, 0) AS canRevoke IF(rt.id IS NOT NULL, 1, 0) AS canRevoke
FROM FROM
@@ -113,7 +114,7 @@ public class CondolenceBranchUnionApprovalController {
} else { } else {
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy())); cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
} }
cnd.groupBy("t.id"); cnd.groupBy("info.id");
sql.setCondition(cnd); sql.setCondition(cnd);
Pagination<NutMap> pageVO = condolenceService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); Pagination<NutMap> pageVO = condolenceService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
return Result.success(pageVO); return Result.success(pageVO);
@@ -79,34 +79,36 @@ import java.util.zip.ZipOutputStream;
@Slf4j @Slf4j
public class CondolenceMineController { public class CondolenceMineController {
@Inject @Inject
private CondolenceService condolenceService; private CondolenceService condolenceService;
@Inject @Inject
private Dao dao; private Dao dao;
@Inject @Inject
private FlowEngine flowEngine; private FlowEngine flowEngine;
@Inject @Inject
private SmsService smsService; private SmsService smsService;
@Inject @Inject
private SysOfficeTemplateUtil sysOfficeTemplateUtil; private SysOfficeTemplateUtil sysOfficeTemplateUtil;
@At("/") @At("/")
@Ok("beetl:/platform/zhgh/staffbenefit/condolence/mine/index.html") @Ok("beetl:/platform/zhgh/staffbenefit/condolence/mine/index.html")
@SaCheckPermission("condolence.mine") @SaCheckPermission("condolence.mine")
public void index() {} public void index() {
}
@At("/h5") @At("/h5")
@Ok("beetl:/platform/zhghh5/staffbenefit/condolence/mine/index.html") @Ok("beetl:/platform/zhghh5/staffbenefit/condolence/mine/index.html")
@SaCheckPermission("h5.condolence.mine") @SaCheckPermission("h5.condolence.mine")
public void h5Index() {} public void h5Index() {
}
@At @At
@ApiOperation("分页查询") @ApiOperation("分页查询")
@SaCheckPermission(value = {"condolence.mine", "h5.condolence.mine"}, mode = SaMode.OR) @SaCheckPermission(value = {"condolence.mine", "h5.condolence.mine"}, mode = SaMode.OR)
public Result pageData(PageForm pageForm, public Result pageData(PageForm pageForm,
@Param(value = "year") Integer year, @Param(value = "year") Integer year,
@Param(value = "type") String type) { @Param(value = "type") String type) {
Sql sql = Sqls.create(""" Sql sql = Sqls.create("""
SELECT SELECT
info.*, info.*,
type.name as typeName, type.name as typeName,
@@ -124,6 +126,7 @@ public class CondolenceMineController {
t.finishTime, t.finishTime,
t.taskParentId, t.taskParentId,
t.variable taskVariable, t.variable taskVariable,
GROUP_CONCAT(DISTINCT ta.actorName, '(', ta.actorAccount, ')' ) AS auditUser,
IF((SELECT taskName FROM wf_process_task tt WHERE tt.id = t.taskParentId) = 'startTask', 1, 0) canRevoke, IF((SELECT taskName FROM wf_process_task tt WHERE tt.id = t.taskParentId) = 'startTask', 1, 0) canRevoke,
(select MAX(id) from wf_process_task where processInstanceId = ins.id and taskName = 'startTask') AS startTaskId (select MAX(id) from wf_process_task where processInstanceId = ins.id and taskName = 'startTask') AS startTaskId
FROM FROM
@@ -134,61 +137,61 @@ public class CondolenceMineController {
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
$condition $condition
"""); """);
Cnd cnd = Cnd.NEW(); Cnd cnd = Cnd.NEW();
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) { if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
SqlExpressionGroup seg = new SqlExpressionGroup(); SqlExpressionGroup seg = new SqlExpressionGroup();
seg.or(Condolence::getHelpUserName, "like", "%" + pageForm.getSearchKeyword() + "%"); seg.or(Condolence::getHelpUserName, "like", "%" + pageForm.getSearchKeyword() + "%");
seg.or(Condolence::getHelpLoginName, "like", "%" + pageForm.getSearchKeyword() + "%"); seg.or(Condolence::getHelpLoginName, "like", "%" + pageForm.getSearchKeyword() + "%");
cnd.and(seg); cnd.and(seg);
} }
cnd.andEX("year(info.createTime)", "=", year); cnd.andEX("year(info.createTime)", "=", year);
cnd.andEX("info.type", "=", type); cnd.andEX("info.type", "=", type);
cnd.and("info.createdBy", "=", SecurityUtil.getUserId()); cnd.and("info.createdBy", "=", SecurityUtil.getUserId());
if (StrUtil.isNotBlank(pageForm.getPageOrderName()) && StrUtil.isNotBlank(pageForm.getPageOrderBy())) { if (StrUtil.isNotBlank(pageForm.getPageOrderName()) && StrUtil.isNotBlank(pageForm.getPageOrderBy())) {
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy())); cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
} else { } else {
cnd.desc("info.createTime"); cnd.desc("info.createTime");
} }
cnd.groupBy("info.id");
sql.setCondition(cnd);
Pagination<NutMap> pagination = condolenceService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
return Result.success(pagination);
}
sql.setCondition(cnd); @At
Pagination<NutMap> pagination = condolenceService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); @ApiOperation("删除")
return Result.success(pagination); @Aop(TransAop.READ_COMMITTED)
} @SaCheckPermission(value = {"condolence.mine", "h5.condolence.mine"}, mode = SaMode.OR)
@SLog(tag = "职工慰问系统-我的申请", msg = "删除职工慰问")
public Result delete(@Param("id") String id) {
condolenceService.delete(id);
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
return Result.success();
}
@At @At
@ApiOperation("删除") @ApiOperation("查询单个慰问申请信息")
@Aop(TransAop.READ_COMMITTED) @SaCheckPermission("condolence")
@SaCheckPermission(value = {"condolence.mine", "h5.condolence.mine"}, mode = SaMode.OR) public Result info(String id) {
@SLog(tag = "职工慰问系统-我的申请", msg = "删除职工慰问") Condolence condolence = condolenceService.fetch(id);
public Result delete(@Param("id") String id) { CondolenceType type = condolenceService.dao().fetch(CondolenceType.class, Cnd.where(CondolenceType::getId, "=", condolence.getType()));
condolenceService.delete(id); NutMap nutMap = Lang.obj2nutmap(condolence);
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id); nutMap.put("typeName", type.getName());
return Result.success(); //smsService.send("20182040", "这是一条由智慧工会系统发出的测试消息。");
} return Result.success(nutMap);
}
@At
@ApiOperation("查询单个慰问申请信息")
@SaCheckPermission("condolence")
public Result info(String id) {
Condolence condolence = condolenceService.fetch(id);
CondolenceType type = condolenceService.dao().fetch(CondolenceType.class, Cnd.where(CondolenceType::getId, "=", condolence.getType()));
NutMap nutMap = Lang.obj2nutmap(condolence);
nutMap.put("typeName", type.getName());
//smsService.send("20182040", "这是一条由智慧工会系统发出的测试消息。");
return Result.success(nutMap);
}
@At @At
@Ok("void") @Ok("void")
public void doExport(String id, HttpServletResponse response) throws Exception { public void doExport(String id, HttpServletResponse response) throws Exception {
Condolence condolence = condolenceService.fetch(id); Condolence condolence = condolenceService.fetch(id);
if (condolence == null) { if (condolence == null) {
throw new RuntimeException("慰问记录不存在"); throw new RuntimeException("慰问记录不存在");
} }
Sql sql = Sqls.create(""" Sql sql = Sqls.create("""
SELECT SELECT
info.*, info.*,
ins.id AS instanceId ins.id AS instanceId
@@ -198,28 +201,28 @@ public class CondolenceMineController {
WHERE WHERE
ins.state = 20 AND info.id = @id ins.state = 20 AND info.id = @id
""").setParam("id", id); """).setParam("id", id);
sql.setCallback(Sqls.callback.map()); sql.setCallback(Sqls.callback.map());
dao.execute(sql); dao.execute(sql);
NutMap info = (NutMap) sql.getResult(); NutMap info = (NutMap) sql.getResult();
HashMap<String, Object> docData = new HashMap<>(); HashMap<String, Object> docData = new HashMap<>();
HashMap<String, Object> docData2 = new HashMap<>(); HashMap<String, Object> docData2 = new HashMap<>();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
LocalDateTime createTime = LocalDateTime.parse(condolence.getCreateTime(), formatter); LocalDateTime createTime = LocalDateTime.parse(condolence.getCreateTime(), formatter);
docData.put("createTime", DateUtil.format(createTime, "yyyy年MM月dd日")); docData.put("createTime", DateUtil.format(createTime, "yyyy年MM月dd日"));
docData.put("applyUnionName", condolence.getApplyUnionName()); docData.put("applyUnionName", condolence.getApplyUnionName());
docData.put("info", info); docData.put("info", info);
docData2.put("createTime", DateUtil.format(createTime, "yyyy年MM月dd日")); docData2.put("createTime", DateUtil.format(createTime, "yyyy年MM月dd日"));
docData2.put("applyUnionName", condolence.getApplyUnionName()); docData2.put("applyUnionName", condolence.getApplyUnionName());
docData2.put("bankUserName", condolence.getBankUserName()); docData2.put("bankUserName", condolence.getBankUserName());
docData2.put("bankCardNumber", condolence.getBankCardNumber()); docData2.put("bankCardNumber", condolence.getBankCardNumber());
docData2.put("bankOfDeposit", condolence.getBankOfDeposit()); docData2.put("bankOfDeposit", condolence.getBankOfDeposit());
docData2.put("info", info); docData2.put("info", info);
// 金额转大写 // 金额转大写
// if (condolence.getMoney() != null) { // if (condolence.getMoney() != null) {
// docData.put("money_big", MoneyUtil.toRMBUpper(String.valueOf(condolence.getMoney()))); // docData.put("money_big", MoneyUtil.toRMBUpper(String.valueOf(condolence.getMoney())));
// } else { // } else {
@@ -227,171 +230,171 @@ public class CondolenceMineController {
// } // }
// docData.put("money", condolence.getMoney()); // docData.put("money", condolence.getMoney());
String fileName; String fileName;
String templateName; String templateName;
String type = condolence.getType(); String type = condolence.getType();
if (("6fb2ae129e674c0dbadc21d9abc22943").equals(type)) { if (("6fb2ae129e674c0dbadc21d9abc22943").equals(type)) {
fileName = "工会会员结婚慰问报销审批单"+ "_" + fileName = "工会会员结婚慰问报销审批单" + "_" +
DateUtil.format(createTime, "yyyyMMdd") + ".docx"; DateUtil.format(createTime, "yyyyMMdd") + ".docx";
templateName = "condolence_marry"; templateName = "condolence_marry";
docData.put("type", "会员结婚慰问"); docData.put("type", "会员结婚慰问");
docData.put("way", "现金"); docData.put("way", "现金");
docData.put("occurTime", condolence.getOccurTime()); docData.put("occurTime", condolence.getOccurTime());
docData2.put("type", "会员结婚慰问"); docData2.put("type", "会员结婚慰问");
docData2.put("money", "1000"); docData2.put("money", "1000");
docData2.put("money_big", "壹仟元整"); docData2.put("money_big", "壹仟元整");
} else if (("cf4ce7af322d464f8f86d818fcc00203").equals(type)){ } else if (("cf4ce7af322d464f8f86d818fcc00203").equals(type)) {
fileName = "工会会员生病住院慰问报销审批单"+ "_" + fileName = "工会会员生病住院慰问报销审批单" + "_" +
DateUtil.format(createTime, "yyyyMMdd") + ".docx"; DateUtil.format(createTime, "yyyyMMdd") + ".docx";
templateName = "condolence_hospitalization"; templateName = "condolence_hospitalization";
docData.put("type", "会员生病慰问"); docData.put("type", "会员生病慰问");
docData.put("way", "现金"); docData.put("way", "现金");
docData.put("hospitalizationTime", condolence.getHospitalizationTime()); docData.put("hospitalizationTime", condolence.getHospitalizationTime());
docData.put("leaveHospitalTime", condolence.getLeaveHospitalTime()); docData.put("leaveHospitalTime", condolence.getLeaveHospitalTime());
docData.put("thisYearHospitalizationNum", condolence.getThisYearHospitalizationNum()); docData.put("thisYearHospitalizationNum", condolence.getThisYearHospitalizationNum());
docData2.put("type", "会员生病慰问"); docData2.put("type", "会员生病慰问");
docData2.put("money", "1000"); docData2.put("money", "1000");
docData2.put("money_big", "壹仟元整"); docData2.put("money_big", "壹仟元整");
} else if (("c90cb10dce6542e99ae271bee6fe8cc0").equals(type)){ } else if (("c90cb10dce6542e99ae271bee6fe8cc0").equals(type)) {
fileName = "工会会员生育慰问报销审批单"+ "_" + fileName = "工会会员生育慰问报销审批单" + "_" +
DateUtil.format(createTime, "yyyyMMdd") + ".docx"; DateUtil.format(createTime, "yyyyMMdd") + ".docx";
templateName = "condolence_birth"; templateName = "condolence_birth";
docData.put("type", "会员生育慰问"); docData.put("type", "会员生育慰问");
docData.put("way", "现金"); docData.put("way", "现金");
docData.put("occurTime", condolence.getOccurTime()); docData.put("occurTime", condolence.getOccurTime());
docData.put("hospitalizationTime", condolence.getHospitalizationTime()); docData.put("hospitalizationTime", condolence.getHospitalizationTime());
docData.put("leaveHospitalTime", condolence.getLeaveHospitalTime()); docData.put("leaveHospitalTime", condolence.getLeaveHospitalTime());
docData2.put("type", "会员生育慰问"); docData2.put("type", "会员生育慰问");
docData2.put("money", "1000"); docData2.put("money", "1000");
docData2.put("money_big", "壹仟元整"); docData2.put("money_big", "壹仟元整");
}else if (("4e316737e71047e0b01aea78524c1416").equals(type)){ } else if (("4e316737e71047e0b01aea78524c1416").equals(type)) {
fileName = "工会会员直系亲属去世报销审批单"+ "_" + fileName = "工会会员直系亲属去世报销审批单" + "_" +
DateUtil.format(createTime, "yyyyMMdd") + ".docx"; DateUtil.format(createTime, "yyyyMMdd") + ".docx";
templateName = "condolence_relative_died"; templateName = "condolence_relative_died";
docData.put("type", "会员直系亲属去世慰问"); docData.put("type", "会员直系亲属去世慰问");
docData.put("way", "现金"); docData.put("way", "现金");
docData.put("relation", condolence.getRelation()); docData.put("relation", condolence.getRelation());
docData.put("occurTime", condolence.getOccurTime()); docData.put("occurTime", condolence.getOccurTime());
docData2.put("type", "会员直系亲属去世慰问"); docData2.put("type", "会员直系亲属去世慰问");
docData2.put("money", "1000"); docData2.put("money", "1000");
docData2.put("money_big", "壹仟元整"); docData2.put("money_big", "壹仟元整");
}else if (("b8ee30faacb2469593dfedb5b52565aa").equals(type)){ } else if (("b8ee30faacb2469593dfedb5b52565aa").equals(type)) {
fileName = "工会会员职工去世慰问报销审批单"+ "_" + fileName = "工会会员职工去世慰问报销审批单" + "_" +
DateUtil.format(createTime, "yyyyMMdd") + ".docx"; DateUtil.format(createTime, "yyyyMMdd") + ".docx";
templateName = "condolence_died"; templateName = "condolence_died";
docData.put("type", "会员职工去世慰问"); docData.put("type", "会员职工去世慰问");
docData.put("way", "现金"); docData.put("way", "现金");
docData.put("occurTime", condolence.getOccurTime()); docData.put("occurTime", condolence.getOccurTime());
docData2.put("type", "会员职工去世慰问"); docData2.put("type", "会员职工去世慰问");
docData2.put("money", "3000"); docData2.put("money", "3000");
docData2.put("money_big", "叁仟元整"); docData2.put("money_big", "叁仟元整");
}else if (("1a2f7e8decb649a6ba8ca76e2af07779").equals(type)){ } else if (("1a2f7e8decb649a6ba8ca76e2af07779").equals(type)) {
fileName = "工会会员退休慰问报销审批单"+ "_" + fileName = "工会会员退休慰问报销审批单" + "_" +
DateUtil.format(createTime, "yyyyMMdd") + ".docx"; DateUtil.format(createTime, "yyyyMMdd") + ".docx";
templateName = "condolence_retirement"; templateName = "condolence_retirement";
docData.put("type", "会员退休慰问"); docData.put("type", "会员退休慰问");
docData.put("way", "工会统一发放慰问信及慰问卷"); docData.put("way", "工会统一发放慰问信及慰问卷");
docData.put("occurTime", condolence.getOccurTime()); docData.put("occurTime", condolence.getOccurTime());
docData2.put("type", "会员退休慰问"); docData2.put("type", "会员退休慰问");
docData2.put("money", "1000"); docData2.put("money", "1000");
docData2.put("money_big", "壹仟元整"); docData2.put("money_big", "壹仟元整");
} else { } else {
fileName = "工会会员慰问报销审批单"+ "_" + fileName = "工会会员慰问报销审批单" + "_" +
DateUtil.format(createTime, "yyyyMMdd") + ".docx"; DateUtil.format(createTime, "yyyyMMdd") + ".docx";
templateName = "condolence_other"; templateName = "condolence_other";
docData.put("type", "会员其他慰问"); docData.put("type", "会员其他慰问");
docData.put("way", "现金"); docData.put("way", "现金");
docData.put("occurTime", condolence.getOccurTime()); docData.put("occurTime", condolence.getOccurTime());
} }
List<ProcessTaskVO> doneTaskVos = new ArrayList<>(); List<ProcessTaskVO> doneTaskVos = new ArrayList<>();
List<ProcessTask> doneTaskList = flowEngine.processTaskService().getDoneTaskList(info.getLong("instanceId"), null); List<ProcessTask> doneTaskList = flowEngine.processTaskService().getDoneTaskList(info.getLong("instanceId"), null);
for (ProcessTask doneTask : doneTaskList) { for (ProcessTask doneTask : doneTaskList) {
ProcessTaskVO taskVO = flowEngine.processTaskService().findById(doneTask.getId()); ProcessTaskVO taskVO = flowEngine.processTaskService().findById(doneTask.getId());
doneTaskVos.add(taskVO); doneTaskVos.add(taskVO);
} }
// 分工会审核 // 分工会审核
doneTaskVos.stream().filter(task -> "分工会审核".equals(task.getDisplayName())) doneTaskVos.stream().filter(task -> "分工会审核".equals(task.getDisplayName()))
.max(Comparator.comparing(ProcessTaskVO::getCreatedAt)) .max(Comparator.comparing(ProcessTaskVO::getCreatedAt))
.ifPresent(v -> { .ifPresent(v -> {
Dict taskFormData = v.getTaskFormData(); Dict taskFormData = v.getTaskFormData();
HashMap<String, Object> approval = new HashMap<>(); HashMap<String, Object> approval = new HashMap<>();
approval.put("date", DateUtil.format(v.getFinishTime(), "yyyy年MM月dd日")); approval.put("date", DateUtil.format(v.getFinishTime(), "yyyy年MM月dd日"));
approval.put("user", taskFormData.getStr("tf_userName")); approval.put("user", taskFormData.getStr("tf_userName"));
if (StrUtil.isNotBlank(taskFormData.getStr("tf_sign"))) { if (StrUtil.isNotBlank(taskFormData.getStr("tf_sign"))) {
approval.put("sign", sysOfficeTemplateUtil.createPictureRenderData(taskFormData.getStr("tf_sign"))); approval.put("sign", sysOfficeTemplateUtil.createPictureRenderData(taskFormData.getStr("tf_sign")));
} }
approval.put("opinion", taskFormData.getStr("tf_opinion")); approval.put("opinion", taskFormData.getStr("tf_opinion"));
docData.put("fgh", approval); docData.put("fgh", approval);
docData2.put("fgh", approval); docData2.put("fgh", approval);
}); });
// 校工会副主席审核 // 校工会副主席审核
doneTaskVos.stream().filter(task -> "校工会审核".equals(task.getDisplayName())) doneTaskVos.stream().filter(task -> "校工会审核".equals(task.getDisplayName()))
.max(Comparator.comparing(ProcessTaskVO::getCreatedAt)) .max(Comparator.comparing(ProcessTaskVO::getCreatedAt))
.ifPresent(v -> { .ifPresent(v -> {
Dict taskFormData = v.getTaskFormData(); Dict taskFormData = v.getTaskFormData();
HashMap<String, Object> approval = new HashMap<>(); HashMap<String, Object> approval = new HashMap<>();
approval.put("date", DateUtil.format(v.getFinishTime(), "yyyy年MM月dd日")); approval.put("date", DateUtil.format(v.getFinishTime(), "yyyy年MM月dd日"));
approval.put("user", taskFormData.getStr("tf_userName")); approval.put("user", taskFormData.getStr("tf_userName"));
if (StrUtil.isNotBlank(taskFormData.getStr("tf_sign"))) { if (StrUtil.isNotBlank(taskFormData.getStr("tf_sign"))) {
approval.put("sign", sysOfficeTemplateUtil.createPictureRenderData(taskFormData.getStr("tf_sign"))); approval.put("sign", sysOfficeTemplateUtil.createPictureRenderData(taskFormData.getStr("tf_sign")));
} }
approval.put("opinion", taskFormData.getStr("tf_opinion")); approval.put("opinion", taskFormData.getStr("tf_opinion"));
docData.put("xzx", approval); docData.put("xzx", approval);
docData2.put("xzx", approval); docData2.put("xzx", approval);
}); });
response.setContentType("application/octet-stream"); response.setContentType("application/octet-stream");
response.setHeader("content-disposition", "attachment;filename=" response.setHeader("content-disposition", "attachment;filename="
+ URLEncoder.encode("报销审批单.zip", "UTF-8")); + URLEncoder.encode("报销审批单.zip", "UTF-8"));
try (ZipOutputStream zipOut = new ZipOutputStream(response.getOutputStream())) { try (ZipOutputStream zipOut = new ZipOutputStream(response.getOutputStream())) {
ZipEntry zipEntry = new ZipEntry(fileName); ZipEntry zipEntry = new ZipEntry(fileName);
zipOut.putNextEntry(zipEntry); zipOut.putNextEntry(zipEntry);
try (ByteArrayOutputStream wordOut = new ByteArrayOutputStream()) { try (ByteArrayOutputStream wordOut = new ByteArrayOutputStream()) {
XWPFTemplate.compile(sysOfficeTemplateUtil.getTemplate(templateName)) XWPFTemplate.compile(sysOfficeTemplateUtil.getTemplate(templateName))
.render(docData) .render(docData)
.writeAndClose(wordOut); .writeAndClose(wordOut);
zipOut.write(wordOut.toByteArray()); zipOut.write(wordOut.toByteArray());
} }
zipOut.closeEntry(); zipOut.closeEntry();
String fileName2 = "武汉城市职业学院报销审批单" + ".docx"; String fileName2 = "武汉城市职业学院报销审批单" + ".docx";
ZipEntry zipEntry2 = new ZipEntry(fileName2); ZipEntry zipEntry2 = new ZipEntry(fileName2);
zipOut.putNextEntry(zipEntry2); zipOut.putNextEntry(zipEntry2);
try (ByteArrayOutputStream wordOut2 = new ByteArrayOutputStream()) { try (ByteArrayOutputStream wordOut2 = new ByteArrayOutputStream()) {
XWPFTemplate.compile(sysOfficeTemplateUtil.getTemplate("reimbursement_approval")) XWPFTemplate.compile(sysOfficeTemplateUtil.getTemplate("reimbursement_approval"))
.render(docData2) .render(docData2)
.writeAndClose(wordOut2); .writeAndClose(wordOut2);
zipOut.write(wordOut2.toByteArray()); zipOut.write(wordOut2.toByteArray());
} }
zipOut.closeEntry(); zipOut.closeEntry();
zipOut.finish(); zipOut.finish();
} catch (IOException e) { } catch (IOException e) {
log.error("导出 ZIP 文件失败,ID: {}, 错误信息: {}", id, e.getMessage()); log.error("导出 ZIP 文件失败,ID: {}, 错误信息: {}", id, e.getMessage());
throw e; throw e;
} }
} }
} }
@@ -102,7 +102,7 @@ public class CondolenceSchoolPrincipalApprovalController {
cnd.andEX("info.applyUnitId", "=", unitId); cnd.andEX("info.applyUnitId", "=", unitId);
cnd.and("t.taskName", "=", "34f7938e-47a3-4b3a-b4e0-92b7a3f47865"); cnd.and("t.taskName", "=", "34f7938e-47a3-4b3a-b4e0-92b7a3f47865");
// cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId())); cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
if (approval) { if (approval) {
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode())); cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
@@ -115,7 +115,7 @@ public class CondolenceSchoolPrincipalApprovalController {
} else { } else {
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy())); cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
} }
cnd.groupBy("t.id"); cnd.groupBy("info.id");
sql.setCondition(cnd); sql.setCondition(cnd);
Pagination<NutMap> pageVO = condolenceService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); Pagination<NutMap> pageVO = condolenceService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
return Result.success(pageVO); return Result.success(pageVO);
@@ -27,6 +27,7 @@ import org.nutz.lang.util.NutMap;
import org.nutz.mvc.annotation.At; import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok; import org.nutz.mvc.annotation.Ok;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid; import javax.validation.Valid;
/** /**
@@ -92,6 +93,7 @@ public class MemberApplyMineController {
t.finishTime, t.finishTime,
t.taskParentId, t.taskParentId,
t.variable taskVariable, t.variable taskVariable,
GROUP_CONCAT(DISTINCT ta.actorName, '(', ta.actorAccount, ')' ) AS auditUser,
IF((SELECT taskName FROM wf_process_task tt WHERE tt.id = t.taskParentId) = 'startTask', 1, 0) canRevoke, IF((SELECT taskName FROM wf_process_task tt WHERE tt.id = t.taskParentId) = 'startTask', 1, 0) canRevoke,
(select MAX(id) from wf_process_task where processInstanceId = ins.id and taskName = 'startTask' AND taskState in (10,20)) AS startTaskId (select MAX(id) from wf_process_task where processInstanceId = ins.id and taskName = 'startTask' AND taskState in (10,20)) AS startTaskId
FROM FROM
@@ -115,7 +117,7 @@ public class MemberApplyMineController {
} else { } else {
cnd.orderBy("info." + pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy())); cnd.orderBy("info." + pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
} }
cnd.groupBy("t.id"); cnd.groupBy("info.id");
sql.setCondition(cnd); sql.setCondition(cnd);
Pagination<NutMap> pagination = memberCommonService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); Pagination<NutMap> pagination = memberCommonService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
return Result.success().addData(pagination); return Result.success().addData(pagination);
@@ -147,4 +149,16 @@ public class MemberApplyMineController {
MemberApplyRecord record = dao.fetch(MemberApplyRecord.class, id); MemberApplyRecord record = dao.fetch(MemberApplyRecord.class, id);
return Result.success().addData(record); return Result.success().addData(record);
} }
/**
* 导出入会申请
* @param id
* @return
*/
@At
@Ok("void")
@SaCheckPermission(value = {"member.apply.mine", "member.apply.branchUnionApproval", "member.apply.branchUnionApproval"}, mode = SaMode.OR)
public void exportApplyDocx(String id, HttpServletResponse response) {
memberCommonService.exportApplyDocx(id, response);
}
} }
@@ -10,6 +10,7 @@ import com.budwk.app.zhgh.staffmanage.member.param.pageform.MemberManagePageForm
import org.nutz.dao.sql.Sql; import org.nutz.dao.sql.Sql;
import org.nutz.lang.util.NutMap; import org.nutz.lang.util.NutMap;
import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@@ -115,4 +116,10 @@ public interface MemberCommonService extends BaseService<Sys_user> {
* @param type 类型: apply or change * @param type 类型: apply or change
*/ */
void validateApplyOrChangeIsDoing(String userId, String type); void validateApplyOrChangeIsDoing(String userId, String type);
/**
* 导出入会申请
* @param id
*/
void exportApplyDocx(String id, HttpServletResponse response);
} }
@@ -3,6 +3,7 @@ package com.budwk.app.zhgh.staffmanage.member.service.impl;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Dict;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HtmlUtil; import cn.hutool.http.HtmlUtil;
@@ -10,9 +11,13 @@ import com.budwk.app.base.constant.RoleConstant;
import com.budwk.app.base.exception.BaseException; import com.budwk.app.base.exception.BaseException;
import com.budwk.app.base.page.Pagination; import com.budwk.app.base.page.Pagination;
import com.budwk.app.base.service.impl.BaseServiceImpl; import com.budwk.app.base.service.impl.BaseServiceImpl;
import com.budwk.app.base.utils.CommonDownloadUtil;
import com.budwk.app.base.utils.SysOfficeTemplateUtil;
import com.budwk.app.flow.engine.FlowEngine; import com.budwk.app.flow.engine.FlowEngine;
import com.budwk.app.flow.entity.ProcessInstance; import com.budwk.app.flow.entity.ProcessInstance;
import com.budwk.app.flow.entity.ProcessTask;
import com.budwk.app.flow.enums.ProcessTaskStateEnum; import com.budwk.app.flow.enums.ProcessTaskStateEnum;
import com.budwk.app.flow.vo.ProcessTaskVO;
import com.budwk.app.sys.models.*; import com.budwk.app.sys.models.*;
import com.budwk.app.sys.services.SysDictService; import com.budwk.app.sys.services.SysDictService;
import com.budwk.app.sys.services.SysRoleService; import com.budwk.app.sys.services.SysRoleService;
@@ -21,6 +26,8 @@ import com.budwk.app.sys.views.View_user;
import com.budwk.app.web.commons.auth.utils.AuthUtil; import com.budwk.app.web.commons.auth.utils.AuthUtil;
import com.budwk.app.web.commons.auth.utils.SecurityUtil; import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import com.budwk.app.zhgh.activity.basic.models.ActivityUserScope; import com.budwk.app.zhgh.activity.basic.models.ActivityUserScope;
import com.budwk.app.zhgh.democratic.suggestion.models.SuggestionInfo;
import com.budwk.app.zhgh.staffbenefit.condolence.model.Condolence;
import com.budwk.app.zhgh.staffmanage.member.constant.MemberChangeOrigin; import com.budwk.app.zhgh.staffmanage.member.constant.MemberChangeOrigin;
import com.budwk.app.zhgh.staffmanage.member.constant.MemberChangeType; import com.budwk.app.zhgh.staffmanage.member.constant.MemberChangeType;
import com.budwk.app.zhgh.staffmanage.member.models.MemberApplyRecord; import com.budwk.app.zhgh.staffmanage.member.models.MemberApplyRecord;
@@ -29,12 +36,12 @@ import com.budwk.app.zhgh.staffmanage.member.param.pageform.MemberManagePageForm
import com.budwk.app.zhgh.staffmanage.member.service.MemberCommonService; import com.budwk.app.zhgh.staffmanage.member.service.MemberCommonService;
import com.budwk.app.zhgh.staffmanage.specialstaff.model.SpecialStaff; import com.budwk.app.zhgh.staffmanage.specialstaff.model.SpecialStaff;
import com.budwk.app.zhgh.welfare.model.WelfareList; import com.budwk.app.zhgh.welfare.model.WelfareList;
import com.deepoove.poi.XWPFTemplate;
import com.deepoove.poi.config.Configure;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.ddr.poi.html.HtmlRenderPolicy;
import org.nutz.aop.interceptor.ioc.TransAop; import org.nutz.aop.interceptor.ioc.TransAop;
import org.nutz.dao.Chain; import org.nutz.dao.*;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql; import org.nutz.dao.sql.Sql;
import org.nutz.dao.util.Daos; import org.nutz.dao.util.Daos;
import org.nutz.dao.util.cri.SqlExpressionGroup; import org.nutz.dao.util.cri.SqlExpressionGroup;
@@ -46,9 +53,18 @@ import org.nutz.lang.Lang;
import org.nutz.lang.random.R; import org.nutz.lang.random.R;
import org.nutz.lang.util.NutMap; import org.nutz.lang.util.NutMap;
import javax.servlet.http.HttpServletResponse;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*; import java.util.*;
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicBoolean;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
/** /**
* @version 1.0 * @version 1.0
@@ -67,6 +83,10 @@ public class MemberManageServiceImpl extends BaseServiceImpl<Sys_user> implement
private SysRoleService sysRoleService; private SysRoleService sysRoleService;
@Inject @Inject
private SysUserService sysUserService; private SysUserService sysUserService;
@Inject
private FlowEngine flowEngine;
@Inject
private SysOfficeTemplateUtil sysOfficeTemplateUtil;
public MemberManageServiceImpl(Dao dao) { public MemberManageServiceImpl(Dao dao) {
super(dao); super(dao);
@@ -129,7 +149,7 @@ public class MemberManageServiceImpl extends BaseServiceImpl<Sys_user> implement
$condition $condition
"""); """);
Cnd cnd = Cnd.NEW(); Cnd cnd = Cnd.NEW();
MemberManagePageForm.buildSearch(cnd,pageForm); MemberManagePageForm.buildSearch(cnd, pageForm);
sql.setCondition(cnd); sql.setCondition(cnd);
cnd.desc("his.changeTime"); cnd.desc("his.changeTime");
cnd.groupBy("u.id"); cnd.groupBy("u.id");
@@ -170,7 +190,7 @@ public class MemberManageServiceImpl extends BaseServiceImpl<Sys_user> implement
cnd.andEX("his.unitId", "=", pageForm.getUnitId()); cnd.andEX("his.unitId", "=", pageForm.getUnitId());
cnd.andEX("his.personType", "=", pageForm.getPersonType()); cnd.andEX("his.personType", "=", pageForm.getPersonType());
cnd.andEX("his.userState", "=", pageForm.getUserState()); cnd.andEX("his.userState", "=", pageForm.getUserState());
if (StrUtil.isNotBlank(pageForm.getChangeType())){ if (StrUtil.isNotBlank(pageForm.getChangeType())) {
cnd.and(new Static("JSON_CONTAINS(his.changeTypes, JSON_ARRAY('%s'), '$')".formatted(pageForm.getChangeType()))); cnd.and(new Static("JSON_CONTAINS(his.changeTypes, JSON_ARRAY('%s'), '$')".formatted(pageForm.getChangeType())));
} }
@@ -264,7 +284,7 @@ public class MemberManageServiceImpl extends BaseServiceImpl<Sys_user> implement
changeTypes.add(list.get(0).name()); changeTypes.add(list.get(0).name());
} }
} }
if (!ObjectUtil.equals(user.getMember() == 1, record.getMember())){ if (!ObjectUtil.equals(user.getMember() == 1, record.getMember())) {
if (record.getMember()) { if (record.getMember()) {
changeTypes.add(MemberChangeType.RESTORE.name()); changeTypes.add(MemberChangeType.RESTORE.name());
} else { } else {
@@ -408,7 +428,7 @@ public class MemberManageServiceImpl extends BaseServiceImpl<Sys_user> implement
} }
@Override @Override
public List<NutMap> getAllChangeInfo(String userId) { public List<NutMap> getAllChangeInfo(String userId) {
List<NutMap> resultMapList = new ArrayList<>(); List<NutMap> resultMapList = new ArrayList<>();
Sql sql = Sqls.fetchString(Sqls.create("select loginname from sys_user where id = @id").setParam("id", userId).toString()); Sql sql = Sqls.fetchString(Sqls.create("select loginname from sys_user where id = @id").setParam("id", userId).toString());
@@ -514,8 +534,9 @@ public class MemberManageServiceImpl extends BaseServiceImpl<Sys_user> implement
/** /**
* 验证申请或变更是否正在进行 * 验证申请或变更是否正在进行
* @param userId 用户id *
* @param type 类型: apply or change * @param userId 用户id
* @param type 类型: apply or change
*/ */
@Override @Override
public void validateApplyOrChangeIsDoing(String userId, String type) { public void validateApplyOrChangeIsDoing(String userId, String type) {
@@ -566,4 +587,131 @@ public class MemberManageServiceImpl extends BaseServiceImpl<Sys_user> implement
} }
return value.toString(); return value.toString();
} }
@Override
public void exportApplyDocx(String id, HttpServletResponse response) {
MemberApplyRecord member = dao().fetch(MemberApplyRecord.class, Cnd.where("id", "=", id));
if (member == null) {
throw new RuntimeException("会员申请记录不存在");
}
Sql sql = Sqls.create("""
SELECT
info.*,
ins.id AS instanceId
FROM
`member_apply_record` info
LEFT JOIN wf_process_instance ins ON ins.businessNo = info.id
WHERE
info.id = @id
""").setParam("id", id);
sql.setCallback(Sqls.callback.map());
dao().execute(sql);
NutMap info = (NutMap) sql.getResult();
HashMap<String, Object> docData = new HashMap<>();
docData.put("unitName", member.getUnitName());
docData.put("time", DateUtil.format(new Date(), "yyyy年MM月dd日"));
docData.put("username", member.getUsername());
docData.put("sex", member.getSex());
docData.put("birthday", StrUtil.isNotBlank(member.getBirthday()) ? DateUtil.parse(member.getBirthday()).toString("yyyy-MM-dd") : "");
docData.put("political", member.getPolitical());
docData.put("nation", member.getNation());
docData.put("education", member.getEducation());
docData.put("nativePlace", member.getNativePlace());
docData.put("marriage", member.getMarriage());
docData.put("specialty", StrUtil.isNotBlank(member.getSpecialty()) ? HtmlUtil.cleanHtmlTag(member.getSpecialty()) : "");
docData.put("jobCategory", member.getJobCategory());
docData.put("idCard", member.getIdCard());
docData.put("mobile", member.getMobile());
docData.put("arrivalAtSchoolDate", StrUtil.isNotBlank(member.getArrivalAtSchoolDate()) ? DateUtil.parse(member.getArrivalAtSchoolDate()).toString("yyyy-MM-dd") : "");
docData.put("homeAddress", member.getHomeAddress());
docData.put("personalData", sysOfficeTemplateUtil.convertRichTextToDocText(member.getPersonalData()));
docData.put("sign", sysOfficeTemplateUtil.createPictureRenderData(member.getSign()));
docData.put("applyDateTime", member.getApplyDateTime() != null ? DateUtil.format(member.getApplyDateTime(), "yyyy年MM月dd日") : "");
// 处理家庭成员列表
if (member.getFamilies() != null && !member.getFamilies().isEmpty()) {
StringBuilder familyStr = new StringBuilder();
for (int i = 0; i < member.getFamilies().size(); i++) {
NutMap fam = NutMap.WRAP(member.getFamilies().get(i));
familyStr.append((i + 1)).append(". ")
.append("关系:").append(StrUtil.nullToDefault(fam.getString("relation"), "")).append(", ")
.append("姓名:").append(StrUtil.nullToDefault(fam.getString("name"), "")).append(", ")
.append("单位:").append(StrUtil.nullToDefault(fam.getString("unit"), "")).append(", ")
.append("备注:").append(StrUtil.nullToDefault(fam.getString("remark"), "")).append("\n");
}
docData.put("familiesStr", familyStr.toString());
} else {
docData.put("familiesStr", "");
}
List<ProcessTaskVO> doneTaskVos = new ArrayList<>();
Long instanceId = info.getLong("instanceId");
if (instanceId != null) {
List<ProcessTask> doneTaskList = flowEngine.processTaskService().getDoneTaskList(instanceId, null);
for (ProcessTask doneTask : doneTaskList) {
ProcessTaskVO taskVO = flowEngine.processTaskService().findById(doneTask.getId());
doneTaskVos.add(taskVO);
}
}
// 提取分工会审核意见
doneTaskVos.stream().filter(task -> "分工会审核".equals(task.getDisplayName()))
.max(Comparator.comparing(ProcessTaskVO::getCreatedAt))
.ifPresent(v -> {
Dict taskFormData = v.getTaskFormData();
HashMap<String, Object> approval = new HashMap<>();
approval.put("date", v.getFinishTime() != null ? DateUtil.format(v.getFinishTime(), "yyyy年MM月dd日") : "");
approval.put("user", taskFormData != null ? taskFormData.getStr("tf_userName") : "");
if (taskFormData != null && StrUtil.isNotBlank(taskFormData.getStr("tf_sign"))) {
approval.put("sign", sysOfficeTemplateUtil.createPictureRenderData(taskFormData.getStr("tf_sign")));
}
approval.put("opinion", taskFormData != null ? taskFormData.getStr("tf_opinion") : "");
docData.put("fgh", approval);
});
// 提取校工会审核意见
doneTaskVos.stream().filter(task -> "校工会审核".equals(task.getDisplayName()))
.max(Comparator.comparing(ProcessTaskVO::getCreatedAt))
.ifPresent(v -> {
Dict taskFormData = v.getTaskFormData();
HashMap<String, Object> approval = new HashMap<>();
approval.put("date", v.getFinishTime() != null ? DateUtil.format(v.getFinishTime(), "yyyy年MM月dd日") : "");
approval.put("user", taskFormData != null ? taskFormData.getStr("tf_userName") : "");
if (taskFormData != null && StrUtil.isNotBlank(taskFormData.getStr("tf_sign"))) {
approval.put("sign", sysOfficeTemplateUtil.createPictureRenderData(taskFormData.getStr("tf_sign")));
}
approval.put("opinion", taskFormData != null ? taskFormData.getStr("tf_opinion") : "");
docData.put("xgh", approval);
});
String fileName = "会员入会申请表_" + member.getUsername() + "_" + DateUtil.format(new Date(), "yyyyMMdd") + ".docx";
response.setContentType("application/vnd.openxmlformats-officedocument.wordprocessingml.document");
response.setHeader("content-disposition", "attachment;filename=" + URLEncoder.encode(fileName, StandardCharsets.UTF_8));
HtmlRenderPolicy htmlRenderPolicy = new HtmlRenderPolicy();
htmlRenderPolicy.getConfig().setShowDefaultTableBorderInTableCell(true);
Configure config = Configure.builder()
.bind("personalData", htmlRenderPolicy)
.build();
try {
XWPFTemplate.compile(sysOfficeTemplateUtil.getTemplate("member_apply_form"), config)
.render(docData)
.write(response.getOutputStream());
} catch (IOException e) {
log.error("导出会员入会申请表失败,ID: {}, 错误信息: {}", id, e.getMessage());
throw new RuntimeException("导出文件失败", e);
}
}
} }
@@ -81,6 +81,10 @@ layout("/layouts/platform.html"){
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"> :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="tf_userSign"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<pc-signature v-model="formData.tf_userSign"></pc-signature>
</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>
@@ -75,9 +75,15 @@ const condolenceInfo = {
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE" <dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
:value="task.ext.submitType"></dict-tag> :value="task.ext.submitType"></dict-tag>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="办理意见" v-if="!task.ext.isFirstTaskNode">{{ <el-descriptions-item label="办理意见" v-if="!task.ext.isFirstTaskNode":span="3">{{
task.taskFormData.opinion }} task.taskFormData.opinion }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="签字" :span="3" v-if="!task.ext.isFirstTaskNode">
<el-image :src="task.taskFormData.tf_userSign"
v-if="task.taskFormData.tf_userSign"
class="signature-image"></el-image>
<span v-else>暂无签字</span>
</el-descriptions-item>
</el-descriptions> </el-descriptions>
</div> </div>
</template> </template>
@@ -101,6 +101,10 @@ layout("/layouts/platform.html"){
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"> :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="tf_userSign"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<pc-signature v-model="formData.tf_userSign"></pc-signature>
</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>
@@ -101,6 +101,10 @@ layout("/layouts/platform.html"){
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"> :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="tf_userSign"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<pc-signature v-model="formData.tf_userSign"></pc-signature>
</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>
@@ -48,6 +48,10 @@ layout("/layouts/platform.html"){
<el-button @click="openView(row)" size="mini" type="primary"> <el-button @click="openView(row)" size="mini" type="primary">
查看 查看
</el-button> </el-button>
<el-button v-if="row.instanceState === 20"
@click="exportApplyDocx(row.id)" size="mini" type="primary">
导出申请表
</el-button>
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" <el-button v-if="row.taskKey === 'startTask' || !row.instanceId"
@click="onEdit(row)" size="mini" type="primary"> @click="onEdit(row)" size="mini" type="primary">
编辑 编辑
@@ -102,6 +106,9 @@ layout("/layouts/platform.html"){
'common-query': COMMON_QUERY, 'common-query': COMMON_QUERY,
}, },
methods: { methods: {
exportApplyDocx(id) {
this.$downLoad("/platform/member/apply/mine/exportApplyDocx", { id })
},
onApply() { onApply() {
commonUtil.pjaxPush('/platform/member/apply/submit') commonUtil.pjaxPush('/platform/member/apply/submit')
}, },
@@ -174,12 +174,7 @@
v-model="formData.isVoluntary"> v-model="formData.isVoluntary">
<div> <div>
<span style="flex: 1; word-wrap: break-word; word-break: break-all; white-space: normal;"> <span style="flex: 1; word-wrap: break-word; word-break: break-all; white-space: normal;">
我自愿申请加入学校工会,并委托学校按规定代为扣缴工会会员会费 我自愿加入中华全国总工会,遵守工会章程,执行工会决议,积极参加工会活动,为把我国建设成为富强、民主、文明的社会主义国家而努力奋斗
</span>
</div>
<div>
<span style="flex: 1; word-wrap: break-word; word-break: break-all; white-space: normal;">
我将严格遵守工会章程,认真执行工会决议,积极参与工会活动,主动融入“学校健康幸福家”建设,为营造温暖、和谐、奋进的校园氛围贡献力量,以实际行动助力学校各项事业发展。
</span> </span>
</div> </div>
</el-checkbox> </el-checkbox>
@@ -203,33 +203,28 @@ layout("/layouts/platform.html"){
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="签字" :span="3">
<el-form-item prop="sign">
<pc-signature v-model="formData.sign"></pc-signature>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="入会意愿" :span="3"> <el-descriptions-item label="入会意愿" :span="3">
<el-form-item prop="isVoluntary"> <el-form-item prop="isVoluntary">
<el-checkbox <el-checkbox
size="medium" size="medium"
style="width: 95%; color: #F56C6C; display: flex; align-items: center;" style="width: 95%; color: #F56C6C; display: flex; align-items: center;"
v-model="formData.isVoluntary"> v-model="formData.isVoluntary">
<div> <div>
<span <span
style="flex: 1; word-wrap: break-word; word-break: break-all; white-space: normal;"> style="flex: 1; word-wrap: break-word; word-break: break-all; white-space: normal;">
我自愿申请加入学校工会,并委托学校按规定代为扣缴工会会员会费 我自愿加入中华全国总工会,遵守工会章程,执行工会决议,积极参加工会活动,为把我国建设成为富强、民主、文明的社会主义国家而努力奋斗
</span>
</div>
<div>
<span
style="flex: 1; word-wrap: break-word; word-break: break-all; white-space: normal;">
我将严格遵守工会章程,认真执行工会决议,积极参与工会活动,主动融入“学校健康幸福家”建设,为营造温暖、和谐、奋进的校园氛围贡献力量,以实际行动助力学校各项事业发展。
</span> </span>
</div> </div>
</el-checkbox> </el-checkbox>
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="签字" :span="3">
<el-form-item prop="sign">
<pc-signature v-model="formData.sign"></pc-signature>
</el-form-item>
</el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-form> </el-form>
<el-row type="flex" justify="end" class="mt20"> <el-row type="flex" justify="end" class="mt20">
@@ -38,7 +38,7 @@ layout("/layouts/platform_h5.html"){
<table-column label="所属工会">{{row.applyUnionName}}</table-column> <table-column label="所属工会">{{row.applyUnionName}}</table-column>
<table-column label="所属单位">{{row.applyUnitName}}</table-column> <table-column label="所属单位">{{row.applyUnitName}}</table-column>
<table-column label="慰问类型">{{row.typeName}}</table-column> <table-column label="慰问类型">{{row.typeName}}</table-column>
<table-column label="当前节点">{{row.curTaskName}}</table-column> <table-column label="当前节点">{{row.curTaskName}}<span v-if="row.auditUser">-{{row.auditUser}}</span></table-column>
</template> </template>
<template #actions="{index,row}"> <template #actions="{index,row}">
<div class="action-btn" @click="onView(row)"> <div class="action-btn" @click="onView(row)">
@@ -70,6 +70,13 @@ layout("/layouts/platform_h5.html"){
maxlength="100" maxlength="100"
show-word-limit show-word-limit
></van-field> ></van-field>
<van-cell-group title="电子签名" class="form-section">
<van-field class="more-text" name="tf_userSign" label="">
<template #input>
<h5-signature v-model="formData.tf_userSign" slot="input"></h5-signature>
</template>
</van-field>
</van-cell-group>
</van-form> </van-form>
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px"> <div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
<van-button type="danger" block @click="handleTaskAction(6)">退回</van-button> <van-button type="danger" block @click="handleTaskAction(6)">退回</van-button>
@@ -68,6 +68,11 @@ const condolenceInfo = {
<van-cell title="办理意见" v-if="!task.ext.isFirstTaskNode" class="direction-column-cell"> <van-cell title="办理意见" v-if="!task.ext.isFirstTaskNode" class="direction-column-cell">
<div v-html="task.taskFormData.tf_opinion"></div> <div v-html="task.taskFormData.tf_opinion"></div>
</van-cell> </van-cell>
<van-cell class="direction-column-cell" title="签字"v-if="!task.ext.isFirstTaskNode">
<van-image :src="task.taskFormData.tf_userSign" v-if="task.taskFormData.tf_userSign"
class="signature-image"></van-image>
<span v-else>暂无签字</span>
</van-cell>
</van-cell-group> </van-cell-group>
</template> </template>
</div> </div>
@@ -33,7 +33,8 @@ layout("/layouts/platform_h5.html"){
<table-column label="所属工会">{{row.applyUnionName}}</table-column> <table-column label="所属工会">{{row.applyUnionName}}</table-column>
<table-column label="所属单位">{{row.applyUnitName}}</table-column> <table-column label="所属单位">{{row.applyUnitName}}</table-column>
<table-column label="慰问类型">{{row.typeName}}</table-column> <table-column label="慰问类型">{{row.typeName}}</table-column>
<table-column label="当前节点">{{row.taskName}}</table-column> <table-column label="当前节点">{{row.taskName}}<span v-if="row.auditUser">-{{row.auditUser}}</span>
</table-column>
</template> </template>
<template #actions="{index,row}"> <template #actions="{index,row}">
<div class="action-btn" @click="onView(row)"> <div class="action-btn" @click="onView(row)">
@@ -78,7 +79,7 @@ layout("/layouts/platform_h5.html"){
year: new Date().getFullYear(), year: new Date().getFullYear(),
type: null type: null
}, },
typeOptions: [], typeOptions: []
} }
}, },
methods: { methods: {
@@ -129,10 +130,11 @@ layout("/layouts/platform_h5.html"){
} }
}) })
}) })
.catch(() => {}) .catch(() => {
})
}, },
async queryCondolenceType() { async queryCondolenceType() {
const res = await this.$axios.post('/platform/condolence/type/queryCondolenceType') const res = await this.$axios.post("/platform/condolence/type/queryCondolenceType")
return res.data return res.data
}, },
doSearch() { doSearch() {
@@ -142,7 +144,7 @@ layout("/layouts/platform_h5.html"){
this.$refs.tableListRef.doSearch() this.$refs.tableListRef.doSearch()
}) })
} }
}, }
}) })
</script> </script>
@@ -70,6 +70,13 @@ layout("/layouts/platform_h5.html"){
maxlength="100" maxlength="100"
show-word-limit show-word-limit
></van-field> ></van-field>
<van-cell-group title="电子签名" class="form-section">
<van-field class="more-text" name="tf_userSign" label="">
<template #input>
<h5-signature v-model="formData.tf_userSign" slot="input"></h5-signature>
</template>
</van-field>
</van-cell-group>
</van-form> </van-form>
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px"> <div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
<van-button type="danger" block @click="handleTaskAction(6)">退回</van-button> <van-button type="danger" block @click="handleTaskAction(6)">退回</van-button>
@@ -70,6 +70,13 @@ layout("/layouts/platform_h5.html"){
maxlength="100" maxlength="100"
show-word-limit show-word-limit
></van-field> ></van-field>
<van-cell-group title="电子签名" class="form-section">
<van-field class="more-text" name="tf_userSign" label="">
<template #input>
<h5-signature v-model="formData.tf_userSign" slot="input"></h5-signature>
</template>
</van-field>
</van-cell-group>
</van-form> </van-form>
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px"> <div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
<van-button type="danger" block @click="handleTaskAction(6)">退回</van-button> <van-button type="danger" block @click="handleTaskAction(6)">退回</van-button>
@@ -59,6 +59,11 @@ layout("/layouts/platform_h5.html"){
maxlength="100" maxlength="100"
show-word-limit show-word-limit
></van-field> ></van-field>
<van-field class="more-text" name="tf_sign" label="" required>
<template #input>
<h5-signature v-model="formData.tf_sign" slot="input"></h5-signature>
</template>
</van-field>
</van-form> </van-form>
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px"> <div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
<van-button type="danger" block @click="handleTaskAction(6)">退回</van-button> <van-button type="danger" block @click="handleTaskAction(6)">退回</van-button>
@@ -13,10 +13,12 @@ const INFO = {
<van-cell title="学历">{{ viewData.education }}</van-cell> <van-cell title="学历">{{ viewData.education }}</van-cell>
<van-cell title="学位">{{ viewData.academicDegree }}</van-cell> <van-cell title="学位">{{ viewData.academicDegree }}</van-cell>
<van-cell title="籍贯">{{ viewData.nativePlace }}</van-cell>
<van-cell title="党政职务">{{ viewData.position }}</van-cell> <van-cell title="党政职务">{{ viewData.position }}</van-cell>
<van-cell title="工作单位">{{ viewData.unitName }}</van-cell> <van-cell title="工作单位">{{ viewData.unitName }}</van-cell>
<van-cell title="所属工会">{{ viewData.unionName }}</van-cell> <van-cell title="所属工会">{{ viewData.unionName }}</van-cell>
<van-cell title="岗位名称">{{ viewData.jobCategory }}</van-cell>
<van-cell title="身份证号码">{{ viewData.idCard }}</van-cell> <van-cell title="身份证号码">{{ viewData.idCard }}</van-cell>
<van-cell title="联系电话">{{ viewData.mobile }}</van-cell> <van-cell title="联系电话">{{ viewData.mobile }}</van-cell>
@@ -73,6 +75,12 @@ const INFO = {
</template> </template>
</van-cell> </van-cell>
<van-cell title="签字" >
<van-image :src="viewData.sign"
v-if="viewData.sign"
class="signature-image"></van-image>
</van-cell>
</van-cell-group> </van-cell-group>
<template v-for="task in doneTasks"> <template v-for="task in doneTasks">
@@ -91,12 +99,17 @@ const INFO = {
</van-cell> </van-cell>
<van-cell title="办理时间">{{ task.finishTime }}</van-cell> <van-cell title="办理时间">{{ task.finishTime }}</van-cell>
<van-cell title="办理结果"> <van-cell title="办理结果">
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT" <dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
:value="task.ext.caseFilingResult"></dict-tag> :value="task.ext.submitType"></dict-tag>
</van-cell> </van-cell>
<van-cell title="办理意见" v-if="!task.ext.isFirstTaskNode" class="direction-column-cell"> <van-cell title="办理意见" v-if="!task.ext.isFirstTaskNode" class="direction-column-cell">
<div v-html="task.taskFormData.tf_opinion"></div> <div v-html="task.taskFormData.tf_opinion"></div>
</van-cell> </van-cell>
<van-cell title="签字" >
<van-image :src="task.taskFormData.tf_sign"
v-if="task.taskFormData.tf_sign"
class="signature-image"></van-image>
</van-cell>
</van-cell-group> </van-cell-group>
</template> </template>
</div> </div>
@@ -32,7 +32,7 @@ layout("/layouts/platform_h5.html"){
<table-column label="所属工会">{{row.unionName}}</table-column> <table-column label="所属工会">{{row.unionName}}</table-column>
<table-column label="工作单位">{{row.unitName}}</table-column> <table-column label="工作单位">{{row.unitName}}</table-column>
<table-column label="填报时间">{{row.applyDateTime}}</table-column> <table-column label="填报时间">{{row.applyDateTime}}</table-column>
<table-column label="当前节点">{{row.taskName}}</table-column> <table-column label="当前节点">{{row.taskName}}<span v-if="row.auditUser">-{{row.auditUser}}</span></table-column>
</template> </template>
<template #actions="{index,row}"> <template #actions="{index,row}">
<div class="action-btn" @click="onView(row)"> <div class="action-btn" @click="onView(row)">
@@ -59,6 +59,11 @@ layout("/layouts/platform_h5.html"){
maxlength="100" maxlength="100"
show-word-limit show-word-limit
></van-field> ></van-field>
<van-field class="more-text" name="tf_sign" label="" required>
<template #input>
<h5-signature v-model="formData.tf_sign" slot="input"></h5-signature>
</template>
</van-field>
</van-form> </van-form>
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px"> <div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
<van-button type="danger" block @click="handleTaskAction(6)">退回</van-button> <van-button type="danger" block @click="handleTaskAction(6)">退回</van-button>
@@ -106,6 +106,16 @@ layout("/layouts/platform_h5.html"){
@confirm="(v)=>{formData.academicDegree = v;showAcademicDegreePicker = false}" @confirm="(v)=>{formData.academicDegree = v;showAcademicDegreePicker = false}"
></van-picker> ></van-picker>
</van-popup> </van-popup>
<van-field
v-model="formData.nativePlace"
name="nativePlace"
label="籍贯"
placeholder="请输入籍贯"
clearable
maxlength="30"
:rules="[{ required: true }]"
required
></van-field>
<van-field <van-field
v-model="formData.position" v-model="formData.position"
name="position" name="position"
@@ -118,6 +128,17 @@ layout("/layouts/platform_h5.html"){
<van-field v-model="formData.unitName" label="工作单位" readonly></van-field> <van-field v-model="formData.unitName" label="工作单位" readonly></van-field>
<van-field v-model="formData.unionName" label="所属工会" readonly></van-field> <van-field v-model="formData.unionName" label="所属工会" readonly></van-field>
<van-field
v-model="formData.jobCategory"
name="jobCategory"
label="岗位名称"
placeholder="请输入岗位名称"
clearable
maxlength="30"
:rules="[{ required: true }]"
required
></van-field>
<!--<van-field <!--<van-field
v-model="formData.campusName" v-model="formData.campusName"
name="campusName" name="campusName"
@@ -139,22 +160,22 @@ layout("/layouts/platform_h5.html"){
placeholder="请填写在职状态" placeholder="请填写在职状态"
clickable clickable
></van-field>--> ></van-field>-->
<van-field <!-- <van-field-->
v-model="formData.personType" <!-- v-model="formData.personType"-->
name="personType" <!-- name="personType"-->
label="教职工类别" <!-- label="教职工类别"-->
readonly <!-- readonly-->
placeholder="请填写人员类型" <!-- placeholder="请填写人员类型"-->
clickable <!-- clickable-->
></van-field> <!-- ></van-field>-->
<van-field <!-- <van-field-->
v-model="formData.preparedBy" <!-- v-model="formData.preparedBy"-->
name="preparedBy" <!-- name="preparedBy"-->
label="编制类别" <!-- label="编制类别"-->
readonly <!-- readonly-->
placeholder="请填写编制类别" <!-- placeholder="请填写编制类别"-->
clickable <!-- clickable-->
></van-field> <!-- ></van-field>-->
<van-field <van-field
v-model="formData.marriage" v-model="formData.marriage"
name="marriage" name="marriage"
@@ -164,6 +185,8 @@ layout("/layouts/platform_h5.html"){
placeholder="请选择婚姻状况" placeholder="请选择婚姻状况"
@click="showMarriagePicker = true" @click="showMarriagePicker = true"
clickable clickable
required
:rules="[{ required: true }]"
></van-field> ></van-field>
<van-popup position="bottom" round v-model:show="showMarriagePicker"> <van-popup position="bottom" round v-model:show="showMarriagePicker">
<van-picker show-toolbar <van-picker show-toolbar
@@ -250,8 +273,7 @@ layout("/layouts/platform_h5.html"){
:rules="[{ required:true, message: '请填写姓名' }]"></van-field> :rules="[{ required:true, message: '请填写姓名' }]"></van-field>
<van-field label="工作单位" v-model="o.unit" placeholder="请填写工作单位" <van-field label="工作单位" v-model="o.unit" placeholder="请填写工作单位"
:rules="[{ required:true, message: '请填写工作单位' }]"></van-field> :rules="[{ required:true, message: '请填写工作单位' }]"></van-field>
<van-field label="备注" v-model="o.remark" placeholder="请填写备注" <van-field label="备注" v-model="o.remark" placeholder="请填写备注"></van-field>
:rules="[{ required:true, message: '请填写备注' }]"></van-field>
</div> </div>
</template> </template>
<template v-else> <template v-else>
@@ -273,17 +295,22 @@ layout("/layouts/platform_h5.html"){
<text-editor v-model="formData.specialty"></text-editor> <text-editor v-model="formData.specialty"></text-editor>
</van-cell-group> </van-cell-group>
<van-cell-group title="签字" class="form-section">
<van-field class="more-text" name="sign" label="" required>
<template #input>
<h5-signature v-model="formData.sign" slot="input"></h5-signature>
</template>
</van-field>
</van-cell-group>
<van-cell-group title="入会意愿" class="form-section"> <van-cell-group title="入会意愿" class="form-section">
<van-checkbox style="font-size: 17px;padding: 12px" icon-size="24px" <van-checkbox style="font-size: 17px;padding: 12px" icon-size="24px"
v-model="formData.isVoluntary" shape="square"> v-model="formData.isVoluntary" shape="square">
<div style="text-indent: 2.1rem"> <div style="text-indent: 2.1rem">
<span :style="'color:' + (formData.isVoluntary ? '#1989fa' : '#F56C6C') "> <span :style="'color:' + (formData.isVoluntary ? '#1989fa' : '#F56C6C') ">
我自愿申请加入学校工会,并委托学校按规定代为扣缴工会会员会费 我自愿加入中华全国总工会,遵守工会章程,执行工会决议,积极参加工会活动,为把我国建设成为富强、民主、文明的社会主义国家而努力奋斗
</span>
</div>
<div style="text-indent: 2.1rem">
<span :style="'color:' + (formData.isVoluntary ? '#1989fa' : '#F56C6C') ">
我将严格遵守工会章程,认真执行工会决议,积极参与工会活动,主动融入“学校健康幸福家”建设,为营造温暖、和谐、奋进的校园氛围贡献力量,以实际行动助力学校各项事业发展。
</span> </span>
</div> </div>
</van-checkbox> </van-checkbox>
@@ -364,6 +391,10 @@ layout("/layouts/platform_h5.html"){
this.$toast.fail("请填写特长及获奖情况") this.$toast.fail("请填写特长及获奖情况")
return return
} }
if (!this.formData.sign){
this.$toast.fail("请填写签字")
return
}
this.$dialog.confirm({ this.$dialog.confirm({
title: "提示", title: "提示",
message: "您确定要提交吗?" message: "您确定要提交吗?"
@@ -401,6 +432,10 @@ layout("/layouts/platform_h5.html"){
this.$toast.fail("请填写特长及获奖情况") this.$toast.fail("请填写特长及获奖情况")
return return
} }
if (!this.formData.sign){
this.$toast.fail("请填写签字")
return
}
this.$dialog.confirm({ this.$dialog.confirm({
title: "提示", title: "提示",
message: "您确定要提交吗?" message: "您确定要提交吗?"
@@ -473,6 +508,8 @@ layout("/layouts/platform_h5.html"){
union, union,
campus, campus,
userState, userState,
nativePlace,
jobCategory,
personType, personType,
preparedBy, preparedBy,
idCard, idCard,
@@ -492,6 +529,8 @@ layout("/layouts/platform_h5.html"){
this.$set(this.formData, "nation", nation) this.$set(this.formData, "nation", nation)
this.$set(this.formData, "political", political) this.$set(this.formData, "political", political)
this.$set(this.formData, "position", position) this.$set(this.formData, "position", position)
this.$set(this.formData, "nativePlace", nativePlace)
this.$set(this.formData, "jobCategory", jobCategory)
this.$set(this.formData, "education", education) this.$set(this.formData, "education", education)
this.$set(this.formData, "academicDegree", academicDegree) this.$set(this.formData, "academicDegree", academicDegree)
this.$set(this.formData, "campus", campus) this.$set(this.formData, "campus", campus)