Merge remote-tracking branch 'origin/main'
@@ -1,6 +1,6 @@
|
|||||||
package io.v.nutz.sys.controllers.platform.sys;
|
package io.v.nutz.sys.controllers.platform.sys;
|
||||||
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.wizzer.framework.base.Result;
|
import cn.wizzer.framework.base.Result;
|
||||||
import io.v.nutz.base.enums.Env;
|
import io.v.nutz.base.enums.Env;
|
||||||
@@ -15,7 +15,6 @@ import io.v.nutz.zhgh.activity.models.ActivityUserScope;
|
|||||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||||
import org.jsoup.Jsoup;
|
import org.jsoup.Jsoup;
|
||||||
import org.jsoup.nodes.Document;
|
import org.jsoup.nodes.Document;
|
||||||
import org.jsoup.nodes.Element;
|
|
||||||
import org.jsoup.select.Elements;
|
import org.jsoup.select.Elements;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Dao;
|
import org.nutz.dao.Dao;
|
||||||
@@ -38,6 +37,7 @@ import javax.servlet.http.HttpServletRequest;
|
|||||||
import javax.servlet.http.HttpSession;
|
import javax.servlet.http.HttpSession;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@@ -210,12 +210,19 @@ public class SysHomeController {
|
|||||||
@RequiresAuthentication
|
@RequiresAuthentication
|
||||||
public Result listHomeActivity() {
|
public Result listHomeActivity() {
|
||||||
FieldFilter fieldFilter = FieldFilter.locked(Sys_home_activity.class, "classPath");
|
FieldFilter fieldFilter = FieldFilter.locked(Sys_home_activity.class, "classPath");
|
||||||
List<Sys_home_activity> list = Daos.ext(dao, fieldFilter).query(Sys_home_activity.class, Cnd.where("enable", "=", 1).desc("top"));
|
List<Sys_home_activity> list = Daos.ext(dao,fieldFilter) .query(Sys_home_activity.class, Cnd.where("enable", "=", 1).desc("top"));
|
||||||
String userId = ShiroUtil.getUserId();
|
String userId = ShiroUtil.getUserId();
|
||||||
|
|
||||||
List<Sys_home_activity> allowActivityList = new ArrayList<>();
|
List<Sys_home_activity> allowActivityList = new ArrayList<>();
|
||||||
|
// 今天的时间
|
||||||
|
Date today = DateUtil.date();
|
||||||
for (Sys_home_activity activity : list) {
|
for (Sys_home_activity activity : list) {
|
||||||
|
// 该活动的时间范围
|
||||||
|
Date startDate = activity.getStartDate();
|
||||||
|
Date endDate = activity.getEndDate();
|
||||||
|
// 判断当前时间是否在活动范围内,不在就过滤掉
|
||||||
|
if (!DateUtil.isIn(today, startDate, endDate)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
Integer allowUserGroupId = activity.getAllowUserGroupId();
|
Integer allowUserGroupId = activity.getAllowUserGroupId();
|
||||||
String allowUserSql = activity.getAllowUserSql();
|
String allowUserSql = activity.getAllowUserSql();
|
||||||
activity.setAllowUserSql(null);
|
activity.setAllowUserSql(null);
|
||||||
@@ -232,10 +239,10 @@ public class SysHomeController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StrUtil.isNotBlank(allowUserSql)) {
|
if (StrUtil.isNotBlank(allowUserSql)){
|
||||||
Sql sql = Sqls.create(allowUserSql).setParam("userId", userId);
|
Sql sql = Sqls.create(allowUserSql).setParam("userId", userId);
|
||||||
NutMap nutMap = (NutMap) Daos.query(dao, sql.toString(), Sqls.callback.map());
|
NutMap nutMap = (NutMap) Daos.query(dao, sql.toString(), Sqls.callback.map());
|
||||||
if (Lang.isNotEmpty(nutMap)) {
|
if (Lang.isNotEmpty(nutMap) && StrUtil.isNotBlank(nutMap.getString("userId"))) {
|
||||||
allowActivityList.add(activity);
|
allowActivityList.add(activity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ import cn.hutool.core.util.StrUtil;
|
|||||||
import cn.wizzer.framework.base.Result;
|
import cn.wizzer.framework.base.Result;
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
import io.v.nutz.base.annontation.ViReturn;
|
||||||
import io.v.nutz.base.page.Pagination;
|
import io.v.nutz.base.page.Pagination;
|
||||||
import io.v.nutz.base.utils.PageUtil;
|
|
||||||
import io.v.nutz.base.utils.Roles;
|
|
||||||
import io.v.nutz.base.query.PageForm;
|
import io.v.nutz.base.query.PageForm;
|
||||||
import io.v.nutz.base.service.ViService;
|
import io.v.nutz.base.service.ViService;
|
||||||
|
import io.v.nutz.base.utils.PageUtil;
|
||||||
|
import io.v.nutz.base.utils.Roles;
|
||||||
import io.v.nutz.sys.models.*;
|
import io.v.nutz.sys.models.*;
|
||||||
import io.v.nutz.sys.services.*;
|
import io.v.nutz.sys.services.*;
|
||||||
import io.v.nutz.web.commons.controller.ViCommonCon;
|
import io.v.nutz.web.commons.controller.ViCommonCon;
|
||||||
@@ -102,7 +102,10 @@ public class SysUnionMangeCon {
|
|||||||
}
|
}
|
||||||
sysUserRoleService.insert(role);
|
sysUserRoleService.insert(role);
|
||||||
} else if (type == 2) {
|
} else if (type == 2) {
|
||||||
Cnd cnd = Cnd.where("roleId", "=", roleId).and("userId", "=", userId);
|
Cnd cnd = Cnd.where("roleId", "=", roleId);
|
||||||
|
if (Strings.isNotBlank(userId)) {
|
||||||
|
cnd.and("userId", "=", userId);
|
||||||
|
}
|
||||||
// if (Strings.isNotBlank(unionid)) {
|
// if (Strings.isNotBlank(unionid)) {
|
||||||
// cnd.and("unionid", "=", unionid);
|
// cnd.and("unionid", "=", unionid);
|
||||||
// }
|
// }
|
||||||
|
|||||||
@@ -682,7 +682,8 @@ public class ViCommonCon {
|
|||||||
u.sex,
|
u.sex,
|
||||||
unit.`id` unitid,
|
unit.`id` unitid,
|
||||||
unit.`name` unitname,
|
unit.`name` unitname,
|
||||||
un.unionname
|
un.unionname,
|
||||||
|
un.id unionid
|
||||||
FROM
|
FROM
|
||||||
sys_user u
|
sys_user u
|
||||||
LEFT JOIN sys_unit unit ON u.unitid = unit.id
|
LEFT JOIN sys_unit unit ON u.unitid = unit.id
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import io.v.nutz.base.service.BaseService;
|
|||||||
import io.v.nutz.base.service.SimpleService;
|
import io.v.nutz.base.service.SimpleService;
|
||||||
import io.v.nutz.base.utils.Vi;
|
import io.v.nutz.base.utils.Vi;
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
|
import io.v.nutz.zhgh.activity.models.ActivityTissue;
|
||||||
import io.v.nutz.zhgh.activity.models.ActivityTissuePerson;
|
import io.v.nutz.zhgh.activity.models.ActivityTissuePerson;
|
||||||
import org.apache.shiro.authz.annotation.Logical;
|
import org.apache.shiro.authz.annotation.Logical;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
@@ -94,7 +95,7 @@ public class ActivityUnionApplyUserController {
|
|||||||
cnd.andEx("tissue.type", "=", type);
|
cnd.andEx("tissue.type", "=", type);
|
||||||
cnd.andEx("tissue.state", "=", 3);
|
cnd.andEx("tissue.state", "=", 3);
|
||||||
cnd.andEx("tissue.projectTypeCode", "!=", 50004);
|
cnd.andEx("tissue.projectTypeCode", "!=", 50004);
|
||||||
cnd.andEx("tissue.signUpMethod", "in", List.of(1, 2));
|
cnd.andEx("tissue.signUpMethod", "in", List.of(1, 2, 3));
|
||||||
|
|
||||||
if (Strings.isNotBlank(name)) {
|
if (Strings.isNotBlank(name)) {
|
||||||
cnd.where().andLike("tissue.name", name);
|
cnd.where().andLike("tissue.name", name);
|
||||||
@@ -143,7 +144,8 @@ public class ActivityUnionApplyUserController {
|
|||||||
@At
|
@At
|
||||||
@ViReturn
|
@ViReturn
|
||||||
@RequiresPermissions(value = {"activity.club.applyUser", "activity.union.applyUser", "activity.school.applyUser"}, logical = Logical.OR)
|
@RequiresPermissions(value = {"activity.club.applyUser", "activity.union.applyUser", "activity.school.applyUser"}, logical = Logical.OR)
|
||||||
public Object selfUnionUsers(String groupId) {
|
public Object selfUnionUsers(String groupId,String tissueId) {
|
||||||
|
ActivityTissue tissue = baseService.dao().fetch(ActivityTissue.class, Cnd.where("id", "=", tissueId));
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
u.id,
|
u.id,
|
||||||
@@ -159,7 +161,9 @@ public class ActivityUnionApplyUserController {
|
|||||||
$condition
|
$condition
|
||||||
""");
|
""");
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
cnd.and("u.unionId", "=", Vi.getUnionId());
|
if (tissue.getSignUpMethod() != 3 && tissue.getType() != 40003) {
|
||||||
|
cnd.and("u.unionId", "=", Vi.getUnionId());
|
||||||
|
}
|
||||||
cnd.and("aus.groupId", "=", groupId);
|
cnd.and("aus.groupId", "=", groupId);
|
||||||
cnd.groupBy("u.id");
|
cnd.groupBy("u.id");
|
||||||
cnd.asc("u.unitname").asc("u.unionname");
|
cnd.asc("u.unitname").asc("u.unionname");
|
||||||
@@ -178,12 +182,14 @@ public class ActivityUnionApplyUserController {
|
|||||||
FROM
|
FROM
|
||||||
activity_tissue_person atp
|
activity_tissue_person atp
|
||||||
LEFT JOIN `user` u ON atp.userId = u.id
|
LEFT JOIN `user` u ON atp.userId = u.id
|
||||||
WHERE
|
$condition
|
||||||
atp.tissueId = @tissueId
|
|
||||||
AND u.unionid = @unionId
|
|
||||||
""");
|
""");
|
||||||
sql.setParam("tissueId", tissueId);
|
Cnd cnd = Cnd.NEW();
|
||||||
sql.setParam("unionId", Vi.getUnionId());
|
cnd.and("atp.tissueId", "=", tissueId);
|
||||||
|
cnd.and("atp.applyUserId", "=", ShiroUtil.getUserId());
|
||||||
|
/* if (tissue.getSignUpMethod() != 3 && tissue.getType() != 40003) {
|
||||||
|
cnd.and("u.unionid", "=", Vi.getUnionId());
|
||||||
|
}*/
|
||||||
List<NutMap> list = baseService.listMap(sql);
|
List<NutMap> list = baseService.listMap(sql);
|
||||||
List<String> userIds = list.stream().map(v -> v.getString("userId")).collect(Collectors.toList());
|
List<String> userIds = list.stream().map(v -> v.getString("userId")).collect(Collectors.toList());
|
||||||
return userIds;
|
return userIds;
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package io.v.nutz.zhgh.activity.controller.union;
|
|||||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.deepoove.poi.XWPFTemplate;
|
import com.deepoove.poi.XWPFTemplate;
|
||||||
import com.deepoove.poi.config.Configure;
|
import com.deepoove.poi.config.Configure;
|
||||||
import com.deepoove.poi.policy.HackLoopTableRenderPolicy;
|
import com.deepoove.poi.policy.HackLoopTableRenderPolicy;
|
||||||
@@ -125,7 +126,7 @@ public class ActivityUnionManageController {
|
|||||||
""");
|
""");
|
||||||
if (!ShiroUtil.hasRole("sysadmin")) {
|
if (!ShiroUtil.hasRole("sysadmin")) {
|
||||||
if (activity_type == 40002) {
|
if (activity_type == 40002) {
|
||||||
cnd.and("unionId", "=", vi.getUnionId());
|
cnd.and("unionId", "=", Vi.getUnionId());
|
||||||
} else if (activity_type == 40003) {
|
} else if (activity_type == 40003) {
|
||||||
cnd.and("id", "in", " SELECT userid FROM sys_club_user WHERE clubid = '%s' ".formatted(vi.getClubId()));
|
cnd.and("id", "in", " SELECT userid FROM sys_club_user WHERE clubid = '%s' ".formatted(vi.getClubId()));
|
||||||
}
|
}
|
||||||
@@ -153,7 +154,9 @@ public class ActivityUnionManageController {
|
|||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
@RequiresPermissions(value = {"activity.union.info", "activity.club.info", "activity.school.info2"}, logical = Logical.OR)
|
@RequiresPermissions(value = {"activity.union.info", "activity.club.info", "activity.school.info2"}, logical = Logical.OR)
|
||||||
public Object doAdd(@Param(value = "tissue") ActivityTissue tissue) {
|
public Object doAdd(@Param(value = "tissue") ActivityTissue tissue) {
|
||||||
tissue.setUserId(ShiroUtil.getUserId());
|
if (StrUtil.isBlank(tissue.getUserId())) {
|
||||||
|
tissue.setUserId(ShiroUtil.getUserId());
|
||||||
|
}
|
||||||
tissue.setApplyTime(DateUtil.getDate());
|
tissue.setApplyTime(DateUtil.getDate());
|
||||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) {
|
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) {
|
||||||
tissue.setState(1);
|
tissue.setState(1);
|
||||||
@@ -166,8 +169,6 @@ public class ActivityUnionManageController {
|
|||||||
tissue.setClubId(vi.getClubId());
|
tissue.setClubId(vi.getClubId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
tissue.getGoods().forEach(v -> {
|
tissue.getGoods().forEach(v -> {
|
||||||
v.setActivityCode(tissue.getActivityCode());
|
v.setActivityCode(tissue.getActivityCode());
|
||||||
v.setReid(tissue.getId());
|
v.setReid(tissue.getId());
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
package io.v.nutz.zhgh.difficulty.controller;
|
|
||||||
|
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
|
||||||
import io.v.nutz.zhgh.difficulty.model.DifficultyApply;
|
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
|
||||||
import org.nutz.mvc.annotation.At;
|
|
||||||
import org.nutz.mvc.annotation.Ok;
|
|
||||||
|
|
||||||
@IocBean
|
|
||||||
@At("/platform/difficulty/apply")
|
|
||||||
@Ok("json:full")
|
|
||||||
public class DifficultyApplyController {
|
|
||||||
|
|
||||||
|
|
||||||
@At
|
|
||||||
@ViReturn
|
|
||||||
public Object doApply(DifficultyApply difficultyApply){
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
package io.v.nutz.zhgh.difficulty.model;
|
|
||||||
|
|
||||||
import io.v.nutz.sys.models.Sys_file;
|
|
||||||
import lombok.Data;
|
|
||||||
import org.nutz.dao.entity.annotation.*;
|
|
||||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 困难补助
|
|
||||||
*/
|
|
||||||
|
|
||||||
@Table("difficulty_apply")
|
|
||||||
@Data
|
|
||||||
public class DifficultyApply {
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Name
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
|
||||||
@PrevInsert(uu32 = true)
|
|
||||||
private String id;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
|
||||||
@Comment("申请人")
|
|
||||||
private String applyUser;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@ColDefine(type = ColType.INT)
|
|
||||||
@Comment("申请模式")
|
|
||||||
private String applyMode;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
|
||||||
@Comment("受补助人")
|
|
||||||
private String difficultyUser;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
|
||||||
@Comment("申请事由")
|
|
||||||
private String remark;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@ColDefine(type = ColType.MYSQL_JSON)
|
|
||||||
@Comment("附件")
|
|
||||||
private List<Sys_file> files;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("状态id")
|
|
||||||
@ColDefine(type = ColType.INT, width = 8)
|
|
||||||
private Integer stateId;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("院级工会主席审核记录")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
|
||||||
private String unionAuditId;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("校工会审核记录")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
|
||||||
private String schoolAuditId;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -106,7 +106,7 @@ public class FundsApplyController {
|
|||||||
@At
|
@At
|
||||||
@ViReturn
|
@ViReturn
|
||||||
@RequiresPermissions(value = {"sys.jf.Funds.apply","sys.jf.Funds.apply2","sys.jf.reimbursement.apply"},logical = Logical.OR)
|
@RequiresPermissions(value = {"sys.jf.Funds.apply","sys.jf.Funds.apply2","sys.jf.reimbursement.apply"},logical = Logical.OR)
|
||||||
public Object getCardNumberByPayeeId(String payeeId){
|
public Object getCardNumberByPayeeId(String username){
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
JT.bankName,
|
JT.bankName,
|
||||||
@@ -116,15 +116,15 @@ public class FundsApplyController {
|
|||||||
JSON_TABLE(
|
JSON_TABLE(
|
||||||
budgets,
|
budgets,
|
||||||
'$[*]' COLUMNS(
|
'$[*]' COLUMNS(
|
||||||
payeeId VARCHAR(255) PATH '$.payeeId',
|
username VARCHAR(255) PATH '$.username',
|
||||||
bankName VARCHAR(255) PATH '$.bankName',
|
bankName VARCHAR(255) PATH '$.bankName',
|
||||||
bankCardNum VARCHAR(255) PATH '$.bankCardNum'
|
bankCardNum VARCHAR(255) PATH '$.bankCardNum'
|
||||||
)
|
)
|
||||||
) AS JT
|
) AS JT
|
||||||
WHERE
|
WHERE
|
||||||
JT.payeeId = @payeeId
|
JT.username = @username
|
||||||
ORDER BY bx.apply_time DESC LIMIT 1
|
ORDER BY bx.apply_time DESC LIMIT 1
|
||||||
""").setParam("payeeId", payeeId);
|
""").setParam("username", username);
|
||||||
sql.setCallback(Sqls.callback.map());
|
sql.setCallback(Sqls.callback.map());
|
||||||
dao.execute(sql);
|
dao.execute(sql);
|
||||||
return sql.getResult();
|
return sql.getResult();
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import cn.wizzer.framework.base.service.BaseService;
|
|||||||
import com.deepoove.poi.XWPFTemplate;
|
import com.deepoove.poi.XWPFTemplate;
|
||||||
import com.deepoove.poi.config.Configure;
|
import com.deepoove.poi.config.Configure;
|
||||||
import com.deepoove.poi.data.PictureRenderData;
|
import com.deepoove.poi.data.PictureRenderData;
|
||||||
|
import com.deepoove.poi.data.PictureType;
|
||||||
import com.deepoove.poi.policy.HackLoopTableRenderPolicy;
|
import com.deepoove.poi.policy.HackLoopTableRenderPolicy;
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
import io.v.nutz.base.annontation.ViReturn;
|
||||||
import io.v.nutz.base.model.Goods;
|
import io.v.nutz.base.model.Goods;
|
||||||
@@ -24,6 +25,7 @@ import io.v.nutz.zhgh.jf.service.ActivityBxService;
|
|||||||
import io.v.nutz.zhgh.jf.service.ActivityFileService;
|
import io.v.nutz.zhgh.jf.service.ActivityFileService;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
|
import org.nutz.boot.starter.ftp.FtpService;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
import org.nutz.dao.sql.Sql;
|
import org.nutz.dao.sql.Sql;
|
||||||
@@ -38,6 +40,7 @@ import org.nutz.mvc.annotation.Ok;
|
|||||||
import org.nutz.mvc.annotation.Param;
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
@@ -69,6 +72,9 @@ public class ReimbursementCon {
|
|||||||
@Inject
|
@Inject
|
||||||
private BaseService baseService;
|
private BaseService baseService;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private FtpService ftpService;
|
||||||
|
|
||||||
|
|
||||||
@At("")
|
@At("")
|
||||||
@Ok("beetl:/platform/jf/activitybx/reimbursement.html")
|
@Ok("beetl:/platform/jf/activitybx/reimbursement.html")
|
||||||
@@ -315,9 +321,16 @@ public class ReimbursementCon {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private PictureRenderData getImage(String base64) throws IOException {
|
private PictureRenderData getImage(String base64) throws IOException {
|
||||||
String s = base64.split(",")[1];
|
if (base64.startsWith("data")) {
|
||||||
byte[] bytes = Base64.getDecoder().decode(s);
|
String s = base64.split(",")[1];
|
||||||
return new PictureRenderData(70, 30, ".png", bytes);
|
byte[] bytes = Base64.getDecoder().decode(s);
|
||||||
|
return new PictureRenderData(70, 30, ".png", bytes);
|
||||||
|
} else {
|
||||||
|
ByteArrayOutputStream os = new ByteArrayOutputStream();
|
||||||
|
ftpService.download(base64, os);
|
||||||
|
os.close();
|
||||||
|
return new PictureRenderData(70, 30, PictureType.PNG, os.toByteArray());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import cn.hutool.json.JSONUtil;
|
|||||||
import com.deepoove.poi.XWPFTemplate;
|
import com.deepoove.poi.XWPFTemplate;
|
||||||
import com.deepoove.poi.config.Configure;
|
import com.deepoove.poi.config.Configure;
|
||||||
import com.deepoove.poi.data.PictureRenderData;
|
import com.deepoove.poi.data.PictureRenderData;
|
||||||
|
import com.deepoove.poi.data.PictureType;
|
||||||
import com.deepoove.poi.policy.HackLoopTableRenderPolicy;
|
import com.deepoove.poi.policy.HackLoopTableRenderPolicy;
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
import io.v.nutz.base.annontation.ViReturn;
|
||||||
import io.v.nutz.base.utils.Html2Text;
|
import io.v.nutz.base.utils.Html2Text;
|
||||||
@@ -15,6 +16,7 @@ import io.v.nutz.web.commons.utils.ShiroUtil;
|
|||||||
import io.v.nutz.zhgh.jf.model.ActivityBx;
|
import io.v.nutz.zhgh.jf.model.ActivityBx;
|
||||||
import io.v.nutz.zhgh.jf.service.ActivityBxService;
|
import io.v.nutz.zhgh.jf.service.ActivityBxService;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.nutz.boot.starter.ftp.FtpService;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
import org.nutz.dao.sql.Sql;
|
import org.nutz.dao.sql.Sql;
|
||||||
@@ -28,6 +30,7 @@ import org.nutz.mvc.annotation.Param;
|
|||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.BufferedOutputStream;
|
import java.io.BufferedOutputStream;
|
||||||
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
@@ -50,9 +53,10 @@ public class ReimbursementViewCon {
|
|||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Vi vi;
|
private Vi vi;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private ActivityBxService activityBxService;
|
private ActivityBxService activityBxService;
|
||||||
|
@Inject
|
||||||
|
private FtpService ftpService;
|
||||||
|
|
||||||
private SysUnionService sysUnionService;
|
private SysUnionService sysUnionService;
|
||||||
|
|
||||||
@@ -127,9 +131,16 @@ public class ReimbursementViewCon {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private PictureRenderData getImage(String base64) throws IOException {
|
private PictureRenderData getImage(String base64) throws IOException {
|
||||||
String s = base64.split(",")[1];
|
if (base64.startsWith("data:")) {
|
||||||
byte[] bytes = Base64.getDecoder().decode(s);
|
String s = base64.split(",")[1];
|
||||||
return new PictureRenderData(100, 30, ".png", bytes);
|
byte[] bytes = Base64.getDecoder().decode(s);
|
||||||
|
return new PictureRenderData(70, 30, ".png", bytes);
|
||||||
|
} else {
|
||||||
|
ByteArrayOutputStream os = new ByteArrayOutputStream();
|
||||||
|
ftpService.download(base64, os);
|
||||||
|
os.close();
|
||||||
|
return new PictureRenderData(70, 30, PictureType.PNG, os.toByteArray());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
|
|||||||
@@ -83,7 +83,9 @@ public class ActivityReimbursementApplyController {
|
|||||||
List<ActivityBx.Budget> budgets = activityBx.getBudgets();
|
List<ActivityBx.Budget> budgets = activityBx.getBudgets();
|
||||||
double sum = budgets.stream().mapToDouble(ActivityBx.Budget::getActualPrice).sum();
|
double sum = budgets.stream().mapToDouble(ActivityBx.Budget::getActualPrice).sum();
|
||||||
activityBx.setActivity_money(sum);
|
activityBx.setActivity_money(sum);
|
||||||
activityBx.setReimbursement_apply_time(DateUtil.today());
|
if (activityBx.getReimbursement_apply_time() == null){
|
||||||
|
activityBx.setReimbursement_apply_time(DateUtil.today());
|
||||||
|
}
|
||||||
|
|
||||||
if (StrUtil.isNotBlank(activityBx.getId()) && count > 0) {
|
if (StrUtil.isNotBlank(activityBx.getId()) && count > 0) {
|
||||||
activityBx.setFiles(null);
|
activityBx.setFiles(null);
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
package io.v.nutz.zhgh.member;
|
package io.v.nutz.zhgh.member;
|
||||||
|
|
||||||
import io.v.nutz.base.utils.Roles;
|
import io.v.nutz.base.utils.Roles;
|
||||||
import io.v.nutz.zhgh.member.constant.MemberOrigin;
|
import io.v.nutz.base.utils.ViResource;
|
||||||
import io.v.nutz.zhgh.member.constant.MemberStatus;
|
|
||||||
import io.v.nutz.sys.models.Sys_user;
|
import io.v.nutz.sys.models.Sys_user;
|
||||||
import io.v.nutz.sys.models.Sys_user_role;
|
import io.v.nutz.sys.models.Sys_user_role;
|
||||||
import io.v.nutz.sys.services.SysUserService;
|
import io.v.nutz.sys.services.SysUserService;
|
||||||
import io.v.nutz.base.utils.ViResource;
|
import io.v.nutz.zhgh.member.constant.MemberOrigin;
|
||||||
|
import io.v.nutz.zhgh.member.constant.MemberStatus;
|
||||||
import org.apache.shiro.crypto.hash.Sha256Hash;
|
import org.apache.shiro.crypto.hash.Sha256Hash;
|
||||||
import org.apache.shiro.util.ByteSource;
|
import org.apache.shiro.util.ByteSource;
|
||||||
import org.nutz.dao.Chain;
|
import org.nutz.dao.Chain;
|
||||||
|
|||||||
@@ -2,13 +2,13 @@ package io.v.nutz.zhgh.member.controller;
|
|||||||
|
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
import io.v.nutz.base.annontation.ViReturn;
|
||||||
import io.v.nutz.base.utils.Vi;
|
import io.v.nutz.base.utils.Vi;
|
||||||
|
import io.v.nutz.sys.models.Sys_menu;
|
||||||
|
import io.v.nutz.sys.models.Sys_user;
|
||||||
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
import io.v.nutz.zhgh.member.constant.MemberApplyState;
|
import io.v.nutz.zhgh.member.constant.MemberApplyState;
|
||||||
import io.v.nutz.zhgh.member.constant.MemberChangeApplyState;
|
import io.v.nutz.zhgh.member.constant.MemberChangeApplyState;
|
||||||
import io.v.nutz.zhgh.member.constant.MemberChangeRecordMode;
|
import io.v.nutz.zhgh.member.constant.MemberChangeRecordMode;
|
||||||
import io.v.nutz.zhgh.member.service.MemberService;
|
import io.v.nutz.zhgh.member.service.MemberService;
|
||||||
import io.v.nutz.sys.models.Sys_menu;
|
|
||||||
import io.v.nutz.sys.models.Sys_user;
|
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
|
|||||||
@@ -3,17 +3,16 @@ package io.v.nutz.zhgh.member.controller;
|
|||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.wizzer.framework.base.Result;
|
import cn.wizzer.framework.base.Result;
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
import io.v.nutz.base.annontation.ViReturn;
|
||||||
|
import io.v.nutz.base.service.ViService;
|
||||||
import io.v.nutz.sys.models.Sys_unit;
|
import io.v.nutz.sys.models.Sys_unit;
|
||||||
import io.v.nutz.zhgh.data.constant.UserChangeType;
|
import io.v.nutz.sys.models.Sys_user;
|
||||||
|
import io.v.nutz.sys.services.SysUserService;
|
||||||
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
import io.v.nutz.zhgh.data.model.UserHistory;
|
import io.v.nutz.zhgh.data.model.UserHistory;
|
||||||
import io.v.nutz.zhgh.member.UserMode;
|
import io.v.nutz.zhgh.member.UserMode;
|
||||||
import io.v.nutz.zhgh.member.model.MemberApplyRecord;
|
import io.v.nutz.zhgh.member.model.MemberApplyRecord;
|
||||||
import io.v.nutz.zhgh.member.model.MemberChangeRecord;
|
import io.v.nutz.zhgh.member.model.MemberChangeRecord;
|
||||||
import io.v.nutz.zhgh.member.service.MemberService;
|
import io.v.nutz.zhgh.member.service.MemberService;
|
||||||
import io.v.nutz.base.service.ViService;
|
|
||||||
import io.v.nutz.sys.models.Sys_user;
|
|
||||||
import io.v.nutz.sys.services.SysUserService;
|
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Dao;
|
import org.nutz.dao.Dao;
|
||||||
@@ -205,7 +204,7 @@ public class MemberCommonController {
|
|||||||
UserHistory userHistory = dao.fetch(UserHistory.class, hisId);
|
UserHistory userHistory = dao.fetch(UserHistory.class, hisId);
|
||||||
Map<String, String> unitMap = dao.query(Sys_unit.class, null).stream().collect(Collectors.toMap(v -> v.getId(), v -> v.getName()));
|
Map<String, String> unitMap = dao.query(Sys_unit.class, null).stream().collect(Collectors.toMap(v -> v.getId(), v -> v.getName()));
|
||||||
NutMap sysUserMap = (NutMap) Daos.query(dao, Sqls.create("select * from sys_user where loginname=@loginname").setParam("loginname", userHistory.getLoginname()).toString(), Sqls.callback.map());
|
NutMap sysUserMap = (NutMap) Daos.query(dao, Sqls.create("select * from sys_user where loginname=@loginname").setParam("loginname", userHistory.getLoginname()).toString(), Sqls.callback.map());
|
||||||
NutMap userHisMap = org.nutz.lang.Lang.obj2nutmap(userHistory);
|
NutMap userHisMap = Lang.obj2nutmap(userHistory);
|
||||||
|
|
||||||
if (StrUtil.isNotBlank(userHistory.getMemberChangeRecordId())) {
|
if (StrUtil.isNotBlank(userHistory.getMemberChangeRecordId())) {
|
||||||
//从变更来的 特殊 需要审核
|
//从变更来的 特殊 需要审核
|
||||||
@@ -221,8 +220,8 @@ public class MemberCommonController {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
String userState = StrUtil.blankToDefault(changeRecord.getUserState(), "");
|
String userState = StrUtil.blankToDefault(changeRecord.getChangeUserState(), "");
|
||||||
if (!userState.equals(sysUserMap.getString("userState", ""))) {
|
if (StrUtil.isNotBlank(userState) && !userState.equals(sysUserMap.getString("userState", ""))) {
|
||||||
compareData.add(NutMap.NEW()
|
compareData.add(NutMap.NEW()
|
||||||
.addv("columnName", "在职状态")
|
.addv("columnName", "在职状态")
|
||||||
.addv("newValue", userState)
|
.addv("newValue", userState)
|
||||||
@@ -230,6 +229,15 @@ public class MemberCommonController {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String personType = StrUtil.blankToDefault(changeRecord.getChangePersonType(), "");
|
||||||
|
if (StrUtil.isNotBlank(personType) && !personType.equals(sysUserMap.getString("personType", ""))) {
|
||||||
|
compareData.add(NutMap.NEW()
|
||||||
|
.addv("columnName", "人员类型")
|
||||||
|
.addv("newValue", personType)
|
||||||
|
.addv("oldValue", sysUserMap.getString("personType"))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
//在职,退休,离职可能会发生会员和福利会员的变化
|
//在职,退休,离职可能会发生会员和福利会员的变化
|
||||||
if(changeRecord.getUpdateMember()!=null && changeRecord.getUpdateMember()){
|
if(changeRecord.getUpdateMember()!=null && changeRecord.getUpdateMember()){
|
||||||
//说明要改变会员状态
|
//说明要改变会员状态
|
||||||
@@ -240,7 +248,7 @@ public class MemberCommonController {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(changeRecord.getUpdateWelfare()!=null && changeRecord.getUpdateWelfare()){
|
if(changeRecord.getUpdateWelfareMember()!=null && changeRecord.getUpdateWelfareMember()){
|
||||||
//说明要改变福利会员状态
|
//说明要改变福利会员状态
|
||||||
compareData.add(NutMap.NEW()
|
compareData.add(NutMap.NEW()
|
||||||
.addv("columnName", "福利会员资格")
|
.addv("columnName", "福利会员资格")
|
||||||
@@ -267,7 +275,7 @@ public class MemberCommonController {
|
|||||||
COLUMN_COMMENT
|
COLUMN_COMMENT
|
||||||
FROM INFORMATION_SCHEMA.COLUMNS
|
FROM INFORMATION_SCHEMA.COLUMNS
|
||||||
WHERE TABLE_NAME = 'sys_user'
|
WHERE TABLE_NAME = 'sys_user'
|
||||||
AND TABLE_SCHEMA = 'union_cpu'
|
AND TABLE_SCHEMA = 'zhgh_hrbnu'
|
||||||
""");
|
""");
|
||||||
List<NutMap> userTableColumnInfos = sysUserService.listMap(userColumnSql);
|
List<NutMap> userTableColumnInfos = sysUserService.listMap(userColumnSql);
|
||||||
|
|
||||||
|
|||||||
@@ -3,10 +3,10 @@ package io.v.nutz.zhgh.member.controller;
|
|||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
import io.v.nutz.base.annontation.ViReturn;
|
||||||
import io.v.nutz.base.service.BaseService;
|
import io.v.nutz.base.service.BaseService;
|
||||||
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
import io.v.nutz.zhgh.member.constant.MemberChangeRecordMode;
|
import io.v.nutz.zhgh.member.constant.MemberChangeRecordMode;
|
||||||
import io.v.nutz.zhgh.member.model.MemberCheckSelfTask;
|
import io.v.nutz.zhgh.member.model.MemberCheckSelfTask;
|
||||||
import io.v.nutz.zhgh.member.model.MemberCheckTask;
|
import io.v.nutz.zhgh.member.model.MemberCheckTask;
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
package io.v.nutz.zhgh.member.controller.apply;
|
package io.v.nutz.zhgh.member.controller.apply;
|
||||||
|
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
import io.v.nutz.base.annontation.ViReturn;
|
||||||
import io.v.nutz.base.lang.Enum;
|
|
||||||
import io.v.nutz.base.utils.Vi;
|
|
||||||
import io.v.nutz.base.dao.CndPlus;
|
import io.v.nutz.base.dao.CndPlus;
|
||||||
import io.v.nutz.zhgh.member.constant.MemberApplyState;
|
import io.v.nutz.base.lang.Enum;
|
||||||
import io.v.nutz.zhgh.member.handle.MemberApplyAuditHandle;
|
|
||||||
import io.v.nutz.zhgh.member.model.MemberApplyRecord;
|
|
||||||
import io.v.nutz.base.model.Audit;
|
import io.v.nutz.base.model.Audit;
|
||||||
import io.v.nutz.base.query.PageForm;
|
import io.v.nutz.base.query.PageForm;
|
||||||
import io.v.nutz.base.service.ViService;
|
import io.v.nutz.base.service.ViService;
|
||||||
|
import io.v.nutz.base.utils.Vi;
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
|
import io.v.nutz.zhgh.member.constant.MemberApplyState;
|
||||||
|
import io.v.nutz.zhgh.member.handle.MemberApplyAuditHandle;
|
||||||
|
import io.v.nutz.zhgh.member.model.MemberApplyRecord;
|
||||||
import org.apache.shiro.authz.annotation.Logical;
|
import org.apache.shiro.authz.annotation.Logical;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
|
|||||||
@@ -5,21 +5,21 @@ import cn.hutool.core.util.StrUtil;
|
|||||||
import com.deepoove.poi.XWPFTemplate;
|
import com.deepoove.poi.XWPFTemplate;
|
||||||
import com.deepoove.poi.config.Configure;
|
import com.deepoove.poi.config.Configure;
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
import io.v.nutz.base.annontation.ViReturn;
|
||||||
|
import io.v.nutz.base.service.ViService;
|
||||||
import io.v.nutz.base.utils.OfficeTemplateUtil;
|
import io.v.nutz.base.utils.OfficeTemplateUtil;
|
||||||
import io.v.nutz.base.utils.Roles;
|
import io.v.nutz.base.utils.Roles;
|
||||||
import io.v.nutz.base.utils.Vi;
|
import io.v.nutz.base.utils.Vi;
|
||||||
import io.v.nutz.base.utils.ViTool;
|
import io.v.nutz.base.utils.ViTool;
|
||||||
import io.v.nutz.sys.models.Sys_signature;
|
import io.v.nutz.sys.models.Sys_signature;
|
||||||
|
import io.v.nutz.sys.models.Sys_user;
|
||||||
import io.v.nutz.sys.services.SysSignatureService;
|
import io.v.nutz.sys.services.SysSignatureService;
|
||||||
|
import io.v.nutz.sys.services.SysUserService;
|
||||||
import io.v.nutz.web.commons.base.Globals;
|
import io.v.nutz.web.commons.base.Globals;
|
||||||
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
import io.v.nutz.zhgh.member.constant.MemberApplyState;
|
import io.v.nutz.zhgh.member.constant.MemberApplyState;
|
||||||
import io.v.nutz.zhgh.member.handle.MemberApplyAuditHandle;
|
import io.v.nutz.zhgh.member.handle.MemberApplyAuditHandle;
|
||||||
import io.v.nutz.zhgh.member.model.MemberApplyRecord;
|
import io.v.nutz.zhgh.member.model.MemberApplyRecord;
|
||||||
import io.v.nutz.zhgh.member.model.MemberCheckSelfTask;
|
import io.v.nutz.zhgh.member.model.MemberCheckSelfTask;
|
||||||
import io.v.nutz.base.service.ViService;
|
|
||||||
import io.v.nutz.sys.models.Sys_user;
|
|
||||||
import io.v.nutz.sys.services.SysUserService;
|
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.ddr.poi.html.HtmlRenderPolicy;
|
import org.ddr.poi.html.HtmlRenderPolicy;
|
||||||
import org.nutz.dao.Chain;
|
import org.nutz.dao.Chain;
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
package io.v.nutz.zhgh.member.controller.change;
|
package io.v.nutz.zhgh.member.controller.change;
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import io.v.nutz.base.lang.Enum;
|
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
import io.v.nutz.base.annontation.ViReturn;
|
||||||
import io.v.nutz.base.utils.Vi;
|
|
||||||
import io.v.nutz.base.dao.CndPlus;
|
import io.v.nutz.base.dao.CndPlus;
|
||||||
|
import io.v.nutz.base.lang.Enum;
|
||||||
|
import io.v.nutz.base.model.Audit;
|
||||||
|
import io.v.nutz.base.query.PageForm;
|
||||||
|
import io.v.nutz.base.service.ViService;
|
||||||
|
import io.v.nutz.base.utils.Vi;
|
||||||
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
import io.v.nutz.zhgh.member.constant.MemberChangeApplyState;
|
import io.v.nutz.zhgh.member.constant.MemberChangeApplyState;
|
||||||
import io.v.nutz.zhgh.member.constant.MemberChangeRecordMode;
|
import io.v.nutz.zhgh.member.constant.MemberChangeRecordMode;
|
||||||
import io.v.nutz.zhgh.member.handle.MemberChangeAuditHandle;
|
import io.v.nutz.zhgh.member.handle.MemberChangeAuditHandle;
|
||||||
import io.v.nutz.zhgh.member.model.MemberChangeRecord;
|
import io.v.nutz.zhgh.member.model.MemberChangeRecord;
|
||||||
import io.v.nutz.base.model.Audit;
|
|
||||||
import io.v.nutz.base.query.PageForm;
|
|
||||||
import io.v.nutz.base.service.ViService;
|
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
|
||||||
import org.apache.shiro.authz.annotation.Logical;
|
import org.apache.shiro.authz.annotation.Logical;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
package io.v.nutz.zhgh.member.controller.change;
|
package io.v.nutz.zhgh.member.controller.change;
|
||||||
|
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
import io.v.nutz.base.annontation.ViReturn;
|
||||||
|
import io.v.nutz.base.service.ViService;
|
||||||
import io.v.nutz.base.utils.Roles;
|
import io.v.nutz.base.utils.Roles;
|
||||||
import io.v.nutz.base.utils.Vi;
|
import io.v.nutz.base.utils.Vi;
|
||||||
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
import io.v.nutz.zhgh.member.constant.MemberChangeApplyState;
|
import io.v.nutz.zhgh.member.constant.MemberChangeApplyState;
|
||||||
import io.v.nutz.zhgh.member.constant.MemberChangeOrigin;
|
import io.v.nutz.zhgh.member.constant.MemberChangeOrigin;
|
||||||
import io.v.nutz.zhgh.member.constant.MemberChangeRecordMode;
|
import io.v.nutz.zhgh.member.constant.MemberChangeRecordMode;
|
||||||
import io.v.nutz.zhgh.member.handle.MemberChangeAuditHandle;
|
import io.v.nutz.zhgh.member.handle.MemberChangeAuditHandle;
|
||||||
import io.v.nutz.zhgh.member.model.MemberChangeRecord;
|
import io.v.nutz.zhgh.member.model.MemberChangeRecord;
|
||||||
import io.v.nutz.zhgh.member.service.MemberService;
|
import io.v.nutz.zhgh.member.service.MemberService;
|
||||||
import io.v.nutz.base.service.ViService;
|
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
import org.nutz.dao.sql.Sql;
|
import org.nutz.dao.sql.Sql;
|
||||||
|
|||||||
@@ -10,13 +10,20 @@ import cn.hutool.core.util.StrUtil;
|
|||||||
import cn.wizzer.framework.base.Result;
|
import cn.wizzer.framework.base.Result;
|
||||||
import com.google.common.base.Joiner;
|
import com.google.common.base.Joiner;
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
import io.v.nutz.base.annontation.ViReturn;
|
||||||
|
import io.v.nutz.base.dao.CndPlus;
|
||||||
|
import io.v.nutz.base.model.Audit;
|
||||||
|
import io.v.nutz.base.query.PageForm;
|
||||||
|
import io.v.nutz.base.service.AuditService;
|
||||||
|
import io.v.nutz.base.service.ViService;
|
||||||
import io.v.nutz.base.utils.PageUtil;
|
import io.v.nutz.base.utils.PageUtil;
|
||||||
import io.v.nutz.base.utils.Roles;
|
import io.v.nutz.base.utils.Roles;
|
||||||
import io.v.nutz.base.utils.Vi;
|
import io.v.nutz.base.utils.Vi;
|
||||||
import io.v.nutz.base.dao.CndPlus;
|
|
||||||
import io.v.nutz.base.utils.ViTool;
|
import io.v.nutz.base.utils.ViTool;
|
||||||
import io.v.nutz.sys.models.*;
|
import io.v.nutz.sys.models.*;
|
||||||
|
import io.v.nutz.sys.services.SysUnitService;
|
||||||
|
import io.v.nutz.sys.services.SysUserService;
|
||||||
import io.v.nutz.web.commons.slog.annotation.SLog;
|
import io.v.nutz.web.commons.slog.annotation.SLog;
|
||||||
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
import io.v.nutz.zhgh.data.constant.UserChangeType;
|
import io.v.nutz.zhgh.data.constant.UserChangeType;
|
||||||
import io.v.nutz.zhgh.member.MemberMode;
|
import io.v.nutz.zhgh.member.MemberMode;
|
||||||
import io.v.nutz.zhgh.member.UserMode;
|
import io.v.nutz.zhgh.member.UserMode;
|
||||||
@@ -27,13 +34,6 @@ import io.v.nutz.zhgh.member.model.MemberChangeRecord;
|
|||||||
import io.v.nutz.zhgh.member.service.MemberService;
|
import io.v.nutz.zhgh.member.service.MemberService;
|
||||||
import io.v.nutz.zhgh.member.template.MemberTemp;
|
import io.v.nutz.zhgh.member.template.MemberTemp;
|
||||||
import io.v.nutz.zhgh.member.utils.MemberUtils;
|
import io.v.nutz.zhgh.member.utils.MemberUtils;
|
||||||
import io.v.nutz.base.model.Audit;
|
|
||||||
import io.v.nutz.base.query.PageForm;
|
|
||||||
import io.v.nutz.base.service.AuditService;
|
|
||||||
import io.v.nutz.base.service.ViService;
|
|
||||||
import io.v.nutz.sys.services.SysUnitService;
|
|
||||||
import io.v.nutz.sys.services.SysUserService;
|
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.poi.ss.usermodel.Workbook;
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
@@ -109,10 +109,12 @@ public class MemberChangeManageController {
|
|||||||
@Param(value = "sex", required = false) String sex,
|
@Param(value = "sex", required = false) String sex,
|
||||||
@Param(value = "personType", required = false) String personType,
|
@Param(value = "personType", required = false) String personType,
|
||||||
@Param(value = "userState", required = false) String userState,
|
@Param(value = "userState", required = false) String userState,
|
||||||
|
@Param(value = "preparedBy", required = false) String preparedBy,
|
||||||
@Param(value = "changeDate", required = false) String changeDate,
|
@Param(value = "changeDate", required = false) String changeDate,
|
||||||
@Param(value = "changeType", required = false) String changeType,
|
@Param(value = "changeType", required = false) String changeType,
|
||||||
@Param(value = "changeTypes", required = false) Integer[] changeTypes,
|
@Param(value = "changeTypes", required = false) Integer[] changeTypes,
|
||||||
@Param(value = "changed", required = false) Integer changed,
|
@Param(value = "changed", required = false) Integer changed,
|
||||||
|
@Param(value = "myUnionGroupUser", required = false) Integer myUnionGroupUser,
|
||||||
@Param(value = "isMember", required = false) Integer isMember) {
|
@Param(value = "isMember", required = false) Integer isMember) {
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
@@ -154,9 +156,16 @@ public class MemberChangeManageController {
|
|||||||
cnd.and("u.unionId", "=", Vi.getUnionId());
|
cnd.and("u.unionId", "=", Vi.getUnionId());
|
||||||
} else if (ShiroUtil.hasRole("ghxzzz")) {
|
} else if (ShiroUtil.hasRole("ghxzzz")) {
|
||||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
seg.or("u.unionGroupId", "in", io.v.nutz.web.commons.utils.ShiroUtil.getUnionGroupIds());
|
if (myUnionGroupUser == null) {
|
||||||
seg.or("u.unionGroupId", "is", null);
|
seg.or("u.unionGroupId", "in", ShiroUtil.getUnionGroupIds());
|
||||||
cnd.and(seg);
|
seg.or("u.unionGroupId", "is", null);
|
||||||
|
cnd.and(seg);
|
||||||
|
} else if (myUnionGroupUser == 1) {
|
||||||
|
cnd.and("u.unionGroupId", "in", ShiroUtil.getUnionGroupIds());
|
||||||
|
} else {
|
||||||
|
seg.or("u.unionGroupId", "is", null);
|
||||||
|
cnd.and(seg);
|
||||||
|
}
|
||||||
cnd.and("u.unionid", "=", Vi.getUnionId());
|
cnd.and("u.unionid", "=", Vi.getUnionId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,6 +178,7 @@ public class MemberChangeManageController {
|
|||||||
cnd.andEX("u.sex", "=", sex);
|
cnd.andEX("u.sex", "=", sex);
|
||||||
cnd.andEX("u.personType", "=", personType);
|
cnd.andEX("u.personType", "=", personType);
|
||||||
cnd.andEX("u.userState", "=", userState);
|
cnd.andEX("u.userState", "=", userState);
|
||||||
|
cnd.andEX("u.preparedBy", "=", preparedBy);
|
||||||
|
|
||||||
if (StrUtil.isNotBlank(changeDateBefore) && StrUtil.isNotBlank(changeDateEnd)) {
|
if (StrUtil.isNotBlank(changeDateBefore) && StrUtil.isNotBlank(changeDateEnd)) {
|
||||||
cnd.and(new Static(String.format("Date(his.changeTime) >= '%s' and Date(his.changeTime) <= '%s'", changeDateBefore, changeDateEnd)));
|
cnd.and(new Static(String.format("Date(his.changeTime) >= '%s' and Date(his.changeTime) <= '%s'", changeDateBefore, changeDateEnd)));
|
||||||
@@ -176,9 +186,10 @@ public class MemberChangeManageController {
|
|||||||
|
|
||||||
if (Strings.isNotBlank(pageForm.getPageOrderName()) && Strings.isNotBlank(pageForm.getPageOrderBy())) {
|
if (Strings.isNotBlank(pageForm.getPageOrderName()) && Strings.isNotBlank(pageForm.getPageOrderBy())) {
|
||||||
cnd.orderBy((List.of("changeTime", "changeType", "changeTypes").contains(pageForm.getPageOrderName()) ? "his." : "u.") + pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
cnd.orderBy((List.of("changeTime", "changeType", "changeTypes").contains(pageForm.getPageOrderName()) ? "his." : "u.") + pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||||
|
} else {
|
||||||
|
cnd.desc("his.changeTime");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (Lang.isNotEmpty(changeTypes)) {
|
if (Lang.isNotEmpty(changeTypes)) {
|
||||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
for (Integer type : changeTypes) {
|
for (Integer type : changeTypes) {
|
||||||
@@ -249,7 +260,7 @@ public class MemberChangeManageController {
|
|||||||
} else if (ShiroUtil.hasRole("ghxzzz")) {
|
} else if (ShiroUtil.hasRole("ghxzzz")) {
|
||||||
cnd.and("u.unionId", "=", Vi.getUnionId());
|
cnd.and("u.unionId", "=", Vi.getUnionId());
|
||||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
seg.or("u.unionGroupId", "in", io.v.nutz.web.commons.utils.ShiroUtil.getUnionGroupIds());
|
seg.or("u.unionGroupId", "in", ShiroUtil.getUnionGroupIds());
|
||||||
seg.or("u.unionGroupId", "is", null);
|
seg.or("u.unionGroupId", "is", null);
|
||||||
cnd.and(seg);
|
cnd.and(seg);
|
||||||
}
|
}
|
||||||
@@ -301,7 +312,11 @@ public class MemberChangeManageController {
|
|||||||
memberChangeRecord = MemberChangeAuditHandle.CREATE.next(memberChangeRecord, null);
|
memberChangeRecord = MemberChangeAuditHandle.CREATE.next(memberChangeRecord, null);
|
||||||
MemberChangeAuditHandle.SCHOOL.next(memberChangeRecord, audit);
|
MemberChangeAuditHandle.SCHOOL.next(memberChangeRecord, audit);
|
||||||
} else {
|
} else {
|
||||||
memberChangeRecord.setApplyOrigin(MemberChangeOrigin.UNION.getCode());
|
if (ShiroUtil.hasAnyRoles("gh01, H04")) {
|
||||||
|
memberChangeRecord.setApplyOrigin(MemberChangeOrigin.UNION.getCode());
|
||||||
|
} else if (ShiroUtil.hasRole("ghxzzz")){
|
||||||
|
memberChangeRecord.setApplyOrigin(MemberChangeOrigin.UNION_GROUP.getCode());
|
||||||
|
}
|
||||||
memberChangeRecord = MemberChangeAuditHandle.CREATE.next(memberChangeRecord, null);
|
memberChangeRecord = MemberChangeAuditHandle.CREATE.next(memberChangeRecord, null);
|
||||||
MemberChangeAuditHandle.UNION.next(memberChangeRecord, audit);
|
MemberChangeAuditHandle.UNION.next(memberChangeRecord, audit);
|
||||||
}
|
}
|
||||||
@@ -363,7 +378,7 @@ public class MemberChangeManageController {
|
|||||||
@Param(value = "memberSearchKeyWord", required = false) String memberSearchKeyWord,
|
@Param(value = "memberSearchKeyWord", required = false) String memberSearchKeyWord,
|
||||||
@Param(value = "isAppendWelfareMember", required = false) Boolean isAppendWelfareMember) {
|
@Param(value = "isAppendWelfareMember", required = false) Boolean isAppendWelfareMember) {
|
||||||
int yyyy = Calendar.getInstance().get(Calendar.YEAR);
|
int yyyy = Calendar.getInstance().get(Calendar.YEAR);
|
||||||
Cnd cnd = MemberUtils.getCnd(pageForm, startDate, endDate, unionId, unitId, personTypes, userStates, memberTypes, sexTypes, age, null, roleIds, null, null, memberStatus, threeUnitId, unionGroupId, reverseSelection, null, null, campus);
|
Cnd cnd = MemberUtils.getCnd(pageForm, startDate, endDate, unionId, unitId, personTypes, userStates, null, memberTypes, sexTypes, age, null, roleIds, null, null, memberStatus, threeUnitId, unionGroupId, reverseSelection, null, null, campus);
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT u.* from $table
|
SELECT u.* from $table
|
||||||
LEFT JOIN sys_user_role sur ON sur.userid = u.id
|
LEFT JOIN sys_user_role sur ON sur.userid = u.id
|
||||||
@@ -510,7 +525,7 @@ public class MemberChangeManageController {
|
|||||||
User user = memberService.dao().fetch(User.class, Cnd.where("id", "=", userId));
|
User user = memberService.dao().fetch(User.class, Cnd.where("id", "=", userId));
|
||||||
MemberChangeRecord changeRecord = new MemberChangeRecord();
|
MemberChangeRecord changeRecord = new MemberChangeRecord();
|
||||||
changeRecord.setType(UserChangeType.NEW.getCode());
|
changeRecord.setType(UserChangeType.NEW.getCode());
|
||||||
changeRecord.setApplyOrigin(io.v.nutz.web.commons.utils.ShiroUtil.hasRole("H04") ? MemberChangeOrigin.UNION.getCode() : MemberChangeOrigin.UNION_GROUP.getCode());
|
changeRecord.setApplyOrigin(ShiroUtil.hasRole("H04") ? MemberChangeOrigin.UNION.getCode() : MemberChangeOrigin.UNION_GROUP.getCode());
|
||||||
changeRecord.setStateId(MemberChangeApplyState.SCHOOL_UNION);
|
changeRecord.setStateId(MemberChangeApplyState.SCHOOL_UNION);
|
||||||
changeRecord.setUpdateWelfareMember(true);
|
changeRecord.setUpdateWelfareMember(true);
|
||||||
changeRecord.setUserId(userId);
|
changeRecord.setUserId(userId);
|
||||||
@@ -536,6 +551,9 @@ public class MemberChangeManageController {
|
|||||||
public Object units() {
|
public Object units() {
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
cnd.and("unitlevel", "=", 2);
|
cnd.and("unitlevel", "=", 2);
|
||||||
|
if (!ShiroUtil.hasAnyRoles("sysadmin,SchoolUnionAdmin")) {
|
||||||
|
cnd.and("id", "!=", "DZJF000");
|
||||||
|
}
|
||||||
return sysUnitService.dao().query("unit_union", cnd);
|
return sysUnitService.dao().query("unit_union", cnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -635,7 +653,7 @@ public class MemberChangeManageController {
|
|||||||
//判断是否在系统中
|
//判断是否在系统中
|
||||||
Sys_user user = userMap.get(v.getLoginname());
|
Sys_user user = userMap.get(v.getLoginname());
|
||||||
Sys_user_role userRole = new Sys_user_role();
|
Sys_user_role userRole = new Sys_user_role();
|
||||||
if (org.nutz.lang.Lang.isNotEmpty(user)) {
|
if (Lang.isNotEmpty(user)) {
|
||||||
user.setUnitid(unitId);
|
user.setUnitid(unitId);
|
||||||
user.setSex(v.getSex());
|
user.setSex(v.getSex());
|
||||||
user.setMobile(v.getMobile());
|
user.setMobile(v.getMobile());
|
||||||
@@ -683,7 +701,7 @@ public class MemberChangeManageController {
|
|||||||
sysUnitService.dao().updateIgnoreNull(needUpdateUser);
|
sysUnitService.dao().updateIgnoreNull(needUpdateUser);
|
||||||
|
|
||||||
//如果有错误数据就返回给前端
|
//如果有错误数据就返回给前端
|
||||||
if (org.nutz.lang.Lang.isNotEmpty(errorInfos)) {
|
if (Lang.isNotEmpty(errorInfos)) {
|
||||||
NutMap nutMap = NutMap.NEW();
|
NutMap nutMap = NutMap.NEW();
|
||||||
nutMap.setv("totalCount", memberImportList.size());
|
nutMap.setv("totalCount", memberImportList.size());
|
||||||
nutMap.setv("successCount", doCleanRoleUsers.size());
|
nutMap.setv("successCount", doCleanRoleUsers.size());
|
||||||
|
|||||||
@@ -2,14 +2,14 @@ package io.v.nutz.zhgh.member.controller.change;
|
|||||||
|
|
||||||
import cn.wizzer.framework.page.Pagination;
|
import cn.wizzer.framework.page.Pagination;
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
import io.v.nutz.base.annontation.ViReturn;
|
||||||
import io.v.nutz.base.utils.Vi;
|
|
||||||
import io.v.nutz.base.dao.CndPlus;
|
import io.v.nutz.base.dao.CndPlus;
|
||||||
import io.v.nutz.zhgh.member.model.MemberChangeRecord;
|
|
||||||
import io.v.nutz.zhgh.member.service.MemberService;
|
|
||||||
import io.v.nutz.base.model.Audit;
|
import io.v.nutz.base.model.Audit;
|
||||||
import io.v.nutz.base.query.PageForm;
|
import io.v.nutz.base.query.PageForm;
|
||||||
import io.v.nutz.base.service.ViService;
|
import io.v.nutz.base.service.ViService;
|
||||||
|
import io.v.nutz.base.utils.Vi;
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
|
import io.v.nutz.zhgh.member.model.MemberChangeRecord;
|
||||||
|
import io.v.nutz.zhgh.member.service.MemberService;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||||
@@ -80,7 +80,7 @@ public class MemberChangeRecordsController {
|
|||||||
} else if (ShiroUtil.hasRole("ghxzzz")) {
|
} else if (ShiroUtil.hasRole("ghxzzz")) {
|
||||||
cnd.and("u.unionId", "=", Vi.getUnionId());
|
cnd.and("u.unionId", "=", Vi.getUnionId());
|
||||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
seg.or("u.unionGroupId", "in", io.v.nutz.web.commons.utils.ShiroUtil.getUnionGroupIds());
|
seg.or("u.unionGroupId", "in", ShiroUtil.getUnionGroupIds());
|
||||||
seg.or("u.unionGroupId", "is", null);
|
seg.or("u.unionGroupId", "is", null);
|
||||||
cnd.and(seg);
|
cnd.and(seg);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
|||||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
import io.v.nutz.base.annontation.ViReturn;
|
||||||
import io.v.nutz.base.utils.Vi;
|
|
||||||
import io.v.nutz.zhgh.member.service.MemberCheckPersonalService;
|
|
||||||
import io.v.nutz.base.query.PageForm;
|
import io.v.nutz.base.query.PageForm;
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
import io.v.nutz.base.utils.Vi;
|
||||||
import io.v.nutz.base.utils.ViTool;
|
import io.v.nutz.base.utils.ViTool;
|
||||||
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
|
import io.v.nutz.zhgh.member.service.MemberCheckPersonalService;
|
||||||
import org.apache.poi.ss.usermodel.Workbook;
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
package io.v.nutz.zhgh.member.controller.check;
|
package io.v.nutz.zhgh.member.controller.check;
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson.JSON;
|
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
import io.v.nutz.base.annontation.ViReturn;
|
||||||
|
import io.v.nutz.base.query.PageForm;
|
||||||
import io.v.nutz.base.service.SimpleService;
|
import io.v.nutz.base.service.SimpleService;
|
||||||
import io.v.nutz.base.utils.Roles;
|
import io.v.nutz.base.utils.Roles;
|
||||||
import io.v.nutz.zhgh.member.constant.MemberChangeApplyState;
|
import io.v.nutz.zhgh.member.constant.MemberChangeApplyState;
|
||||||
import io.v.nutz.zhgh.member.model.MemberChangeRecord;
|
import io.v.nutz.zhgh.member.model.MemberChangeRecord;
|
||||||
import io.v.nutz.base.query.PageForm;
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Dao;
|
import org.nutz.dao.Dao;
|
||||||
@@ -15,7 +14,6 @@ import org.nutz.dao.Sqls;
|
|||||||
import org.nutz.dao.sql.Sql;
|
import org.nutz.dao.sql.Sql;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
import org.nutz.json.Json;
|
|
||||||
import org.nutz.lang.util.NutMap;
|
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;
|
||||||
|
|||||||
@@ -2,16 +2,15 @@ package io.v.nutz.zhgh.member.controller.check;
|
|||||||
|
|
||||||
import cn.hutool.core.lang.Assert;
|
import cn.hutool.core.lang.Assert;
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
import io.v.nutz.base.annontation.ViReturn;
|
||||||
|
import io.v.nutz.base.query.PageForm;
|
||||||
import io.v.nutz.base.service.SimpleService;
|
import io.v.nutz.base.service.SimpleService;
|
||||||
import io.v.nutz.sys.models.Sys_union;
|
import io.v.nutz.sys.models.Sys_union;
|
||||||
|
import io.v.nutz.sys.models.Sys_user;
|
||||||
import io.v.nutz.zhgh.member.constant.MemberChangeRecordMode;
|
import io.v.nutz.zhgh.member.constant.MemberChangeRecordMode;
|
||||||
import io.v.nutz.zhgh.member.model.MemberChangeRecord;
|
import io.v.nutz.zhgh.member.model.MemberChangeRecord;
|
||||||
import io.v.nutz.zhgh.member.model.MemberCheckSelfTask;
|
import io.v.nutz.zhgh.member.model.MemberCheckSelfTask;
|
||||||
import io.v.nutz.zhgh.member.model.MemberCheckTask;
|
import io.v.nutz.zhgh.member.model.MemberCheckTask;
|
||||||
import io.v.nutz.zhgh.member.model.MemberCheckUnionTask;
|
import io.v.nutz.zhgh.member.model.MemberCheckUnionTask;
|
||||||
import io.v.nutz.base.query.PageForm;
|
|
||||||
import io.v.nutz.sys.models.SysUnionGroup;
|
|
||||||
import io.v.nutz.sys.models.Sys_user;
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Dao;
|
import org.nutz.dao.Dao;
|
||||||
|
|||||||
@@ -4,9 +4,12 @@ import cn.hutool.core.util.StrUtil;
|
|||||||
import cn.wizzer.framework.base.Result;
|
import cn.wizzer.framework.base.Result;
|
||||||
import com.google.common.base.Joiner;
|
import com.google.common.base.Joiner;
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
import io.v.nutz.base.annontation.ViReturn;
|
||||||
|
import io.v.nutz.base.model.Audit;
|
||||||
|
import io.v.nutz.base.query.PageForm;
|
||||||
import io.v.nutz.base.service.SimpleService;
|
import io.v.nutz.base.service.SimpleService;
|
||||||
import io.v.nutz.base.utils.Vi;
|
import io.v.nutz.base.utils.Vi;
|
||||||
import io.v.nutz.sys.models.Sys_config;
|
import io.v.nutz.sys.models.Sys_config;
|
||||||
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
import io.v.nutz.zhgh.data.constant.UserChangeType;
|
import io.v.nutz.zhgh.data.constant.UserChangeType;
|
||||||
import io.v.nutz.zhgh.member.constant.MemberChangeApplyState;
|
import io.v.nutz.zhgh.member.constant.MemberChangeApplyState;
|
||||||
import io.v.nutz.zhgh.member.constant.MemberChangeOrigin;
|
import io.v.nutz.zhgh.member.constant.MemberChangeOrigin;
|
||||||
@@ -14,9 +17,6 @@ import io.v.nutz.zhgh.member.constant.MemberChangeRecordMode;
|
|||||||
import io.v.nutz.zhgh.member.handle.MemberChangeAuditHandle;
|
import io.v.nutz.zhgh.member.handle.MemberChangeAuditHandle;
|
||||||
import io.v.nutz.zhgh.member.model.MemberChangeRecord;
|
import io.v.nutz.zhgh.member.model.MemberChangeRecord;
|
||||||
import io.v.nutz.zhgh.member.model.MemberCheckUnionTask;
|
import io.v.nutz.zhgh.member.model.MemberCheckUnionTask;
|
||||||
import io.v.nutz.base.model.Audit;
|
|
||||||
import io.v.nutz.base.query.PageForm;
|
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.nutz.dao.Chain;
|
import org.nutz.dao.Chain;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
@@ -67,11 +67,11 @@ public class MemberCheckUnionController {
|
|||||||
@Param(value = "taskId", required = false) String taskId,
|
@Param(value = "taskId", required = false) String taskId,
|
||||||
@Param(value = "unionId", required = false) String unionId,
|
@Param(value = "unionId", required = false) String unionId,
|
||||||
@Param(value = "unitId", required = false) String unitId,
|
@Param(value = "unitId", required = false) String unitId,
|
||||||
@Param(value = "sex", required = false) String sex,
|
|
||||||
@Param(value = "changed", required = false) Integer changed,
|
@Param(value = "changed", required = false) Integer changed,
|
||||||
@Param(value = "isMember", required = false) Integer isMember,
|
@Param(value = "isMember", required = false) Integer isMember,
|
||||||
@Param(value = "unionGroupId", required = false) String unionGroupId,
|
@Param(value = "unionGroupId", required = false) String unionGroupId,
|
||||||
@Param(value = "threeUnitId", required = false) String threeUnitId,
|
@Param(value = "threeUnitId", required = false) String threeUnitId,
|
||||||
|
@Param(value = "preparedBy", required = false) String preparedBy,
|
||||||
@Param(value = "userStates", required = false) String[] userStates,
|
@Param(value = "userStates", required = false) String[] userStates,
|
||||||
@Param(value = "personTypes", required = false) String[] personTypes,
|
@Param(value = "personTypes", required = false) String[] personTypes,
|
||||||
@Param(value = "changeTypes", required = false) Integer[] changeTypes,
|
@Param(value = "changeTypes", required = false) Integer[] changeTypes,
|
||||||
@@ -86,6 +86,7 @@ public class MemberCheckUnionController {
|
|||||||
u.birthday,
|
u.birthday,
|
||||||
u.personType,
|
u.personType,
|
||||||
u.userState,
|
u.userState,
|
||||||
|
u.preparedBy,
|
||||||
u.unionname,
|
u.unionname,
|
||||||
u.unitname,
|
u.unitname,
|
||||||
u.threeUnitName,
|
u.threeUnitName,
|
||||||
@@ -114,18 +115,18 @@ public class MemberCheckUnionController {
|
|||||||
cnd.and("u.unionId", "=", Vi.getUnionId());
|
cnd.and("u.unionId", "=", Vi.getUnionId());
|
||||||
} else if (ShiroUtil.hasRole("ghxzzz")) {
|
} else if (ShiroUtil.hasRole("ghxzzz")) {
|
||||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
seg.or("u.unionGroupId", "in", io.v.nutz.web.commons.utils.ShiroUtil.getUnionGroupIds());
|
seg.or("u.unionGroupId", "in", ShiroUtil.getUnionGroupIds());
|
||||||
seg.or("u.unionGroupId", "is", null);
|
seg.or("u.unionGroupId", "is", null);
|
||||||
cnd.and(seg);
|
cnd.and(seg);
|
||||||
cnd.and("u.unionid", "=", Vi.getUnionId());
|
cnd.and("u.unionid", "=", Vi.getUnionId());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
cnd.andEX("u.sex", "=", sex);
|
|
||||||
cnd.andEX("u.unionid", "=", unionId);
|
cnd.andEX("u.unionid", "=", unionId);
|
||||||
cnd.andEX("u.unitid", "=", unitId);
|
cnd.andEX("u.unitid", "=", unitId);
|
||||||
cnd.andEX("u.unionGroupId", "=", unionGroupId);
|
cnd.andEX("u.unionGroupId", "=", unionGroupId);
|
||||||
cnd.andEX("u.threeUnitId", "=", threeUnitId);
|
cnd.andEX("u.threeUnitId", "=", threeUnitId);
|
||||||
|
cnd.andEX("u.preparedBy", "=", preparedBy);
|
||||||
cnd.and(Cnd.likeEX("u." + pageForm.getSearchName(), pageForm.getSearchKeyword()));
|
cnd.and(Cnd.likeEX("u." + pageForm.getSearchName(), pageForm.getSearchKeyword()));
|
||||||
|
|
||||||
cnd.andEX("u.member", "=", isMember);
|
cnd.andEX("u.member", "=", isMember);
|
||||||
@@ -143,7 +144,7 @@ public class MemberCheckUnionController {
|
|||||||
cnd.desc("changeTime");
|
cnd.desc("changeTime");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (org.nutz.lang.Lang.isNotEmpty(changeTypes)) {
|
if (Lang.isNotEmpty(changeTypes)) {
|
||||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
for (Integer type : changeTypes) {
|
for (Integer type : changeTypes) {
|
||||||
seg.or(new Static("JSON_CONTAINS(his.changeTypes, CAST(%d AS JSON), '$')".formatted(type)));
|
seg.or(new Static("JSON_CONTAINS(his.changeTypes, CAST(%d AS JSON), '$')".formatted(type)));
|
||||||
@@ -151,7 +152,7 @@ public class MemberCheckUnionController {
|
|||||||
cnd.and(seg);
|
cnd.and(seg);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (org.nutz.lang.Lang.isNotEmpty(userStates)) {
|
if (Lang.isNotEmpty(userStates)) {
|
||||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
for (String state : userStates) {
|
for (String state : userStates) {
|
||||||
seg.orEquals("u.userState", state);
|
seg.orEquals("u.userState", state);
|
||||||
@@ -159,7 +160,7 @@ public class MemberCheckUnionController {
|
|||||||
cnd.and(seg);
|
cnd.and(seg);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (org.nutz.lang.Lang.isNotEmpty(personTypes)) {
|
if (Lang.isNotEmpty(personTypes)) {
|
||||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
for (String personType : personTypes) {
|
for (String personType : personTypes) {
|
||||||
seg.orEquals("u.personType", personType);
|
seg.orEquals("u.personType", personType);
|
||||||
@@ -167,7 +168,7 @@ public class MemberCheckUnionController {
|
|||||||
cnd.and(seg);
|
cnd.and(seg);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (org.nutz.lang.Lang.isNotEmpty(changeOrigins)) {
|
if (Lang.isNotEmpty(changeOrigins)) {
|
||||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
for (Integer c : changeOrigins) {
|
for (Integer c : changeOrigins) {
|
||||||
seg.orEquals("u.changeOrigin", c);
|
seg.orEquals("u.changeOrigin", c);
|
||||||
@@ -218,7 +219,7 @@ public class MemberCheckUnionController {
|
|||||||
} else if (ShiroUtil.hasRole("ghxzzz")) {
|
} else if (ShiroUtil.hasRole("ghxzzz")) {
|
||||||
cnd.and("u.unionId", "=", Vi.getUnionId());
|
cnd.and("u.unionId", "=", Vi.getUnionId());
|
||||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
seg.or("u.unionGroupId", "in", io.v.nutz.web.commons.utils.ShiroUtil.getUnionGroupIds());
|
seg.or("u.unionGroupId", "in", ShiroUtil.getUnionGroupIds());
|
||||||
seg.or("u.unionGroupId", "is", null);
|
seg.or("u.unionGroupId", "is", null);
|
||||||
cnd.and(seg);
|
cnd.and(seg);
|
||||||
}
|
}
|
||||||
@@ -230,7 +231,7 @@ public class MemberCheckUnionController {
|
|||||||
cnd.andEX("u.unitid", "=", unitId);
|
cnd.andEX("u.unitid", "=", unitId);
|
||||||
cnd.andEX("u.member", "=", isMember);
|
cnd.andEX("u.member", "=", isMember);
|
||||||
|
|
||||||
if (org.nutz.lang.Lang.isNotEmpty(changeTypes)) {
|
if (Lang.isNotEmpty(changeTypes)) {
|
||||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
for (Integer type : changeTypes) {
|
for (Integer type : changeTypes) {
|
||||||
seg.or(new Static("JSON_CONTAINS(his.changeTypes, CAST(%d AS JSON), '$')".formatted(type)));
|
seg.or(new Static("JSON_CONTAINS(his.changeTypes, CAST(%d AS JSON), '$')".formatted(type)));
|
||||||
@@ -238,7 +239,7 @@ public class MemberCheckUnionController {
|
|||||||
cnd.and(seg);
|
cnd.and(seg);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (org.nutz.lang.Lang.isNotEmpty(userStates)) {
|
if (Lang.isNotEmpty(userStates)) {
|
||||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
for (String state : userStates) {
|
for (String state : userStates) {
|
||||||
seg.orEquals("u.userState", state);
|
seg.orEquals("u.userState", state);
|
||||||
@@ -246,7 +247,7 @@ public class MemberCheckUnionController {
|
|||||||
cnd.and(seg);
|
cnd.and(seg);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (org.nutz.lang.Lang.isNotEmpty(personTypes)) {
|
if (Lang.isNotEmpty(personTypes)) {
|
||||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
for (String personType : personTypes) {
|
for (String personType : personTypes) {
|
||||||
seg.orEquals("u.personType", personType);
|
seg.orEquals("u.personType", personType);
|
||||||
@@ -254,7 +255,7 @@ public class MemberCheckUnionController {
|
|||||||
cnd.and(seg);
|
cnd.and(seg);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (org.nutz.lang.Lang.isNotEmpty(changeOrigins)) {
|
if (Lang.isNotEmpty(changeOrigins)) {
|
||||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
for (Integer c : changeOrigins) {
|
for (Integer c : changeOrigins) {
|
||||||
seg.orEquals("u.changeOrigin", c);
|
seg.orEquals("u.changeOrigin", c);
|
||||||
@@ -309,11 +310,11 @@ public class MemberCheckUnionController {
|
|||||||
dao.execute(userSql);
|
dao.execute(userSql);
|
||||||
String userState = StrUtil.blankToDefault(userSql.getString(), "");
|
String userState = StrUtil.blankToDefault(userSql.getString(), "");
|
||||||
|
|
||||||
if (memberChangeRecord.getType() == UserChangeType.ON_DUTY.getCode()) {
|
// if (memberChangeRecord.getType() == UserChangeType.ON_DUTY.getCode()) {
|
||||||
if (userState.equals(UserChangeType.ON_DUTY.getDescription())) {
|
// if (userState.equals(UserChangeType.ON_DUTY.getDescription())) {
|
||||||
return Result.error("该用户当前的状态已经是" + UserChangeType.ON_DUTY.getDescription() + ",您无需变更!");
|
// return Result.error("该用户当前的状态已经是" + UserChangeType.ON_DUTY.getDescription() + ",您无需变更!");
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (memberChangeRecord.getType() == UserChangeType.RESIGN.getCode()) {
|
if (memberChangeRecord.getType() == UserChangeType.RESIGN.getCode()) {
|
||||||
if (userState.equals(UserChangeType.RESIGN.getDescription())) {
|
if (userState.equals(UserChangeType.RESIGN.getDescription())) {
|
||||||
return Result.error("该用户当前的状态已经是" + UserChangeType.RESIGN.getDescription() + ",您无需变更!");
|
return Result.error("该用户当前的状态已经是" + UserChangeType.RESIGN.getDescription() + ",您无需变更!");
|
||||||
|
|||||||
@@ -4,8 +4,15 @@ import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
|||||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
import io.v.nutz.base.annontation.ViReturn;
|
||||||
import io.v.nutz.base.utils.Vi;
|
|
||||||
import io.v.nutz.base.dao.CndPlus;
|
import io.v.nutz.base.dao.CndPlus;
|
||||||
|
import io.v.nutz.base.model.Audit;
|
||||||
|
import io.v.nutz.base.query.PageForm;
|
||||||
|
import io.v.nutz.base.service.AsyncService;
|
||||||
|
import io.v.nutz.base.service.AuditService;
|
||||||
|
import io.v.nutz.base.utils.Vi;
|
||||||
|
import io.v.nutz.base.utils.ViTool;
|
||||||
|
import io.v.nutz.sys.services.SysUserService;
|
||||||
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
import io.v.nutz.zhgh.data.constant.UserChangeType;
|
import io.v.nutz.zhgh.data.constant.UserChangeType;
|
||||||
import io.v.nutz.zhgh.member.MemberMode;
|
import io.v.nutz.zhgh.member.MemberMode;
|
||||||
import io.v.nutz.zhgh.member.UserMode;
|
import io.v.nutz.zhgh.member.UserMode;
|
||||||
@@ -15,13 +22,6 @@ import io.v.nutz.zhgh.member.constant.MemberChangeRecordMode;
|
|||||||
import io.v.nutz.zhgh.member.constant.MemberOrigin;
|
import io.v.nutz.zhgh.member.constant.MemberOrigin;
|
||||||
import io.v.nutz.zhgh.member.model.MemberChangeRecord;
|
import io.v.nutz.zhgh.member.model.MemberChangeRecord;
|
||||||
import io.v.nutz.zhgh.member.service.MemberService;
|
import io.v.nutz.zhgh.member.service.MemberService;
|
||||||
import io.v.nutz.base.model.Audit;
|
|
||||||
import io.v.nutz.base.query.PageForm;
|
|
||||||
import io.v.nutz.base.service.AuditService;
|
|
||||||
import io.v.nutz.base.service.AsyncService;
|
|
||||||
import io.v.nutz.sys.services.SysUserService;
|
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
|
||||||
import io.v.nutz.base.utils.ViTool;
|
|
||||||
import org.apache.poi.ss.usermodel.Workbook;
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
@@ -123,7 +123,7 @@ public class MemberBatchMakeController {
|
|||||||
} else if (ShiroUtil.hasRole("ghxzzz")) {
|
} else if (ShiroUtil.hasRole("ghxzzz")) {
|
||||||
cnd.and("unionId", "=", Vi.getUnionId());
|
cnd.and("unionId", "=", Vi.getUnionId());
|
||||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
seg.or("unionGroupId", "in", io.v.nutz.web.commons.utils.ShiroUtil.getUnionGroupIds());
|
seg.or("unionGroupId", "in", ShiroUtil.getUnionGroupIds());
|
||||||
seg.or("unionGroupId", "is", null);
|
seg.or("unionGroupId", "is", null);
|
||||||
cnd.and(seg);
|
cnd.and(seg);
|
||||||
}
|
}
|
||||||
@@ -217,7 +217,7 @@ public class MemberBatchMakeController {
|
|||||||
} else if (ShiroUtil.hasRole("ghxzzz")) {
|
} else if (ShiroUtil.hasRole("ghxzzz")) {
|
||||||
cnd.and("unionId", "=", Vi.getUnionId());
|
cnd.and("unionId", "=", Vi.getUnionId());
|
||||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
seg.or("unionGroupId", "in", io.v.nutz.web.commons.utils.ShiroUtil.getUnionGroupIds());
|
seg.or("unionGroupId", "in", ShiroUtil.getUnionGroupIds());
|
||||||
seg.or("unionGroupId", "is", null);
|
seg.or("unionGroupId", "is", null);
|
||||||
cnd.and(seg);
|
cnd.and(seg);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,12 @@ package io.v.nutz.zhgh.member.controller.info;
|
|||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
import io.v.nutz.base.annontation.ViReturn;
|
||||||
|
import io.v.nutz.base.model.Audit;
|
||||||
|
import io.v.nutz.base.query.PageForm;
|
||||||
import io.v.nutz.base.utils.PageUtil;
|
import io.v.nutz.base.utils.PageUtil;
|
||||||
import io.v.nutz.base.utils.Vi;
|
import io.v.nutz.base.utils.Vi;
|
||||||
|
import io.v.nutz.sys.models.Sys_user;
|
||||||
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
import io.v.nutz.zhgh.data.constant.UserChangeType;
|
import io.v.nutz.zhgh.data.constant.UserChangeType;
|
||||||
import io.v.nutz.zhgh.member.MemberMode;
|
import io.v.nutz.zhgh.member.MemberMode;
|
||||||
import io.v.nutz.zhgh.member.UserMode;
|
import io.v.nutz.zhgh.member.UserMode;
|
||||||
@@ -14,10 +18,6 @@ import io.v.nutz.zhgh.member.constant.MemberChangeRecordMode;
|
|||||||
import io.v.nutz.zhgh.member.constant.MemberOrigin;
|
import io.v.nutz.zhgh.member.constant.MemberOrigin;
|
||||||
import io.v.nutz.zhgh.member.model.MemberChangeRecord;
|
import io.v.nutz.zhgh.member.model.MemberChangeRecord;
|
||||||
import io.v.nutz.zhgh.member.service.MemberService;
|
import io.v.nutz.zhgh.member.service.MemberService;
|
||||||
import io.v.nutz.base.model.Audit;
|
|
||||||
import io.v.nutz.base.query.PageForm;
|
|
||||||
import io.v.nutz.sys.models.Sys_user;
|
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
import org.nutz.dao.Chain;
|
import org.nutz.dao.Chain;
|
||||||
@@ -71,7 +71,8 @@ public class MemberDataManageController {
|
|||||||
@Param(value = "startLoginNames", required = false) String startLoginNames,
|
@Param(value = "startLoginNames", required = false) String startLoginNames,
|
||||||
@Param(value = "endLoginNames", required = false) String endLoginNames,
|
@Param(value = "endLoginNames", required = false) String endLoginNames,
|
||||||
@Param(value = "personTypes", required = false) String[] personTypes,
|
@Param(value = "personTypes", required = false) String[] personTypes,
|
||||||
@Param(value = "userStates", required = false) String[] userStates
|
@Param(value = "userStates", required = false) String[] userStates,
|
||||||
|
@Param(value = "preparedBys", required = false) String[] preparedBys
|
||||||
) {
|
) {
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
@@ -83,6 +84,7 @@ public class MemberDataManageController {
|
|||||||
welfareMember,
|
welfareMember,
|
||||||
personType,
|
personType,
|
||||||
userState,
|
userState,
|
||||||
|
preparedBy,
|
||||||
unioncode,
|
unioncode,
|
||||||
unionname,
|
unionname,
|
||||||
unionid,
|
unionid,
|
||||||
@@ -123,6 +125,7 @@ public class MemberDataManageController {
|
|||||||
cnd.andEX("campusName", "=", campus);
|
cnd.andEX("campusName", "=", campus);
|
||||||
cnd.andEX("personType", "in", personTypes);
|
cnd.andEX("personType", "in", personTypes);
|
||||||
cnd.andEX("userState", "in", userStates);
|
cnd.andEX("userState", "in", userStates);
|
||||||
|
cnd.andEX("preparedBy", "in", preparedBys);
|
||||||
|
|
||||||
if (StrUtil.isNotBlank(startLoginNames)) {
|
if (StrUtil.isNotBlank(startLoginNames)) {
|
||||||
String[] loginNames = startLoginNames.split(",");
|
String[] loginNames = startLoginNames.split(",");
|
||||||
@@ -146,7 +149,7 @@ public class MemberDataManageController {
|
|||||||
if (ShiroUtil.hasRole("H04")) {
|
if (ShiroUtil.hasRole("H04")) {
|
||||||
cnd.and("unionid", "=", Vi.getUnionId());
|
cnd.and("unionid", "=", Vi.getUnionId());
|
||||||
} else {
|
} else {
|
||||||
cnd.and("unionGroupId", "in", io.v.nutz.web.commons.utils.ShiroUtil.getUnionGroupIds());
|
cnd.and("unionGroupId", "in", ShiroUtil.getUnionGroupIds());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -249,7 +252,7 @@ public class MemberDataManageController {
|
|||||||
if (ShiroUtil.hasRole("H04")) {
|
if (ShiroUtil.hasRole("H04")) {
|
||||||
cnd.and("unionid", "=", Vi.getUnionId());
|
cnd.and("unionid", "=", Vi.getUnionId());
|
||||||
} else {
|
} else {
|
||||||
cnd.and("unionGroupId", "in", io.v.nutz.web.commons.utils.ShiroUtil.getUnionGroupIds());
|
cnd.and("unionGroupId", "in", ShiroUtil.getUnionGroupIds());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -315,6 +318,7 @@ public class MemberDataManageController {
|
|||||||
@Param(value = "endLoginNames", required = false) String endLoginNames,
|
@Param(value = "endLoginNames", required = false) String endLoginNames,
|
||||||
@Param(value = "confirm", required = false) Boolean confirm,
|
@Param(value = "confirm", required = false) Boolean confirm,
|
||||||
@Param(value = "personTypes", required = false) String[] personTypes,
|
@Param(value = "personTypes", required = false) String[] personTypes,
|
||||||
|
@Param(value = "preparedBys", required = false) String[] preparedBys,
|
||||||
@Param(value = "userStates", required = false) String[] userStates) {
|
@Param(value = "userStates", required = false) String[] userStates) {
|
||||||
|
|
||||||
|
|
||||||
@@ -343,6 +347,7 @@ public class MemberDataManageController {
|
|||||||
cnd.andEX("campusName", "=", campus);
|
cnd.andEX("campusName", "=", campus);
|
||||||
cnd.andEX("personType", "in", personTypes);
|
cnd.andEX("personType", "in", personTypes);
|
||||||
cnd.andEX("userState", "in", userStates);
|
cnd.andEX("userState", "in", userStates);
|
||||||
|
cnd.andEX("preparedBy", "in", preparedBys);
|
||||||
|
|
||||||
if (StrUtil.isNotBlank(startLoginNames)) {
|
if (StrUtil.isNotBlank(startLoginNames)) {
|
||||||
String[] loginNames = startLoginNames.split(",");
|
String[] loginNames = startLoginNames.split(",");
|
||||||
@@ -366,7 +371,7 @@ public class MemberDataManageController {
|
|||||||
if (ShiroUtil.hasRole("H04")) {
|
if (ShiroUtil.hasRole("H04")) {
|
||||||
cnd.and("unionid", "=", Vi.getUnionId());
|
cnd.and("unionid", "=", Vi.getUnionId());
|
||||||
} else {
|
} else {
|
||||||
cnd.and("unionGroupId", "in", io.v.nutz.web.commons.utils.ShiroUtil.getUnionGroupIds());
|
cnd.and("unionGroupId", "in", ShiroUtil.getUnionGroupIds());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,20 +5,20 @@ import cn.afterturn.easypoi.excel.entity.ExportParams;
|
|||||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
import io.v.nutz.base.annontation.ViReturn;
|
||||||
|
import io.v.nutz.base.dao.CndPlus;
|
||||||
|
import io.v.nutz.base.query.PageForm;
|
||||||
import io.v.nutz.base.result.Result;
|
import io.v.nutz.base.result.Result;
|
||||||
import io.v.nutz.base.service.AsyncService;
|
import io.v.nutz.base.service.AsyncService;
|
||||||
import io.v.nutz.base.utils.Vi;
|
import io.v.nutz.base.utils.Vi;
|
||||||
import io.v.nutz.base.dao.CndPlus;
|
import io.v.nutz.base.utils.ViTool;
|
||||||
|
import io.v.nutz.sys.services.SysRoleService;
|
||||||
|
import io.v.nutz.sys.services.SysUserService;
|
||||||
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
import io.v.nutz.zhgh.member.MemberMode;
|
import io.v.nutz.zhgh.member.MemberMode;
|
||||||
import io.v.nutz.zhgh.member.UserMode;
|
import io.v.nutz.zhgh.member.UserMode;
|
||||||
import io.v.nutz.zhgh.member.model.MemberHistory;
|
import io.v.nutz.zhgh.member.model.MemberHistory;
|
||||||
import io.v.nutz.zhgh.member.service.MemberHistoryService;
|
import io.v.nutz.zhgh.member.service.MemberHistoryService;
|
||||||
import io.v.nutz.zhgh.member.service.MemberService;
|
import io.v.nutz.zhgh.member.service.MemberService;
|
||||||
import io.v.nutz.base.query.PageForm;
|
|
||||||
import io.v.nutz.sys.services.SysRoleService;
|
|
||||||
import io.v.nutz.sys.services.SysUserService;
|
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
|
||||||
import io.v.nutz.base.utils.ViTool;
|
|
||||||
import org.apache.poi.ss.usermodel.Workbook;
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
@@ -159,7 +159,7 @@ public class MemberGroupInfoController {
|
|||||||
} else if (ShiroUtil.hasRole("ghxzzz")) {
|
} else if (ShiroUtil.hasRole("ghxzzz")) {
|
||||||
cnd.and("unionId", "=", Vi.getUnionId());
|
cnd.and("unionId", "=", Vi.getUnionId());
|
||||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
seg.or("unionGroupId", "in", io.v.nutz.web.commons.utils.ShiroUtil.getUnionGroupIds());
|
seg.or("unionGroupId", "in", ShiroUtil.getUnionGroupIds());
|
||||||
seg.or("unionGroupId", "is", null);
|
seg.or("unionGroupId", "is", null);
|
||||||
cnd.and(seg);
|
cnd.and(seg);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
package io.v.nutz.zhgh.member.controller.info;
|
package io.v.nutz.zhgh.member.controller.info;
|
||||||
|
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
import io.v.nutz.base.annontation.ViReturn;
|
||||||
import io.v.nutz.base.utils.Vi;
|
|
||||||
import io.v.nutz.base.dao.CndPlus;
|
import io.v.nutz.base.dao.CndPlus;
|
||||||
|
import io.v.nutz.base.query.PageForm;
|
||||||
|
import io.v.nutz.base.utils.Vi;
|
||||||
|
import io.v.nutz.sys.models.Sys_user;
|
||||||
|
import io.v.nutz.sys.services.SysUserService;
|
||||||
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
import io.v.nutz.zhgh.data.constant.UserChangeType;
|
import io.v.nutz.zhgh.data.constant.UserChangeType;
|
||||||
import io.v.nutz.zhgh.data.model.UserHistory;
|
import io.v.nutz.zhgh.data.model.UserHistory;
|
||||||
import io.v.nutz.zhgh.data.service.HistoryUserService;
|
import io.v.nutz.zhgh.data.service.HistoryUserService;
|
||||||
@@ -10,10 +14,6 @@ import io.v.nutz.zhgh.member.UserMode;
|
|||||||
import io.v.nutz.zhgh.member.constant.*;
|
import io.v.nutz.zhgh.member.constant.*;
|
||||||
import io.v.nutz.zhgh.member.model.MemberChangeRecord;
|
import io.v.nutz.zhgh.member.model.MemberChangeRecord;
|
||||||
import io.v.nutz.zhgh.member.service.MemberService;
|
import io.v.nutz.zhgh.member.service.MemberService;
|
||||||
import io.v.nutz.base.query.PageForm;
|
|
||||||
import io.v.nutz.sys.models.Sys_user;
|
|
||||||
import io.v.nutz.sys.services.SysUserService;
|
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.nutz.dao.Chain;
|
import org.nutz.dao.Chain;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
@@ -132,7 +132,7 @@ public class MemberMakeController {
|
|||||||
if (ShiroUtil.hasRole("H04")) {
|
if (ShiroUtil.hasRole("H04")) {
|
||||||
cnd.and("unionid", "=", Vi.getUnionId());
|
cnd.and("unionid", "=", Vi.getUnionId());
|
||||||
} else {
|
} else {
|
||||||
cnd.and("unionGroupId", "in", io.v.nutz.web.commons.utils.ShiroUtil.getUnionGroupIds());
|
cnd.and("unionGroupId", "in", ShiroUtil.getUnionGroupIds());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
|||||||
import io.v.nutz.base.annontation.ViReturn;
|
import io.v.nutz.base.annontation.ViReturn;
|
||||||
import io.v.nutz.base.utils.Vi;
|
import io.v.nutz.base.utils.Vi;
|
||||||
import io.v.nutz.base.utils.ViTool;
|
import io.v.nutz.base.utils.ViTool;
|
||||||
import io.v.nutz.zhgh.member.service.MemberService;
|
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
|
import io.v.nutz.zhgh.member.service.MemberService;
|
||||||
import org.apache.poi.ss.usermodel.Workbook;
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
|
|||||||
@@ -2,12 +2,12 @@ package io.v.nutz.zhgh.member.controller.inquire;
|
|||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
import io.v.nutz.base.annontation.ViReturn;
|
||||||
import io.v.nutz.base.utils.Vi;
|
|
||||||
import io.v.nutz.base.dao.CndPlus;
|
import io.v.nutz.base.dao.CndPlus;
|
||||||
import io.v.nutz.zhgh.data.model.UserHistory;
|
|
||||||
import io.v.nutz.base.query.PageForm;
|
import io.v.nutz.base.query.PageForm;
|
||||||
import io.v.nutz.base.service.ViService;
|
import io.v.nutz.base.service.ViService;
|
||||||
|
import io.v.nutz.base.utils.Vi;
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
|
import io.v.nutz.zhgh.data.model.UserHistory;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
import org.nutz.dao.sql.Sql;
|
import org.nutz.dao.sql.Sql;
|
||||||
@@ -69,7 +69,7 @@ public class MemberHistoyController {
|
|||||||
} else if (ShiroUtil.hasRole("ghxzzz")) {
|
} else if (ShiroUtil.hasRole("ghxzzz")) {
|
||||||
cnd.and("u.unionId", "=", Vi.getUnionId());
|
cnd.and("u.unionId", "=", Vi.getUnionId());
|
||||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
seg.or("u.unionGroupId", "in", io.v.nutz.web.commons.utils.ShiroUtil.getUnionGroupIds());
|
seg.or("u.unionGroupId", "in", ShiroUtil.getUnionGroupIds());
|
||||||
seg.or("u.unionGroupId", "is", null);
|
seg.or("u.unionGroupId", "is", null);
|
||||||
cnd.and(seg);
|
cnd.and(seg);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,16 +6,16 @@ import cn.afterturn.easypoi.excel.entity.ExportParams;
|
|||||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
import io.v.nutz.base.annontation.ViReturn;
|
||||||
import io.v.nutz.base.utils.Vi;
|
|
||||||
import io.v.nutz.base.dao.CndPlus;
|
import io.v.nutz.base.dao.CndPlus;
|
||||||
import io.v.nutz.zhgh.member.constant.MemberStatus;
|
|
||||||
import io.v.nutz.zhgh.member.service.MemberService;
|
|
||||||
import io.v.nutz.zhgh.member.utils.MemberUtils;
|
|
||||||
import io.v.nutz.base.query.PageForm;
|
import io.v.nutz.base.query.PageForm;
|
||||||
import io.v.nutz.base.service.ViService;
|
import io.v.nutz.base.service.ViService;
|
||||||
|
import io.v.nutz.base.utils.Vi;
|
||||||
import io.v.nutz.sys.models.Sys_user;
|
import io.v.nutz.sys.models.Sys_user;
|
||||||
import io.v.nutz.sys.services.SysUserService;
|
import io.v.nutz.sys.services.SysUserService;
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
|
import io.v.nutz.zhgh.member.constant.MemberStatus;
|
||||||
|
import io.v.nutz.zhgh.member.service.MemberService;
|
||||||
|
import io.v.nutz.zhgh.member.utils.MemberUtils;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.apache.poi.ss.usermodel.Workbook;
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
@@ -80,6 +80,7 @@ public class MemberInquireIntegrateController {
|
|||||||
@Param(value = "unionGroupId", required = false) String[] unionGroupId,
|
@Param(value = "unionGroupId", required = false) String[] unionGroupId,
|
||||||
@Param(value = "personTypes", required = false) String[] personTypes,
|
@Param(value = "personTypes", required = false) String[] personTypes,
|
||||||
@Param(value = "userStates", required = false) String[] userStates,
|
@Param(value = "userStates", required = false) String[] userStates,
|
||||||
|
@Param(value = "preparedBys", required = false) String[] preparedBys,
|
||||||
@Param(value = "memberStatus", required = false) String[] memberStatus,
|
@Param(value = "memberStatus", required = false) String[] memberStatus,
|
||||||
@Param(value = "campus", required = false) String campus,
|
@Param(value = "campus", required = false) String campus,
|
||||||
@Param(value = "memberType", required = false) String memberType,
|
@Param(value = "memberType", required = false) String memberType,
|
||||||
@@ -92,7 +93,7 @@ public class MemberInquireIntegrateController {
|
|||||||
@Param(value = "memberSearchKeyWord", required = false) String memberSearchKeyWord) {
|
@Param(value = "memberSearchKeyWord", required = false) String memberSearchKeyWord) {
|
||||||
int yyyy = Calendar.getInstance().get(Calendar.YEAR);
|
int yyyy = Calendar.getInstance().get(Calendar.YEAR);
|
||||||
|
|
||||||
Cnd cnd = MemberUtils.getCnd(pageForm, startDate, endDate, unionId, unitId, personTypes, userStates, memberTypes, sexTypes, age, null, roleIds, null, null, memberStatus, threeUnitId, unionGroupId, reverseSelection, null, null, campus);
|
Cnd cnd = MemberUtils.getCnd(pageForm, startDate, endDate, unionId, unitId, personTypes, userStates, preparedBys, memberTypes, sexTypes, age, null, roleIds, null, null, memberStatus, threeUnitId, unionGroupId, reverseSelection, null, null, campus);
|
||||||
|
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT u.* from $table
|
SELECT u.* from $table
|
||||||
@@ -143,7 +144,12 @@ public class MemberInquireIntegrateController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06,H03")) {
|
if (!ShiroUtil.hasAnyRoles("sysadmin,A06,H03")) {
|
||||||
cnd.and("unionid", "=", Vi.getUnionId());
|
if (ShiroUtil.hasAnyRoles("H04,gh01")) {
|
||||||
|
cnd.and("u.unionId", "=", Vi.getUnionId());
|
||||||
|
} else if (ShiroUtil.hasRole("ghxzzz")) {
|
||||||
|
cnd.and("u.unionGroupId", "in", ShiroUtil.getUnionGroupIds());
|
||||||
|
// cnd.and("u.unionid", "=", Vi.getUnionId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StrUtil.isBlank(pageForm.getPageOrderName()) && StrUtil.isBlank(pageForm.getPageOrderBy())) {
|
if (StrUtil.isBlank(pageForm.getPageOrderName()) && StrUtil.isBlank(pageForm.getPageOrderBy())) {
|
||||||
@@ -241,7 +247,7 @@ public class MemberInquireIntegrateController {
|
|||||||
private String endDate;
|
private String endDate;
|
||||||
|
|
||||||
@Excel(name = "参加工作日期", width = 20d)
|
@Excel(name = "参加工作日期", width = 20d)
|
||||||
private String schoolTime;
|
private String workDate;
|
||||||
|
|
||||||
@Excel(name = "录用职位", width = 20d)
|
@Excel(name = "录用职位", width = 20d)
|
||||||
private String position;
|
private String position;
|
||||||
@@ -443,6 +449,7 @@ public class MemberInquireIntegrateController {
|
|||||||
@Param(value = "unionGroupId", required = false) String[] unionGroupId,
|
@Param(value = "unionGroupId", required = false) String[] unionGroupId,
|
||||||
@Param(value = "personTypes", required = false) String[] personTypes,
|
@Param(value = "personTypes", required = false) String[] personTypes,
|
||||||
@Param(value = "userStates", required = false) String[] userStates,
|
@Param(value = "userStates", required = false) String[] userStates,
|
||||||
|
@Param(value = "preparedBys", required = false) String[] preparedBys,
|
||||||
@Param(value = "memberStatus", required = false) String[] memberStatus,
|
@Param(value = "memberStatus", required = false) String[] memberStatus,
|
||||||
@Param(value = "campus", required = false) String campus,
|
@Param(value = "campus", required = false) String campus,
|
||||||
@Param(value = "memberType", required = false) String memberType,
|
@Param(value = "memberType", required = false) String memberType,
|
||||||
@@ -455,62 +462,9 @@ public class MemberInquireIntegrateController {
|
|||||||
@Param(value = "memberSearchKeyWord", required = false) String memberSearchKeyWord,
|
@Param(value = "memberSearchKeyWord", required = false) String memberSearchKeyWord,
|
||||||
String props) {
|
String props) {
|
||||||
try {
|
try {
|
||||||
// int yyyy = Calendar.getInstance().get(Calendar.YEAR);
|
|
||||||
// CndPlus cnd = CndPlus.create();
|
|
||||||
// Sql sql = Sqls.create("""
|
|
||||||
// SELECT
|
|
||||||
// *,
|
|
||||||
// unitname,
|
|
||||||
// unionname,
|
|
||||||
// unitcode,
|
|
||||||
// unioncode
|
|
||||||
// FROM
|
|
||||||
// $table
|
|
||||||
// $condition
|
|
||||||
// """);
|
|
||||||
//
|
|
||||||
// if (year == yyyy) {
|
|
||||||
// sql.setVar("table", "user");
|
|
||||||
// } else {
|
|
||||||
// sql.setVar("table", "member_his");
|
|
||||||
// cnd.andEX("year", "=", year);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// cnd.and("member", "=", 1);
|
|
||||||
// if (ShiroUtil.hasAnyRoles("sysadmin,A06,H03")) {
|
|
||||||
// cnd.andEX("unionid", "=", unionId);
|
|
||||||
// } else {
|
|
||||||
// cnd.andEX("unionid", "=", Vi.getUnionId());
|
|
||||||
// }
|
|
||||||
// cnd.andEX("unitid", "=", unitId);
|
|
||||||
// if (memberStatus != null) {
|
|
||||||
// if (Json.fromJsonAsArray(Integer.class, memberStatus).length > 0) {
|
|
||||||
// cnd.andEX("memberStatus", "in", Json.fromJsonAsArray(Integer.class, memberStatus));
|
|
||||||
// } else {
|
|
||||||
// List<Integer> status = new ArrayList<>();
|
|
||||||
// status.add(MemberStatus.NORMAL.getCode());
|
|
||||||
// status.add(MemberStatus.TURN_IN.getCode());
|
|
||||||
// status.add(MemberStatus.RESTORE.getCode());
|
|
||||||
// SqlExpressionGroup group = new SqlExpressionGroup();
|
|
||||||
// group.and("memberStatus", "in", status);
|
|
||||||
// group.or("memberStatus", "IS", null);
|
|
||||||
// cnd.and(group);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// if (personTypes != null && Json.fromJsonAsArray(String.class, personTypes).length > 0) {
|
|
||||||
// cnd.andEX("personType", "in", Json.fromJsonAsArray(String.class, personTypes));
|
|
||||||
// }
|
|
||||||
// if (userStates != null && Json.fromJsonAsArray(String.class, userStates).length > 0) {
|
|
||||||
// cnd.andEX("userState", "in", Json.fromJsonAsArray(String.class, userStates));
|
|
||||||
// }
|
|
||||||
// cnd.asc("unitcode");
|
|
||||||
// cnd.asc("unioncode");
|
|
||||||
// cnd.asc("memberJoinTime");
|
|
||||||
// sql.setCondition(cnd);
|
|
||||||
int yyyy = Calendar.getInstance().get(Calendar.YEAR);
|
int yyyy = Calendar.getInstance().get(Calendar.YEAR);
|
||||||
|
|
||||||
Cnd cnd = MemberUtils.getCnd(null, startDate, endDate, unionId, unitId, personTypes, userStates, memberTypes, sexTypes, age, null, roleIds, null, null, memberStatus, threeUnitId, unionGroupId, reverseSelection, null, null, campus);
|
Cnd cnd = MemberUtils.getCnd(null, startDate, endDate, unionId, unitId, personTypes, userStates, preparedBys, memberTypes, sexTypes, age, null, roleIds, null, null, memberStatus, threeUnitId, unionGroupId, reverseSelection, null, null, campus);
|
||||||
|
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT u.* from $table
|
SELECT u.* from $table
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
|||||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import io.v.nutz.base.utils.Vi;
|
|
||||||
import io.v.nutz.base.dao.CndPlus;
|
import io.v.nutz.base.dao.CndPlus;
|
||||||
|
import io.v.nutz.base.utils.Vi;
|
||||||
import io.v.nutz.sys.services.SysUserService;
|
import io.v.nutz.sys.services.SysUserService;
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ import cn.afterturn.easypoi.excel.entity.ExportParams;
|
|||||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
import io.v.nutz.base.annontation.ViReturn;
|
||||||
import io.v.nutz.base.utils.Vi;
|
import io.v.nutz.base.utils.Vi;
|
||||||
import io.v.nutz.zhgh.member.service.MemberService;
|
|
||||||
import io.v.nutz.sys.models.Sys_dict;
|
import io.v.nutz.sys.models.Sys_dict;
|
||||||
import io.v.nutz.sys.services.SysDictService;
|
import io.v.nutz.sys.services.SysDictService;
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
|
import io.v.nutz.zhgh.member.service.MemberService;
|
||||||
import org.apache.poi.ss.usermodel.Workbook;
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
|
|||||||
@@ -1,9 +1,16 @@
|
|||||||
package io.v.nutz.zhgh.member.handle;
|
package io.v.nutz.zhgh.member.handle;
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import io.v.nutz.base.model.Audit;
|
||||||
|
import io.v.nutz.base.service.AuditService;
|
||||||
|
import io.v.nutz.base.service.ViService;
|
||||||
|
import io.v.nutz.base.service.impl.ViServiceImpl;
|
||||||
import io.v.nutz.base.utils.MsgApi;
|
import io.v.nutz.base.utils.MsgApi;
|
||||||
import io.v.nutz.base.utils.Roles;
|
import io.v.nutz.base.utils.Roles;
|
||||||
import io.v.nutz.base.utils.Vi;
|
import io.v.nutz.base.utils.Vi;
|
||||||
|
import io.v.nutz.base.utils.ViResource;
|
||||||
|
import io.v.nutz.sys.models.Sys_user;
|
||||||
|
import io.v.nutz.sys.services.SysUserService;
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
import io.v.nutz.zhgh.data.constant.UserChangeType;
|
import io.v.nutz.zhgh.data.constant.UserChangeType;
|
||||||
import io.v.nutz.zhgh.data.model.UserHistory;
|
import io.v.nutz.zhgh.data.model.UserHistory;
|
||||||
@@ -12,13 +19,6 @@ import io.v.nutz.zhgh.member.constant.MemberApplyState;
|
|||||||
import io.v.nutz.zhgh.member.constant.MemberChangeOrigin;
|
import io.v.nutz.zhgh.member.constant.MemberChangeOrigin;
|
||||||
import io.v.nutz.zhgh.member.constant.MemberOrigin;
|
import io.v.nutz.zhgh.member.constant.MemberOrigin;
|
||||||
import io.v.nutz.zhgh.member.model.MemberApplyRecord;
|
import io.v.nutz.zhgh.member.model.MemberApplyRecord;
|
||||||
import io.v.nutz.base.model.Audit;
|
|
||||||
import io.v.nutz.base.service.AuditService;
|
|
||||||
import io.v.nutz.base.service.ViService;
|
|
||||||
import io.v.nutz.base.service.impl.ViServiceImpl;
|
|
||||||
import io.v.nutz.sys.models.Sys_user;
|
|
||||||
import io.v.nutz.sys.services.SysUserService;
|
|
||||||
import io.v.nutz.base.utils.ViResource;
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
import org.nutz.dao.Chain;
|
import org.nutz.dao.Chain;
|
||||||
@@ -106,29 +106,29 @@ public enum MemberApplyAuditHandle {
|
|||||||
|
|
||||||
MemberApplyToDoHandler.COMPLETE_UNION_TASK.exec(record,NutMap.NEW().addv("nodeName",audit.getAuditPass() ? "基层工会通过" : "基层工会拒绝"));
|
MemberApplyToDoHandler.COMPLETE_UNION_TASK.exec(record,NutMap.NEW().addv("nodeName",audit.getAuditPass() ? "基层工会通过" : "基层工会拒绝"));
|
||||||
|
|
||||||
if (audit.getAuditPass()) {
|
// if (audit.getAuditPass()) {
|
||||||
|
//
|
||||||
Sql sql = Sqls.create("""
|
// Sql sql = Sqls.create("""
|
||||||
SELECT
|
// SELECT
|
||||||
su.loginname
|
// su.loginname
|
||||||
FROM
|
// FROM
|
||||||
sys_user_role sur
|
// sys_user_role sur
|
||||||
LEFT JOIN sys_user su ON su.id = sur.userId
|
// LEFT JOIN sys_user su ON su.id = sur.userId
|
||||||
WHERE
|
// WHERE
|
||||||
sur.roleId = @roleId
|
// sur.roleId = @roleId
|
||||||
""").setParam("roleId", Roles.H03);
|
// """).setParam("roleId", Roles.H03);
|
||||||
|
//
|
||||||
List<NutMap> mapList = sysUserService.listMap(sql);
|
// List<NutMap> mapList = sysUserService.listMap(sql);
|
||||||
|
//
|
||||||
MemberApplyToDoHandler.CREATE_SCHOOL_TASK.exec(record,NutMap.NEW().addv("schoolLeader",mapList));
|
// MemberApplyToDoHandler.CREATE_SCHOOL_TASK.exec(record,NutMap.NEW().addv("schoolLeader",mapList));
|
||||||
|
//
|
||||||
/* mapList.forEach(v -> {
|
///* mapList.forEach(v -> {
|
||||||
// sendMsg.pushWeChatMsg("会员系统", user.getUsername() + "提交了会员申请待您审核,请前往智慧工会进行审核!", v.getString("loginname"));
|
//// sendMsg.pushWeChatMsg("会员系统", user.getUsername() + "提交了会员申请待您审核,请前往智慧工会进行审核!", v.getString("loginname"));
|
||||||
});*/
|
// });*/
|
||||||
} else {
|
// } else {
|
||||||
// sendMsg.pushWeChatMsg("会员系统", "院级工会拒绝了您的会员申请", user.getLoginname());
|
//// sendMsg.pushWeChatMsg("会员系统", "院级工会拒绝了您的会员申请", user.getLoginname());
|
||||||
MemberApplyToDoHandler.REFUSE_UNION_TASK.exec(record,NutMap.NEW().addv("nodeName","基层工会拒绝"));
|
// MemberApplyToDoHandler.REFUSE_UNION_TASK.exec(record,NutMap.NEW().addv("nodeName","基层工会拒绝"));
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
return record;
|
return record;
|
||||||
|
|||||||
@@ -1,23 +1,18 @@
|
|||||||
package io.v.nutz.zhgh.member.handle;
|
package io.v.nutz.zhgh.member.handle;
|
||||||
|
|
||||||
import io.v.nutz.base.utils.Roles;
|
|
||||||
import io.v.nutz.base.utils.Vi;
|
|
||||||
import io.v.nutz.base.utils.ViResource;
|
import io.v.nutz.base.utils.ViResource;
|
||||||
import io.v.nutz.sys.models.User;
|
import io.v.nutz.sys.models.User;
|
||||||
import io.v.nutz.sys.services.SysLocalProcessService;
|
import io.v.nutz.sys.services.SysLocalProcessService;
|
||||||
import io.v.nutz.sys.services.impl.SysLocalProcessServiceImpl;
|
import io.v.nutz.sys.services.impl.SysLocalProcessServiceImpl;
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
import io.v.nutz.zhgh.member.model.MemberApplyRecord;
|
import io.v.nutz.zhgh.member.model.MemberApplyRecord;
|
||||||
import io.v.nutz.zhgh.member.model.MemberChangeRecord;
|
|
||||||
import io.v.nutz.zhgh.member.service.MemberService;
|
import io.v.nutz.zhgh.member.service.MemberService;
|
||||||
import io.v.nutz.zhgh.member.service.impl.MemberServiceImpl;
|
import io.v.nutz.zhgh.member.service.impl.MemberServiceImpl;
|
||||||
import io.v.nutz.zhgh.zgfw.model.difficult.Zgfw_knbf;
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
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.Daos;
|
|
||||||
import org.nutz.lang.util.NutMap;
|
import org.nutz.lang.util.NutMap;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
package io.v.nutz.zhgh.member.handle;
|
package io.v.nutz.zhgh.member.handle;
|
||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import io.v.nutz.base.lang.Enum;
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import io.v.nutz.base.lang.Enum;
|
||||||
|
import io.v.nutz.base.model.Audit;
|
||||||
|
import io.v.nutz.base.service.AuditService;
|
||||||
|
import io.v.nutz.base.service.ViService;
|
||||||
|
import io.v.nutz.base.service.impl.ViServiceImpl;
|
||||||
import io.v.nutz.base.utils.Vi;
|
import io.v.nutz.base.utils.Vi;
|
||||||
|
import io.v.nutz.base.utils.ViResource;
|
||||||
|
import io.v.nutz.sys.models.Sys_user;
|
||||||
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
import io.v.nutz.zhgh.data.constant.UserChangeType;
|
import io.v.nutz.zhgh.data.constant.UserChangeType;
|
||||||
import io.v.nutz.zhgh.data.model.UserHistory;
|
import io.v.nutz.zhgh.data.model.UserHistory;
|
||||||
import io.v.nutz.zhgh.member.constant.MemberChangeApplyState;
|
import io.v.nutz.zhgh.member.constant.MemberChangeApplyState;
|
||||||
import io.v.nutz.zhgh.member.constant.MemberChangeOrigin;
|
import io.v.nutz.zhgh.member.constant.MemberChangeOrigin;
|
||||||
import io.v.nutz.zhgh.member.model.MemberChangeRecord;
|
import io.v.nutz.zhgh.member.model.MemberChangeRecord;
|
||||||
import io.v.nutz.base.model.Audit;
|
|
||||||
import io.v.nutz.base.service.AuditService;
|
|
||||||
import io.v.nutz.base.service.ViService;
|
|
||||||
import io.v.nutz.base.service.impl.ViServiceImpl;
|
|
||||||
import io.v.nutz.sys.models.Sys_user;
|
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
|
||||||
import io.v.nutz.base.utils.ViResource;
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.lang.util.NutMap;
|
import org.nutz.lang.util.NutMap;
|
||||||
@@ -118,7 +118,8 @@ public enum MemberChangeAuditHandle {
|
|||||||
|
|
||||||
if (record.getStateId() == MemberChangeApplyState.SUCCESS) {
|
if (record.getStateId() == MemberChangeApplyState.SUCCESS) {
|
||||||
|
|
||||||
if (auditService.dao().count(UserHistory.class, Cnd.where("memberChangeRecordId", "=", record.getId())) == 0) {
|
int count = auditService.dao().count(UserHistory.class, Cnd.where("memberChangeRecordId", "=", record.getId()));
|
||||||
|
if (count == 0) {
|
||||||
UserHistory history = new UserHistory();
|
UserHistory history = new UserHistory();
|
||||||
Sys_user user = recordViService.dao().fetch(Sys_user.class, record.getUserId());
|
Sys_user user = recordViService.dao().fetch(Sys_user.class, record.getUserId());
|
||||||
BeanUtils.copyProperties(user, history);
|
BeanUtils.copyProperties(user, history);
|
||||||
|
|||||||
@@ -1,25 +1,26 @@
|
|||||||
package io.v.nutz.zhgh.member.handle;
|
package io.v.nutz.zhgh.member.handle;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import io.v.nutz.base.service.ViService;
|
||||||
|
import io.v.nutz.base.service.impl.ViServiceImpl;
|
||||||
|
import io.v.nutz.base.utils.ViResource;
|
||||||
|
import io.v.nutz.sys.models.Sys_user;
|
||||||
|
import io.v.nutz.sys.services.SysRoleService;
|
||||||
|
import io.v.nutz.sys.services.SysUserService;
|
||||||
import io.v.nutz.zhgh.data.constant.UserChangeType;
|
import io.v.nutz.zhgh.data.constant.UserChangeType;
|
||||||
import io.v.nutz.zhgh.data.model.UserHistory;
|
import io.v.nutz.zhgh.data.model.UserHistory;
|
||||||
|
import io.v.nutz.zhgh.member.MemberMode;
|
||||||
import io.v.nutz.zhgh.member.UserMode;
|
import io.v.nutz.zhgh.member.UserMode;
|
||||||
import io.v.nutz.zhgh.member.WelfareMemberMode;
|
import io.v.nutz.zhgh.member.WelfareMemberMode;
|
||||||
import io.v.nutz.zhgh.member.constant.MemberStatus;
|
import io.v.nutz.zhgh.member.constant.MemberStatus;
|
||||||
import io.v.nutz.zhgh.member.model.MemberChangeRecord;
|
import io.v.nutz.zhgh.member.model.MemberChangeRecord;
|
||||||
import io.v.nutz.base.service.ViService;
|
|
||||||
import io.v.nutz.base.service.impl.ViServiceImpl;
|
|
||||||
import io.v.nutz.sys.models.Sys_user;
|
|
||||||
import io.v.nutz.sys.services.SysRoleService;
|
|
||||||
import io.v.nutz.sys.services.SysUserService;
|
|
||||||
import io.v.nutz.base.utils.ViResource;
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import org.nutz.dao.Chain;
|
import org.nutz.dao.Chain;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.lang.Strings;
|
import org.nutz.lang.Strings;
|
||||||
import org.springframework.beans.BeanUtils;
|
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 会员变更Handle
|
* 会员变更Handle
|
||||||
@@ -37,7 +38,7 @@ public enum MemberChangeHandle {
|
|||||||
UNIT_CHANGE(UserChangeType.UNIT_CHANGE.getCode()) {
|
UNIT_CHANGE(UserChangeType.UNIT_CHANGE.getCode()) {
|
||||||
@Override
|
@Override
|
||||||
public void change(MemberChangeRecord record) {
|
public void change(MemberChangeRecord record) {
|
||||||
archive(record.getUserId(), UserChangeType.UNIT_CHANGE);
|
archive(record, UserChangeType.UNIT_CHANGE);
|
||||||
sysUserService.update(Chain.make("unitid", record.getCurrentUnitId())
|
sysUserService.update(Chain.make("unitid", record.getCurrentUnitId())
|
||||||
.add("unionid", record.getCurrentUnionId())
|
.add("unionid", record.getCurrentUnionId())
|
||||||
.add("threeUnitId", record.getCurrentThreeUnitId()), Cnd.where("id", "=", record.getUserId()));
|
.add("threeUnitId", record.getCurrentThreeUnitId()), Cnd.where("id", "=", record.getUserId()));
|
||||||
@@ -48,14 +49,11 @@ public enum MemberChangeHandle {
|
|||||||
NEW(UserChangeType.NEW.getCode()) {
|
NEW(UserChangeType.NEW.getCode()) {
|
||||||
@Override
|
@Override
|
||||||
public void change(MemberChangeRecord record) {
|
public void change(MemberChangeRecord record) {
|
||||||
archive(record.getUserId(), UserChangeType.NEW);
|
archive(record, UserChangeType.NEW);
|
||||||
if (null != record.getInsertMember() && record.getInsertMember()){
|
if (null != record.getUpdateMember() && record.getUpdateMember()){
|
||||||
UserMode.addMemberRole(record.getUserId());
|
|
||||||
sysUserService.update(Chain.make("schoolTime", DateUtil.today()),Cnd.where("id","=",record.getUserId()));
|
sysUserService.update(Chain.make("schoolTime", DateUtil.today()),Cnd.where("id","=",record.getUserId()));
|
||||||
}
|
}
|
||||||
if (null != record.getUpdateWelfareMember() && record.getUpdateWelfareMember()) {
|
updateMemberAndWelfareMember(record);
|
||||||
sysUserService.update(Chain.make("welfareMember", WelfareMemberMode.NORMAL.getCode()).add("schoolTime", DateUtil.today()), Cnd.where("id", "=", record.getUserId()));
|
|
||||||
}
|
|
||||||
sysUserService.clearCache();
|
sysUserService.clearCache();
|
||||||
sysRoleService.clearCache();
|
sysRoleService.clearCache();
|
||||||
}
|
}
|
||||||
@@ -63,105 +61,102 @@ public enum MemberChangeHandle {
|
|||||||
RESIGN(UserChangeType.RESIGN.getCode()) {
|
RESIGN(UserChangeType.RESIGN.getCode()) {
|
||||||
@Override
|
@Override
|
||||||
public void change(MemberChangeRecord record) {
|
public void change(MemberChangeRecord record) {
|
||||||
archive(record.getUserId(), UserChangeType.RESIGN);
|
archive(record, UserChangeType.RESIGN);
|
||||||
UserMode.removeMemberRole(record.getUserId());
|
UserMode.removeMemberRole(record.getUserId());
|
||||||
updateWelfareMember(record);
|
updateMemberAndWelfareMember(record);
|
||||||
updateMemberStatus(MemberStatus.TURN_OUT, record.getUserId());
|
// updateMemberStatus(MemberStatus.TURN_OUT, record.getUserId());
|
||||||
updateUserStateAndPersonType(record);
|
updateUserStateAndPersonType(record);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
DIE(UserChangeType.DIE.getCode()) {
|
DIE(UserChangeType.DIE.getCode()) {
|
||||||
@Override
|
@Override
|
||||||
public void change(MemberChangeRecord record) {
|
public void change(MemberChangeRecord record) {
|
||||||
archive(record.getUserId(), UserChangeType.DIE);
|
archive(record, UserChangeType.DIE);
|
||||||
UserMode.removeMemberRole(record.getUserId());
|
UserMode.removeMemberRole(record.getUserId());
|
||||||
updateWelfareMember(record);
|
updateMemberAndWelfareMember(record);
|
||||||
updateMemberStatus(MemberStatus.WITHDRAWAL, record.getUserId());
|
|
||||||
updateUserStateAndPersonType(record);
|
updateUserStateAndPersonType(record);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
RETIREMENT(UserChangeType.RETIREMENT.getCode()) {
|
RETIREMENT(UserChangeType.RETIREMENT.getCode()) {
|
||||||
@Override
|
@Override
|
||||||
public void change(MemberChangeRecord record) {
|
public void change(MemberChangeRecord record) {
|
||||||
archive(record.getUserId(), UserChangeType.RETIREMENT);
|
archive(record, UserChangeType.RETIREMENT);
|
||||||
UserMode.removeMemberRole(record.getUserId());
|
UserMode.removeMemberRole(record.getUserId());
|
||||||
updateWelfareMember(record);
|
updateMemberAndWelfareMember(record);
|
||||||
updateMemberStatus(MemberStatus.KEEP, record.getUserId());
|
|
||||||
updateUserStateAndPersonType(record);
|
updateUserStateAndPersonType(record);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// EXPELLED(UserChangeType.EXPELLED.getCode()) {
|
/*EXPELLED(UserChangeType.EXPELLED.getCode()) {
|
||||||
// @Override
|
@Override
|
||||||
// public void change(MemberChangeRecord record) {
|
public void change(MemberChangeRecord record) {
|
||||||
// archive(record.getUserId(), UserChangeType.EXPELLED);
|
archive(record, UserChangeType.EXPELLED);
|
||||||
// UserMode.removeMemberRole(record.getUserId());
|
UserMode.removeMemberRole(record.getUserId());
|
||||||
// updateWelfareMember(record);
|
updateWelfareMember(record);
|
||||||
// updateMemberStatus(MemberStatus.EXPELLED, record.getUserId());
|
updateUserStateAndPersonType(record);
|
||||||
// updateUserStateAndPersonType(record);
|
}
|
||||||
// }
|
},*/
|
||||||
// },
|
|
||||||
RESTORE(UserChangeType.RESTORE.getCode()) {
|
RESTORE(UserChangeType.RESTORE.getCode()) {
|
||||||
@Override
|
@Override
|
||||||
public void change(MemberChangeRecord record) {
|
public void change(MemberChangeRecord record) {
|
||||||
archive(record.getUserId(), UserChangeType.RESTORE);
|
archive(record, UserChangeType.RESTORE);
|
||||||
UserMode.addMemberRole(record.getUserId());
|
UserMode.addMemberRole(record.getUserId());
|
||||||
updateMemberStatus(MemberStatus.RESTORE, record.getUserId());
|
updateMemberAndWelfareMember(record);
|
||||||
if (record.getUpdateWelfareMember()) {
|
|
||||||
sysUserService.update(Chain.make("welfareMember", WelfareMemberMode.NORMAL.getCode()), Cnd.where("id", "=", record.getUserId()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
WITHDRAWAL(UserChangeType.WITHDRAWAL.getCode()) {
|
WITHDRAWAL(UserChangeType.WITHDRAWAL.getCode()) {
|
||||||
@Override
|
@Override
|
||||||
public void change(MemberChangeRecord record) {
|
public void change(MemberChangeRecord record) {
|
||||||
archive(record.getUserId(), UserChangeType.WITHDRAWAL);
|
archive(record, UserChangeType.WITHDRAWAL);
|
||||||
UserMode.removeMemberRole(record.getUserId());
|
UserMode.removeMemberRole(record.getUserId());
|
||||||
updateWelfareMember(record);
|
updateMemberAndWelfareMember(record);
|
||||||
updateMemberStatus(MemberStatus.WITHDRAWAL, record.getUserId());
|
|
||||||
updateUserStateAndPersonType(record);
|
updateUserStateAndPersonType(record);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
CARD_CHANGE(UserChangeType.CARD_CHANGE.getCode()){
|
CARD_CHANGE(UserChangeType.CARD_CHANGE.getCode()){
|
||||||
@Override
|
@Override
|
||||||
public void change(MemberChangeRecord record) {
|
public void change(MemberChangeRecord record) {
|
||||||
archive(record.getUserId(), UserChangeType.CARD_CHANGE);
|
archive(record, UserChangeType.CARD_CHANGE);
|
||||||
if (Strings.isNotBlank(record.getIdCard())) {
|
if (Strings.isNotBlank(record.getChangeIdCard())) {
|
||||||
sysUserService.update(Chain.make("idcard", record.getIdCard()), Cnd.where("id", "=", record.getUserId()));
|
sysUserService.update(Chain.make("idcard", record.getChangeIdCard()), Cnd.where("id", "=", record.getUserId()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
MOBILE_CHANGE(UserChangeType.MOBILE_CHANGE.getCode()){
|
MOBILE_CHANGE(UserChangeType.MOBILE_CHANGE.getCode()){
|
||||||
@Override
|
@Override
|
||||||
public void change(MemberChangeRecord record) {
|
public void change(MemberChangeRecord record) {
|
||||||
archive(record.getUserId(), UserChangeType.MOBILE_CHANGE);
|
archive(record, UserChangeType.MOBILE_CHANGE);
|
||||||
if (Strings.isNotBlank(record.getMobile())) {
|
if (Strings.isNotBlank(record.getChangeMobile())) {
|
||||||
sysUserService.update(Chain.make("mobile", record.getMobile()), Cnd.where("id", "=", record.getUserId()));
|
sysUserService.update(Chain.make("mobile", record.getChangeMobile()), Cnd.where("id", "=", record.getUserId()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
};
|
||||||
EDUCATION_CHANGE(UserChangeType.EDUCATION_CHANGE.getCode()){
|
/*EDUCATION_CHANGE(UserChangeType.EDUCATION_CHANGE.getCode()){
|
||||||
@Override
|
@Override
|
||||||
public void change(MemberChangeRecord record) {
|
public void change(MemberChangeRecord record) {
|
||||||
archive(record.getUserId(), UserChangeType.EDUCATION_CHANGE);
|
archive(record, UserChangeType.EDUCATION_CHANGE);
|
||||||
if (Strings.isNotBlank(record.getEducation())) {
|
if (Strings.isNotBlank(record.getEducation())) {
|
||||||
sysUserService.update(Chain.make("education", record.getEducation()), Cnd.where("id", "=", record.getUserId()));
|
sysUserService.update(Chain.make("education", record.getEducation()), Cnd.where("id", "=", record.getUserId()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 存档
|
* 存档
|
||||||
*
|
*
|
||||||
* @param userId
|
* @param record
|
||||||
* @param changeType
|
* @param changeType
|
||||||
*/
|
*/
|
||||||
private static void archive(String userId, UserChangeType changeType) {
|
private static void archive(MemberChangeRecord record, UserChangeType changeType) {
|
||||||
// Sys_user user = sysUserService.fetch(userId);
|
int count = sysUserService.dao().count(UserHistory.class, Cnd.where("memberChangeRecordId", "=", record.getId()));
|
||||||
// UserHistory history = new UserHistory();
|
if (count == 0) {
|
||||||
// BeanUtils.copyProperties(user,history);
|
Sys_user user = sysUserService.fetch(record.getUserId());
|
||||||
// history.setChangeTime(new Date());
|
UserHistory history = new UserHistory();
|
||||||
// history.setChangeType(changeType.getCode());
|
BeanUtil.copyProperties(user, history);
|
||||||
// sysUserService.insert(history);
|
history.setChangeTime(DateUtil.date());
|
||||||
|
history.setChangeType(changeType.getCode());
|
||||||
|
history.setChangeTypes(List.of(changeType.getCode()));
|
||||||
|
sysUserService.insert(history);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -170,14 +165,17 @@ public enum MemberChangeHandle {
|
|||||||
*
|
*
|
||||||
* @param record 变更记录
|
* @param record 变更记录
|
||||||
*/
|
*/
|
||||||
public static void updateWelfareMember(MemberChangeRecord record) {
|
public static void updateMemberAndWelfareMember(MemberChangeRecord record) {
|
||||||
//record.getUpdateWelfareMember() (true:增加福利会员 false:取消福利会员);针对入会(恢复)
|
if (null != record.getUpdateWelfareMember()) {
|
||||||
if (null != record.getUpdateWelfareMember() && record.getUpdateWelfareMember()) {
|
sysUserService.update(Chain.make("welfareMember", record.getUpdateWelfareMember() ? WelfareMemberMode.NORMAL.getCode() : WelfareMemberMode.NONE.getCode()), Cnd.where("id", "=", record.getUserId()));
|
||||||
sysUserService.update(Chain.make("welfareMember", WelfareMemberMode.NORMAL.getCode()), Cnd.where("id", "=", record.getUserId()));
|
|
||||||
}
|
}
|
||||||
//record.getUpdateWelfare() (true:取消 false:不取消);针对(退休、离职、退会、去世)
|
if (null != record.getUpdateMember()){
|
||||||
if (null != record.getUpdateWelfare() && record.getUpdateWelfare()){
|
sysUserService.update(Chain.make("member", record.getUpdateMember() ? MemberMode.NORMAL.getCode() : MemberMode.NONE.getCode()), Cnd.where("id", "=", record.getUserId()));
|
||||||
sysUserService.update(Chain.make("welfareMember", WelfareMemberMode.NONE.getCode()), Cnd.where("id", "=", record.getUserId()));
|
}
|
||||||
|
if (null != record.getUpdateMember() && record.getUpdateMember()) {
|
||||||
|
UserMode.addMemberRole(record.getUserId());
|
||||||
|
} else {
|
||||||
|
UserMode.removeMemberRole(record.getUserId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -198,13 +196,12 @@ public enum MemberChangeHandle {
|
|||||||
* @param record 变更记录
|
* @param record 变更记录
|
||||||
*/
|
*/
|
||||||
public static void updateUserStateAndPersonType(MemberChangeRecord record){
|
public static void updateUserStateAndPersonType(MemberChangeRecord record){
|
||||||
Chain chain = null;
|
Chain chain = Chain.make("eCard",null);
|
||||||
if (Strings.isNotBlank(record.getUserState()) && Strings.isNotBlank(record.getPersonType())){
|
if (Strings.isNotBlank(record.getChangeUserState())) {
|
||||||
chain = Chain.make("userState",record.getUserState()).add("personType",record.getPersonType());
|
chain.add("userState", record.getChangeUserState());
|
||||||
} else if (Strings.isNotBlank(record.getUserState()) && Strings.isBlank(record.getPersonType())){
|
}
|
||||||
chain = Chain.make("userState",record.getUserState());
|
if (Strings.isNotBlank(record.getChangePersonType())) {
|
||||||
} else if (Strings.isBlank(record.getUserState()) && Strings.isNotBlank(record.getPersonType())){
|
chain.add("personType", record.getChangePersonType());
|
||||||
chain = Chain.make("personType",record.getPersonType());
|
|
||||||
}
|
}
|
||||||
sysUserService.update(chain,Cnd.where("id","=",record.getUserId()));
|
sysUserService.update(chain,Cnd.where("id","=",record.getUserId()));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import io.v.nutz.sys.models.User;
|
|||||||
import io.v.nutz.sys.services.SysLocalProcessService;
|
import io.v.nutz.sys.services.SysLocalProcessService;
|
||||||
import io.v.nutz.sys.services.impl.SysLocalProcessServiceImpl;
|
import io.v.nutz.sys.services.impl.SysLocalProcessServiceImpl;
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
import io.v.nutz.zhgh.member.model.MemberApplyRecord;
|
|
||||||
import io.v.nutz.zhgh.member.model.MemberChangeRecord;
|
import io.v.nutz.zhgh.member.model.MemberChangeRecord;
|
||||||
import io.v.nutz.zhgh.member.service.MemberService;
|
import io.v.nutz.zhgh.member.service.MemberService;
|
||||||
import io.v.nutz.zhgh.member.service.impl.MemberServiceImpl;
|
import io.v.nutz.zhgh.member.service.impl.MemberServiceImpl;
|
||||||
@@ -107,19 +106,19 @@ public enum MemberChangeToDoHandler {
|
|||||||
CREATE_UNION_TASK() {
|
CREATE_UNION_TASK() {
|
||||||
@Override
|
@Override
|
||||||
public void exec(MemberChangeRecord record, NutMap extra) {
|
public void exec(MemberChangeRecord record, NutMap extra) {
|
||||||
List<String> unionLeader = Vi.getUnionLeader(record.getUserId());
|
// List<String> unionLeader = Vi.getUnionLeader(record.getUserId());
|
||||||
|
|
||||||
localProcessService.createTask(
|
// localProcessService.createTask(
|
||||||
"member_change_record@" + record.getId(),
|
// "member_change_record@" + record.getId(),
|
||||||
"member_change_record_union_audit",
|
// "member_change_record_union_audit",
|
||||||
"基层工会审核",
|
// "基层工会审核",
|
||||||
ShiroUtil.getUserId(),
|
// ShiroUtil.getUserId(),
|
||||||
unionLeader,
|
// unionLeader,
|
||||||
"/platform/member/change/audit/union",
|
// "/platform/member/change/audit/union",
|
||||||
"/platform/member/change/audit/union",
|
// "/platform/member/change/audit/union",
|
||||||
"/platform/member/change/audit/union",
|
// "/platform/member/change/audit/union",
|
||||||
"/platform/member/change/audit/union"
|
// "/platform/member/change/audit/union"
|
||||||
);
|
// );
|
||||||
|
|
||||||
localProcessService.updateProcessNodeName("member_change_record@" + record.getId(), "基层工会审核");
|
localProcessService.updateProcessNodeName("member_change_record@" + record.getId(), "基层工会审核");
|
||||||
|
|
||||||
@@ -150,32 +149,32 @@ public enum MemberChangeToDoHandler {
|
|||||||
CREATE_SCHOOL_TASK() {
|
CREATE_SCHOOL_TASK() {
|
||||||
@Override
|
@Override
|
||||||
public void exec(MemberChangeRecord record, NutMap extra) {
|
public void exec(MemberChangeRecord record, NutMap extra) {
|
||||||
Sql sql = Sqls.create("""
|
// Sql sql = Sqls.create("""
|
||||||
SELECT
|
// SELECT
|
||||||
u.loginname
|
// u.loginname
|
||||||
FROM
|
// FROM
|
||||||
sys_user_role sur
|
// sys_user_role sur
|
||||||
LEFT JOIN sys_user u ON u.id = sur.userid
|
// LEFT JOIN sys_user u ON u.id = sur.userid
|
||||||
WHERE
|
// WHERE
|
||||||
sur.roleId = @roleId
|
// sur.roleId = @roleId
|
||||||
GROUP BY
|
// GROUP BY
|
||||||
sur.userId
|
// sur.userId
|
||||||
""").setParam("roleId", Roles.H03);
|
// """).setParam("roleId", Roles.H03);
|
||||||
List<NutMap> list = (List<NutMap>) Daos.query(dao, sql.toString(), Sqls.callback.maps());
|
// List<NutMap> list = (List<NutMap>) Daos.query(dao, sql.toString(), Sqls.callback.maps());
|
||||||
List<String> schoolLeader = list.stream().map(v -> v.getString("loginname")).collect(Collectors.toList());
|
// List<String> schoolLeader = list.stream().map(v -> v.getString("loginname")).collect(Collectors.toList());
|
||||||
localProcessService.createTask(
|
// localProcessService.createTask(
|
||||||
"member_change_record@" + record.getId(),
|
// "member_change_record@" + record.getId(),
|
||||||
"member_change_record_school_audit",
|
// "member_change_record_school_audit",
|
||||||
"校工会审核",
|
// "校工会审核",
|
||||||
ShiroUtil.getUserId(),
|
// ShiroUtil.getUserId(),
|
||||||
schoolLeader,
|
// schoolLeader,
|
||||||
"/platform/member/change/audit/school",
|
// "/platform/member/change/audit/school",
|
||||||
"/platform/member/change/audit/school",
|
// "/platform/member/change/audit/school",
|
||||||
"/platform/member/change/audit/school",
|
// "/platform/member/change/audit/school",
|
||||||
"/platform/member/change/audit/school"
|
// "/platform/member/change/audit/school"
|
||||||
);
|
// );
|
||||||
|
//
|
||||||
localProcessService.updateProcessNodeName("member_change_record@" + record.getId(), "校工会审核");
|
// localProcessService.updateProcessNodeName("member_change_record@" + record.getId(), "校工会审核");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -64,11 +64,6 @@ public class MemberApplyRecord {
|
|||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
public String schoolAuditId;
|
public String schoolAuditId;
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("个人签字Id")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
|
||||||
public String signId;
|
|
||||||
|
|
||||||
@One(field = "unionAuditId")
|
@One(field = "unionAuditId")
|
||||||
public Audit unionAudit;
|
public Audit unionAudit;
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package io.v.nutz.zhgh.member.model;
|
package io.v.nutz.zhgh.member.model;
|
||||||
|
|
||||||
import io.v.nutz.zhgh.member.constant.MemberChangeOrigin;
|
|
||||||
import io.v.nutz.zhgh.member.constant.MemberChangeRecordMode;
|
|
||||||
import io.v.nutz.base.model.Audit;
|
import io.v.nutz.base.model.Audit;
|
||||||
import io.v.nutz.base.model.AuditState;
|
import io.v.nutz.base.model.AuditState;
|
||||||
import io.v.nutz.sys.models.Sys_union;
|
import io.v.nutz.sys.models.Sys_union;
|
||||||
import io.v.nutz.sys.models.Sys_unit;
|
import io.v.nutz.sys.models.Sys_unit;
|
||||||
|
import io.v.nutz.zhgh.member.constant.MemberChangeOrigin;
|
||||||
|
import io.v.nutz.zhgh.member.constant.MemberChangeRecordMode;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
import org.nutz.dao.entity.annotation.*;
|
import org.nutz.dao.entity.annotation.*;
|
||||||
@@ -124,40 +124,30 @@ public class MemberChangeRecord {
|
|||||||
@ColDefine(type = ColType.BOOLEAN)
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
private Boolean updateMember;
|
private Boolean updateMember;
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("福利会员身份(true:取消 false:不取消);针对(退休、离职、退会、去世)")
|
|
||||||
@ColDefine(type = ColType.BOOLEAN)
|
|
||||||
private Boolean updateWelfare;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("是否增加会员身份(true:增加 false:不增加)")
|
|
||||||
@ColDefine(type = ColType.BOOLEAN)
|
|
||||||
private Boolean insertMember;
|
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("身份证号异动")
|
@Comment("身份证号异动")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||||
private String idCard;
|
private String changeIdCard;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("手机号异动")
|
@Comment("手机号异动")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||||
private String mobile;
|
private String changeMobile;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("学历异动")
|
@Comment("学历异动")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||||
private String education;
|
private String changeEducation;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("在职状态")
|
@Comment("在职状态")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||||
private String userState;
|
private String changeUserState;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("人员类别")
|
@Comment("人员类别")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||||
private String personType;
|
private String changePersonType;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("任务id")
|
@Comment("任务id")
|
||||||
|
|||||||
@@ -67,4 +67,9 @@ public class MemberCheckTask extends BaseModel {
|
|||||||
@Comment("创建模式1.小组核对2.个人核对")
|
@Comment("创建模式1.小组核对2.个人核对")
|
||||||
@ColDefine(type = ColType.INT)
|
@ColDefine(type = ColType.INT)
|
||||||
private Integer createTaskMode;
|
private Integer createTaskMode;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("核对模式(字典)")
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
private Integer welfareCheckFilterMode;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package io.v.nutz.zhgh.member.service;
|
package io.v.nutz.zhgh.member.service;
|
||||||
|
|
||||||
import io.v.nutz.zhgh.member.model.MemberHistory;
|
|
||||||
import io.v.nutz.base.service.ViService;
|
import io.v.nutz.base.service.ViService;
|
||||||
|
import io.v.nutz.zhgh.member.model.MemberHistory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Todo
|
* Todo
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package io.v.nutz.zhgh.member.service.impl;
|
package io.v.nutz.zhgh.member.service.impl;
|
||||||
|
|
||||||
import io.v.nutz.zhgh.member.service.MemberCheckPersonalService;
|
|
||||||
import io.v.nutz.base.service.impl.ViServiceImpl;
|
import io.v.nutz.base.service.impl.ViServiceImpl;
|
||||||
|
import io.v.nutz.zhgh.member.service.MemberCheckPersonalService;
|
||||||
import org.nutz.dao.Dao;
|
import org.nutz.dao.Dao;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package io.v.nutz.zhgh.member.service.impl;
|
package io.v.nutz.zhgh.member.service.impl;
|
||||||
|
|
||||||
import io.v.nutz.base.service.AsyncService;
|
import io.v.nutz.base.service.AsyncService;
|
||||||
import io.v.nutz.zhgh.member.model.MemberHistory;
|
|
||||||
import io.v.nutz.zhgh.member.service.MemberHistoryService;
|
|
||||||
import io.v.nutz.base.service.impl.ViServiceImpl;
|
import io.v.nutz.base.service.impl.ViServiceImpl;
|
||||||
import io.v.nutz.sys.services.SysRoleService;
|
import io.v.nutz.sys.services.SysRoleService;
|
||||||
import io.v.nutz.sys.services.SysUserService;
|
import io.v.nutz.sys.services.SysUserService;
|
||||||
|
import io.v.nutz.zhgh.member.model.MemberHistory;
|
||||||
|
import io.v.nutz.zhgh.member.service.MemberHistoryService;
|
||||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
import org.nutz.dao.Dao;
|
import org.nutz.dao.Dao;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ package io.v.nutz.zhgh.member.service.impl;
|
|||||||
import cn.wizzer.framework.page.Pagination;
|
import cn.wizzer.framework.page.Pagination;
|
||||||
import io.v.nutz.base.dao.CndPlus;
|
import io.v.nutz.base.dao.CndPlus;
|
||||||
import io.v.nutz.base.query.PageForm;
|
import io.v.nutz.base.query.PageForm;
|
||||||
import io.v.nutz.zhgh.member.service.MemberService;
|
|
||||||
import io.v.nutz.base.service.impl.ViServiceImpl;
|
import io.v.nutz.base.service.impl.ViServiceImpl;
|
||||||
import io.v.nutz.sys.models.Sys_user;
|
import io.v.nutz.sys.models.Sys_user;
|
||||||
|
import io.v.nutz.zhgh.member.service.MemberService;
|
||||||
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;
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
package io.v.nutz.zhgh.member.utils;
|
package io.v.nutz.zhgh.member.utils;
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import io.v.nutz.base.query.PageForm;
|
||||||
|
import io.v.nutz.sys.models.Sys_user;
|
||||||
import io.v.nutz.zhgh.activity.models.ActivityUserCnd;
|
import io.v.nutz.zhgh.activity.models.ActivityUserCnd;
|
||||||
import io.v.nutz.zhgh.data.constant.UserChangeType;
|
import io.v.nutz.zhgh.data.constant.UserChangeType;
|
||||||
import io.v.nutz.zhgh.member.MemberMode;
|
import io.v.nutz.zhgh.member.MemberMode;
|
||||||
import io.v.nutz.zhgh.member.constant.MemberStatus;
|
import io.v.nutz.zhgh.member.constant.MemberStatus;
|
||||||
import io.v.nutz.base.query.PageForm;
|
|
||||||
import io.v.nutz.sys.models.Sys_user;
|
|
||||||
import org.apache.commons.lang.ArrayUtils;
|
import org.apache.commons.lang.ArrayUtils;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
@@ -39,10 +39,6 @@ public class MemberUtils {
|
|||||||
member = MemberMode.NONE.getCode();
|
member = MemberMode.NONE.getCode();
|
||||||
memberStatus = MemberStatus.TURN_OUT.getCode();
|
memberStatus = MemberStatus.TURN_OUT.getCode();
|
||||||
}
|
}
|
||||||
if (type == UserChangeType.DIE.getCode()) {
|
|
||||||
member = MemberMode.NONE.getCode();
|
|
||||||
memberStatus = MemberStatus.WITHDRAWAL.getCode();
|
|
||||||
}
|
|
||||||
if (type == UserChangeType.RETIREMENT.getCode()) {
|
if (type == UserChangeType.RETIREMENT.getCode()) {
|
||||||
member = MemberMode.NONE.getCode();
|
member = MemberMode.NONE.getCode();
|
||||||
memberStatus = MemberStatus.KEEP.getCode();
|
memberStatus = MemberStatus.KEEP.getCode();
|
||||||
@@ -71,6 +67,7 @@ public class MemberUtils {
|
|||||||
String[] unitId,
|
String[] unitId,
|
||||||
String[] personTypes,
|
String[] personTypes,
|
||||||
String[] userStates,
|
String[] userStates,
|
||||||
|
String[] preparedBys,
|
||||||
String[] memberTypes,
|
String[] memberTypes,
|
||||||
String[] sexTypes,
|
String[] sexTypes,
|
||||||
String[] age,
|
String[] age,
|
||||||
@@ -168,6 +165,7 @@ public class MemberUtils {
|
|||||||
cnd.andEX("u.campus", EQ_OR_NEQ_OP, campus);
|
cnd.andEX("u.campus", EQ_OR_NEQ_OP, campus);
|
||||||
cnd.andEX("u.personType", IN_OR_NIN_OP, personTypes);
|
cnd.andEX("u.personType", IN_OR_NIN_OP, personTypes);
|
||||||
cnd.andEX("u.userState", IN_OR_NIN_OP, userStates);
|
cnd.andEX("u.userState", IN_OR_NIN_OP, userStates);
|
||||||
|
cnd.andEX("u.preparedBy", IN_OR_NIN_OP, preparedBys);
|
||||||
cnd.andEX("u.sex", IN_OR_NIN_OP, sexTypes);
|
cnd.andEX("u.sex", IN_OR_NIN_OP, sexTypes);
|
||||||
cnd.andEX("sur.jdhid", EQ_OR_NEQ_OP, teacherMeetingId);
|
cnd.andEX("sur.jdhid", EQ_OR_NEQ_OP, teacherMeetingId);
|
||||||
cnd.andEX("sur.roleid", IN_OR_NIN_OP, roleIds);
|
cnd.andEX("sur.roleid", IN_OR_NIN_OP, roleIds);
|
||||||
|
|||||||
@@ -43,9 +43,6 @@ public class MobileMemberCostListController {
|
|||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
mpi.*,
|
mpi.*,
|
||||||
mpp.modeValue,
|
|
||||||
mpp.modeValueList,
|
|
||||||
mpp.selectMode,
|
|
||||||
mpp.projectName
|
mpp.projectName
|
||||||
FROM
|
FROM
|
||||||
member_payment_info mpi
|
member_payment_info mpi
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import org.nutz.dao.FieldFilter;
|
|||||||
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.Daos;
|
import org.nutz.dao.util.Daos;
|
||||||
|
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||||
import org.nutz.dao.util.cri.Static;
|
import org.nutz.dao.util.cri.Static;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
@@ -300,8 +301,6 @@ public class UnionActivityRegisterController {
|
|||||||
@ViReturn
|
@ViReturn
|
||||||
@RequiresAuthentication
|
@RequiresAuthentication
|
||||||
public Object searchNoRegisterUser(String searchKey, String activityId) {
|
public Object searchNoRegisterUser(String searchKey, String activityId) {
|
||||||
|
|
||||||
|
|
||||||
ActivityTissue tissue = simpleService.dao().fetch(ActivityTissue.class, Cnd.where("id", "=", activityId));
|
ActivityTissue tissue = simpleService.dao().fetch(ActivityTissue.class, Cnd.where("id", "=", activityId));
|
||||||
|
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
@@ -317,10 +316,16 @@ public class UnionActivityRegisterController {
|
|||||||
""");
|
""");
|
||||||
String unionId = Vi.getUnionId();
|
String unionId = Vi.getUnionId();
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
if (tissue.getSignUpMethod() != 3) {
|
if (tissue.getSignUpMethod() != 3 && tissue.getType() != 40003) {
|
||||||
cnd.andEX("unionId", "=", unionId);
|
cnd.andEX("unionId", "=", unionId);
|
||||||
}
|
}
|
||||||
cnd.and(Cnd.exps(Cnd.likeEX("username", searchKey.trim())).or(Cnd.likeEX("loginname", searchKey.trim())));
|
if (StrUtil.isNotBlank(searchKey)){
|
||||||
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
|
seg.or("username", "LIKE", "%" + searchKey + "%");
|
||||||
|
seg.or("loginname", "LIKE", "%" + searchKey + "%");
|
||||||
|
cnd.and(seg);
|
||||||
|
}
|
||||||
|
// cnd.and(Cnd.exps(Cnd.likeEX("username", searchKey.trim())).or(Cnd.likeEX("loginname", searchKey.trim())));
|
||||||
if (tissue.getGroupId() != null) {
|
if (tissue.getGroupId() != null) {
|
||||||
cnd.and(new Static("""
|
cnd.and(new Static("""
|
||||||
id IN ( SELECT userid FROM activity_user_scope WHERE groupId IN ( SELECT groupId FROM activity_tissue WHERE id = '%s' AND groupId IS NOT NULL ) )
|
id IN ( SELECT userid FROM activity_user_scope WHERE groupId IN ( SELECT groupId FROM activity_tissue WHERE id = '%s' AND groupId IS NOT NULL ) )
|
||||||
|
|||||||
@@ -104,6 +104,12 @@ public class ZgfwGdzcbgController {
|
|||||||
$condition
|
$condition
|
||||||
""").setParam("zcpdid", zcpdid);
|
""").setParam("zcpdid", zcpdid);
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
|
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) {
|
||||||
|
cnd.andEX("xx.zcghlx", "=", "1");
|
||||||
|
cnd.andEX("xx.zclydwhid", "=", Vi.getUnionId());
|
||||||
|
} else {
|
||||||
|
// cndPlus.andExcludeEmpty("zc.zcghlx", "=", "2");
|
||||||
|
}
|
||||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword()) && StrUtil.isNotBlank(pageForm.getSearchName())) {
|
if (StrUtil.isNotBlank(pageForm.getSearchKeyword()) && StrUtil.isNotBlank(pageForm.getSearchName())) {
|
||||||
cnd.and(Cnd.likeEX(pageForm.getSearchName(), pageForm.getSearchKeyword()));
|
cnd.and(Cnd.likeEX(pageForm.getSearchName(), pageForm.getSearchKeyword()));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public class CondolenceAgentController {
|
|||||||
|
|
||||||
List<NutMap> result = new ArrayList<>();
|
List<NutMap> result = new ArrayList<>();
|
||||||
|
|
||||||
result.add(new NutMap().setv("title", title).setv("url", UCR).setv("iconClass", vi.getIconByPath(UCR)).setv("label", "待分工会审核").setv("number", getUcrCount()));
|
result.add(new NutMap().setv("title", title).setv("url", UCR).setv("iconClass", vi.getIconByPath(UCR)).setv("label", "待院级工会审核").setv("number", getUcrCount()));
|
||||||
result.add(new NutMap().setv("title", title).setv("url", FR).setv("iconClass", vi.getIconByPath(FR)).setv("label", "待二级党组织审核").setv("number", getFrCount()));
|
result.add(new NutMap().setv("title", title).setv("url", FR).setv("iconClass", vi.getIconByPath(FR)).setv("label", "待二级党组织审核").setv("number", getFrCount()));
|
||||||
result.add(new NutMap().setv("title", title).setv("url", VCR).setv("iconClass", vi.getIconByPath(VCR)).setv("label", "待校工会审核").setv("number", getVcrCount()));
|
result.add(new NutMap().setv("title", title).setv("url", VCR).setv("iconClass", vi.getIconByPath(VCR)).setv("label", "待校工会审核").setv("number", getVcrCount()));
|
||||||
result.add(new NutMap().setv("title", title).setv("url", ECR).setv("iconClass", vi.getIconByPath(ECR)).setv("label", "待工会常务副主席审核").setv("number", getEcrCount()));
|
result.add(new NutMap().setv("title", title).setv("url", ECR).setv("iconClass", vi.getIconByPath(ECR)).setv("label", "待工会常务副主席审核").setv("number", getEcrCount()));
|
||||||
@@ -75,7 +75,7 @@ public class CondolenceAgentController {
|
|||||||
""");
|
""");
|
||||||
cnd.and("con.state_id", "=", 2000);
|
cnd.and("con.state_id", "=", 2000);
|
||||||
if (!ShiroUtil.hasAnyRoles("sysadmin")) {
|
if (!ShiroUtil.hasAnyRoles("sysadmin")) {
|
||||||
cnd.and("us.unionid", "=", vi.getUnionId());
|
cnd.and("us.unionid", "=", Vi.getUnionId());
|
||||||
}
|
}
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
return condolenceService.count(sql);
|
return condolenceService.count(sql);
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import org.nutz.mvc.annotation.Param;
|
|||||||
* @DateTime: 2020/11/20 11:49
|
* @DateTime: 2020/11/20 11:49
|
||||||
* @Description: 会计审核
|
* @Description: 会计审核
|
||||||
*/
|
*/
|
||||||
|
// 江南大学,校工会审核
|
||||||
@At("/platform/fw/condolence/fr")
|
@At("/platform/fw/condolence/fr")
|
||||||
@IocBean
|
@IocBean
|
||||||
@RequiresAuthentication
|
@RequiresAuthentication
|
||||||
@@ -44,6 +45,11 @@ public class CondolenceFrCon {
|
|||||||
public void index() {
|
public void index() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@At("/h5")
|
||||||
|
@Ok("beetl:/mobile/condolence/schoolunionaudit/index.html")
|
||||||
|
@RequiresPermissions("fw.condolence.fr")
|
||||||
|
public void h5() {
|
||||||
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@ViReturn
|
@ViReturn
|
||||||
@@ -66,6 +72,7 @@ public class CondolenceFrCon {
|
|||||||
be.username be_username,
|
be.username be_username,
|
||||||
be.loginname be_loginname,
|
be.loginname be_loginname,
|
||||||
sqr.username sqr_username,
|
sqr.username sqr_username,
|
||||||
|
sqr.loginname sqr_loginname,
|
||||||
be.unitname be_unitname,
|
be.unitname be_unitname,
|
||||||
be.unionname be_unionname,
|
be.unionname be_unionname,
|
||||||
state.state_name,
|
state.state_name,
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ import io.v.nutz.base.utils.ViTool;
|
|||||||
import io.v.nutz.sys.models.Sys_signature;
|
import io.v.nutz.sys.models.Sys_signature;
|
||||||
import io.v.nutz.web.commons.base.Globals;
|
import io.v.nutz.web.commons.base.Globals;
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
import io.v.nutz.zhgh.zgfw.model.condolence.CondolenceType;
|
|
||||||
import io.v.nutz.zhgh.zgfw.model.condolence.Condolence;
|
import io.v.nutz.zhgh.zgfw.model.condolence.Condolence;
|
||||||
|
import io.v.nutz.zhgh.zgfw.model.condolence.CondolenceType;
|
||||||
import io.v.nutz.zhgh.zgfw.service.CondolenceService;
|
import io.v.nutz.zhgh.zgfw.service.CondolenceService;
|
||||||
import org.apache.poi.ss.usermodel.Workbook;
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||||
@@ -111,7 +111,7 @@ public class CondolenceReadCon {
|
|||||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06,wyh02")) {
|
if (!ShiroUtil.hasAnyRoles("sysadmin,A06,wyh02")) {
|
||||||
SqlExpressionGroup group2 = new SqlExpressionGroup();
|
SqlExpressionGroup group2 = new SqlExpressionGroup();
|
||||||
if (ShiroUtil.hasAnyRoles("gh01,H04")) {
|
if (ShiroUtil.hasAnyRoles("gh01,H04")) {
|
||||||
group2.or("be.unionid", "=", vi.getUnionId());
|
group2.or("be.unionid", "=", Vi.getUnionId());
|
||||||
/*group2.or("con.state_id", ">=", 2000);*/
|
/*group2.or("con.state_id", ">=", 2000);*/
|
||||||
}
|
}
|
||||||
/* if (ShiroUtil.hasAnyRoles("SchoolUnionAccountant")) {
|
/* if (ShiroUtil.hasAnyRoles("SchoolUnionAccountant")) {
|
||||||
|
|||||||
@@ -53,6 +53,12 @@ public class CondolenceUcrCon {
|
|||||||
public void index() {
|
public void index() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@At("/h5")
|
||||||
|
@Ok("beetl:/mobile/condolence/branchunionaudit/index.html")
|
||||||
|
@RequiresPermissions("fw.condolence.ucr")
|
||||||
|
public void h5() {
|
||||||
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@ViReturn
|
@ViReturn
|
||||||
@RequiresPermissions("fw.condolence.ucr")
|
@RequiresPermissions("fw.condolence.ucr")
|
||||||
@@ -74,6 +80,7 @@ public class CondolenceUcrCon {
|
|||||||
be.username be_username,
|
be.username be_username,
|
||||||
be.loginname be_loginname,
|
be.loginname be_loginname,
|
||||||
sqr.username sqr_username,
|
sqr.username sqr_username,
|
||||||
|
sqr.loginname sqr_loginname,
|
||||||
be.unitname be_unitname,
|
be.unitname be_unitname,
|
||||||
be.unionname be_unionname,
|
be.unionname be_unionname,
|
||||||
state.state_name,
|
state.state_name,
|
||||||
|
|||||||
@@ -5,9 +5,12 @@ import io.v.nutz.base.model.Review;
|
|||||||
import io.v.nutz.base.service.ReviewService;
|
import io.v.nutz.base.service.ReviewService;
|
||||||
import io.v.nutz.base.utils.DateUtil;
|
import io.v.nutz.base.utils.DateUtil;
|
||||||
import io.v.nutz.base.utils.Vi;
|
import io.v.nutz.base.utils.Vi;
|
||||||
|
import io.v.nutz.sys.models.Sys_user;
|
||||||
|
import io.v.nutz.sys.services.SysMsgService;
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
import io.v.nutz.zhgh.zgfw.handler.condolence.CondolenceToDoHandler;
|
import io.v.nutz.zhgh.zgfw.handler.condolence.CondolenceToDoHandler;
|
||||||
import io.v.nutz.zhgh.zgfw.model.condolence.Condolence;
|
import io.v.nutz.zhgh.zgfw.model.condolence.Condolence;
|
||||||
|
import io.v.nutz.zhgh.zgfw.model.condolence.CondolenceType;
|
||||||
import io.v.nutz.zhgh.zgfw.service.CondolenceService;
|
import io.v.nutz.zhgh.zgfw.service.CondolenceService;
|
||||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
@@ -22,12 +25,15 @@ import org.nutz.mvc.annotation.At;
|
|||||||
import org.nutz.mvc.annotation.Ok;
|
import org.nutz.mvc.annotation.Ok;
|
||||||
import org.nutz.mvc.annotation.Param;
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: 1V
|
* @Author: 1V
|
||||||
* @DateTime: 2020/11/20 11:49
|
* @DateTime: 2020/11/20 11:49
|
||||||
* @Description: 校工会审核
|
* @Description: 校工会审核
|
||||||
*/
|
*/
|
||||||
@At({"/platform/fw/condolence/vcr","/platform/fw/condolence/vcr/school"})
|
// 江南大学,校工会主席审核
|
||||||
|
@At({"/platform/fw/condolence/vcr", "/platform/fw/condolence/vcr/school"})
|
||||||
@IocBean
|
@IocBean
|
||||||
@RequiresAuthentication
|
@RequiresAuthentication
|
||||||
@Ok("json")
|
@Ok("json")
|
||||||
@@ -36,27 +42,36 @@ public class CondolenceVcrCon {
|
|||||||
@Inject
|
@Inject
|
||||||
private Vi vi;
|
private Vi vi;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private SysMsgService sysMsgService;
|
||||||
|
|
||||||
@At("")
|
@At("")
|
||||||
@Ok("beetl:/platform/zgfw/condolence/vcr.html")
|
@Ok("beetl:/platform/zgfw/condolence/vcr.html")
|
||||||
@RequiresPermissions("fw.condolence.vcr")
|
@RequiresPermissions("fw.condolence.vcr")
|
||||||
public void index() {
|
public void index() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@At("/h5")
|
||||||
|
@Ok("beetl:/mobile/condolence/schoolchairmanaudit/index.html")
|
||||||
|
@RequiresPermissions("fw.condolence.vcr")
|
||||||
|
public void h5() {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@ViReturn
|
@ViReturn
|
||||||
@RequiresPermissions("fw.condolence.vcr")
|
@RequiresPermissions("fw.condolence.vcr")
|
||||||
public Object pageData(@Param(value = "year",required = false) String year,
|
public Object pageData(@Param(value = "year", required = false) String year,
|
||||||
@Param(value = "unitId",required = false) String unitId,
|
@Param(value = "unitId", required = false) String unitId,
|
||||||
@Param(value = "unionId",required = false) String unionId,
|
@Param(value = "unionId", required = false) String unionId,
|
||||||
@Param(value = "isAudit",required = false) Boolean isAudit,
|
@Param(value = "isAudit", required = false) Boolean isAudit,
|
||||||
@Param(value = "type",required = false) String type,
|
@Param(value = "type", required = false) String type,
|
||||||
@Param(value = "way",required = false) String way,
|
@Param(value = "way", required = false) String way,
|
||||||
@Param(value = "searchName",required = false) String searchName,
|
@Param(value = "searchName", required = false) String searchName,
|
||||||
@Param(value = "searchKeyword",required = false) String searchKeyword,
|
@Param(value = "searchKeyword", required = false) String searchKeyword,
|
||||||
@Param("pageNumber") int pageNumber,@Param("pageSize") int pageSize,
|
@Param("pageNumber") int pageNumber, @Param("pageSize") int pageSize,
|
||||||
@Param(value = "pageOrderName",required = false) String pageOrderName,
|
@Param(value = "pageOrderName", required = false) String pageOrderName,
|
||||||
@Param(value = "pageOrderBy",required = false) String pageOrderBy) {
|
@Param(value = "pageOrderBy", required = false) String pageOrderBy) {
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
con.*,
|
con.*,
|
||||||
@@ -64,6 +79,7 @@ public class CondolenceVcrCon {
|
|||||||
be.username be_username,
|
be.username be_username,
|
||||||
be.loginname be_loginname,
|
be.loginname be_loginname,
|
||||||
sqr.username sqr_username,
|
sqr.username sqr_username,
|
||||||
|
sqr.loginname sqr_loginname,
|
||||||
be.unitname be_unitname,
|
be.unitname be_unitname,
|
||||||
be.unionname be_unionname,
|
be.unionname be_unionname,
|
||||||
state.state_name,
|
state.state_name,
|
||||||
@@ -130,12 +146,26 @@ public class CondolenceVcrCon {
|
|||||||
}
|
}
|
||||||
condolenceService.updateIgnoreNull(condolence);
|
condolenceService.updateIgnoreNull(condolence);
|
||||||
CondolenceToDoHandler.COMPLETE_SCHOOL_TASK.exec(condolence, review.getOpinion());
|
CondolenceToDoHandler.COMPLETE_SCHOOL_TASK.exec(condolence, review.getOpinion());
|
||||||
if (pass == 1){
|
if (pass == 1) {
|
||||||
CondolenceToDoHandler.COMPLETE_PROCESS.exec(condolence, review.getOpinion());
|
CondolenceToDoHandler.COMPLETE_PROCESS.exec(condolence, review.getOpinion());
|
||||||
} else if (pass == 2){
|
} else if (pass == 2) {
|
||||||
CondolenceToDoHandler.CREATE_BACK_SCHOOL_TASK.exec(condolence, review.getOpinion());
|
CondolenceToDoHandler.CREATE_BACK_SCHOOL_TASK.exec(condolence, review.getOpinion());
|
||||||
}
|
}
|
||||||
CondolenceToDoHandler.COMPLETE_PROCESS.exec(condolence,null);
|
CondolenceToDoHandler.COMPLETE_PROCESS.exec(condolence, null);
|
||||||
|
|
||||||
|
if (condolence.getState_id().equals("2040") || condolence.getState_id().equals("2050")) {
|
||||||
|
List<String> unionLeaders = condolenceService.getUnionLeader(condolence.getManager());
|
||||||
|
Sys_user beUser = condolenceService.dao().fetch(Sys_user.class, condolence.getBe_user());
|
||||||
|
CondolenceType condolenceType = condolenceService.dao().fetch(CondolenceType.class, condolence.getType());
|
||||||
|
|
||||||
|
String note = """
|
||||||
|
<p style="text-indent: 2em;">您的申报已审批通过,请参照以下提示跟进:</p><p style="text-indent: 2em;">1.慰问事项为生病住院、去世、直系亲属去世,慰问金线上申报审批完成后,不需要再提交纸质材料。</p><p style="text-indent: 2em;">2.慰问事项为结婚和生育的,审核通过后请将报销材料尽快提交至校工会(行政楼A426办公室)周学军老师处。注意:报销发票上须有分工会主席和经办人的签字;购买慰问品须有公务卡支付记录,如未使用公务卡,请提交支付记录和公务卡结算审批表(所在单位审核签字)。 </p><p style="text-indent: 2em;">3.各类慰问金每月结算一次。当月审核通过且报销材料提交齐全的,校工会将于次月第一周统一办理慰问金(慰问品报销)上卡,材料不齐全的推迟上卡。</p>
|
||||||
|
""";
|
||||||
|
for (String unionLeader : unionLeaders) {
|
||||||
|
sysMsgService.sendMsg(unionLeader,"【职工慰问】-" + beUser.getUsername(),note,ShiroUtil.getUserId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,126 +0,0 @@
|
|||||||
package io.v.nutz.zhgh.zgfw.controller.difficult;
|
|
||||||
|
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
|
||||||
import io.v.nutz.base.utils.Vi;
|
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
|
||||||
import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfService;
|
|
||||||
import org.nutz.dao.Cnd;
|
|
||||||
import org.nutz.dao.Sqls;
|
|
||||||
import org.nutz.dao.sql.Sql;
|
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
|
||||||
import org.nutz.lang.util.NutMap;
|
|
||||||
import org.nutz.mvc.annotation.At;
|
|
||||||
import org.nutz.mvc.annotation.Ok;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhf
|
|
||||||
* @date 2021/3/22 9:41
|
|
||||||
* @description 困难帮扶代办事项
|
|
||||||
*/
|
|
||||||
|
|
||||||
@IocBean
|
|
||||||
@Ok("json:full")
|
|
||||||
@At("/platform/difficult/agent")
|
|
||||||
public class DifficultAgentController {
|
|
||||||
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private Vi vi;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private ZgfwKnbfService zgfwKnbfService;
|
|
||||||
|
|
||||||
private static final String UNIONCHAIRMAN = "/platform/fw/difficulty/unionchairman";
|
|
||||||
private static final String SCHOOLMANAGER = "/platform/fw/difficulty/schoolmanager";
|
|
||||||
private static final String SCHOOLVICECHAIRMAN = "/platform/fw/difficulty/schoolvicechairman";
|
|
||||||
private static final String SCHOOLSTANDING = "/platform/fw/difficulty/schoolstanding";
|
|
||||||
|
|
||||||
|
|
||||||
@At
|
|
||||||
@ViReturn
|
|
||||||
public Object getAgenda() {
|
|
||||||
final String title = "【困难帮扶】";
|
|
||||||
|
|
||||||
List<NutMap> result = new ArrayList<>();
|
|
||||||
|
|
||||||
if (ShiroUtil.hasAnyRoles("sysadmin")) {
|
|
||||||
result.add(new NutMap().setv("title", title).setv("url", UNIONCHAIRMAN).setv("iconClass", vi.getIconByPath(UNIONCHAIRMAN)).setv("label", "待分工会审核").setv("number", getUnionChairmanCount()));
|
|
||||||
result.add(new NutMap().setv("title", title).setv("url", SCHOOLMANAGER).setv("iconClass", vi.getIconByPath(SCHOOLMANAGER)).setv("label", "待校工会审核").setv("number", getSchoolManagerCount()));
|
|
||||||
//暂时没用到
|
|
||||||
result.add(new NutMap().setv("title", title).setv("url", SCHOOLVICECHAIRMAN).setv("iconClass", vi.getIconByPath(SCHOOLVICECHAIRMAN)).setv("label", "待校工会副主席审核").setv("number", getSchoolviceChairmanCount()));
|
|
||||||
//暂时没用到
|
|
||||||
result.add(new NutMap().setv("title", title).setv("url", SCHOOLSTANDING).setv("iconClass", vi.getIconByPath(SCHOOLSTANDING)).setv("label", "待校工会常务副主席审核").setv("number", getSchoolStandingCount()));
|
|
||||||
} else {
|
|
||||||
if (ShiroUtil.hasAnyRoles("H04,gh01")) {
|
|
||||||
result.add(new NutMap().setv("title", title).setv("url", UNIONCHAIRMAN).setv("iconClass", vi.getIconByPath(UNIONCHAIRMAN)).setv("label", "待分工会审核").setv("number", getUnionChairmanCount()));
|
|
||||||
}
|
|
||||||
if (ShiroUtil.hasAnyRoles("A06,wyh02")) {
|
|
||||||
result.add(new NutMap().setv("title", title).setv("url", SCHOOLMANAGER).setv("iconClass", vi.getIconByPath(SCHOOLMANAGER)).setv("label", "待校工会审核").setv("number", getSchoolManagerCount()));
|
|
||||||
|
|
||||||
}//暂时没用到
|
|
||||||
if (ShiroUtil.hasRole("wyh01")) {
|
|
||||||
result.add(new NutMap().setv("title", title).setv("url", SCHOOLVICECHAIRMAN).setv("iconClass", vi.getIconByPath(SCHOOLVICECHAIRMAN)).setv("label", "待校工会副主席审核").setv("number", getSchoolviceChairmanCount()));
|
|
||||||
|
|
||||||
}//暂时没用到
|
|
||||||
if (ShiroUtil.hasRole("wyh02")) {
|
|
||||||
result.add(new NutMap().setv("title", title).setv("url", SCHOOLSTANDING).setv("iconClass", vi.getIconByPath(SCHOOLSTANDING)).setv("label", "待校工会常务副主席审核").setv("number", getSchoolStandingCount()));
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 待工会主席审核
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
private Integer getUnionChairmanCount() {
|
|
||||||
Cnd cnd = Cnd.NEW();
|
|
||||||
Sql sql = Sqls.create("""
|
|
||||||
SELECT COUNT(1) FROM zgfw_knbf bf LEFT JOIN `user` us ON bf.sqr=us.id $condition
|
|
||||||
""");
|
|
||||||
|
|
||||||
cnd.and("bf.zt", "=", 100);
|
|
||||||
if (!ShiroUtil.hasAnyRoles("sysadmin")) {
|
|
||||||
cnd.and("us.unionid", "=", vi.getUnionId());
|
|
||||||
}
|
|
||||||
sql.setCondition(cnd);
|
|
||||||
return zgfwKnbfService.count(sql);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 待校工会审核
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
private Integer getSchoolManagerCount() {
|
|
||||||
return zgfwKnbfService.count(Cnd.where("zt", "=", 200));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 待校工会副主席审核
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
private Integer getSchoolviceChairmanCount() {
|
|
||||||
return zgfwKnbfService.count(Cnd.where("zt", "=", 300));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 待校工会常务副主席审核
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
private Integer getSchoolStandingCount() {
|
|
||||||
return zgfwKnbfService.count(Cnd.where("zt", "=", 400));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,153 @@
|
|||||||
|
package io.v.nutz.zhgh.zgfw.controller.difficult;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import cn.wizzer.framework.base.Result;
|
||||||
|
import cn.wizzer.framework.page.Pagination;
|
||||||
|
import io.v.nutz.base.annontation.ViReturn;
|
||||||
|
import io.v.nutz.base.model.Audit;
|
||||||
|
import io.v.nutz.base.query.PageForm;
|
||||||
|
import io.v.nutz.base.service.AuditService;
|
||||||
|
import io.v.nutz.base.utils.Vi;
|
||||||
|
import io.v.nutz.sys.services.SysLocalProcessService;
|
||||||
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
|
import io.v.nutz.zhgh.zgfw.handler.difficult.DifficultToDoHandler;
|
||||||
|
import io.v.nutz.zhgh.zgfw.model.difficult.Zgfw_knbf;
|
||||||
|
import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfService;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
|
import org.nutz.dao.Chain;
|
||||||
|
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.util.cri.SqlExpressionGroup;
|
||||||
|
import org.nutz.ioc.aop.Aop;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@At("/platform/difficulty/branchUnionAudit")
|
||||||
|
@Ok("json:full")
|
||||||
|
@IocBean
|
||||||
|
public class DifficultBranchUnionAuditController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private ZgfwKnbfService zgfwKnbfService;
|
||||||
|
@Inject
|
||||||
|
private AuditService auditService;
|
||||||
|
@Inject
|
||||||
|
private Vi vi;
|
||||||
|
@Inject
|
||||||
|
private Dao dao;
|
||||||
|
@Inject
|
||||||
|
private SysLocalProcessService sysLocalProcessService;
|
||||||
|
|
||||||
|
@At("")
|
||||||
|
@Ok("beetl:/platform/zgfw/difficulty/branchUnionAudit.html")
|
||||||
|
@RequiresPermissions("difficulty.branchUnionAudit")
|
||||||
|
public void index() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@At("/h5")
|
||||||
|
@Ok("beetl:/mobile/difficulty/branchunionaudit/index.html")
|
||||||
|
@RequiresPermissions("difficulty.branchUnionAudit")
|
||||||
|
public void h5() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ViReturn
|
||||||
|
@RequiresPermissions("difficulty.branchUnionAudit")
|
||||||
|
public Object pageData(@Param(value = "isAudit", required = false) Boolean isAudit,
|
||||||
|
@Param(value = "year", required = false) Integer year,
|
||||||
|
@Param(value = "unitId", required = false) String unitId,
|
||||||
|
@Param(value = "unionId", required = false) String unionId, PageForm page) {
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
info.*,
|
||||||
|
s.state_name
|
||||||
|
FROM
|
||||||
|
`zgfw_knbf` info
|
||||||
|
LEFT JOIN state s ON s.state_id = info.stateId
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
|
||||||
|
cnd.and("info.stateId", isAudit ? ">" : "=", 3000);
|
||||||
|
|
||||||
|
if (!ShiroUtil.hasAnyRoles("sysadmin")) {
|
||||||
|
cnd.and("info.unionId", "=", Vi.getUnionId());
|
||||||
|
}
|
||||||
|
cnd.andEX("YEAR(info.applyTime)", "=", year);
|
||||||
|
cnd.andEX("info.unitId", "=", unitId);
|
||||||
|
cnd.andEX("info.unionId", "=", unionId);
|
||||||
|
|
||||||
|
if (StrUtil.isNotBlank(page.getSearchKeyword())) {
|
||||||
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
|
seg.orLike("info.userName", page.getSearchKeyword());
|
||||||
|
seg.orLike("info.loginName", page.getSearchKeyword());
|
||||||
|
cnd.and(seg);
|
||||||
|
}
|
||||||
|
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
Pagination pagination = zgfwKnbfService.listPageMap(page.getPageNumber(), page.getPageSize(), sql);
|
||||||
|
return Result.success(pagination);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ViReturn
|
||||||
|
@RequiresPermissions("difficulty.branchUnionAudit")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
public Result doEdit(String id) {
|
||||||
|
dao.update(Zgfw_knbf.class, Chain.make("stateId", 3000)
|
||||||
|
.add("branchUnionAuditId", null),
|
||||||
|
Cnd.where("id", "=", id));
|
||||||
|
//待办撤回
|
||||||
|
sysLocalProcessService.revokeTask("zgfw_knbf@" + id, "分工会审核");
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ViReturn
|
||||||
|
@RequiresPermissions("difficulty.branchUnionAudit")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
public Object doReview(String id, Integer pass, double money, Audit audit) {
|
||||||
|
audit.setAuditor(ShiroUtil.getPrincipalProperty("id").toString());
|
||||||
|
audit.setLoginname(ShiroUtil.getPrincipalProperty("loginname").toString());
|
||||||
|
audit.setUsername(ShiroUtil.getPrincipalProperty("username").toString());
|
||||||
|
audit.setAuditTime(new Date());
|
||||||
|
audit.setExt(JSONUtil.parseObj(Map.of("money", money)));
|
||||||
|
audit = dao.insert(audit);
|
||||||
|
|
||||||
|
Zgfw_knbf zgfw_knbf = zgfwKnbfService.fetch(id);
|
||||||
|
if (pass == 1) {
|
||||||
|
//不通过
|
||||||
|
zgfw_knbf.setStateId(3010);
|
||||||
|
} else if (pass == 2) {
|
||||||
|
//退回
|
||||||
|
zgfw_knbf.setStateId(3020);
|
||||||
|
} else {
|
||||||
|
//通过
|
||||||
|
zgfw_knbf.setStateId(3030);
|
||||||
|
}
|
||||||
|
zgfw_knbf.setBranchUnionAuditId(audit.getId());
|
||||||
|
zgfwKnbfService.updateIgnoreNull(zgfw_knbf);
|
||||||
|
|
||||||
|
if (pass == 2) {
|
||||||
|
DifficultToDoHandler.CREATE_APPLY_RE_MODIFY_TASK.exec(zgfw_knbf);
|
||||||
|
} else if (pass == 3) {
|
||||||
|
DifficultToDoHandler.CREATE_FINANCE_TASK.exec(zgfw_knbf);
|
||||||
|
}
|
||||||
|
DifficultToDoHandler.COMPLETE_UNION_TASK.exec(zgfw_knbf);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package io.v.nutz.zhgh.zgfw.controller.difficult;
|
||||||
|
|
||||||
|
import cn.wizzer.framework.base.Result;
|
||||||
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
|
import io.v.nutz.zhgh.zgfw.model.difficult.Zgfw_knbf;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
|
||||||
|
@IocBean
|
||||||
|
@At("/platform/difficulty/common")
|
||||||
|
@Ok("json:full")
|
||||||
|
public class DifficultCommonController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Dao dao;
|
||||||
|
|
||||||
|
@At
|
||||||
|
@RequiresPermissions("difficulty")
|
||||||
|
public Result findOne(String id) {
|
||||||
|
Zgfw_knbf knbf = dao.fetch(Zgfw_knbf.class, id);
|
||||||
|
dao.fetchLinks(knbf, null);
|
||||||
|
if(!ShiroUtil.hasRole("sysadmin")){
|
||||||
|
boolean isSelf = knbf.getUserId().equals(ShiroUtil.getUserId());
|
||||||
|
knbf.setSelf(isSelf);
|
||||||
|
}
|
||||||
|
return Result.success(knbf);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,474 @@
|
|||||||
|
package io.v.nutz.zhgh.zgfw.controller.difficult;
|
||||||
|
|
||||||
|
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.convert.Convert;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.wizzer.framework.base.Result;
|
||||||
|
import cn.wizzer.framework.page.Pagination;
|
||||||
|
import com.deepoove.poi.XWPFTemplate;
|
||||||
|
import com.deepoove.poi.config.Configure;
|
||||||
|
import com.deepoove.poi.data.PictureRenderData;
|
||||||
|
import com.deepoove.poi.data.PictureType;
|
||||||
|
import com.deepoove.poi.policy.HackLoopTableRenderPolicy;
|
||||||
|
import io.v.nutz.base.annontation.ViReturn;
|
||||||
|
import io.v.nutz.base.model.Audit;
|
||||||
|
import io.v.nutz.base.query.PageForm;
|
||||||
|
import io.v.nutz.base.service.BaseService;
|
||||||
|
import io.v.nutz.base.utils.OfficeTemplateUtil;
|
||||||
|
import io.v.nutz.base.utils.Vi;
|
||||||
|
import io.v.nutz.base.utils.ViTool;
|
||||||
|
import io.v.nutz.sys.models.Sys_signature;
|
||||||
|
import io.v.nutz.sys.services.SysUnionService;
|
||||||
|
import io.v.nutz.sys.services.SysUserService;
|
||||||
|
import io.v.nutz.web.commons.base.Globals;
|
||||||
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
|
import io.v.nutz.zhgh.zgfw.model.difficult.Zgfw_knbf;
|
||||||
|
import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfJtcyService;
|
||||||
|
import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfService;
|
||||||
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.nutz.boot.starter.ftp.FtpService;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.entity.Record;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.Strings;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
|
import javax.servlet.ServletOutputStream;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.ByteArrayOutputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.io.OutputStream;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
@IocBean
|
||||||
|
@Ok("json")
|
||||||
|
@At("/platform/difficulty/reading")
|
||||||
|
public class DifficultReadingController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Dao dao;
|
||||||
|
@Inject
|
||||||
|
private ZgfwKnbfService zgfwKnbfService;
|
||||||
|
@Inject
|
||||||
|
private FtpService ftpService;
|
||||||
|
@Inject
|
||||||
|
private SysUserService sysUserService;
|
||||||
|
@Inject
|
||||||
|
private SysUnionService sysUnionService;
|
||||||
|
@Inject
|
||||||
|
private BaseService baseService;
|
||||||
|
@Inject
|
||||||
|
private Vi vi;
|
||||||
|
@Inject
|
||||||
|
private OfficeTemplateUtil officeTemplateUtil;
|
||||||
|
|
||||||
|
@At("")
|
||||||
|
@Ok("beetl:/platform/zgfw/difficulty/reading.html")
|
||||||
|
@RequiresPermissions("difficulty.reading")
|
||||||
|
public void index() {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At()
|
||||||
|
@ViReturn
|
||||||
|
@RequiresPermissions("difficulty.reading")
|
||||||
|
public Object pageData(@Param(value = "dateRange", required = false) String[] dateRange,
|
||||||
|
@Param(value = "year", required = false) Integer year,
|
||||||
|
@Param(value = "unitId", required = false) String unitId,
|
||||||
|
@Param(value = "unionId", required = false) String unionId,
|
||||||
|
PageForm page) {
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
info.*,
|
||||||
|
s.state_name
|
||||||
|
FROM
|
||||||
|
`zgfw_knbf` info
|
||||||
|
LEFT JOIN state s ON s.state_id = info.stateId
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
if (!ShiroUtil.hasAnyRoles("sysadmin")) {
|
||||||
|
cnd.and("info.unionId", "=", Vi.getUnionId());
|
||||||
|
}
|
||||||
|
// cnd.andEX("YEAR(info.applyTime)", "=", year);
|
||||||
|
cnd.andEX("info.unitId", "=", unitId);
|
||||||
|
cnd.andEX("info.unionId", "=", unionId);
|
||||||
|
|
||||||
|
if (StrUtil.isAllNotBlank(page.getSearchName(), page.getSearchKeyword())) {
|
||||||
|
cnd.and(Cnd.likeEX(page.getSearchName(), page.getSearchKeyword()));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dateRange != null && dateRange.length == 2) {
|
||||||
|
cnd.and("info.applyTime", ">=", dateRange[0]);
|
||||||
|
cnd.and("info.applyTime", "<=", dateRange[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
Pagination pagination = zgfwKnbfService.listPageMap(page.getPageNumber(), page.getPageSize(), sql);
|
||||||
|
return Result.success(pagination);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ViReturn
|
||||||
|
@RequiresPermissions("difficulty.reading")
|
||||||
|
public Object findOne(String id) {
|
||||||
|
return zgfwKnbfService.findOne(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出报销表
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @param response
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@At
|
||||||
|
@Ok("void")
|
||||||
|
@ViReturn
|
||||||
|
@RequiresPermissions("difficulty.reading")
|
||||||
|
public void doExport(@Param("id") String id, HttpServletResponse response) throws Exception {
|
||||||
|
Zgfw_knbf knbf = dao.fetch(Zgfw_knbf.class, id);
|
||||||
|
dao.fetchLinks(knbf, null);
|
||||||
|
Map<String, Object> renderData = BeanUtil.beanToMap(knbf);
|
||||||
|
renderData.put("knbf", "☑");
|
||||||
|
|
||||||
|
renderData.put("applyDateTime", DateUtil.format(knbf.getApplyTime(), "yyyy年MM月dd日"));
|
||||||
|
if (ObjectUtil.isNotNull(knbf.getSignature())) {
|
||||||
|
String sign = knbf.getSignature();
|
||||||
|
ByteArrayOutputStream os = new ByteArrayOutputStream();
|
||||||
|
ftpService.download(sign, os);
|
||||||
|
os.close();
|
||||||
|
renderData.put("applySign", new PictureRenderData(70, 30, PictureType.PNG, os.toByteArray()));
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isNotNull(knbf.getBranchUnionAudit())) {
|
||||||
|
String sign = knbf.getBranchUnionAudit().getAuditSign();
|
||||||
|
ByteArrayOutputStream os = new ByteArrayOutputStream();
|
||||||
|
ftpService.download(sign, os);
|
||||||
|
os.close();
|
||||||
|
renderData.put("branchUnionAuditSign", new PictureRenderData(70, 30, PictureType.PNG, os.toByteArray()));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ObjectUtil.isNotNull(knbf.getSchoolUnionInitialAudit())) {
|
||||||
|
String sign = knbf.getSchoolUnionInitialAudit().getAuditSign();
|
||||||
|
ByteArrayOutputStream os = new ByteArrayOutputStream();
|
||||||
|
ftpService.download(sign, os);
|
||||||
|
os.close();
|
||||||
|
renderData.put("schoolUnionInitialAuditSign", new PictureRenderData(70, 30, PictureType.PNG, os.toByteArray()));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ObjectUtil.isNotNull(knbf.getSchoolUnionFinalAudit())) {
|
||||||
|
String sign = knbf.getSchoolUnionFinalAudit().getAuditSign();
|
||||||
|
ByteArrayOutputStream os = new ByteArrayOutputStream();
|
||||||
|
ftpService.download(sign, os);
|
||||||
|
os.close();
|
||||||
|
renderData.put("schoolUnionFinalAuditSign", new PictureRenderData(70, 30, PictureType.PNG, os.toByteArray()));
|
||||||
|
}
|
||||||
|
renderData.put("subsidy_amount_big", Convert.digitToChinese(knbf.getSchoolUnionFinalAudit().getExt().getDouble("money")));
|
||||||
|
renderData.put("money", knbf.getSchoolUnionFinalAudit().getExt().getDouble("money"));
|
||||||
|
|
||||||
|
|
||||||
|
Configure config = Configure.newBuilder().build();
|
||||||
|
String suffix = "领取通知单";
|
||||||
|
response.addHeader("Content-Type", "application/octet-stream");
|
||||||
|
response.addHeader("Content-Disposition", "attachment; filename=\"" + new String(suffix.getBytes("UTF-8"), "ISO-8859-1") + "\".docx");
|
||||||
|
XWPFTemplate.compile(officeTemplateUtil.getPath("knbf_pay"), config).render(renderData).writeAndClose(response.getOutputStream());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出备案表
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @param response
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@Ok("void")
|
||||||
|
@RequiresPermissions("difficulty.reading")
|
||||||
|
public void export(@Param("id") String id, HttpServletResponse response) throws Exception {
|
||||||
|
String suffix = "江南大学工会会员困难补助申请表";
|
||||||
|
response.addHeader("Content-Type", "application/octet-stream");
|
||||||
|
response.addHeader("Content-Disposition", "attachment; filename=\"" + new String(suffix.getBytes("UTF-8"), "ISO-8859-1") + "\".docx");
|
||||||
|
ServletOutputStream outputStream = response.getOutputStream();
|
||||||
|
|
||||||
|
Zgfw_knbf knbf = dao.fetch(Zgfw_knbf.class, id);
|
||||||
|
dao.fetchLinks(knbf, null);
|
||||||
|
|
||||||
|
Map<String, Object> renderData = BeanUtil.beanToMap(knbf);
|
||||||
|
renderData.put("birthday", DateUtil.format(knbf.getBirthday(), "yyyy-MM-dd"));
|
||||||
|
renderData.put("applyDateTime", DateUtil.format(knbf.getApplyTime(), "yyyy年MM月dd日"));
|
||||||
|
|
||||||
|
|
||||||
|
if (ObjectUtil.isNotNull(knbf.getBranchUnionAudit())) {
|
||||||
|
String sign = knbf.getBranchUnionAudit().getAuditSign();
|
||||||
|
ByteArrayOutputStream os = new ByteArrayOutputStream();
|
||||||
|
ftpService.download(sign, os);
|
||||||
|
os.close();
|
||||||
|
renderData.put("branchUnionAuditSign", new PictureRenderData(70, 30, PictureType.PNG, os.toByteArray()));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ObjectUtil.isNotNull(knbf.getSchoolUnionInitialAudit())) {
|
||||||
|
String sign = knbf.getSchoolUnionInitialAudit().getAuditSign();
|
||||||
|
ByteArrayOutputStream os = new ByteArrayOutputStream();
|
||||||
|
ftpService.download(sign, os);
|
||||||
|
os.close();
|
||||||
|
renderData.put("schoolUnionInitialAuditSign", new PictureRenderData(70, 30, PictureType.PNG, os.toByteArray()));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ObjectUtil.isNotNull(knbf.getSchoolUnionFinalAudit())) {
|
||||||
|
String sign = knbf.getSchoolUnionFinalAudit().getAuditSign();
|
||||||
|
ByteArrayOutputStream os = new ByteArrayOutputStream();
|
||||||
|
ftpService.download(sign, os);
|
||||||
|
os.close();
|
||||||
|
renderData.put("schoolUnionFinalAuditSign", new PictureRenderData(70, 30, PictureType.PNG, os.toByteArray()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HackLoopTableRenderPolicy policy = new HackLoopTableRenderPolicy();
|
||||||
|
Configure config = Configure.builder().bind("familyList", policy).build();
|
||||||
|
|
||||||
|
String officeTemplateUtilPath = officeTemplateUtil.getPath("knbf_apply");
|
||||||
|
XWPFTemplate.compile(officeTemplateUtilPath, config).render(renderData, outputStream);
|
||||||
|
outputStream.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private ZgfwKnbfJtcyService zgfwKnbfJtcyService;
|
||||||
|
|
||||||
|
private void Export(String id, OutputStream outputStream) throws Exception {
|
||||||
|
|
||||||
|
Record record = zgfwKnbfService.findOne(id);
|
||||||
|
List<Record> recordList = zgfwKnbfJtcyService.list(Sqls.create("select * from zgfw_knbf_jtcy where sqid = @id").setParam("id", id));
|
||||||
|
|
||||||
|
HackLoopTableRenderPolicy policy = new HackLoopTableRenderPolicy();
|
||||||
|
Configure config = Configure.newBuilder().bind("familyList", policy).build();
|
||||||
|
|
||||||
|
if (!recordList.isEmpty()) {
|
||||||
|
record.set("familyList", recordList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* if (record.getInt("sq_bzlx") == 1) {
|
||||||
|
record.set("bzlx_name", "日常补助慰问");
|
||||||
|
} else if (record.getInt("sq_bzlx") == 2) {
|
||||||
|
record.set("bzlx_name", "“元旦、春节”困难补助慰问");
|
||||||
|
}*/
|
||||||
|
|
||||||
|
//分工会
|
||||||
|
Object app = record.get("app");
|
||||||
|
if (app != null) {
|
||||||
|
Sys_signature signature = (Sys_signature) app;
|
||||||
|
if (Strings.isNotBlank(signature.getData())) {
|
||||||
|
record.set("appimg", ((Sys_signature) app).getData() != null ? getImg(((Sys_signature) app).getData()) : null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//分工会
|
||||||
|
Object upa = record.get("upa");
|
||||||
|
if (upa != null) {
|
||||||
|
Audit audit = (Audit) upa;
|
||||||
|
record.set("upaimg", audit.getAuditSign() != null ? getImg(audit.getAuditSign()) : null);
|
||||||
|
record.set("upaTime", audit.getAuditTime() != null ? DateUtil.formatDate(audit.getAuditTime()) : null);
|
||||||
|
record.set("upaOpinion", audit.getAuditOpinion());
|
||||||
|
}
|
||||||
|
|
||||||
|
//二级党委组织
|
||||||
|
Object tda = record.get("tda");
|
||||||
|
if (tda != null) {
|
||||||
|
Audit audit = (Audit) tda;
|
||||||
|
record.set("tdaimg", audit.getAuditSign() != null ? getImg(audit.getAuditSign()) : null);
|
||||||
|
record.set("tdaTime", audit.getAuditTime() != null ? DateUtil.formatDate(audit.getAuditTime()) : null);
|
||||||
|
record.set("tdaOpinion", audit.getAuditOpinion());
|
||||||
|
}
|
||||||
|
|
||||||
|
//校工会主席
|
||||||
|
Object sma = record.get("sma");
|
||||||
|
if (sma != null) {
|
||||||
|
Audit audit = (Audit) sma;
|
||||||
|
record.set("smaimg", audit.getAuditSign() != null ? getImg(audit.getAuditSign()) : null);
|
||||||
|
record.set("smaTime", audit.getAuditTime() != null ? DateUtil.formatDate(audit.getAuditTime()) : null);
|
||||||
|
record.set("smaOpinion", audit.getAuditOpinion());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Strings.isNotBlank(record.getString("xghbzje"))) {
|
||||||
|
record.set("subsidy_amount_big", Convert.digitToChinese(record.getDouble("xghbzje")));
|
||||||
|
}
|
||||||
|
record.set("schoolName", Globals.schoolName);
|
||||||
|
|
||||||
|
InputStream inputStream;
|
||||||
|
String officeTemplateUtilPath = officeTemplateUtil.getPath("knbf_apply");
|
||||||
|
/* if (record.getString("sq_knlx").equals("1")) {
|
||||||
|
officeTemplateUtilPath = officeTemplateUtil.getPath("knbf_sick");
|
||||||
|
} else if (record.getString("sq_knlx").equals("3")) {
|
||||||
|
officeTemplateUtilPath = officeTemplateUtil.getPath("knbf_die");
|
||||||
|
} else {
|
||||||
|
officeTemplateUtilPath = officeTemplateUtil.getPath("knbf_summary");
|
||||||
|
}*/
|
||||||
|
assert officeTemplateUtilPath != null;
|
||||||
|
XWPFTemplate.compile(officeTemplateUtilPath, config).render(record, outputStream);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下载备案表和附件
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @param response
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ViReturn
|
||||||
|
@RequiresPermissions("difficulty.reading")
|
||||||
|
public void downloadAnnex(@Param("id") String id, HttpServletResponse response) throws Exception {
|
||||||
|
// response.reset();
|
||||||
|
// response.setContentType("application/x-msdownload;charset=utf-8");
|
||||||
|
//
|
||||||
|
// String fileName = "";
|
||||||
|
//
|
||||||
|
// Zgfw_knbf zgfwKnbf = zgfwKnbfService.fetch(id);
|
||||||
|
// Sys_user user = sysUserService.fetchLinks(sysUserService.fetch(zgfwKnbf.getBbzrusername()), "unit");
|
||||||
|
// if (user.getUnit() != null && Strings.isNotBlank(user.getUnit().getUnionid())) {
|
||||||
|
// Sys_union union = sysUnionService.fetch(user.getUnit().getUnionid());
|
||||||
|
// fileName += union.getUnionname() + "-";
|
||||||
|
// }
|
||||||
|
// fileName += user.getUsername();
|
||||||
|
//
|
||||||
|
// List<Sys_file> files = zgfwKnbf.getFiles();
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 创建临时文件夹
|
||||||
|
// */
|
||||||
|
// String tmpPath = "tmp/" + R.UU32();
|
||||||
|
// File tmpDir = new File(tmpPath + "/" + fileName);
|
||||||
|
// tmpDir.mkdirs();
|
||||||
|
//
|
||||||
|
// if (files != null) {
|
||||||
|
// for (Sys_file file : files) {
|
||||||
|
// FileOutputStream outputStream = new FileOutputStream(tmpDir.getPath() + "/" + file.getFilename());
|
||||||
|
// ftpService.download(file.getFilepath(), outputStream);
|
||||||
|
// outputStream.close();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// FileOutputStream outputStream = new FileOutputStream(tmpDir.getPath() + "/" + "职工慰问报销审批单.docx");
|
||||||
|
// Export(id, outputStream);
|
||||||
|
// outputStream.close();
|
||||||
|
//
|
||||||
|
// String aimsDir = "zipTmp/" + R.UU32();
|
||||||
|
// String aimsName = fileName + ".zip";
|
||||||
|
// String aimsPath = aimsDir + "/" + aimsName;
|
||||||
|
// FileUtil.compressToZip(tmpDir.getPath(), aimsDir, aimsName);
|
||||||
|
//
|
||||||
|
// response.setHeader("content-disposition", "attachment;filename="
|
||||||
|
// + URLEncoder.encode(aimsName, "UTF-8"));
|
||||||
|
//
|
||||||
|
// File aimsFile = new File(aimsPath);
|
||||||
|
// FileInputStream inputStream = new FileInputStream(aimsFile);
|
||||||
|
// IOUtils.copy(inputStream, response.getOutputStream());
|
||||||
|
// inputStream.close();
|
||||||
|
// aimsFile.delete();
|
||||||
|
//
|
||||||
|
// FileUtil.deleteDir(new File(tmpPath));
|
||||||
|
// FileUtil.deleteDir(new File(aimsDir));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@Ok("void")
|
||||||
|
@RequiresPermissions("difficulty.reading")
|
||||||
|
public void doExcel(@Param(value = "year", required = false) Integer year,
|
||||||
|
@Param(value = "dateRange", required = false) String[] dateRange,
|
||||||
|
@Param(value = "unionId", required = false) String unionId,
|
||||||
|
@Param(value = "unitId", required = false) String unitId, HttpServletResponse response) throws IOException {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
info.userName,
|
||||||
|
info.loginName,
|
||||||
|
info.unitName,
|
||||||
|
info.unionName,
|
||||||
|
info.applyTime,
|
||||||
|
info.mobile,
|
||||||
|
info.subsidyStandards,
|
||||||
|
s.state_name,
|
||||||
|
branchUnionAudit.auditOpinion AS branchUnionAuditOpinion,
|
||||||
|
schoolUnionInitialAudit.auditOpinion AS schoolUnionInitialAuditOpinion,
|
||||||
|
schoolUnionFinalAudit.auditOpinion AS schoolUnionFinalAuditOpinion,
|
||||||
|
JSON_EXTRACT( branchUnionAudit.ext, '$.money' ) AS branchUnionAuditMoney,
|
||||||
|
JSON_EXTRACT( schoolUnionInitialAudit.ext, '$.money' ) AS schoolUnionInitialAuditMoney,
|
||||||
|
JSON_EXTRACT( schoolUnionFinalAudit.ext, '$.money' ) AS schoolUnionFinalAuditMoney
|
||||||
|
FROM
|
||||||
|
zgfw_knbf info
|
||||||
|
LEFT JOIN state s ON s.state_id = info.stateId
|
||||||
|
LEFT JOIN audit branchUnionAudit ON branchUnionAudit.id = info.branchUnionAuditId
|
||||||
|
LEFT JOIN audit schoolUnionInitialAudit ON schoolUnionInitialAudit.id = info.schoolUnionInitialAuditId
|
||||||
|
LEFT JOIN audit schoolUnionFinalAudit ON schoolUnionFinalAudit.id = info.schoolUnionFinalAuditId
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
|
||||||
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
|
||||||
|
Cnd cnd = Cnd.where("info.stateId", "=", 3090);
|
||||||
|
if (dateRange != null && dateRange.length == 2) {
|
||||||
|
cnd.and("info.applyTime", ">=", dateRange[0]);
|
||||||
|
cnd.and("info.applyTime", "<=", dateRange[1]);
|
||||||
|
}
|
||||||
|
cnd.andEX("info.unionId", "=", unionId);
|
||||||
|
cnd.andEX("info.unitId", "=", unitId);
|
||||||
|
cnd.asc("info.applyTime");
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
List<NutMap> list = sysUserService.listMap(sql);
|
||||||
|
|
||||||
|
ViTool.excelResponse(response, "困难补助汇总表.xlsx");
|
||||||
|
|
||||||
|
List<ExcelExportEntity> entities = new ArrayList<>();
|
||||||
|
entities.add(new ExcelExportEntity("工号", "loginName", 20));
|
||||||
|
entities.add(new ExcelExportEntity("姓名", "userName", 20));
|
||||||
|
entities.add(new ExcelExportEntity("单位", "unitName", 20));
|
||||||
|
entities.add(new ExcelExportEntity("部门", "unionName", 20));
|
||||||
|
entities.add(new ExcelExportEntity("申请时间", "applyTime", 20));
|
||||||
|
entities.add(new ExcelExportEntity("联系电话", "mobile", 20));
|
||||||
|
entities.add(new ExcelExportEntity("类别", "subsidyStandards", 20));
|
||||||
|
entities.add(new ExcelExportEntity("分工会审核意见", "branchUnionAuditOpinion", 20));
|
||||||
|
entities.add(new ExcelExportEntity("分工会审核金额", "branchUnionAuditMoney", 20));
|
||||||
|
entities.add(new ExcelExportEntity("校工会初审意见", "schoolUnionInitialAuditOpinion", 20));
|
||||||
|
entities.add(new ExcelExportEntity("校工会初审金额", "schoolUnionInitialAuditMoney", 20));
|
||||||
|
entities.add(new ExcelExportEntity("工会常委会审核意见", "schoolUnionFinalAuditOpinion", 20));
|
||||||
|
entities.add(new ExcelExportEntity("工会常委会审核金额", "schoolUnionFinalAuditMoney", 20));
|
||||||
|
|
||||||
|
|
||||||
|
ExportParams exportParams = new ExportParams();
|
||||||
|
exportParams.setType(ExcelType.XSSF);
|
||||||
|
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entities, list);
|
||||||
|
workbook.write(response.getOutputStream());
|
||||||
|
response.getOutputStream().close();
|
||||||
|
workbook.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private PictureRenderData getImg(String base64) throws IOException {
|
||||||
|
String s = base64.split(",")[1];
|
||||||
|
byte[] bytes = Base64.getDecoder().decode(s);
|
||||||
|
return new PictureRenderData(70, 30, ".png", bytes);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,151 @@
|
|||||||
|
package io.v.nutz.zhgh.zgfw.controller.difficult;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import cn.wizzer.framework.base.Result;
|
||||||
|
import cn.wizzer.framework.page.Pagination;
|
||||||
|
import io.v.nutz.base.annontation.ViReturn;
|
||||||
|
import io.v.nutz.base.model.Audit;
|
||||||
|
import io.v.nutz.base.query.PageForm;
|
||||||
|
import io.v.nutz.base.service.AuditService;
|
||||||
|
import io.v.nutz.base.utils.Vi;
|
||||||
|
import io.v.nutz.sys.services.SysLocalProcessService;
|
||||||
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
|
import io.v.nutz.zhgh.zgfw.handler.difficult.DifficultToDoHandler;
|
||||||
|
import io.v.nutz.zhgh.zgfw.model.difficult.Zgfw_knbf;
|
||||||
|
import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfService;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
|
import org.nutz.dao.Chain;
|
||||||
|
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.util.cri.SqlExpressionGroup;
|
||||||
|
import org.nutz.ioc.aop.Aop;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@At("/platform/difficulty/schoolUnionFinalAudit")
|
||||||
|
@Ok("json:full")
|
||||||
|
@IocBean
|
||||||
|
public class DifficultSchoolUnionFinalAuditController {
|
||||||
|
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private ZgfwKnbfService zgfwKnbfService;
|
||||||
|
@Inject
|
||||||
|
private AuditService auditService;
|
||||||
|
@Inject
|
||||||
|
private Dao dao;
|
||||||
|
@Inject
|
||||||
|
private SysLocalProcessService sysLocalProcessService;
|
||||||
|
|
||||||
|
|
||||||
|
@At("")
|
||||||
|
@Ok("beetl:/platform/zgfw/difficulty/schoolUnionFinalAudit.html")
|
||||||
|
@RequiresPermissions("difficulty.schoolUnionFinalAudit")
|
||||||
|
public void index() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@At("/h5")
|
||||||
|
@Ok("beetl:/mobile/difficulty/schoolunionfinalaudit/index.html")
|
||||||
|
@RequiresPermissions("difficulty.schoolUnionFinalAudit")
|
||||||
|
public void h5() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ViReturn
|
||||||
|
@RequiresPermissions("difficulty.schoolUnionFinalAudit")
|
||||||
|
public Object pageData(@Param(value = "isAudit", required = false) Boolean isAudit,
|
||||||
|
@Param(value = "year", required = false) Integer year,
|
||||||
|
@Param(value = "unitId", required = false) String unitId,
|
||||||
|
@Param(value = "unionId", required = false) String unionId, PageForm page) {
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
info.*,
|
||||||
|
s.state_name
|
||||||
|
FROM
|
||||||
|
`zgfw_knbf` info
|
||||||
|
LEFT JOIN state s ON s.state_id = info.stateId
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
|
||||||
|
cnd.and("info.stateId", isAudit ? ">" : "=", 3060);
|
||||||
|
|
||||||
|
if (!ShiroUtil.hasAnyRoles("sysadmin")) {
|
||||||
|
cnd.and("info.unionId", "=", Vi.getUnionId());
|
||||||
|
}
|
||||||
|
cnd.andEX("YEAR(info.applyTime)", "=", year);
|
||||||
|
cnd.andEX("info.unitId", "=", unitId);
|
||||||
|
cnd.andEX("info.unionId", "=", unionId);
|
||||||
|
|
||||||
|
if (StrUtil.isNotBlank(page.getSearchKeyword())) {
|
||||||
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
|
seg.orLike("info.userName", page.getSearchKeyword());
|
||||||
|
seg.orLike("info.loginName", page.getSearchKeyword());
|
||||||
|
cnd.and(seg);
|
||||||
|
}
|
||||||
|
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
Pagination pagination = zgfwKnbfService.listPageMap(page.getPageNumber(), page.getPageSize(), sql);
|
||||||
|
return Result.success(pagination);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ViReturn
|
||||||
|
@RequiresPermissions("difficulty.schoolUnionFinalAudit")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
public Object doReview(String id, Integer pass, Audit audit, double money) {
|
||||||
|
audit.setAuditor(ShiroUtil.getPrincipalProperty("id").toString());
|
||||||
|
audit.setLoginname(ShiroUtil.getPrincipalProperty("loginname").toString());
|
||||||
|
audit.setUsername(ShiroUtil.getPrincipalProperty("username").toString());
|
||||||
|
audit.setAuditTime(new Date());
|
||||||
|
audit.setExt(JSONUtil.parseObj(Map.of("money", money)));
|
||||||
|
audit = dao.insert(audit);
|
||||||
|
|
||||||
|
Zgfw_knbf zgfw_knbf = zgfwKnbfService.fetch(id);
|
||||||
|
if (pass == 1) {
|
||||||
|
//不通过
|
||||||
|
zgfw_knbf.setStateId(3070);
|
||||||
|
} else if (pass == 2) {
|
||||||
|
//退回
|
||||||
|
zgfw_knbf.setStateId(3080);
|
||||||
|
} else {
|
||||||
|
//通过
|
||||||
|
zgfw_knbf.setStateId(3090);
|
||||||
|
}
|
||||||
|
zgfw_knbf.setSchoolUnionFinalAuditId(audit.getId());
|
||||||
|
zgfwKnbfService.updateIgnoreNull(zgfw_knbf);
|
||||||
|
|
||||||
|
if (pass == 1){
|
||||||
|
DifficultToDoHandler.CREATE_APPLY_RE_MODIFY_TASK.exec(zgfw_knbf);
|
||||||
|
} else if (pass == 2){
|
||||||
|
DifficultToDoHandler.COMPLETE_PROCESS.exec(zgfw_knbf);
|
||||||
|
}
|
||||||
|
DifficultToDoHandler.COMPLETE_SCHOOL_TASK.exec(zgfw_knbf);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ViReturn
|
||||||
|
@RequiresPermissions("difficulty.schoolUnionFinalAudit")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
public Result doEdit(String id) {
|
||||||
|
dao.update(Zgfw_knbf.class, Chain.make("stateId", 3060)
|
||||||
|
.add("schoolUnionFinalAuditId", null)
|
||||||
|
, Cnd.where("id", "=", id));
|
||||||
|
//待办撤回
|
||||||
|
sysLocalProcessService.revokeTask("zgfw_knbf@" + id,"工会常委会审核");
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,224 @@
|
|||||||
|
package io.v.nutz.zhgh.zgfw.controller.difficult;
|
||||||
|
|
||||||
|
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import cn.wizzer.framework.base.Result;
|
||||||
|
import cn.wizzer.framework.page.Pagination;
|
||||||
|
import io.v.nutz.base.annontation.ViReturn;
|
||||||
|
import io.v.nutz.base.model.Audit;
|
||||||
|
import io.v.nutz.base.query.PageForm;
|
||||||
|
import io.v.nutz.base.service.AuditService;
|
||||||
|
import io.v.nutz.base.utils.Vi;
|
||||||
|
import io.v.nutz.base.utils.ViTool;
|
||||||
|
import io.v.nutz.sys.services.SysLocalProcessService;
|
||||||
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
|
import io.v.nutz.zhgh.zgfw.handler.difficult.DifficultToDoHandler;
|
||||||
|
import io.v.nutz.zhgh.zgfw.model.difficult.Zgfw_knbf;
|
||||||
|
import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfService;
|
||||||
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
|
import org.nutz.dao.Chain;
|
||||||
|
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.util.cri.SqlExpressionGroup;
|
||||||
|
import org.nutz.ioc.aop.Aop;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
@At("/platform/difficulty/schoolUnionInitialAudit")
|
||||||
|
@Ok("json:full")
|
||||||
|
@IocBean
|
||||||
|
public class DifficultSchoolUnionInitialAuditController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private ZgfwKnbfService zgfwKnbfService;
|
||||||
|
@Inject
|
||||||
|
private AuditService auditService;
|
||||||
|
@Inject
|
||||||
|
private Vi vi;
|
||||||
|
@Inject
|
||||||
|
private Dao dao;
|
||||||
|
@Inject
|
||||||
|
private SysLocalProcessService sysLocalProcessService;
|
||||||
|
|
||||||
|
@At("")
|
||||||
|
@Ok("beetl:/platform/zgfw/difficulty/schoolUnionInitialAudit.html")
|
||||||
|
@RequiresPermissions("difficulty.schoolUnionInitialAudit")
|
||||||
|
public void index() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@At("/h5")
|
||||||
|
@Ok("beetl:/mobile/difficulty/schoolunioninitialaudit/index.html")
|
||||||
|
@RequiresPermissions("difficulty.schoolUnionInitialAudit")
|
||||||
|
public void h5() {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ViReturn
|
||||||
|
@RequiresPermissions("difficulty.schoolUnionInitialAudit")
|
||||||
|
public Object pageData(@Param(value = "isAudit", required = false) Boolean isAudit,
|
||||||
|
@Param(value = "year", required = false) Integer year,
|
||||||
|
@Param(value = "unitId", required = false) String unitId,
|
||||||
|
@Param(value = "unionId", required = false) String unionId, PageForm page) {
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
info.*,
|
||||||
|
s.state_name
|
||||||
|
FROM
|
||||||
|
`zgfw_knbf` info
|
||||||
|
LEFT JOIN state s ON s.state_id = info.stateId
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
|
||||||
|
cnd.and("info.stateId", isAudit ? ">" : "=", 3030);
|
||||||
|
|
||||||
|
if (!ShiroUtil.hasAnyRoles("sysadmin")) {
|
||||||
|
cnd.and("info.unionId", "=", Vi.getUnionId());
|
||||||
|
}
|
||||||
|
cnd.andEX("YEAR(info.applyTime)", "=", year);
|
||||||
|
cnd.andEX("info.unitId", "=", unitId);
|
||||||
|
cnd.andEX("info.unionId", "=", unionId);
|
||||||
|
|
||||||
|
if (StrUtil.isNotBlank(page.getSearchKeyword())) {
|
||||||
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
|
seg.orLike("info.userName", page.getSearchKeyword());
|
||||||
|
seg.orLike("info.loginName", page.getSearchKeyword());
|
||||||
|
cnd.and(seg);
|
||||||
|
}
|
||||||
|
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
Pagination pagination = zgfwKnbfService.listPageMap(page.getPageNumber(), page.getPageSize(), sql);
|
||||||
|
return Result.success(pagination);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ViReturn
|
||||||
|
@RequiresPermissions("difficulty.schoolUnionInitialAudit")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
public Object doReview(String id, Integer pass, Audit audit, double money) {
|
||||||
|
audit.setAuditor(ShiroUtil.getPrincipalProperty("id").toString());
|
||||||
|
audit.setLoginname(ShiroUtil.getPrincipalProperty("loginname").toString());
|
||||||
|
audit.setUsername(ShiroUtil.getPrincipalProperty("username").toString());
|
||||||
|
audit.setAuditTime(new Date());
|
||||||
|
audit.setExt(JSONUtil.parseObj(Map.of("money", money)));
|
||||||
|
audit = dao.insert(audit);
|
||||||
|
|
||||||
|
Zgfw_knbf zgfw_knbf = zgfwKnbfService.fetch(id);
|
||||||
|
if (pass == 1) {
|
||||||
|
//不通过
|
||||||
|
zgfw_knbf.setStateId(3040);
|
||||||
|
} else if (pass == 2) {
|
||||||
|
//退回
|
||||||
|
zgfw_knbf.setStateId(3050);
|
||||||
|
} else {
|
||||||
|
//通过
|
||||||
|
zgfw_knbf.setStateId(3060);
|
||||||
|
}
|
||||||
|
zgfw_knbf.setSchoolUnionInitialAuditId(audit.getId());
|
||||||
|
zgfwKnbfService.updateIgnoreNull(zgfw_knbf);
|
||||||
|
|
||||||
|
if (pass == 2) {
|
||||||
|
DifficultToDoHandler.CREATE_APPLY_RE_MODIFY_TASK.exec(zgfw_knbf);
|
||||||
|
} else if (pass == 3) {
|
||||||
|
DifficultToDoHandler.CREATE_SCHOOL_TASK.exec(zgfw_knbf);
|
||||||
|
}
|
||||||
|
DifficultToDoHandler.COMPLETE_FINANCE_TASK.exec(zgfw_knbf);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ViReturn
|
||||||
|
@RequiresPermissions("difficulty.schoolUnionInitialAudit")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
public Result doEdit(String id) {
|
||||||
|
dao.update(Zgfw_knbf.class, Chain.make("stateId", 3030)
|
||||||
|
.add("schoolUnionInitialAuditId", null)
|
||||||
|
, Cnd.where("id", "=", id));
|
||||||
|
//待办撤回
|
||||||
|
sysLocalProcessService.revokeTask("zgfw_knbf@" + id, "校工会初审");
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@Ok("void")
|
||||||
|
@RequiresPermissions("difficulty.schoolUnionInitialAudit")
|
||||||
|
public void exportExcel(@Param(value = "year", required = false) Integer year,
|
||||||
|
@Param(value = "unionId", required = false) String unionId,
|
||||||
|
@Param(value = "unitId", required = false) String unitId,
|
||||||
|
HttpServletResponse response) throws IOException {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
info.userName,
|
||||||
|
info.loginName,
|
||||||
|
info.unitName,
|
||||||
|
info.unionName,
|
||||||
|
info.applyTime,
|
||||||
|
info.mobile,
|
||||||
|
info.subsidyStandards,
|
||||||
|
s.state_name,
|
||||||
|
branchUnionAudit.auditOpinion AS branchUnionAuditOpinion,
|
||||||
|
schoolUnionInitialAudit.auditOpinion AS schoolUnionInitialAuditOpinion,
|
||||||
|
schoolUnionFinalAudit.auditOpinion AS schoolUnionFinalAuditOpinion,
|
||||||
|
JSON_EXTRACT( branchUnionAudit.ext, '$.money' ) AS branchUnionAuditMoney,
|
||||||
|
JSON_EXTRACT( schoolUnionInitialAudit.ext, '$.money' ) AS schoolUnionInitialAuditMoney
|
||||||
|
FROM
|
||||||
|
zgfw_knbf info
|
||||||
|
LEFT JOIN state s ON s.state_id = info.stateId
|
||||||
|
LEFT JOIN audit branchUnionAudit ON branchUnionAudit.id = info.branchUnionAuditId
|
||||||
|
LEFT JOIN audit schoolUnionInitialAudit ON schoolUnionInitialAudit.id = info.schoolUnionInitialAuditId
|
||||||
|
LEFT JOIN audit schoolUnionFinalAudit ON schoolUnionFinalAudit.id = info.schoolUnionFinalAuditId
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
|
||||||
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
|
||||||
|
Cnd cnd = Cnd.where("info.stateId", ">=", 3060);
|
||||||
|
cnd.andEX("YEAR(info.applyTime)","=",year);
|
||||||
|
cnd.andEX("info.unionId", "=", unionId);
|
||||||
|
cnd.andEX("info.unitId", "=", unitId);
|
||||||
|
cnd.asc("info.applyTime");
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
List<NutMap> list = auditService.listMap(sql);
|
||||||
|
|
||||||
|
ViTool.excelResponse(response, "困难补助审定汇总表.xlsx");
|
||||||
|
|
||||||
|
List<ExcelExportEntity> entities = new ArrayList<>();
|
||||||
|
entities.add(new ExcelExportEntity("工号", "loginName", 20));
|
||||||
|
entities.add(new ExcelExportEntity("姓名", "userName", 20));
|
||||||
|
entities.add(new ExcelExportEntity("单位", "unitName", 20));
|
||||||
|
entities.add(new ExcelExportEntity("部门", "unionName", 20));
|
||||||
|
entities.add(new ExcelExportEntity("申请时间", "applyTime", 20));
|
||||||
|
entities.add(new ExcelExportEntity("联系电话", "mobile", 20));
|
||||||
|
entities.add(new ExcelExportEntity("类别", "subsidyStandards", 20));
|
||||||
|
entities.add(new ExcelExportEntity("分工会审核意见", "branchUnionAuditOpinion", 20));
|
||||||
|
entities.add(new ExcelExportEntity("分工会审核金额", "branchUnionAuditMoney", 20));
|
||||||
|
entities.add(new ExcelExportEntity("校工会初审意见", "schoolUnionInitialAuditOpinion", 20));
|
||||||
|
entities.add(new ExcelExportEntity("校工会初审金额", "schoolUnionInitialAuditMoney", 20));
|
||||||
|
|
||||||
|
ExportParams exportParams = new ExportParams();
|
||||||
|
exportParams.setType(ExcelType.XSSF);
|
||||||
|
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entities, list);
|
||||||
|
workbook.write(response.getOutputStream());
|
||||||
|
response.getOutputStream().close();
|
||||||
|
workbook.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -3,9 +3,7 @@ package io.v.nutz.zhgh.zgfw.controller.difficult;
|
|||||||
import cn.wizzer.framework.base.Result;
|
import cn.wizzer.framework.base.Result;
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
import io.v.nutz.base.annontation.ViReturn;
|
||||||
import io.v.nutz.base.service.AuditService;
|
import io.v.nutz.base.service.AuditService;
|
||||||
import io.v.nutz.base.utils.DateUtil;
|
|
||||||
import io.v.nutz.base.utils.Vi;
|
import io.v.nutz.base.utils.Vi;
|
||||||
import io.v.nutz.sys.models.Sys_signature;
|
|
||||||
import io.v.nutz.sys.services.SysSignatureService;
|
import io.v.nutz.sys.services.SysSignatureService;
|
||||||
import io.v.nutz.sys.services.SysUserService;
|
import io.v.nutz.sys.services.SysUserService;
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
@@ -16,6 +14,7 @@ import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfService;
|
|||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
|
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;
|
||||||
@@ -25,7 +24,9 @@ import org.nutz.ioc.loader.annotation.IocBean;
|
|||||||
import org.nutz.lang.Strings;
|
import org.nutz.lang.Strings;
|
||||||
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 org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -35,34 +36,72 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
@IocBean
|
@IocBean
|
||||||
@Ok("json")
|
@Ok("json")
|
||||||
@At("/platform/fw/difficulty/apply")
|
@At("/platform/difficulty/apply")
|
||||||
public class DifficultyApply {
|
public class DifficultyApplyController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Dao dao;
|
||||||
@Inject
|
@Inject
|
||||||
private SysUserService sysUserService;
|
private SysUserService sysUserService;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private ZgfwKnbfService zgfwKnbfService;
|
private ZgfwKnbfService zgfwKnbfService;
|
||||||
@Inject
|
@Inject
|
||||||
private ZgfwKnbfJtcyService zgfwKnbfJtcyService;
|
private ZgfwKnbfJtcyService zgfwKnbfJtcyService;
|
||||||
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private AuditService auditService;
|
private AuditService auditService;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private SysSignatureService sysSignatureService;
|
private SysSignatureService sysSignatureService;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Vi vi;
|
private Vi vi;
|
||||||
|
|
||||||
|
|
||||||
@At("")
|
@At("")
|
||||||
@Ok("beetl:/platform/zgfw/difficulty/apply.html")
|
@Ok("beetl:/platform/zgfw/difficulty/apply.html")
|
||||||
@RequiresPermissions("difficulty.apply")
|
@RequiresPermissions("difficulty.apply")
|
||||||
public void index() {
|
public void index() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@At("/h5")
|
||||||
|
@Ok("beetl:/mobile/difficulty/apply/index.html")
|
||||||
|
@RequiresPermissions("difficulty.apply")
|
||||||
|
public void h5() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ViReturn
|
||||||
|
@RequiresPermissions("difficulty.apply")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
public Object doAdd(@Param("data") Zgfw_knbf knbf) {
|
||||||
|
knbf.setApplyTime(new Date());
|
||||||
|
knbf.setStateId(3000);
|
||||||
|
dao.insert(knbf);
|
||||||
|
DifficultToDoHandler.START_PROCESS.exec(knbf);
|
||||||
|
DifficultToDoHandler.CREATE_UNION_TASK.exec(knbf);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ViReturn
|
||||||
|
@RequiresPermissions("difficulty.apply")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
public Object doEdit(@Param("data") Zgfw_knbf knbf) {
|
||||||
|
knbf.setStateId(3000);
|
||||||
|
zgfwKnbfService.updateIgnoreNull(knbf);
|
||||||
|
DifficultToDoHandler.START_PROCESS.exec(knbf);
|
||||||
|
DifficultToDoHandler.CREATE_UNION_TASK.exec(knbf);
|
||||||
|
if (List.of(3020, 3050, 3080).contains(knbf.getStateId())) {
|
||||||
|
DifficultToDoHandler.COMPLETE_APPLY_RE_MODIFY_TASK.exec(knbf);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@RequiresPermissions("difficulty.apply")
|
||||||
|
public Result findOne(String id) {
|
||||||
|
Zgfw_knbf knbf = dao.fetch(Zgfw_knbf.class, id);
|
||||||
|
return Result.success(knbf);
|
||||||
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@ViReturn
|
@ViReturn
|
||||||
@@ -71,106 +110,34 @@ public class DifficultyApply {
|
|||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
su.id,
|
id,
|
||||||
su.username,su.birthday,
|
username,
|
||||||
su.loginname,su.mobile,su.sex,
|
birthday,
|
||||||
un.`name` unit_name,
|
loginname,
|
||||||
uni.unionname
|
mobile,
|
||||||
|
sex,
|
||||||
|
unitname,
|
||||||
|
unionname,
|
||||||
|
unionid,
|
||||||
|
unitid
|
||||||
FROM
|
FROM
|
||||||
sys_user su
|
`user` $condition
|
||||||
LEFT JOIN sys_unit un ON un.id = su.unitid
|
|
||||||
LEFT JOIN sys_union uni ON uni.id = un.unionid $condition
|
|
||||||
""");
|
""");
|
||||||
cnd.and("uni.id", "=", vi.getUnionId());
|
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) {
|
||||||
|
cnd.and("unionid", "=", Vi.getUnionId());
|
||||||
|
if (!ShiroUtil.hasAnyRoles("gh01")){
|
||||||
|
cnd.and("id", "=", ShiroUtil.getUserId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (Strings.isNotBlank(key)) {
|
if (Strings.isNotBlank(key)) {
|
||||||
SqlExpressionGroup group = new SqlExpressionGroup();
|
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||||
group.orLike("su.username", key);
|
group.orLike("username", key);
|
||||||
group.orLike("su.loginname", key);
|
group.orLike("loginname", key);
|
||||||
cnd.and(group);
|
cnd.and(group);
|
||||||
}
|
}
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
return sysUserService.listPage(1, 10, sql).getList();
|
return sysUserService.listPage(1, 10, sql).getList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@At
|
|
||||||
@ViReturn
|
|
||||||
@RequiresPermissions("difficulty.apply")
|
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
|
||||||
public Object doAdd(Zgfw_knbf knbf, Boolean flag) {
|
|
||||||
if (Strings.isNotBlank(knbf.getApplicantsign())) {
|
|
||||||
knbf.setApplicantsign(sysSignatureService.insert(new Sys_signature(knbf.getApplicantsign())).getId());
|
|
||||||
}
|
|
||||||
if (knbf.getApply_mode().equals("1")) {
|
|
||||||
knbf.setBbzrusername(ShiroUtil.getPrincipalProperty("id").toString());
|
|
||||||
}
|
|
||||||
knbf.setZt(flag ? 100 : 98);
|
|
||||||
knbf.setSqr(ShiroUtil.getPrincipalProperty("id").toString());
|
|
||||||
knbf.setSqsj(DateUtil.getDate());
|
|
||||||
// zgfwKnbfService.insert(knbf);
|
|
||||||
zgfwKnbfService.insertWith(knbf, "jtcys");
|
|
||||||
|
|
||||||
DifficultToDoHandler.START_PROCESS.exec(knbf);
|
|
||||||
DifficultToDoHandler.CREATE_UNION_TASK.exec(knbf);
|
|
||||||
return Result.success();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@At
|
|
||||||
@ViReturn
|
|
||||||
@RequiresPermissions("difficulty.apply")
|
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
|
||||||
public Object doEdit(Zgfw_knbf knbf, Boolean flag) {
|
|
||||||
if (Strings.isNotBlank(knbf.getApplicantsign())) {
|
|
||||||
knbf.setApplicantsign(sysSignatureService.insert(new Sys_signature(knbf.getApplicantsign())).getId());
|
|
||||||
}
|
|
||||||
if (knbf.getApply_mode().equals("1")) {
|
|
||||||
knbf.setBbzrusername(ShiroUtil.getPrincipalProperty("id").toString());
|
|
||||||
}
|
|
||||||
knbf.setZt(flag ? 100 : 98);
|
|
||||||
zgfwKnbfService.updateIgnoreNull(knbf);
|
|
||||||
zgfwKnbfJtcyService.clear(Cnd.where("sqid", "=", knbf.getId()));
|
|
||||||
zgfwKnbfService.insertLinks(knbf, "jtcys");
|
|
||||||
DifficultToDoHandler.START_PROCESS.exec(knbf);
|
|
||||||
DifficultToDoHandler.CREATE_UNION_TASK.exec(knbf);
|
|
||||||
if (List.of(150,156,250,350,450).contains(knbf.getZt())){
|
|
||||||
DifficultToDoHandler.COMPLETE_APPLY_RE_MODIFY_TASK.exec(knbf);
|
|
||||||
}
|
|
||||||
// zgfwKnbfService.updateWith(knbf, "jtcys");
|
|
||||||
return Result.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取部分信息
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@At
|
|
||||||
@ViReturn
|
|
||||||
@RequiresPermissions("difficulty.apply")
|
|
||||||
public Object getUserData() {
|
|
||||||
Sql sql = Sqls.create("""
|
|
||||||
SELECT
|
|
||||||
u.id,
|
|
||||||
u.loginname,
|
|
||||||
u.username,
|
|
||||||
u.idcard,
|
|
||||||
u.nation,
|
|
||||||
u.political,
|
|
||||||
u.birthday,
|
|
||||||
u.sex,
|
|
||||||
u.jobTitle,
|
|
||||||
u.position,
|
|
||||||
u.bank_number AS yhkh,
|
|
||||||
un.`name` unitname
|
|
||||||
FROM
|
|
||||||
sys_user u
|
|
||||||
LEFT JOIN sys_unit un ON u.unitid = un.id
|
|
||||||
WHERE u.id = @id
|
|
||||||
""").setParam("id", ShiroUtil.getPrincipalProperty("id").toString());
|
|
||||||
return Result.success().addData(sysUserService.list(sql).get(0));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,93 +0,0 @@
|
|||||||
package io.v.nutz.zhgh.zgfw.controller.difficult;
|
|
||||||
|
|
||||||
import cn.wizzer.framework.base.Result;
|
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
|
||||||
import io.v.nutz.base.dao.CndPlus;
|
|
||||||
import io.v.nutz.base.query.PageForm;
|
|
||||||
import io.v.nutz.base.service.AuditService;
|
|
||||||
import io.v.nutz.sys.services.SysUnionService;
|
|
||||||
import io.v.nutz.sys.services.SysUserService;
|
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
|
||||||
import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfJtcyService;
|
|
||||||
import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfService;
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
||||||
import org.nutz.boot.starter.ftp.FtpService;
|
|
||||||
import org.nutz.dao.Cnd;
|
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
|
||||||
import org.nutz.mvc.annotation.At;
|
|
||||||
import org.nutz.mvc.annotation.Ok;
|
|
||||||
import org.nutz.mvc.annotation.Param;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhf
|
|
||||||
* @date 2021/1/28 9:26
|
|
||||||
* @description 困难帮扶申请列表
|
|
||||||
*/
|
|
||||||
@IocBean
|
|
||||||
@Ok("json")
|
|
||||||
@At("/platform/fw/difficulty/applylist")
|
|
||||||
public class DifficultyApplyList {
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private FtpService ftpService;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private ZgfwKnbfService zgfwKnbfService;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private ZgfwKnbfJtcyService zgfwKnbfJtcyService;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private AuditService auditService;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private SysUserService sysUserService;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private SysUnionService sysUnionService;
|
|
||||||
|
|
||||||
|
|
||||||
@At("")
|
|
||||||
@Ok("beetl:/platform/zgfw/difficulty/applylist.html")
|
|
||||||
@RequiresPermissions("difficulty.applylist")
|
|
||||||
public void index() {
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@At()
|
|
||||||
@ViReturn
|
|
||||||
@RequiresPermissions("difficulty.applylist")
|
|
||||||
public Object pageData(@Param(value = "year",required = false) Integer year,
|
|
||||||
@Param(value = "unitId",required = false) String unitId,
|
|
||||||
@Param(value = "unionId",required = false) String unionId, PageForm page) {
|
|
||||||
CndPlus cnd = CndPlus.create();
|
|
||||||
if (!ShiroUtil.hasAnyRoles("sysadmin")) {
|
|
||||||
cnd.and(Cnd.exps("sq.sqr", "=", ShiroUtil.getPlatformUid()).or("sq.bbzrusername", "=", ShiroUtil.getPlatformUid()));
|
|
||||||
}
|
|
||||||
return zgfwKnbfService.pageData(cnd, page, year, unitId,unionId);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@At
|
|
||||||
@ViReturn
|
|
||||||
@RequiresPermissions("difficulty.applylist")
|
|
||||||
public Object findOne(String id) {
|
|
||||||
return zgfwKnbfService.findOne(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@At
|
|
||||||
@ViReturn
|
|
||||||
@RequiresPermissions("difficulty.applylist")
|
|
||||||
public Object doDelete(String id) {
|
|
||||||
zgfwKnbfJtcyService.clear(Cnd.where("sqid", "=", id));
|
|
||||||
zgfwKnbfService.delete(id);
|
|
||||||
return Result.success();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,112 @@
|
|||||||
|
package io.v.nutz.zhgh.zgfw.controller.difficult;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.wizzer.framework.base.Result;
|
||||||
|
import cn.wizzer.framework.page.Pagination;
|
||||||
|
import io.v.nutz.base.annontation.ViReturn;
|
||||||
|
import io.v.nutz.base.query.PageForm;
|
||||||
|
import io.v.nutz.base.service.AuditService;
|
||||||
|
import io.v.nutz.sys.services.SysLocalProcessService;
|
||||||
|
import io.v.nutz.sys.services.SysUnionService;
|
||||||
|
import io.v.nutz.sys.services.SysUserService;
|
||||||
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
|
import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfJtcyService;
|
||||||
|
import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfService;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.nutz.boot.starter.ftp.FtpService;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
|
@IocBean
|
||||||
|
@Ok("json")
|
||||||
|
@At("/platform/difficulty/applylist")
|
||||||
|
public class DifficultyApplyListController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private FtpService ftpService;
|
||||||
|
@Inject
|
||||||
|
private ZgfwKnbfService zgfwKnbfService;
|
||||||
|
@Inject
|
||||||
|
private ZgfwKnbfJtcyService zgfwKnbfJtcyService;
|
||||||
|
@Inject
|
||||||
|
private AuditService auditService;
|
||||||
|
@Inject
|
||||||
|
private SysUserService sysUserService;
|
||||||
|
@Inject
|
||||||
|
private SysUnionService sysUnionService;
|
||||||
|
@Inject
|
||||||
|
private SysLocalProcessService localProcessService;
|
||||||
|
|
||||||
|
@At("")
|
||||||
|
@Ok("beetl:/platform/zgfw/difficulty/applylist.html")
|
||||||
|
@RequiresPermissions("difficulty.applylist")
|
||||||
|
public void index() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@At("/h5")
|
||||||
|
@Ok("beetl:/mobile/difficulty/mine/index.html")
|
||||||
|
@RequiresPermissions("difficulty.applylist")
|
||||||
|
public void h5() {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@RequiresPermissions("difficulty.applylist")
|
||||||
|
public Result pageData(@Param(value = "year", required = false) Integer year,
|
||||||
|
@Param(value = "unitId", required = false) String unitId,
|
||||||
|
@Param(value = "unionId", required = false) String unionId, PageForm page) {
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
info.*,
|
||||||
|
s.state_name
|
||||||
|
FROM
|
||||||
|
`zgfw_knbf` info
|
||||||
|
LEFT JOIN state s ON s.state_id = info.stateId
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
if (!ShiroUtil.hasAnyRoles("sysadmin")) {
|
||||||
|
cnd.and("info.proxyUserId", "=", ShiroUtil.getUserId());
|
||||||
|
}
|
||||||
|
cnd.andEX("YEAR(info.applyTime)", "=", year);
|
||||||
|
cnd.andEX("info.unitId", "=", unitId);
|
||||||
|
cnd.andEX("info.unionId", "=", unionId);
|
||||||
|
if (StrUtil.isNotBlank(page.getSearchKeyword())) {
|
||||||
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
|
seg.orLike("info.userName", page.getSearchKeyword());
|
||||||
|
seg.orLike("info.loginName", page.getSearchKeyword());
|
||||||
|
cnd.and(seg);
|
||||||
|
}
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
Pagination pagination = zgfwKnbfService.listPageMap(page.getPageNumber(), page.getPageSize(), sql);
|
||||||
|
return Result.success(pagination);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ViReturn
|
||||||
|
@RequiresPermissions("difficulty.applylist")
|
||||||
|
public Object findOne(String id) {
|
||||||
|
return zgfwKnbfService.findOne(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ViReturn
|
||||||
|
@RequiresPermissions("difficulty.applylist")
|
||||||
|
public Object doDelete(String id) {
|
||||||
|
zgfwKnbfJtcyService.clear(Cnd.where("sqid", "=", id));
|
||||||
|
zgfwKnbfService.delete(id);
|
||||||
|
localProcessService.deleteProcessInstance("zgfw_knbf@" + id);
|
||||||
|
return Result.success();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,442 +0,0 @@
|
|||||||
package io.v.nutz.zhgh.zgfw.controller.difficult;
|
|
||||||
|
|
||||||
import cn.hutool.core.convert.Convert;
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
|
||||||
import com.deepoove.poi.XWPFTemplate;
|
|
||||||
import com.deepoove.poi.config.Configure;
|
|
||||||
import com.deepoove.poi.data.PictureRenderData;
|
|
||||||
import com.deepoove.poi.policy.HackLoopTableRenderPolicy;
|
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
|
||||||
import io.v.nutz.base.dao.CndPlus;
|
|
||||||
import io.v.nutz.base.model.Audit;
|
|
||||||
import io.v.nutz.base.query.PageForm;
|
|
||||||
import io.v.nutz.base.service.BaseService;
|
|
||||||
import io.v.nutz.base.utils.OfficeTemplateUtil;
|
|
||||||
import io.v.nutz.base.utils.Vi;
|
|
||||||
import io.v.nutz.sys.models.Sys_file;
|
|
||||||
import io.v.nutz.sys.models.Sys_signature;
|
|
||||||
import io.v.nutz.sys.models.Sys_union;
|
|
||||||
import io.v.nutz.sys.models.Sys_user;
|
|
||||||
import io.v.nutz.sys.services.SysUnionService;
|
|
||||||
import io.v.nutz.sys.services.SysUserService;
|
|
||||||
import io.v.nutz.web.commons.base.Globals;
|
|
||||||
import io.v.nutz.web.commons.utils.FileUtil;
|
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
|
||||||
import io.v.nutz.zhgh.zgfw.model.difficult.Zgfw_knbf;
|
|
||||||
import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfJtcyService;
|
|
||||||
import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfService;
|
|
||||||
import org.apache.commons.io.IOUtils;
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
||||||
import org.nutz.boot.starter.ftp.FtpService;
|
|
||||||
import org.nutz.dao.Cnd;
|
|
||||||
import org.nutz.dao.Sqls;
|
|
||||||
import org.nutz.dao.entity.Record;
|
|
||||||
import org.nutz.dao.sql.Sql;
|
|
||||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
|
||||||
import org.nutz.lang.Strings;
|
|
||||||
import org.nutz.lang.random.R;
|
|
||||||
import org.nutz.lang.util.NutMap;
|
|
||||||
import org.nutz.mvc.annotation.At;
|
|
||||||
import org.nutz.mvc.annotation.Ok;
|
|
||||||
import org.nutz.mvc.annotation.Param;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import java.io.*;
|
|
||||||
import java.net.URLEncoder;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
import java.util.Base64;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhf
|
|
||||||
* @date 2021/2/2 13:45
|
|
||||||
* @description 困难帮扶阅览
|
|
||||||
*/
|
|
||||||
@IocBean
|
|
||||||
@Ok("json")
|
|
||||||
@At("/platform/fw/difficulty/reading")
|
|
||||||
public class ReadingController {
|
|
||||||
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private ZgfwKnbfService zgfwKnbfService;
|
|
||||||
@Inject
|
|
||||||
private FtpService ftpService;
|
|
||||||
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private SysUserService sysUserService;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private SysUnionService sysUnionService;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private BaseService baseService;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private Vi vi;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private OfficeTemplateUtil officeTemplateUtil;
|
|
||||||
|
|
||||||
@At("")
|
|
||||||
@Ok("beetl:/platform/zgfw/difficulty/reading.html")
|
|
||||||
@RequiresPermissions("difficulty.reading")
|
|
||||||
public void index() {
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@At()
|
|
||||||
@ViReturn
|
|
||||||
@RequiresPermissions("difficulty.reading")
|
|
||||||
public Object pageData(@Param(value = "dateRange", required = false) String[] dateRange,
|
|
||||||
@Param(value = "year", required = false) Integer year,
|
|
||||||
@Param(value = "unitId", required = false) String unitId,
|
|
||||||
@Param(value = "unionId", required = false) String unionId, PageForm page) {
|
|
||||||
CndPlus cnd = CndPlus.create();
|
|
||||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06,wyh03,wyh02")) {
|
|
||||||
SqlExpressionGroup group2 = new SqlExpressionGroup();
|
|
||||||
if (ShiroUtil.hasAnyRoles("gh01,H04")) {
|
|
||||||
group2.or("sqr.unionid", "=", vi.getUnionId());
|
|
||||||
}
|
|
||||||
if (ShiroUtil.hasRole("H01")) {
|
|
||||||
group2.or("sq.sqr", "=", ShiroUtil.getPrincipalProperty("id").toString());
|
|
||||||
group2.or("sq.bbzrusername", "=", ShiroUtil.getPrincipalProperty("id").toString());
|
|
||||||
}
|
|
||||||
cnd.and(group2);
|
|
||||||
}
|
|
||||||
if (dateRange != null && dateRange.length == 2) {
|
|
||||||
cnd.and("sq.sqsj", ">=", dateRange[0]);
|
|
||||||
cnd.and("sq.sqsj", "<=", dateRange[1]);
|
|
||||||
}
|
|
||||||
return zgfwKnbfService.pageData(cnd, page, year, unitId, unionId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
|
||||||
@ViReturn
|
|
||||||
@RequiresPermissions("difficulty.reading")
|
|
||||||
public Object findOne(String id) {
|
|
||||||
return zgfwKnbfService.findOne(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出报销表
|
|
||||||
*
|
|
||||||
* @param id
|
|
||||||
* @param response
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
@At
|
|
||||||
@Ok("void")
|
|
||||||
@ViReturn
|
|
||||||
@RequiresPermissions("difficulty.reading")
|
|
||||||
public void doExport(@Param("id") String id, HttpServletResponse response) throws Exception {
|
|
||||||
|
|
||||||
Record record = zgfwKnbfService.findOne(id);
|
|
||||||
record.put("knbf", "☑");
|
|
||||||
Object app = record.get("app");
|
|
||||||
if (app != null) {
|
|
||||||
Sys_signature signature = (Sys_signature) app;
|
|
||||||
if (Strings.isNotBlank(signature.getData())) {
|
|
||||||
record.set("appimg", ((Sys_signature) app).getData() != null ? getImg(((Sys_signature) app).getData()) : null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Object upa = record.get("upa");
|
|
||||||
if (upa != null) {
|
|
||||||
Audit audit = (Audit) upa;
|
|
||||||
record.set("upaimg", audit.getAuditSign() != null ? getImg(audit.getAuditSign()) : null);
|
|
||||||
}
|
|
||||||
|
|
||||||
Object sua = record.get("sua");
|
|
||||||
if (sua != null) {
|
|
||||||
Audit audit = (Audit) sua;
|
|
||||||
record.set("suaimg", audit.getAuditSign() != null ? getImg(audit.getAuditSign()) : null);
|
|
||||||
}
|
|
||||||
record.set("subsidy_amount_big", Convert.digitToChinese(record.getDouble("xghbzje")));
|
|
||||||
|
|
||||||
/*int price = record.getInt("xghbzje");
|
|
||||||
int money_int = price;
|
|
||||||
int money_decimal = money_int - price;
|
|
||||||
record.set("one", money_int >= 1000000 ? (money_int / 1000000) % 10 : null);
|
|
||||||
record.set("two", money_int >= 100000 ? (money_int / 100000) % 10 : null);
|
|
||||||
record.set("three", money_int >= 10000 ? (money_int / 10000) % 10 : null);
|
|
||||||
record.set("four", money_int >= 1000 ? (money_int / 1000) % 10 : null);
|
|
||||||
record.set("five", money_int >= 100 ? (money_int / 100) % 10 : null);
|
|
||||||
record.set("six", money_int >= 10 ? (money_int / 10) % 10 : null);
|
|
||||||
record.set("seven", money_int >= 10 ? money_int % 10 : null);
|
|
||||||
record.set("eight", (int) (money_decimal * 10));
|
|
||||||
record.set("nine", (int) (money_decimal % 0.1 * 100));*/
|
|
||||||
|
|
||||||
|
|
||||||
/* if (record.getInt("sq_bzlx") == 1) {
|
|
||||||
record.set("bzlx_name", "日常补助慰问");
|
|
||||||
} else if (record.getInt("sq_bzlx") == 2) {
|
|
||||||
record.set("bzlx_name", "“元旦、春节”困难补助慰问");
|
|
||||||
}*/
|
|
||||||
|
|
||||||
Configure config = Configure.newBuilder().build();
|
|
||||||
String suffix = "领取通知单";
|
|
||||||
//InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("docTemplate/difficulty/knbf_reimbursement.docx");
|
|
||||||
response.addHeader("Content-Type", "application/octet-stream");
|
|
||||||
response.addHeader("Content-Disposition", "attachment; filename=\"" + new String(suffix.getBytes("UTF-8"), "ISO-8859-1") + "\".docx");
|
|
||||||
XWPFTemplate.compile(officeTemplateUtil.getPath("knbf_pay"), config).render(record).writeAndClose(response.getOutputStream());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出备案表
|
|
||||||
*
|
|
||||||
* @param id
|
|
||||||
* @param response
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
@At
|
|
||||||
@RequiresPermissions("difficulty.reading")
|
|
||||||
public void export(@Param("id") String id, HttpServletResponse response) throws Exception {
|
|
||||||
|
|
||||||
// Record record = zgfwKnbfService.findOne(id);
|
|
||||||
String suffix = "江南大学工会会员困难补助申请表";
|
|
||||||
|
|
||||||
/* if (record.getString("sq_knlx").equals("1")) {
|
|
||||||
suffix = Globals.schoolName + "工会审批表";
|
|
||||||
} else if (record.getString("sq_knlx").equals("3")) {
|
|
||||||
suffix = Globals.schoolName + "工会审批表";
|
|
||||||
} else {
|
|
||||||
suffix = Globals.schoolName + "工会审批表";
|
|
||||||
}*/
|
|
||||||
|
|
||||||
|
|
||||||
response.addHeader("Content-Type", "application/octet-stream");
|
|
||||||
response.addHeader("Content-Disposition", "attachment; filename=\"" + new String(suffix.getBytes("UTF-8"), "ISO-8859-1") + "\".docx");
|
|
||||||
Export(id, response.getOutputStream());
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private ZgfwKnbfJtcyService zgfwKnbfJtcyService;
|
|
||||||
|
|
||||||
private void Export(String id, OutputStream outputStream) throws Exception {
|
|
||||||
|
|
||||||
Record record = zgfwKnbfService.findOne(id);
|
|
||||||
List<Record> recordList = zgfwKnbfJtcyService.list(Sqls.create("select * from zgfw_knbf_jtcy where sqid = @id").setParam("id", id));
|
|
||||||
|
|
||||||
HackLoopTableRenderPolicy policy = new HackLoopTableRenderPolicy();
|
|
||||||
Configure config = Configure.newBuilder().bind("familyList", policy).build();
|
|
||||||
|
|
||||||
if (!recordList.isEmpty()) {
|
|
||||||
record.set("familyList", recordList);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* if (record.getInt("sq_bzlx") == 1) {
|
|
||||||
record.set("bzlx_name", "日常补助慰问");
|
|
||||||
} else if (record.getInt("sq_bzlx") == 2) {
|
|
||||||
record.set("bzlx_name", "“元旦、春节”困难补助慰问");
|
|
||||||
}*/
|
|
||||||
|
|
||||||
//分工会
|
|
||||||
Object app = record.get("app");
|
|
||||||
if (app != null) {
|
|
||||||
Sys_signature signature = (Sys_signature) app;
|
|
||||||
if (Strings.isNotBlank(signature.getData())) {
|
|
||||||
record.set("appimg", ((Sys_signature) app).getData() != null ? getImg(((Sys_signature) app).getData()) : null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//分工会
|
|
||||||
Object upa = record.get("upa");
|
|
||||||
if (upa != null) {
|
|
||||||
Audit audit = (Audit) upa;
|
|
||||||
record.set("upaimg", audit.getAuditSign() != null ? getImg(audit.getAuditSign()) : null);
|
|
||||||
record.set("upaTime", audit.getAuditTime() != null ? DateUtil.formatDate(audit.getAuditTime()) : null);
|
|
||||||
record.set("upaOpinion", audit.getAuditOpinion());
|
|
||||||
}
|
|
||||||
|
|
||||||
//二级党委组织
|
|
||||||
Object tda = record.get("tda");
|
|
||||||
if (tda != null) {
|
|
||||||
Audit audit = (Audit) tda;
|
|
||||||
record.set("tdaimg", audit.getAuditSign() != null ? getImg(audit.getAuditSign()) : null);
|
|
||||||
record.set("tdaTime", audit.getAuditTime() != null ? DateUtil.formatDate(audit.getAuditTime()) : null);
|
|
||||||
record.set("tdaOpinion", audit.getAuditOpinion());
|
|
||||||
}
|
|
||||||
|
|
||||||
//校工会主席
|
|
||||||
Object sma = record.get("sma");
|
|
||||||
if (sma != null) {
|
|
||||||
Audit audit = (Audit) sma;
|
|
||||||
record.set("smaimg", audit.getAuditSign() != null ? getImg(audit.getAuditSign()) : null);
|
|
||||||
record.set("smaTime", audit.getAuditTime() != null ? DateUtil.formatDate(audit.getAuditTime()) : null);
|
|
||||||
record.set("smaOpinion", audit.getAuditOpinion());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Strings.isNotBlank(record.getString("xghbzje"))) {
|
|
||||||
record.set("subsidy_amount_big", Convert.digitToChinese(record.getDouble("xghbzje")));
|
|
||||||
}
|
|
||||||
record.set("schoolName", Globals.schoolName);
|
|
||||||
|
|
||||||
InputStream inputStream;
|
|
||||||
String officeTemplateUtilPath = officeTemplateUtil.getPath("knbf_apply");
|
|
||||||
/* if (record.getString("sq_knlx").equals("1")) {
|
|
||||||
officeTemplateUtilPath = officeTemplateUtil.getPath("knbf_sick");
|
|
||||||
} else if (record.getString("sq_knlx").equals("3")) {
|
|
||||||
officeTemplateUtilPath = officeTemplateUtil.getPath("knbf_die");
|
|
||||||
} else {
|
|
||||||
officeTemplateUtilPath = officeTemplateUtil.getPath("knbf_summary");
|
|
||||||
}*/
|
|
||||||
assert officeTemplateUtilPath != null;
|
|
||||||
XWPFTemplate.compile(officeTemplateUtilPath, config).render(record, outputStream);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 下载备案表和附件
|
|
||||||
*
|
|
||||||
* @param id
|
|
||||||
* @param response
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
|
|
||||||
@At
|
|
||||||
@ViReturn
|
|
||||||
@RequiresPermissions("difficulty.reading")
|
|
||||||
public void downloadAnnex(@Param("id") String id, HttpServletResponse response) throws Exception {
|
|
||||||
response.reset();
|
|
||||||
response.setContentType("application/x-msdownload;charset=utf-8");
|
|
||||||
|
|
||||||
String fileName = "";
|
|
||||||
|
|
||||||
Zgfw_knbf zgfwKnbf = zgfwKnbfService.fetch(id);
|
|
||||||
Sys_user user = sysUserService.fetchLinks(sysUserService.fetch(zgfwKnbf.getBbzrusername()), "unit");
|
|
||||||
if (user.getUnit() != null && Strings.isNotBlank(user.getUnit().getUnionid())) {
|
|
||||||
Sys_union union = sysUnionService.fetch(user.getUnit().getUnionid());
|
|
||||||
fileName += union.getUnionname() + "-";
|
|
||||||
}
|
|
||||||
fileName += user.getUsername();
|
|
||||||
|
|
||||||
List<Sys_file> files = zgfwKnbf.getFiles();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建临时文件夹
|
|
||||||
*/
|
|
||||||
String tmpPath = "tmp/" + R.UU32();
|
|
||||||
File tmpDir = new File(tmpPath + "/" + fileName);
|
|
||||||
tmpDir.mkdirs();
|
|
||||||
|
|
||||||
if (files != null) {
|
|
||||||
for (Sys_file file : files) {
|
|
||||||
FileOutputStream outputStream = new FileOutputStream(tmpDir.getPath() + "/" + file.getFilename());
|
|
||||||
ftpService.download(file.getFilepath(), outputStream);
|
|
||||||
outputStream.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
FileOutputStream outputStream = new FileOutputStream(tmpDir.getPath() + "/" + "职工慰问报销审批单.docx");
|
|
||||||
Export(id, outputStream);
|
|
||||||
outputStream.close();
|
|
||||||
|
|
||||||
String aimsDir = "zipTmp/" + R.UU32();
|
|
||||||
String aimsName = fileName + ".zip";
|
|
||||||
String aimsPath = aimsDir + "/" + aimsName;
|
|
||||||
FileUtil.compressToZip(tmpDir.getPath(), aimsDir, aimsName);
|
|
||||||
|
|
||||||
response.setHeader("content-disposition", "attachment;filename="
|
|
||||||
+ URLEncoder.encode(aimsName, "UTF-8"));
|
|
||||||
|
|
||||||
File aimsFile = new File(aimsPath);
|
|
||||||
FileInputStream inputStream = new FileInputStream(aimsFile);
|
|
||||||
IOUtils.copy(inputStream, response.getOutputStream());
|
|
||||||
inputStream.close();
|
|
||||||
aimsFile.delete();
|
|
||||||
|
|
||||||
FileUtil.deleteDir(new File(tmpPath));
|
|
||||||
FileUtil.deleteDir(new File(aimsDir));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@At
|
|
||||||
@ViReturn
|
|
||||||
@Ok("void")
|
|
||||||
@RequiresPermissions("difficulty.reading")
|
|
||||||
public void doExcel(@Param(value = "year", required = false) Integer year,
|
|
||||||
@Param(value = "dateRange", required = false) String[] dateRange,
|
|
||||||
@Param(value = "unionId", required = false) String unionId,
|
|
||||||
@Param(value = "unitId", required = false) String unitId, HttpServletResponse response) throws IOException {
|
|
||||||
Sql sql = Sqls.create("""
|
|
||||||
SELECT
|
|
||||||
su.username,
|
|
||||||
su.loginname,
|
|
||||||
su.unitname,
|
|
||||||
su.unionname,
|
|
||||||
su.sex,
|
|
||||||
su.jobTitle,
|
|
||||||
bf.zc,
|
|
||||||
bf.zw,
|
|
||||||
bf.zyzkyybz,
|
|
||||||
bf.xghbzje,
|
|
||||||
bf.yhkh,
|
|
||||||
bf.lxfs,
|
|
||||||
bf.apply_reason
|
|
||||||
FROM
|
|
||||||
zgfw_knbf bf
|
|
||||||
LEFT JOIN `user` su ON su.id = bf.bbzrusername $condition
|
|
||||||
""");
|
|
||||||
|
|
||||||
Map<String, Object> map = new HashMap<>();
|
|
||||||
|
|
||||||
Cnd cnd = Cnd.where("bf.zt", "=", 500);
|
|
||||||
if (dateRange != null && dateRange.length == 2) {
|
|
||||||
cnd.and("bf.sqsj", ">=", dateRange[0]);
|
|
||||||
cnd.and("bf.sqsj", "<=", dateRange[1]);
|
|
||||||
}
|
|
||||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06,wyh03,wyh02")) {
|
|
||||||
if (ShiroUtil.hasAnyRoles("gh01,H04")) {
|
|
||||||
cnd.andEX("su.unionid", "=", vi.getUnionId());
|
|
||||||
map.put("union", "院级工会主席");
|
|
||||||
|
|
||||||
}
|
|
||||||
map.put("union", "校工会");
|
|
||||||
}
|
|
||||||
cnd.andEX("su.unionid", "=", unionId);
|
|
||||||
cnd.andEX("su.unitid", "=", unitId);
|
|
||||||
cnd.asc("su.unionname");
|
|
||||||
cnd.asc("su.unitname");
|
|
||||||
cnd.asc("bf.sqsj");
|
|
||||||
|
|
||||||
sql.setCondition(cnd);
|
|
||||||
|
|
||||||
List<NutMap> nutMap = sysUserService.listMap(sql);
|
|
||||||
AtomicInteger listIndex = new AtomicInteger(1);
|
|
||||||
nutMap.forEach(v -> {
|
|
||||||
v.put("index", listIndex.get());
|
|
||||||
listIndex.getAndIncrement();
|
|
||||||
});
|
|
||||||
map.put("exportDate", io.v.nutz.base.utils.DateUtil.getDate());
|
|
||||||
map.put("knbf", nutMap);
|
|
||||||
|
|
||||||
|
|
||||||
HackLoopTableRenderPolicy policy = new HackLoopTableRenderPolicy();
|
|
||||||
Configure config = Configure.newBuilder().bind("knbf", policy).build();
|
|
||||||
response.addHeader("Content-Type", "application/octet-stream");
|
|
||||||
response.addHeader("Content-Disposition", "attachment; filename=\"" + new String(("院级工会教职工困难补助申报汇总表").getBytes(StandardCharsets.UTF_8), StandardCharsets.ISO_8859_1) + "\".docx");
|
|
||||||
XWPFTemplate.compile(officeTemplateUtil.getPath("knbf_summary"), config).render(map).writeAndClose(response.getOutputStream());
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private PictureRenderData getImg(String base64) throws IOException {
|
|
||||||
String s = base64.split(",")[1];
|
|
||||||
byte[] bytes = Base64.getDecoder().decode(s);
|
|
||||||
return new PictureRenderData(70, 30, ".png", bytes);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,95 +0,0 @@
|
|||||||
package io.v.nutz.zhgh.zgfw.controller.difficult;
|
|
||||||
|
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
|
||||||
import io.v.nutz.base.dao.CndPlus;
|
|
||||||
import io.v.nutz.base.model.Audit;
|
|
||||||
import io.v.nutz.base.query.PageForm;
|
|
||||||
import io.v.nutz.base.service.AuditService;
|
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
|
||||||
import io.v.nutz.zhgh.zgfw.handler.difficult.DifficultToDoHandler;
|
|
||||||
import io.v.nutz.zhgh.zgfw.model.difficult.Zgfw_knbf;
|
|
||||||
import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfService;
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
||||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
|
||||||
import org.nutz.ioc.aop.Aop;
|
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
|
||||||
import org.nutz.mvc.annotation.At;
|
|
||||||
import org.nutz.mvc.annotation.Ok;
|
|
||||||
import org.nutz.mvc.annotation.Param;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhf
|
|
||||||
* @date 2021/1/30 8:42
|
|
||||||
* @description 校工会主席
|
|
||||||
*/
|
|
||||||
@At("/platform/fw/difficulty/schoolmanager")
|
|
||||||
@Ok("json:full")
|
|
||||||
@IocBean
|
|
||||||
public class SchoolManagerController {
|
|
||||||
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private ZgfwKnbfService zgfwKnbfService;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private AuditService auditService;
|
|
||||||
|
|
||||||
|
|
||||||
@At("")
|
|
||||||
@Ok("beetl:/platform/zgfw/difficulty/schoolmanager.html")
|
|
||||||
@RequiresPermissions("fw.difficulty.schoolmanager")
|
|
||||||
public void index() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
|
||||||
@ViReturn
|
|
||||||
@RequiresPermissions("fw.difficulty.schoolmanager")
|
|
||||||
public Object pageData(@Param(value = "isAudit", required = false) Boolean isAudit,
|
|
||||||
@Param(value = "year", required = false) Integer year,
|
|
||||||
@Param(value = "unitId", required = false) String unitId,
|
|
||||||
@Param(value = "unionId", required = false) String unionId, PageForm page) {
|
|
||||||
CndPlus cnd = CndPlus.create();
|
|
||||||
cnd.and("sq.zt", isAudit ? ">" : "=", 200);
|
|
||||||
return zgfwKnbfService.pageData(cnd, page, year, unitId, unionId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
|
||||||
@ViReturn
|
|
||||||
@RequiresPermissions("fw.difficulty.schoolmanager")
|
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
|
||||||
public Object doReview(String id, Integer pass, Audit audit, @Param(value = "xghbzje", required = false) String xghbzje) {
|
|
||||||
audit.setAuditor(ShiroUtil.getPrincipalProperty("id").toString());
|
|
||||||
audit.setLoginname(ShiroUtil.getPrincipalProperty("loginname").toString());
|
|
||||||
audit.setUsername(ShiroUtil.getPrincipalProperty("username").toString());
|
|
||||||
audit.setAuditTime(new Date());
|
|
||||||
audit = auditService.insert(audit);
|
|
||||||
Zgfw_knbf zgfw_knbf = zgfwKnbfService.fetch(id);
|
|
||||||
zgfw_knbf.setSchool_manager_audit(audit.getId());
|
|
||||||
// zgfw_knbf.setXghbzje(xghbzje);
|
|
||||||
if (pass == 1) {
|
|
||||||
//不通过
|
|
||||||
zgfw_knbf.setZt(250);
|
|
||||||
}
|
|
||||||
if (pass == 2) {
|
|
||||||
//通过
|
|
||||||
zgfw_knbf.setZt(500);
|
|
||||||
}
|
|
||||||
if (pass == 3) {
|
|
||||||
zgfw_knbf.setZt(252);
|
|
||||||
}
|
|
||||||
zgfwKnbfService.updateIgnoreNull(zgfw_knbf);
|
|
||||||
|
|
||||||
if (pass == 1){
|
|
||||||
DifficultToDoHandler.CREATE_APPLY_RE_MODIFY_TASK.exec(zgfw_knbf);
|
|
||||||
} else if (pass == 2){
|
|
||||||
DifficultToDoHandler.COMPLETE_PROCESS.exec(zgfw_knbf);
|
|
||||||
}
|
|
||||||
DifficultToDoHandler.COMPLETE_SCHOOL_TASK.exec(zgfw_knbf);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
package io.v.nutz.zhgh.zgfw.controller.difficult;
|
|
||||||
|
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
|
||||||
import io.v.nutz.base.dao.CndPlus;
|
|
||||||
import io.v.nutz.base.model.Audit;
|
|
||||||
import io.v.nutz.base.query.PageForm;
|
|
||||||
import io.v.nutz.base.service.AuditService;
|
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
|
||||||
import io.v.nutz.zhgh.zgfw.model.difficult.Zgfw_knbf;
|
|
||||||
import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfService;
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
|
||||||
import org.nutz.mvc.annotation.At;
|
|
||||||
import org.nutz.mvc.annotation.Ok;
|
|
||||||
import org.nutz.mvc.annotation.Param;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhf
|
|
||||||
* @date 2021/1/30 8:49
|
|
||||||
* @description 校工会常务副主席审核
|
|
||||||
*/
|
|
||||||
@At("/platform/fw/difficulty/schoolstanding")
|
|
||||||
@Ok("json:full")
|
|
||||||
@IocBean
|
|
||||||
public class SchoolStandingController {
|
|
||||||
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private ZgfwKnbfService zgfwKnbfService;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private AuditService auditService;
|
|
||||||
|
|
||||||
|
|
||||||
@At("")
|
|
||||||
@Ok("beetl:/platform/fw/difficulty/schoolstanding.html")
|
|
||||||
@RequiresPermissions("fw.difficulty.schoolstanding")
|
|
||||||
public void index() {
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@At()
|
|
||||||
@ViReturn
|
|
||||||
@RequiresPermissions("fw.difficulty.schoolstanding")
|
|
||||||
public Object pageData(@Param(value = "isAudit",required = false) Boolean isAudit,
|
|
||||||
@Param(value = "year",required = false) Integer year,
|
|
||||||
@Param(value = "unitId",required = false) String unitId,
|
|
||||||
@Param(value = "unionId",required = false) String unionId, PageForm page) {
|
|
||||||
CndPlus cnd = CndPlus.create();
|
|
||||||
cnd.and("sq.zt", isAudit ? ">" : "=", 400);
|
|
||||||
return zgfwKnbfService.pageData(cnd, page, year, unitId,unionId);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@At
|
|
||||||
@ViReturn
|
|
||||||
@RequiresPermissions("fw.difficulty.schoolstanding")
|
|
||||||
public Object doReview(String id, boolean pass, Audit audit, String jb, String xghbzje) {
|
|
||||||
audit.setAuditor(ShiroUtil.getPrincipalProperty("id").toString());
|
|
||||||
audit.setLoginname(ShiroUtil.getPrincipalProperty("loginname").toString());
|
|
||||||
audit.setUsername(ShiroUtil.getPrincipalProperty("username").toString());
|
|
||||||
audit.setAuditTime(new Date());
|
|
||||||
audit = auditService.insert(audit);
|
|
||||||
Zgfw_knbf zgfw_knbf = zgfwKnbfService.fetch(id);
|
|
||||||
zgfw_knbf.setSchool_standing_audit(audit.getId());
|
|
||||||
zgfw_knbf.setJb(jb);
|
|
||||||
zgfw_knbf.setXghbzje(xghbzje);
|
|
||||||
zgfw_knbf.setZt(pass ? 500 : 450);
|
|
||||||
zgfwKnbfService.updateIgnoreNull(zgfw_knbf);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,77 +0,0 @@
|
|||||||
package io.v.nutz.zhgh.zgfw.controller.difficult;
|
|
||||||
|
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
|
||||||
import io.v.nutz.base.dao.CndPlus;
|
|
||||||
import io.v.nutz.base.model.Audit;
|
|
||||||
import io.v.nutz.base.query.PageForm;
|
|
||||||
import io.v.nutz.base.service.AuditService;
|
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
|
||||||
import io.v.nutz.zhgh.zgfw.model.difficult.Zgfw_knbf;
|
|
||||||
import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfService;
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
|
||||||
import org.nutz.mvc.annotation.At;
|
|
||||||
import org.nutz.mvc.annotation.Ok;
|
|
||||||
import org.nutz.mvc.annotation.Param;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhf
|
|
||||||
* @date 2021/1/30 8:47
|
|
||||||
* @description 校工会财务审核
|
|
||||||
*/
|
|
||||||
@At("/platform/fw/difficulty/schoolvicechairman")
|
|
||||||
@Ok("json:full")
|
|
||||||
@IocBean
|
|
||||||
public class SchoolViceChairmanCon {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private ZgfwKnbfService zgfwKnbfService;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private AuditService auditService;
|
|
||||||
|
|
||||||
|
|
||||||
@At("")
|
|
||||||
@Ok("beetl:/platform/fw/difficulty/schoolvicechairman.html")
|
|
||||||
@RequiresPermissions("fw.difficulty.schoolvicechairman")
|
|
||||||
public void index() {
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@At()
|
|
||||||
@ViReturn
|
|
||||||
@RequiresPermissions("fw.difficulty.schoolvicechairman")
|
|
||||||
public Object pageData(@Param(value = "isAudit",required = false) Boolean isAudit,
|
|
||||||
@Param(value = "year",required = false) Integer year,
|
|
||||||
@Param(value = "unitId",required = false) String unitId,
|
|
||||||
@Param(value = "unionId",required = false) String unionId, PageForm page) {
|
|
||||||
CndPlus cnd = CndPlus.create();
|
|
||||||
cnd.and("sq.zt", isAudit ? ">" : "=", 300);
|
|
||||||
return zgfwKnbfService.pageData(cnd, page, year, unitId,unionId);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@At
|
|
||||||
@ViReturn
|
|
||||||
@RequiresPermissions("fw.difficulty.schoolvicechairman")
|
|
||||||
public Object doReview(String id, boolean pass, Audit audit) {
|
|
||||||
audit.setAuditor(ShiroUtil.getPrincipalProperty("id").toString());
|
|
||||||
audit.setLoginname(ShiroUtil.getPrincipalProperty("loginname").toString());
|
|
||||||
audit.setUsername(ShiroUtil.getPrincipalProperty("username").toString());
|
|
||||||
audit.setAuditTime(new Date());
|
|
||||||
audit = auditService.insert(audit);
|
|
||||||
Zgfw_knbf zgfw_knbf = zgfwKnbfService.fetch(id);
|
|
||||||
zgfw_knbf.setSchool_vice_chairman_audit(audit.getId());
|
|
||||||
zgfw_knbf.setZt(pass ? 500 : 350);
|
|
||||||
zgfwKnbfService.updateIgnoreNull(zgfw_knbf);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,95 +0,0 @@
|
|||||||
package io.v.nutz.zhgh.zgfw.controller.difficult;
|
|
||||||
|
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
|
||||||
import io.v.nutz.base.dao.CndPlus;
|
|
||||||
import io.v.nutz.base.model.Audit;
|
|
||||||
import io.v.nutz.base.query.PageForm;
|
|
||||||
import io.v.nutz.base.service.AuditService;
|
|
||||||
import io.v.nutz.base.utils.Vi;
|
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
|
||||||
import io.v.nutz.zhgh.zgfw.handler.difficult.DifficultToDoHandler;
|
|
||||||
import io.v.nutz.zhgh.zgfw.model.difficult.Zgfw_knbf;
|
|
||||||
import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfService;
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
||||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
|
||||||
import org.nutz.ioc.aop.Aop;
|
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
|
||||||
import org.nutz.mvc.annotation.At;
|
|
||||||
import org.nutz.mvc.annotation.Ok;
|
|
||||||
import org.nutz.mvc.annotation.Param;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 二级党组织审核
|
|
||||||
*/
|
|
||||||
|
|
||||||
@At("/platform/fw/difficulty/twoOrganization")
|
|
||||||
@Ok("json:full")
|
|
||||||
@IocBean
|
|
||||||
public class TwoOrganizationController {
|
|
||||||
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private ZgfwKnbfService zgfwKnbfService;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private AuditService auditService;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private Vi vi;
|
|
||||||
|
|
||||||
@At("")
|
|
||||||
@Ok("beetl:/platform/zgfw/difficulty/twoOrganization.html")
|
|
||||||
@RequiresPermissions("fw.difficulty.twoOrganization")
|
|
||||||
public void index() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@At()
|
|
||||||
@ViReturn
|
|
||||||
@RequiresPermissions("fw.difficulty.twoOrganization")
|
|
||||||
public Object pageData(@Param(value = "isAudit", required = false) Boolean isAudit,
|
|
||||||
@Param(value = "year", required = false) Integer year,
|
|
||||||
@Param(value = "unitId", required = false) String unitId,
|
|
||||||
@Param(value = "unionId", required = false) String unionId, PageForm page) {
|
|
||||||
CndPlus cnd = CndPlus.create();
|
|
||||||
cnd.and("sq.zt", isAudit ? ">" : "=", 155);
|
|
||||||
return zgfwKnbfService.pageData(cnd, page, year, unitId, unionId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
|
||||||
@ViReturn
|
|
||||||
@RequiresPermissions("fw.difficulty.twoOrganization")
|
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
|
||||||
public Object doReview(String id, Integer pass, Audit audit, @Param(value = "xghbzje", required = false) String xghbzje) {
|
|
||||||
audit.setAuditor(ShiroUtil.getPrincipalProperty("id").toString());
|
|
||||||
audit.setLoginname(ShiroUtil.getPrincipalProperty("loginname").toString());
|
|
||||||
audit.setUsername(ShiroUtil.getPrincipalProperty("username").toString());
|
|
||||||
audit.setAuditTime(new Date());
|
|
||||||
audit = auditService.insert(audit);
|
|
||||||
Zgfw_knbf zgfw_knbf = zgfwKnbfService.fetch(id);
|
|
||||||
if (pass == 1) {
|
|
||||||
//不通过
|
|
||||||
zgfw_knbf.setZt(156);
|
|
||||||
} else if (pass == 2) {
|
|
||||||
//通过
|
|
||||||
zgfw_knbf.setZt(200);
|
|
||||||
} else {
|
|
||||||
zgfw_knbf.setZt(157);
|
|
||||||
}
|
|
||||||
zgfw_knbf.setXghbzje(xghbzje);
|
|
||||||
zgfw_knbf.setTwo_dzz_audit(audit.getId());
|
|
||||||
zgfwKnbfService.updateIgnoreNull(zgfw_knbf);
|
|
||||||
|
|
||||||
if (pass == 1){
|
|
||||||
DifficultToDoHandler.CREATE_APPLY_RE_MODIFY_TASK.exec(zgfw_knbf);
|
|
||||||
}else if (pass == 2){
|
|
||||||
DifficultToDoHandler.CREATE_SCHOOL_TASK.exec(zgfw_knbf);
|
|
||||||
}
|
|
||||||
DifficultToDoHandler.COMPLETE_FINANCE_TASK.exec(zgfw_knbf);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,120 +0,0 @@
|
|||||||
package io.v.nutz.zhgh.zgfw.controller.difficult;
|
|
||||||
|
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
|
||||||
import io.v.nutz.base.dao.CndPlus;
|
|
||||||
import io.v.nutz.base.model.Audit;
|
|
||||||
import io.v.nutz.base.query.PageForm;
|
|
||||||
import io.v.nutz.base.service.AuditService;
|
|
||||||
import io.v.nutz.base.utils.Vi;
|
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
|
||||||
import io.v.nutz.zhgh.zgfw.handler.difficult.DifficultToDoHandler;
|
|
||||||
import io.v.nutz.zhgh.zgfw.model.difficult.Zgfw_knbf;
|
|
||||||
import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfService;
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
||||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
|
||||||
import org.nutz.dao.Chain;
|
|
||||||
import org.nutz.dao.Cnd;
|
|
||||||
import org.nutz.ioc.aop.Aop;
|
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
|
||||||
import org.nutz.mvc.annotation.At;
|
|
||||||
import org.nutz.mvc.annotation.Ok;
|
|
||||||
import org.nutz.mvc.annotation.Param;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author zhf
|
|
||||||
* @date 2021/1/30 8:34
|
|
||||||
* @description 工会主席审核
|
|
||||||
*/
|
|
||||||
@At("/platform/fw/difficulty/unionchairman")
|
|
||||||
@Ok("json:full")
|
|
||||||
@IocBean
|
|
||||||
public class UnionChairmanController {
|
|
||||||
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private ZgfwKnbfService zgfwKnbfService;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private AuditService auditService;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private Vi vi;
|
|
||||||
|
|
||||||
@At("")
|
|
||||||
@Ok("beetl:/platform/zgfw/difficulty/unionchairman.html")
|
|
||||||
@RequiresPermissions("fw.difficulty.unionchairman")
|
|
||||||
public void index() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@At()
|
|
||||||
@ViReturn
|
|
||||||
@RequiresPermissions("fw.difficulty.unionchairman")
|
|
||||||
public Object pageData(@Param(value = "isAudit",required = false) Boolean isAudit,
|
|
||||||
@Param(value = "year",required = false) Integer year,
|
|
||||||
@Param(value = "unitId",required = false) String unitId,
|
|
||||||
@Param(value = "unionId",required = false) String unionId, PageForm page) {
|
|
||||||
CndPlus cnd = CndPlus.create();
|
|
||||||
if (!ShiroUtil.hasAnyRoles("sysadmin")){
|
|
||||||
cnd.and("un.id", "=", vi.getUnionId());
|
|
||||||
}
|
|
||||||
cnd.and("sq.zt", isAudit ? ">" : "=", 100);
|
|
||||||
return zgfwKnbfService.pageData(cnd, page, year, unitId,unionId);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@At
|
|
||||||
@ViReturn
|
|
||||||
@RequiresPermissions("fw.difficulty.unionchairman")
|
|
||||||
public Object doEdit(String id) {
|
|
||||||
Zgfw_knbf knbf = zgfwKnbfService.fetch(id);
|
|
||||||
int zt = 0;
|
|
||||||
//审核通过,撤回为待校工会审核
|
|
||||||
if(knbf.getZt().equals(500)){
|
|
||||||
zt=200;
|
|
||||||
} else if (knbf.getZt().equals(200)){//待校工会审核,撤回为待二级党组织审核
|
|
||||||
zt=155;
|
|
||||||
}else if (knbf.getZt().equals(155)){//待二级党组织审核,撤回为待分工会审核
|
|
||||||
zt=100;
|
|
||||||
}
|
|
||||||
zgfwKnbfService.update(Chain.make("zt", zt), Cnd.where("id", "=", id));
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@At
|
|
||||||
@ViReturn
|
|
||||||
@RequiresPermissions("fw.difficulty.unionchairman")
|
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
|
||||||
public Object doReview(String id, Integer pass, Audit audit) {
|
|
||||||
audit.setAuditor(ShiroUtil.getPrincipalProperty("id").toString());
|
|
||||||
audit.setLoginname(ShiroUtil.getPrincipalProperty("loginname").toString());
|
|
||||||
audit.setUsername(ShiroUtil.getPrincipalProperty("username").toString());
|
|
||||||
audit.setAuditTime(new Date());
|
|
||||||
audit = auditService.insert(audit);
|
|
||||||
Zgfw_knbf zgfw_knbf = zgfwKnbfService.fetch(id);
|
|
||||||
if (pass == 1) {
|
|
||||||
//不通过
|
|
||||||
zgfw_knbf.setZt(150);
|
|
||||||
} else if (pass == 2) {
|
|
||||||
zgfw_knbf.setZt(152);
|
|
||||||
} else {
|
|
||||||
//通过
|
|
||||||
zgfw_knbf.setZt(155);
|
|
||||||
}
|
|
||||||
zgfw_knbf.setUnion_president_audit(audit.getId());
|
|
||||||
zgfwKnbfService.updateIgnoreNull(zgfw_knbf);
|
|
||||||
|
|
||||||
if (pass == 1){
|
|
||||||
DifficultToDoHandler.CREATE_APPLY_RE_MODIFY_TASK.exec(zgfw_knbf);
|
|
||||||
}else if (pass == 3){
|
|
||||||
DifficultToDoHandler.CREATE_FINANCE_TASK.exec(zgfw_knbf);
|
|
||||||
}
|
|
||||||
DifficultToDoHandler.COMPLETE_UNION_TASK.exec(zgfw_knbf);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,407 +0,0 @@
|
|||||||
package io.v.nutz.zhgh.zgfw.controller.difficult;
|
|
||||||
|
|
||||||
|
|
||||||
import cn.wizzer.framework.base.Result;
|
|
||||||
import io.v.nutz.base.utils.DateUtil;
|
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
|
||||||
import io.v.nutz.zhgh.zgfw.model.difficult.Zgfw_knbf;
|
|
||||||
import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfJtcyService;
|
|
||||||
import io.v.nutz.zhgh.zgfw.service.ZgfwKnbfService;
|
|
||||||
import org.apache.poi.hssf.usermodel.HSSFCell;
|
|
||||||
import org.apache.poi.hssf.usermodel.HSSFRow;
|
|
||||||
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
|
||||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
|
||||||
import org.apache.poi.ss.usermodel.CellType;
|
|
||||||
import org.apache.poi.xssf.usermodel.XSSFCell;
|
|
||||||
import org.apache.poi.xssf.usermodel.XSSFRow;
|
|
||||||
import org.apache.poi.xssf.usermodel.XSSFSheet;
|
|
||||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
||||||
import org.nutz.dao.Cnd;
|
|
||||||
import org.nutz.dao.Sqls;
|
|
||||||
import org.nutz.dao.entity.Record;
|
|
||||||
import org.nutz.dao.sql.Sql;
|
|
||||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
|
||||||
import org.nutz.lang.Strings;
|
|
||||||
import org.nutz.lang.util.NutMap;
|
|
||||||
import org.nutz.mvc.annotation.AdaptBy;
|
|
||||||
import org.nutz.mvc.annotation.At;
|
|
||||||
import org.nutz.mvc.annotation.Ok;
|
|
||||||
import org.nutz.mvc.annotation.Param;
|
|
||||||
import org.nutz.mvc.upload.TempFile;
|
|
||||||
import org.nutz.mvc.upload.UploadAdaptor;
|
|
||||||
|
|
||||||
import javax.servlet.ServletOutputStream;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.FileInputStream;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
|
||||||
import java.net.URLEncoder;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author: V
|
|
||||||
* @Date: 2020/5/26 9:59
|
|
||||||
* @Description: 数据导入
|
|
||||||
*/
|
|
||||||
@IocBean
|
|
||||||
@Ok("json")
|
|
||||||
@At("/platform/knbf/sjdr")
|
|
||||||
public class ZgfwKnbfSjdrCon extends ZgfwUtil {
|
|
||||||
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private ZgfwKnbfService zgfwKnbfService;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private ZgfwKnbfJtcyService zgfwKnbfJtcyService;
|
|
||||||
|
|
||||||
@At("")
|
|
||||||
@Ok("re")
|
|
||||||
@RequiresPermissions("zgfw.knbf.sjdr")
|
|
||||||
public String index() {
|
|
||||||
return "beetl:/platform/fw/difficulty/sjdr.html";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@At
|
|
||||||
@RequiresPermissions("zgfw.knbf.sjdr")
|
|
||||||
public Object queryUser(String query) {
|
|
||||||
try {
|
|
||||||
Sql sql = Sqls.create("SELECT u.*,un.`name` unitname from sys_user u left join sys_unit un on u.unitid = un.id $condition");
|
|
||||||
Cnd cnd = Cnd.NEW();
|
|
||||||
|
|
||||||
if (!ShiroUtil.hasAnyRoles("sysadmin", "A06")) {
|
|
||||||
SqlExpressionGroup group = new SqlExpressionGroup();
|
|
||||||
if (ShiroUtil.hasRole("H04")) {
|
|
||||||
//院级工会
|
|
||||||
group.or("unit.unionid", "in", getFghIdStr());
|
|
||||||
}
|
|
||||||
cnd.and(group);
|
|
||||||
}
|
|
||||||
|
|
||||||
SqlExpressionGroup g2 = new SqlExpressionGroup();
|
|
||||||
g2.orLike("username", query);
|
|
||||||
g2.orLike("loginname", query);
|
|
||||||
|
|
||||||
cnd.and(g2);
|
|
||||||
cnd.asc("u.unitid");
|
|
||||||
sql.setCondition(cnd);
|
|
||||||
|
|
||||||
return Result.success().addData(sysUserService.listPage(1, 50, sql));
|
|
||||||
} catch (Exception e) {
|
|
||||||
return Result.error();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
|
||||||
@RequiresPermissions("zgfw.knbf.sjdr")
|
|
||||||
public Object doAdd(Zgfw_knbf zgfw_knbf) {
|
|
||||||
try {
|
|
||||||
zgfw_knbf.setZyzkyy("[]");
|
|
||||||
zgfw_knbf.setJtfc("[]");
|
|
||||||
zgfw_knbf.setJtcc("[]");
|
|
||||||
zgfw_knbf.setZt(600);
|
|
||||||
zgfwKnbfService.insert(zgfw_knbf);
|
|
||||||
return Result.success();
|
|
||||||
} catch (Exception e) {
|
|
||||||
return Result.error();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 下载摸板
|
|
||||||
*
|
|
||||||
* @param response
|
|
||||||
* @throws IOException
|
|
||||||
*/
|
|
||||||
@At
|
|
||||||
@RequiresPermissions("zgfw.knbf.sjdr")
|
|
||||||
public void downLoadTemp(HttpServletResponse response) throws IOException {
|
|
||||||
File file = null;
|
|
||||||
InputStream fin = null;
|
|
||||||
ServletOutputStream out = null;
|
|
||||||
try {
|
|
||||||
file = new File("src/main/resources/templates/knbfls.xlsx");
|
|
||||||
fin = new FileInputStream(file);
|
|
||||||
// 设置浏览器以下载的方式处理该文件名
|
|
||||||
String fileName = "困难帮扶历史数据" + ".xlsx";
|
|
||||||
response.setHeader("Content-Disposition", "attachment;filename="
|
|
||||||
.concat(String.valueOf(URLEncoder.encode(fileName, "UTF-8"))));
|
|
||||||
|
|
||||||
out = response.getOutputStream();
|
|
||||||
byte[] buffer = new byte[512]; // 缓冲区
|
|
||||||
int bytesToRead = -1;
|
|
||||||
// 通过循环将读入的Word文件的内容输出到浏览器中
|
|
||||||
while ((bytesToRead = fin.read(buffer)) != -1) {
|
|
||||||
out.write(buffer, 0, bytesToRead);
|
|
||||||
}
|
|
||||||
out.flush();
|
|
||||||
} finally {
|
|
||||||
if (fin != null) fin.close();
|
|
||||||
if (out != null) out.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
|
||||||
@Ok("json")
|
|
||||||
@AdaptBy(type = UploadAdaptor.class, args = {"ioc:fileUpload"})
|
|
||||||
@RequiresPermissions("zgfw.knbf.sjdr")
|
|
||||||
public Object getRow(@Param("file") TempFile tempFile,@Param(value = "year",required = false) String year) {
|
|
||||||
try {
|
|
||||||
if (tempFile == null) {
|
|
||||||
return Result.error("文件为空!");
|
|
||||||
}
|
|
||||||
|
|
||||||
List<NutMap> result = new ArrayList<>();
|
|
||||||
|
|
||||||
InputStream fileInputStream = tempFile.getInputStream();
|
|
||||||
String suffixName = tempFile.getSubmittedFileName().substring(tempFile.getSubmittedFileName().lastIndexOf(".")).toLowerCase();
|
|
||||||
|
|
||||||
if (suffixName.equals(".xls")) {
|
|
||||||
HSSFWorkbook hssfWorkbook = new HSSFWorkbook(fileInputStream);
|
|
||||||
//2.获取要解析的表格(第一个表格)
|
|
||||||
HSSFSheet sheet = hssfWorkbook.getSheetAt(0);
|
|
||||||
//获得最后一行的行号
|
|
||||||
int lastRowNum = sheet.getLastRowNum();
|
|
||||||
for (int i = 1; i <= lastRowNum; i++) {//遍历每一行
|
|
||||||
//3.获得要解析的行
|
|
||||||
HSSFRow row = sheet.getRow(i);
|
|
||||||
|
|
||||||
String unitname = null;
|
|
||||||
String loginname = null;
|
|
||||||
String username = null;
|
|
||||||
String sex = null;
|
|
||||||
String jtzz = null;
|
|
||||||
String lxfs = null;
|
|
||||||
String zyzkyybz = null;
|
|
||||||
Integer jtrs = null;
|
|
||||||
Integer brnzsr = null;
|
|
||||||
Integer jtnzsr = null;
|
|
||||||
String jb = null;
|
|
||||||
|
|
||||||
//4.获得每个单元格中的内容(String)
|
|
||||||
|
|
||||||
HSSFCell cell1 = row.getCell(1);
|
|
||||||
HSSFCell cell2 = row.getCell(2);
|
|
||||||
HSSFCell cell3 = row.getCell(3);
|
|
||||||
HSSFCell cell4 = row.getCell(4);
|
|
||||||
HSSFCell cell5 = row.getCell(5);
|
|
||||||
HSSFCell cell6 = row.getCell(6);
|
|
||||||
HSSFCell cell7 = row.getCell(7);
|
|
||||||
HSSFCell cell8 = row.getCell(8);
|
|
||||||
HSSFCell cell9 = row.getCell(9);
|
|
||||||
HSSFCell cell10 = row.getCell(10);
|
|
||||||
HSSFCell cell11 = row.getCell(11);
|
|
||||||
|
|
||||||
if (cell1 != null) {
|
|
||||||
cell1.setCellType(CellType.STRING);
|
|
||||||
unitname = cell1.getStringCellValue();
|
|
||||||
}
|
|
||||||
if (cell2 != null) {
|
|
||||||
cell2.setCellType(CellType.STRING);
|
|
||||||
loginname = cell2.getStringCellValue();
|
|
||||||
}
|
|
||||||
if (cell3 != null) {
|
|
||||||
cell3.setCellType(CellType.STRING);
|
|
||||||
username = cell3.getStringCellValue();
|
|
||||||
}
|
|
||||||
if (cell4 != null) {
|
|
||||||
cell4.setCellType(CellType.STRING);
|
|
||||||
sex = cell4.getStringCellValue();
|
|
||||||
}
|
|
||||||
if (cell5 != null) {
|
|
||||||
cell5.setCellType(CellType.STRING);
|
|
||||||
jtzz = cell5.getStringCellValue();
|
|
||||||
}
|
|
||||||
if (cell6 != null) {
|
|
||||||
cell6.setCellType(CellType.STRING);
|
|
||||||
lxfs = cell6.getStringCellValue();
|
|
||||||
}
|
|
||||||
if (cell7 != null) {
|
|
||||||
cell7.setCellType(CellType.STRING);
|
|
||||||
zyzkyybz = cell7.getStringCellValue();
|
|
||||||
}
|
|
||||||
if (cell8 != null) {
|
|
||||||
cell8.setCellType(CellType.STRING);
|
|
||||||
jtrs = Strings.isBlank(cell8.getStringCellValue()) ? null : Integer.parseInt(cell8.getStringCellValue());
|
|
||||||
}
|
|
||||||
if (cell9 != null) {
|
|
||||||
cell9.setCellType(CellType.STRING);
|
|
||||||
brnzsr = Strings.isBlank(cell9.getStringCellValue()) ? null : Integer.parseInt(cell9.getStringCellValue());
|
|
||||||
}
|
|
||||||
if (cell10 != null) {
|
|
||||||
cell10.setCellType(CellType.STRING);
|
|
||||||
jtnzsr = Strings.isBlank(cell10.getStringCellValue()) ? null : Integer.parseInt(cell10.getStringCellValue());
|
|
||||||
}
|
|
||||||
if (cell11 != null) {
|
|
||||||
cell11.setCellType(CellType.STRING);
|
|
||||||
jb = cell11.getStringCellValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
Sql sql = Sqls.create("SELECT u.*,un.`name` unitname from sys_user u left join sys_unit un on u.unitid = un.id WHERE u.loginname = @loginname LIMIT 1").setParam("loginname", loginname);
|
|
||||||
List<Record> list = sysUserService.list(sql);
|
|
||||||
if (list.size() > 0) {
|
|
||||||
Record record = list.get(0);
|
|
||||||
|
|
||||||
NutMap map = new NutMap();
|
|
||||||
map.setv("sqr", record == null ? "" : record.getString("id"));
|
|
||||||
map.setv("unitname", record == null ? "" : record.getString("unitname"));
|
|
||||||
map.setv("loginname", loginname == null ? "" : loginname);
|
|
||||||
map.setv("username", record == null ? "" : record.getString("username"));
|
|
||||||
map.setv("sex", sex == null ? "" : sex);
|
|
||||||
map.setv("jtzz", jtzz == null ? "" : jtzz);
|
|
||||||
map.setv("lxfs", lxfs == null ? "" : lxfs);
|
|
||||||
map.setv("zyzkyybz", zyzkyybz == null ? "" : zyzkyybz);
|
|
||||||
map.setv("jtrs", jtrs);
|
|
||||||
map.setv("brnzsr", brnzsr);
|
|
||||||
map.setv("jtnzsr", jtnzsr);
|
|
||||||
map.setv("jb", jb == null ? "" : jb);
|
|
||||||
|
|
||||||
result.add(map);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
} else if (suffixName.equals(".xlsx")) {
|
|
||||||
XSSFWorkbook xssfWorkbook = new XSSFWorkbook(fileInputStream);
|
|
||||||
//2.获取要解析的表格(第一个表格)
|
|
||||||
XSSFSheet sheet = xssfWorkbook.getSheetAt(0);
|
|
||||||
|
|
||||||
//获得最后一行的行号
|
|
||||||
int lastRowNum = sheet.getLastRowNum();
|
|
||||||
for (int i = 1; i <= lastRowNum; i++) {//遍历每一行
|
|
||||||
//3.获得要解析的行
|
|
||||||
XSSFRow row = sheet.getRow(i);
|
|
||||||
|
|
||||||
String unitname = null;
|
|
||||||
String loginname = null;
|
|
||||||
String username = null;
|
|
||||||
String sex = null;
|
|
||||||
String jtzz = null;
|
|
||||||
String lxfs = null;
|
|
||||||
String zyzkyybz = null;
|
|
||||||
Integer jtrs = null;
|
|
||||||
Integer brnzsr = null;
|
|
||||||
Integer jtnzsr = null;
|
|
||||||
String jb = null;
|
|
||||||
//4.获得每个单元格中的内容(String)
|
|
||||||
|
|
||||||
XSSFCell cell1 = row.getCell(1);
|
|
||||||
XSSFCell cell2 = row.getCell(2);
|
|
||||||
XSSFCell cell3 = row.getCell(3);
|
|
||||||
XSSFCell cell4 = row.getCell(4);
|
|
||||||
XSSFCell cell5 = row.getCell(5);
|
|
||||||
XSSFCell cell6 = row.getCell(6);
|
|
||||||
XSSFCell cell7 = row.getCell(7);
|
|
||||||
XSSFCell cell8 = row.getCell(8);
|
|
||||||
XSSFCell cell9 = row.getCell(9);
|
|
||||||
XSSFCell cell10 = row.getCell(10);
|
|
||||||
XSSFCell cell11 = row.getCell(11);
|
|
||||||
|
|
||||||
if (cell1 != null) {
|
|
||||||
cell1.setCellType(CellType.STRING);
|
|
||||||
unitname = cell1.getStringCellValue();
|
|
||||||
}
|
|
||||||
if (cell2 != null) {
|
|
||||||
cell2.setCellType(CellType.STRING);
|
|
||||||
loginname = cell2.getStringCellValue();
|
|
||||||
}
|
|
||||||
if (cell3 != null) {
|
|
||||||
cell3.setCellType(CellType.STRING);
|
|
||||||
username = cell3.getStringCellValue();
|
|
||||||
}
|
|
||||||
if (cell4 != null) {
|
|
||||||
cell4.setCellType(CellType.STRING);
|
|
||||||
sex = cell4.getStringCellValue();
|
|
||||||
}
|
|
||||||
if (cell5 != null) {
|
|
||||||
cell5.setCellType(CellType.STRING);
|
|
||||||
jtzz = cell5.getStringCellValue();
|
|
||||||
}
|
|
||||||
if (cell6 != null) {
|
|
||||||
cell6.setCellType(CellType.STRING);
|
|
||||||
lxfs = cell6.getStringCellValue();
|
|
||||||
}
|
|
||||||
if (cell7 != null) {
|
|
||||||
cell7.setCellType(CellType.STRING);
|
|
||||||
zyzkyybz = cell7.getStringCellValue();
|
|
||||||
}
|
|
||||||
if (cell8 != null) {
|
|
||||||
cell8.setCellType(CellType.STRING);
|
|
||||||
jtrs = Strings.isBlank(cell8.getStringCellValue()) ? null : Integer.parseInt(cell8.getStringCellValue());
|
|
||||||
}
|
|
||||||
if (cell9 != null) {
|
|
||||||
cell9.setCellType(CellType.STRING);
|
|
||||||
brnzsr = Strings.isBlank(cell9.getStringCellValue()) ? null : Integer.parseInt(cell9.getStringCellValue());
|
|
||||||
}
|
|
||||||
if (cell10 != null) {
|
|
||||||
cell10.setCellType(CellType.STRING);
|
|
||||||
jtnzsr = Strings.isBlank(cell10.getStringCellValue()) ? null : Integer.parseInt(cell10.getStringCellValue());
|
|
||||||
}
|
|
||||||
if (cell11 != null) {
|
|
||||||
cell11.setCellType(CellType.STRING);
|
|
||||||
jb = cell11.getStringCellValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
Sql sql = Sqls.create("SELECT u.*,un.`name` unitname from sys_user u left join sys_unit un on u.unitid = un.id WHERE u.loginname = @loginname LIMIT 1").setParam("loginname", loginname);
|
|
||||||
List<Record> list = sysUserService.list(sql);
|
|
||||||
if (list.size() > 0) {
|
|
||||||
Record record = list.get(0);
|
|
||||||
|
|
||||||
NutMap map = new NutMap();
|
|
||||||
map.setv("sqr", record == null ? "" : record.getString("id"));
|
|
||||||
map.setv("unitname", record == null ? "" : record.getString("unitname"));
|
|
||||||
map.setv("loginname", loginname == null ? "" : loginname);
|
|
||||||
map.setv("username", record == null ? "" : record.getString("username"));
|
|
||||||
map.setv("sex", sex == null ? "" : sex);
|
|
||||||
map.setv("jtzz", jtzz == null ? "" : jtzz);
|
|
||||||
map.setv("lxfs", lxfs == null ? "" : lxfs);
|
|
||||||
map.setv("zyzkyybz", zyzkyybz == null ? "" : zyzkyybz);
|
|
||||||
map.setv("jtrs", jtrs);
|
|
||||||
map.setv("brnzsr", brnzsr);
|
|
||||||
map.setv("jtnzsr", jtnzsr);
|
|
||||||
map.setv("jb", jb == null ? "" : jb);
|
|
||||||
result.add(map);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return Result.error("文件类型不对!必须为excel表格!");
|
|
||||||
}
|
|
||||||
|
|
||||||
return Result.success().addData(result);
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
return Result.error();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@At
|
|
||||||
@Ok("json")
|
|
||||||
@RequiresPermissions("zgfw.knbf.sjdr")
|
|
||||||
public Object write(Zgfw_knbf[] zgfw_knbfs, String sqsj) {
|
|
||||||
try {
|
|
||||||
if (Strings.isBlank(sqsj)) {
|
|
||||||
throw new RuntimeException();
|
|
||||||
}
|
|
||||||
for (Zgfw_knbf zgfw_knbf : zgfw_knbfs) {
|
|
||||||
zgfw_knbf.setZyzkyy("[]");
|
|
||||||
zgfw_knbf.setJtfc("[]");
|
|
||||||
zgfw_knbf.setJtcc("[]");
|
|
||||||
zgfw_knbf.setZt(600);
|
|
||||||
zgfw_knbf.setSqsj(DateUtil.getDate());
|
|
||||||
zgfwKnbfService.insert(zgfw_knbf);
|
|
||||||
}
|
|
||||||
return Result.success();
|
|
||||||
} catch (Exception e) {
|
|
||||||
return Result.error();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
package io.v.nutz.zhgh.zgfw.handler.difficult;
|
package io.v.nutz.zhgh.zgfw.handler.difficult;
|
||||||
|
|
||||||
import io.v.nutz.base.utils.Vi;
|
|
||||||
import io.v.nutz.base.utils.ViResource;
|
import io.v.nutz.base.utils.ViResource;
|
||||||
import io.v.nutz.sys.services.SysLocalProcessService;
|
import io.v.nutz.sys.services.SysLocalProcessService;
|
||||||
import io.v.nutz.sys.services.impl.SysLocalProcessServiceImpl;
|
import io.v.nutz.sys.services.impl.SysLocalProcessServiceImpl;
|
||||||
@@ -24,7 +23,7 @@ public enum DifficultToDoHandler {
|
|||||||
START_PROCESS(){
|
START_PROCESS(){
|
||||||
@Override
|
@Override
|
||||||
public void exec(Zgfw_knbf knbf) {
|
public void exec(Zgfw_knbf knbf) {
|
||||||
Sql sql = Sqls.fetchString(Sqls.create("select username from sys_user where id = @id").setParam("id", knbf.getSqr()).toString());
|
Sql sql = Sqls.fetchString(Sqls.create("select username from sys_user where id = @id").setParam("id", knbf.getUserId()).toString());
|
||||||
dao.execute(sql);
|
dao.execute(sql);
|
||||||
String username = sql.getString();
|
String username = sql.getString();
|
||||||
|
|
||||||
@@ -32,9 +31,9 @@ public enum DifficultToDoHandler {
|
|||||||
"【困难帮扶】" + username,
|
"【困难帮扶】" + username,
|
||||||
"zgfw_knbf@" + knbf.getId(),
|
"zgfw_knbf@" + knbf.getId(),
|
||||||
"",
|
"",
|
||||||
knbf.getSqr(),
|
knbf.getUserId(),
|
||||||
"/platform/fw/difficulty/applylist",
|
"/platform/difficulty/applylist",
|
||||||
"/platform/fw/difficulty/applylist"
|
"/platform/difficulty/applylist"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -45,7 +44,7 @@ public enum DifficultToDoHandler {
|
|||||||
CREATE_APPLY_RE_MODIFY_TASK(){
|
CREATE_APPLY_RE_MODIFY_TASK(){
|
||||||
@Override
|
@Override
|
||||||
public void exec(Zgfw_knbf knbf) {
|
public void exec(Zgfw_knbf knbf) {
|
||||||
Sql sql = Sqls.fetchString(Sqls.create("select loginname from sys_user where id = @id").setParam("id", knbf.getSqr()).toString());
|
Sql sql = Sqls.fetchString(Sqls.create("select loginname from sys_user where id = @id").setParam("id", knbf.getUserId()).toString());
|
||||||
dao.execute(sql);
|
dao.execute(sql);
|
||||||
String loginname = sql.getString();
|
String loginname = sql.getString();
|
||||||
|
|
||||||
@@ -55,10 +54,10 @@ public enum DifficultToDoHandler {
|
|||||||
"退回重新修改",
|
"退回重新修改",
|
||||||
ShiroUtil.getUserId(),
|
ShiroUtil.getUserId(),
|
||||||
List.of(loginname),
|
List.of(loginname),
|
||||||
"/platform/fw/difficulty/applylist",
|
"/platform/difficulty/applylist",
|
||||||
"/platform/fw/difficulty/applylist",
|
"/platform/difficulty/applylist",
|
||||||
"/platform/fw/difficulty/applylist",
|
"/platform/difficulty/applylist",
|
||||||
"/platform/fw/difficulty/applylist"
|
"/platform/difficulty/applylist"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -85,17 +84,17 @@ public enum DifficultToDoHandler {
|
|||||||
CREATE_UNION_TASK(){
|
CREATE_UNION_TASK(){
|
||||||
@Override
|
@Override
|
||||||
public void exec(Zgfw_knbf knbf) {
|
public void exec(Zgfw_knbf knbf) {
|
||||||
List<String> unionLeader = zgfwKnbfService.getUnionLeader(knbf.getSqr());
|
List<String> unionLeader = zgfwKnbfService.getUnionLeader(knbf.getUserId());
|
||||||
localProcessService.createTask(
|
localProcessService.createTask(
|
||||||
"zgfw_knbf@" + knbf.getId(),
|
"zgfw_knbf@" + knbf.getId(),
|
||||||
"union_president_audit",
|
"branchUnionAudit",
|
||||||
"分工会审核",
|
"分工会审核",
|
||||||
ShiroUtil.getUserId(),
|
ShiroUtil.getUserId(),
|
||||||
unionLeader,
|
unionLeader,
|
||||||
"/platform/fw/difficulty/unionchairman",
|
"/platform/difficulty/branchUnionAudit",
|
||||||
"/platform/fw/difficulty/unionchairman",
|
"/platform/difficulty/branchUnionAudit",
|
||||||
"/platform/fw/difficulty/unionchairman",
|
"/platform/difficulty/branchUnionAudit",
|
||||||
"/platform/fw/difficulty/unionchairman"
|
"/platform/difficulty/branchUnionAudit"
|
||||||
);
|
);
|
||||||
localProcessService.updateProcessNodeName("zgfw_knbf@" + knbf.getId(), "分工会审核");
|
localProcessService.updateProcessNodeName("zgfw_knbf@" + knbf.getId(), "分工会审核");
|
||||||
}
|
}
|
||||||
@@ -108,7 +107,7 @@ public enum DifficultToDoHandler {
|
|||||||
@Override
|
@Override
|
||||||
public void exec(Zgfw_knbf knbf) {
|
public void exec(Zgfw_knbf knbf) {
|
||||||
localProcessService.completeTask(
|
localProcessService.completeTask(
|
||||||
"union_president_audit",
|
"branchUnionAudit",
|
||||||
"zgfw_knbf@" + knbf.getId(),
|
"zgfw_knbf@" + knbf.getId(),
|
||||||
ShiroUtil.getUserId(),
|
ShiroUtil.getUserId(),
|
||||||
""
|
""
|
||||||
@@ -117,36 +116,36 @@ public enum DifficultToDoHandler {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建财务任务
|
* 创建校工会初审任务
|
||||||
*/
|
*/
|
||||||
CREATE_FINANCE_TASK(){
|
CREATE_FINANCE_TASK(){
|
||||||
@Override
|
@Override
|
||||||
public void exec(Zgfw_knbf knbf) {
|
public void exec(Zgfw_knbf knbf) {
|
||||||
List<String> schoolUnionAccountant = Vi.getSchoolUnionAccountant();
|
List<String> list = zgfwKnbfService.getSchoolUnionDifficultyAdmin();
|
||||||
localProcessService.createTask(
|
localProcessService.createTask(
|
||||||
"zgfw_knbf@" + knbf.getId(),
|
"zgfw_knbf@" + knbf.getId(),
|
||||||
"two_dzz_audit",
|
"schoolUnionInitialAudit",
|
||||||
"财务审核",
|
"校工会初审",
|
||||||
ShiroUtil.getUserId(),
|
ShiroUtil.getUserId(),
|
||||||
schoolUnionAccountant,
|
list,
|
||||||
"/platform/fw/difficulty/twoOrganization",
|
"/platform/difficulty/schoolUnionInitialAudit",
|
||||||
"/platform/fw/difficulty/twoOrganization",
|
"/platform/difficulty/schoolUnionInitialAudit",
|
||||||
"/platform/fw/difficulty/twoOrganization",
|
"/platform/difficulty/schoolUnionInitialAudit",
|
||||||
"/platform/fw/difficulty/twoOrganization"
|
"/platform/difficulty/schoolUnionInitialAudit"
|
||||||
);
|
);
|
||||||
|
|
||||||
localProcessService.updateProcessNodeName("zgfw_knbf@" + knbf.getId(), "财务审核");
|
localProcessService.updateProcessNodeName("zgfw_knbf@" + knbf.getId(), "校工会初审");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 财务完成
|
* 校工会初审任务完成
|
||||||
*/
|
*/
|
||||||
COMPLETE_FINANCE_TASK(){
|
COMPLETE_FINANCE_TASK(){
|
||||||
@Override
|
@Override
|
||||||
public void exec(Zgfw_knbf knbf) {
|
public void exec(Zgfw_knbf knbf) {
|
||||||
localProcessService.completeTask(
|
localProcessService.completeTask(
|
||||||
"two_dzz_audit",
|
"schoolUnionInitialAudit",
|
||||||
"zgfw_knbf@" + knbf.getId(),
|
"zgfw_knbf@" + knbf.getId(),
|
||||||
ShiroUtil.getUserId(),
|
ShiroUtil.getUserId(),
|
||||||
""
|
""
|
||||||
@@ -163,14 +162,14 @@ public enum DifficultToDoHandler {
|
|||||||
List<String> list = zgfwKnbfService.getSchoolUnionDifficultyAdmin();
|
List<String> list = zgfwKnbfService.getSchoolUnionDifficultyAdmin();
|
||||||
localProcessService.createTask(
|
localProcessService.createTask(
|
||||||
"zgfw_knbf@" + knbf.getId(),
|
"zgfw_knbf@" + knbf.getId(),
|
||||||
"school_standing_audit",
|
"schoolUnionFinalAudit",
|
||||||
"校工会审核",
|
"工会常委会审核",
|
||||||
ShiroUtil.getUserId(),
|
ShiroUtil.getUserId(),
|
||||||
list,
|
list,
|
||||||
"/platform/fw/difficulty/schoolmanager",
|
"/platform/difficulty/schoolUnionFinalAudit",
|
||||||
"/platform/fw/difficulty/schoolmanager",
|
"/platform/difficulty/schoolUnionFinalAudit",
|
||||||
"/platform/fw/difficulty/schoolmanager",
|
"/platform/difficulty/schoolUnionFinalAudit",
|
||||||
"/platform/fw/difficulty/schoolmanager"
|
"/platform/difficulty/schoolUnionFinalAudit"
|
||||||
);
|
);
|
||||||
|
|
||||||
localProcessService.updateProcessNodeName("zgfw_knbf@" + knbf.getId(), "校工会审核");
|
localProcessService.updateProcessNodeName("zgfw_knbf@" + knbf.getId(), "校工会审核");
|
||||||
@@ -184,7 +183,7 @@ public enum DifficultToDoHandler {
|
|||||||
@Override
|
@Override
|
||||||
public void exec(Zgfw_knbf knbf) {
|
public void exec(Zgfw_knbf knbf) {
|
||||||
localProcessService.completeTask(
|
localProcessService.completeTask(
|
||||||
"school_standing_audit",
|
"schoolUnionFinalAudit",
|
||||||
"zgfw_knbf@" + knbf.getId(),
|
"zgfw_knbf@" + knbf.getId(),
|
||||||
ShiroUtil.getUserId(),
|
ShiroUtil.getUserId(),
|
||||||
""
|
""
|
||||||
@@ -200,10 +199,15 @@ public enum DifficultToDoHandler {
|
|||||||
public void exec(Zgfw_knbf knbf) {
|
public void exec(Zgfw_knbf knbf) {
|
||||||
localProcessService.completeProcess("zgfw_knbf@" + knbf.getId());
|
localProcessService.completeProcess("zgfw_knbf@" + knbf.getId());
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
DELETE_PROCESS(){
|
||||||
|
@Override
|
||||||
|
public void exec(Zgfw_knbf knbf) {
|
||||||
|
localProcessService.deleteProcessInstance("zgfw_knbf@" + knbf.getId());
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public abstract void exec(Zgfw_knbf knbf);
|
public abstract void exec(Zgfw_knbf knbf);
|
||||||
public Dao dao = ViResource.dao;
|
public Dao dao = ViResource.dao;
|
||||||
public ZgfwKnbfService zgfwKnbfService = ViResource.ioc.get(ZgfwKnbfServiceImpl.class);
|
public ZgfwKnbfService zgfwKnbfService = ViResource.ioc.get(ZgfwKnbfServiceImpl.class);
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package io.v.nutz.zhgh.zgfw.model.difficult;
|
package io.v.nutz.zhgh.zgfw.model.difficult;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import io.v.nutz.base.model.Audit;
|
||||||
import io.v.nutz.sys.models.Sys_file;
|
import io.v.nutz.sys.models.Sys_file;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.nutz.dao.DB;
|
import org.nutz.dao.DB;
|
||||||
@@ -8,6 +10,7 @@ import org.nutz.dao.entity.annotation.*;
|
|||||||
import org.nutz.integration.json4excel.annotation.J4EIgnore;
|
import org.nutz.integration.json4excel.annotation.J4EIgnore;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -30,43 +33,43 @@ public class Zgfw_knbf implements Serializable {
|
|||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("申请时间")
|
@Comment("申请时间")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
@ColDefine(type = ColType.DATETIME)
|
||||||
private String sqsj;
|
private Date applyTime;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("申请模式")
|
@Comment("申请模式")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||||
private String apply_mode;
|
private String mode;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("填写人id")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String proxyUserId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("填写人姓名")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||||
|
private String proxyUserName;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("填写人工号")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||||
|
private String proxyLoginName;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("申请人id")
|
@Comment("申请人id")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
private String sqr;
|
private String userId;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("受补助人id")
|
@Comment("申请人姓名")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||||
private String bbzrusername;
|
private String userName;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("身份证")
|
@Comment("申请人工号")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||||
private String idcard;
|
private String loginName;
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("民族")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
|
||||||
private String mz;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("政治面貌")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
|
||||||
private String zzmm;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("生日")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
|
||||||
private String birthday;
|
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("性别")
|
@Comment("性别")
|
||||||
@@ -74,196 +77,94 @@ public class Zgfw_knbf implements Serializable {
|
|||||||
private String sex;
|
private String sex;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("职称")
|
@Comment("单位")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
private String zc;
|
private String unitId;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("职务")
|
@Comment("单位名称")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
@ColDefine(type = ColType.VARCHAR, width = 500)
|
||||||
private String zw;
|
private String unitName;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("人事编制")
|
@Comment("分工会id")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
private String rsbz;
|
private String unionId;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("参加工作时间")
|
@Comment("工会名称")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
@ColDefine(type = ColType.VARCHAR, width = 500)
|
||||||
private String cjgzsj;
|
private String unionName;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("医保状况")
|
@Comment("月收入")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||||
private String ybzk;
|
private String monthlyIncome;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("联系方式")
|
@Comment("出生日期")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
@ColDefine(type = ColType.DATETIME)
|
||||||
private String lxfs;
|
private Date birthday;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("本人年总收入")
|
@Comment("联系电话")
|
||||||
@ColDefine(type = ColType.INT)
|
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||||
private Integer brnzsr;
|
private String mobile;
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("家庭年总收入")
|
|
||||||
@ColDefine(type = ColType.INT)
|
|
||||||
private Integer jtnzsr;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("家庭人数")
|
|
||||||
@ColDefine(type = ColType.INT)
|
|
||||||
private Integer jtrs;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("现住房类型")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
|
||||||
private String xzflx;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("建筑面积 m*m")
|
|
||||||
@ColDefine(type = ColType.INT)
|
|
||||||
private Integer jzmj;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("家庭房产 (json)")
|
|
||||||
@ColDefine(type = ColType.TEXT)
|
|
||||||
private String jtfc;
|
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("家庭住址")
|
@Comment("家庭住址")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 200)
|
@ColDefine(type = ColType.VARCHAR, width = 200)
|
||||||
private String jtzz;
|
private String homeAddress;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("婚姻状态")
|
@Comment("补助标准")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
|
||||||
private String hyzt;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("家庭车产 (json)")
|
|
||||||
@ColDefine(type = ColType.TEXT)
|
|
||||||
private String jtcc;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("所在医院")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
|
||||||
private String hospital;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("住院时间")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
|
||||||
private String hospitalized_time;
|
|
||||||
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("银行名称")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
|
||||||
private String yhmc;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("银行卡号")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
|
||||||
private String yhkh;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("科室班组")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
|
||||||
private String sq_ksbz;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("主要致困原因(json 多选)")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
|
||||||
private String zyzkyy;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("主要致困原因备注")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 500)
|
@ColDefine(type = ColType.VARCHAR, width = 500)
|
||||||
private String zyzkyybz;
|
private String subsidyStandards;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("家庭成员")
|
||||||
|
@ColDefine(type = ColType.MYSQL_JSON)
|
||||||
|
private List<JSONObject> familyList;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("申请理由")
|
@Comment("申请理由")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 500)
|
@ColDefine(type = ColType.VARCHAR, width = 500)
|
||||||
private String apply_reason;
|
private String reason;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("补助类型")
|
@Comment("备注")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 4)
|
@ColDefine(type = ColType.VARCHAR, width = 500)
|
||||||
private String sq_bzlx;
|
private String remarks;
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("困难类型")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 4)
|
|
||||||
private String sq_knlx;
|
|
||||||
|
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("附件")
|
@Comment("附件")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 500)
|
@ColDefine(type = ColType.MYSQL_JSON)
|
||||||
private List<Sys_file> files;
|
private List<Sys_file> files;
|
||||||
|
|
||||||
@Many(field = "sqid")
|
@Column
|
||||||
private List<Zgfw_knbf_jtcy> jtcys;
|
@Comment("申请人签字")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 500)
|
||||||
|
private String signature;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("申请人签字 对应id")
|
@Comment("分工会审核记录id")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
private String applicantsign;
|
private String branchUnionAuditId;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("工会主席审核记录 id")
|
@Comment("校工会初审审核记录id")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
private String union_president_audit;
|
private String schoolUnionInitialAuditId;
|
||||||
|
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("校工会经办人审核记录 id")
|
@Comment("工会常委会审核记录id")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
private String school_manager_audit;
|
private String schoolUnionFinalAuditId;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("校工会副主席审核记录 id")
|
@Comment("状态")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
|
||||||
private String school_vice_chairman_audit;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("校工会审核记录id")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
|
||||||
private String school_union_audit;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("二级党组织审核记录id")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
|
||||||
private String two_dzz_audit;
|
|
||||||
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("校工会常务副主席审核记录id")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
|
||||||
private String school_standing_audit;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("级别")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
|
||||||
private String jb;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("补助金额")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
|
||||||
private String xghbzje;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("上级工会补助金额")
|
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
|
||||||
private String sjghbzje;
|
|
||||||
|
|
||||||
@Column
|
|
||||||
@Comment("状态(100 待工会主席审核 150 工会主席不通过 200 校工会经办人审核 250 校工会经办人不通过 300 待校工会副主席审核 350 校工会副主席不通过 400 校工会常务副主席审核 450 校工会常务副主席不通过 500待校工会审核 550校工会主席不通过 600 通过)")
|
|
||||||
@ColDefine(type = ColType.INT, width = 4)
|
@ColDefine(type = ColType.INT, width = 4)
|
||||||
private Integer zt;
|
private Integer stateId;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("单据号")
|
@Comment("单据号")
|
||||||
@@ -272,4 +173,15 @@ public class Zgfw_knbf implements Serializable {
|
|||||||
})
|
})
|
||||||
private Integer document_no;
|
private Integer document_no;
|
||||||
|
|
||||||
|
|
||||||
|
@One(field = "branchUnionAuditId")
|
||||||
|
private Audit branchUnionAudit;
|
||||||
|
|
||||||
|
@One(field = "schoolUnionInitialAuditId")
|
||||||
|
private Audit schoolUnionInitialAudit;
|
||||||
|
|
||||||
|
@One(field = "schoolUnionFinalAuditId")
|
||||||
|
private Audit schoolUnionFinalAudit;
|
||||||
|
|
||||||
|
private boolean isSelf;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,7 +77,7 @@
|
|||||||
box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
|
box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.van-empty {
|
/*.van-empty {
|
||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
.van-dropdown-item__content {
|
.van-dropdown-item__content {
|
||||||
border-bottom-right-radius: 15px;
|
border-bottom-right-radius: 15px;
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
<svg t="1706509236796" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3418" width="64" height="64"><path d="M281.5 308.4c-3.2-1.1-16.3 14.4-17.5 16.5s-10.3 68-10.3 68c0 8.6 7 36.2 26.3 39" fill="#E8B491" p-id="3419"></path><path d="M280.5 194.5h626v313.6h-626z" fill="#EA7657" p-id="3420"></path><path d="M303.1 236.1h626v313.6h-626z" fill="#FF8A65" p-id="3421"></path><path d="M683 422.9h-50.3v-33.4H683c9.3 0 16.7-7.4 16.7-16.7s-7.4-16.7-16.7-16.7h-34.3l32.5-60c4.2-7.6 1.6-17.3-5.5-21.8-7.2-4.3-16.3-1.8-20.4 5.8l-37.3 69c-1.2 2.3-1.8 4.6-1.9 7h-0.2c-0.2-2.4-0.8-4.8-1.9-7l-36.9-68.8c-4.1-7.6-13.2-10.1-20.2-5.8s-9.5 14.2-5.4 21.8l32.1 60h-34.3c-9.3 0-16.7 7.4-16.7 16.7s7.4 16.7 16.7 16.7h50.3V423h-50.3c-9.3 0-16.7 7.4-16.7 16.7s7.4 16.7 16.7 16.7h50.3v35.1c0 8.4 7.4 15.1 16.7 15.1 9.3 0 16.7-6.7 16.7-15.1v-35.1h50.3c9.3 0 16.7-7.4 16.7-16.7-0.1-9.3-7.8-16.8-17-16.8z" fill="#FCEAE6" p-id="3422"></path><path d="M134.2 609.4s8.7-239.3 14.6-251.2c5.8-11.9 131.7-143.8 131.7-143.8l-1.2 4.7 1.1 89.3c-3.2-1.1-16.3 14.4-17.5 16.5s-10.3 68-10.3 68c0 8.6 7 36.2 26.3 39 8.4 2.4 17.7-1.8 30.1-10.1 10.2-5.8 15.1-21.2 25.9-32.4 11.3-33.7 18.5-49.7 36-72 17.5-22.2 33.3-37 33.3-37l6.7-8.2c0.7-0.1 17.3-1.3 17.9-1.3 22.3-1.9 39.8 11.4 43 38.6 3.4 28.1-81.5 165.9-81.5 165.9s-21.9 38-27.7 117.7c-0.4 6-8.4 33.8-8.4 33.8-6.7 16.8-49.8 75.2-49.8 75.2-3.2 3.5-6.2 7.3-9.4 10.7-34.9 36.3-73.4 62.8-89.6 63.5-32 1.5-110.6-66.5-110.6-66.5l39.4-100.4z" fill="#FCD4B1" p-id="3423"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 114 KiB |
@@ -0,0 +1 @@
|
|||||||
|
<svg t="1706580209183" class="icon" viewBox="0 0 1147 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="28392" width="128" height="128"><path d="M476.689655 1024C213.415724 1024 0 810.584276 0 547.310345S213.415724 70.62069 476.689655 70.62069s476.689655 213.415724 476.689655 476.689655-213.415724 476.689655-476.689655 476.689655z m224.803311-670.896552L437.848276 622.750897l-150.651586-154.07669L211.862069 545.703724 437.848276 776.827586 776.827586 430.150621 701.492966 353.103448zM927.744 131.566345L847.448276 105.931034l80.295724-25.63531L953.37931 0l25.635311 80.295724L1059.310345 105.931034l-80.295724 25.635311L953.37931 211.862069zM57.803034 983.852138L17.655172 971.034483l40.147862-12.817655L70.62069 918.068966l12.817655 40.147862L123.586207 971.034483l-40.147862 12.817655L70.62069 1024zM1081.803034 312.955586L1041.655172 300.137931l40.147862-12.817655L1094.62069 247.172414l12.817655 40.147862L1147.586207 300.137931l-40.147862 12.817655L1094.62069 353.103448z" fill="#FFFFFF" p-id="28393"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1 @@
|
|||||||
|
<svg t="1706421773003" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8826" width="32" height="32"><path d="M337.387283 341.82659c-17.757225 0-35.514451 11.83815-35.514451 29.595375s17.757225 29.595376 35.514451 29.595376 29.595376-11.83815 29.595376-29.595376c0-18.49711-11.83815-29.595376-29.595376-29.595375zM577.849711 513.479769c-11.83815 0-22.936416 12.578035-22.936416 23.6763 0 12.578035 11.83815 23.676301 22.936416 23.676301 17.757225 0 29.595376-11.83815 29.595376-23.676301s-11.83815-23.676301-29.595376-23.6763zM501.641618 401.017341c17.757225 0 29.595376-12.578035 29.595376-29.595376 0-17.757225-11.83815-29.595376-29.595376-29.595375s-35.514451 11.83815-35.51445 29.595375 17.757225 29.595376 35.51445 29.595376zM706.589595 513.479769c-11.83815 0-22.936416 12.578035-22.936416 23.6763 0 12.578035 11.83815 23.676301 22.936416 23.676301 17.757225 0 29.595376-11.83815 29.595376-23.676301s-11.83815-23.676301-29.595376-23.6763z" fill="#28C445" p-id="8827"></path><path d="M510.520231 2.959538C228.624277 2.959538 0 231.583815 0 513.479769s228.624277 510.520231 510.520231 510.520231 510.520231-228.624277 510.520231-510.520231-228.624277-510.520231-510.520231-510.520231zM413.595376 644.439306c-29.595376 0-53.271676-5.919075-81.387284-12.578034l-81.387283 41.433526 22.936416-71.768786c-58.450867-41.433526-93.965318-95.445087-93.965317-159.815029 0-113.202312 105.803468-201.988439 233.803468-201.98844 114.682081 0 216.046243 71.028902 236.023121 166.473989-7.398844-0.739884-14.797688-1.479769-22.196532-1.479769-110.982659 1.479769-198.289017 85.086705-198.289017 188.67052 0 17.017341 2.959538 33.294798 7.398844 49.572255-7.398844 0.739884-15.537572 1.479769-22.936416 1.479768z m346.265896 82.867052l17.757225 59.190752-63.630058-35.514451c-22.936416 5.919075-46.612717 11.83815-70.289017 11.83815-111.722543 0-199.768786-76.947977-199.768786-172.393063-0.739884-94.705202 87.306358-171.653179 198.289017-171.65318 105.803468 0 199.028902 77.687861 199.028902 172.393064 0 53.271676-34.774566 100.624277-81.387283 136.138728z" fill="#28C445" p-id="8828"></path></svg>
|
||||||
|
After Width: | Height: | Size: 2.1 KiB |
@@ -0,0 +1 @@
|
|||||||
|
<svg t="1706500361500" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4266" width="64" height="64"><path d="M515.291429 832.548571a321.718857 321.718857 0 0 1-228.608-94.464 320 320 0 0 1-94.756572-228.096 320 320 0 0 1 94.72-228.059428 321.718857 321.718857 0 0 1 228.644572-94.464c46.226286 0 90.953143 9.508571 132.790857 28.452571 15.469714 6.948571 22.418286 25.161143 15.469714 40.594286a30.756571 30.756571 0 0 1-40.594286 15.469714 260.571429 260.571429 0 0 0-107.666285-23.04 260.388571 260.388571 0 0 0-185.124572 76.434286 258.925714 258.925714 0 0 0-76.653714 184.539429c0 69.668571 27.209143 135.277714 76.653714 184.502857a260.388571 260.388571 0 0 0 185.124572 76.434285 261.12 261.12 0 0 0 175.981714-67.84c47.908571-43.410286 77.897143-99.986286 84.443428-163.949714a30.829714 30.829714 0 0 1 33.645715-27.538286 30.829714 30.829714 0 0 1 27.538285 33.682286c-8.082286 79.104-45.129143 149.577143-104.265142 203.227429a321.755429 321.755429 0 0 1-217.344 84.114285z m290.377142-531.602285a30.72 30.72 0 0 0-43.483428-0.109715L512 550.326857l-108.470857-108.178286a30.72 30.72 0 1 0-43.373714 43.593143l130.157714 129.865143a30.683429 30.683429 0 0 0 43.52 0l271.725714-271.177143a30.72 30.72 0 0 0 0.109714-43.483428z" fill="#2A77FF" p-id="4267"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 122 KiB |
@@ -0,0 +1 @@
|
|||||||
|
<svg t="1706421982466" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9853" width="32" height="32"><path d="M230.404 576.536c-12.087 9.728-25.043 23.93-28.805 41.984-5.12 24.666-1.069 55.541 22.728 79.761 28.828 29.362 72.637 37.398 91.56 38.779 51.4 3.717 106.184-21.772 147.477-50.844 16.184-11.42 43.899-34.349 70.39-69.721-59.37-30.653-133.477-64.557-212.703-61.24-40.47 1.692-69.454 10.084-90.647 21.281z m752.859 135.545C1009.463 650.574 1024 582.968 1024 512 1024 229.688 794.335 0 512 0 229.665 0 0 229.688 0 512c0 282.335 229.665 512 512 512 170.385 0 321.491-83.723 414.631-212.124-87.997-43.742-233.027-115.734-322.36-159.299-42.63 48.596-105.65 97.303-176.84 118.495-44.722 13.29-85.037 18.365-127.199 9.75-41.739-8.548-72.481-28.093-90.401-47.683-9.127-9.995-19.612-22.706-27.203-37.82a71.25 71.25 0 0 0 1.202 3.049s-4.363-7.524-7.702-19.5a85.994 85.994 0 0 1-3.34-18.143 93.517 93.517 0 0 1-0.2-13.045c-0.378-7.702-0.066-15.783 1.67-24.064 4.185-20.235 12.822-43.81 35.172-65.692 49.063-48.039 114.777-50.621 148.814-50.42 50.421 0.289 138.04 22.35 211.812 48.439 20.436-43.52 33.547-90.068 42.007-121.1H305.308v-33.168h157.518v-66.337H272.139v-33.169h190.687v-66.315c0-9.105 1.803-16.584 16.584-16.584h74.619v82.899h207.293v33.169H554.029v66.337h165.82s-16.65 92.828-68.719 184.32c115.557 41.272 278.128 104.849 332.133 126.086z" fill="#1296DB" p-id="9854"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.4 KiB |
@@ -67,4 +67,4 @@ window.activity = {
|
|||||||
return false
|
return false
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,192 +1,191 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="padding-bottom: 20px;">
|
<div style="padding-bottom: 20px">
|
||||||
|
<van-form readonly input-align="right">
|
||||||
|
<div class="van-cell-group__title">
|
||||||
|
<div class="van-sidebar-item van-sidebar-item--select">申请信息</div>
|
||||||
|
</div>
|
||||||
|
<van-cell-group>
|
||||||
|
<van-field readonly :value="viewData.manager_name" label="申请人"></van-field>
|
||||||
|
<!-- <van-field readonly :value="viewData.apply_time" label="申请时间"></van-field>-->
|
||||||
|
<van-field readonly :value="viewData.be_username" label="慰问对象"></van-field>
|
||||||
|
<van-field readonly :value="viewData.typename" name="type" label="慰问类型"></van-field>
|
||||||
|
<van-field readonly :value="viewData.money" type="number" label="慰问金额"></van-field>
|
||||||
|
<van-field readonly :value="viewData.way" name="way" label="慰问方式"></van-field>
|
||||||
|
<van-field readonly :value="viewData.occur_time" name="occur_time" label="慰问时间"></van-field>
|
||||||
|
<van-field
|
||||||
|
readonly
|
||||||
|
:value="viewData.birth_child_num"
|
||||||
|
name="birth_child_num"
|
||||||
|
v-if="viewData.type === '2'"
|
||||||
|
label="生育孩次"
|
||||||
|
></van-field>
|
||||||
|
<template v-if="viewData.type === '3' || viewData.type === '4'">
|
||||||
|
<van-field readonly :value="viewData.the_hospital" name="the_hospital" label="治疗医院"></van-field>
|
||||||
|
<van-field readonly :value="viewData.the_hospital_house_num" name="the_hospital_house_num" label="病房号"></van-field>
|
||||||
|
<van-field readonly :value="viewData.the_hospital_house_bed_num" name="the_hospital_house_bed_num" label="床号"></van-field>
|
||||||
|
<van-field readonly :value="viewData.hospital_by" name="hospital_by" v-if="viewData.type === '4'" label="患病病种"></van-field>
|
||||||
|
</template>
|
||||||
|
<van-field
|
||||||
|
readonly
|
||||||
|
:value="viewData.deadImmediateFamily"
|
||||||
|
name="deadImmediateFamily"
|
||||||
|
v-if="viewData.type === '6'"
|
||||||
|
label="直系亲属"
|
||||||
|
></van-field>
|
||||||
|
<van-field
|
||||||
|
readonly
|
||||||
|
:value="viewData.remark"
|
||||||
|
label="申请事由"
|
||||||
|
input-align="left"
|
||||||
|
style="flex-flow: column"
|
||||||
|
rows="2"
|
||||||
|
maxlength="200"
|
||||||
|
type="textarea"
|
||||||
|
show-word-limit
|
||||||
|
autosize
|
||||||
|
></van-field>
|
||||||
|
<van-field label="附件" style="flex-flow: column" input-align="left">
|
||||||
|
<template #label>
|
||||||
|
<div class="mb10">附  件</div>
|
||||||
|
</template>
|
||||||
|
<template #input>
|
||||||
|
<vant-file-upload
|
||||||
|
:files.sync="viewData.files"
|
||||||
|
view
|
||||||
|
:del="false"
|
||||||
|
v-if="viewData.files && viewData.files.length"
|
||||||
|
></vant-file-upload>
|
||||||
|
<span v-else>暂无</span>
|
||||||
|
</template>
|
||||||
|
</van-field>
|
||||||
|
|
||||||
<van-form readonly input-align="right">
|
<van-field name="sign" label="签字">
|
||||||
<div class="van-cell-group__title">
|
<template #input>
|
||||||
<div class="van-sidebar-item van-sidebar-item--select">
|
<van-image width="200" height="100" :src="viewData.manager_sign_data" v-if="viewData.manager_sign_data" />
|
||||||
申请信息
|
<span v-else>暂无</span>
|
||||||
</div>
|
</template>
|
||||||
</div>
|
</van-field>
|
||||||
<van-cell-group>
|
</van-cell-group>
|
||||||
<van-field readonly :value="viewData.manager_name" label="申请人"></van-field>
|
</van-form>
|
||||||
<van-field readonly :value="viewData.apply_time" label="申请时间"></van-field>
|
|
||||||
<van-field readonly :value="viewData.be_username" label="慰问对象"></van-field>
|
<template v-if="viewData.ucr">
|
||||||
<van-field readonly :value="viewData.typename" name="type" label="慰问类型"></van-field>
|
<div class="van-cell-group__title mt20">
|
||||||
<van-field readonly :value="viewData.money" type="number" label="慰问金额"></van-field>
|
<div class="van-sidebar-item van-sidebar-item--select">分工会审核信息</div>
|
||||||
<van-field readonly :value="viewData.way" name="way" label="慰问方式"></van-field>
|
</div>
|
||||||
<van-field readonly :value="viewData.occur_time" name="occur_time" label="慰问时间"></van-field>
|
<van-cell-group>
|
||||||
<van-field readonly :value="viewData.birth_child_num" name="birth_child_num" v-if="viewData.type === '2'" label="生育孩次"></van-field>
|
<div style="padding-left: 16px">
|
||||||
<template v-if="viewData.type === '3' || viewData.type === '4'">
|
<van-field label="审 核 人" :value="viewData.ucr.username" left-icon="contact" readonly></van-field>
|
||||||
<van-field readonly :value="viewData.the_hospital" name="the_hospital" label="治疗医院"></van-field>
|
<van-field label="审核时间" :value="viewData.ucr.time" left-icon="clock-o" readonly></van-field>
|
||||||
<van-field readonly :value="viewData.the_hospital_house_num" name="the_hospital_house_num" label="病房号"></van-field>
|
<van-field label="审核意见" left-icon="chat-o" :value="viewData.ucr.opinion ? viewData.ucr.opinion : '暂无'" readonly></van-field>
|
||||||
<van-field readonly :value="viewData.the_hospital_house_bed_num" name="the_hospital_house_bed_num" label="床号"></van-field>
|
<van-field name="sign" label="签字">
|
||||||
<van-field readonly :value="viewData.hospital_by" name="hospital_by" v-if="viewData.type === '4'" label="患病病种"></van-field>
|
<template #input>
|
||||||
|
<van-image width="200" height="100" :src="viewData.ucr.sign" v-if="viewData.ucr.sign" />
|
||||||
|
<span v-else>暂无</span>
|
||||||
|
</template>
|
||||||
|
</van-field>
|
||||||
|
</div>
|
||||||
|
</van-cell-group>
|
||||||
</template>
|
</template>
|
||||||
<van-field readonly :value="viewData.deadImmediateFamily" name="deadImmediateFamily" v-if="viewData.type === '6'" label="直系亲属"></van-field>
|
|
||||||
<van-field readonly :value="viewData.remark" label="申请事由"
|
|
||||||
input-align="left"
|
|
||||||
style="flex-flow: column"
|
|
||||||
rows="2" maxlength="200" type="textarea" show-word-limit autosize></van-field>
|
|
||||||
<van-field label="附件" style="flex-flow: column" input-align="left">
|
|
||||||
<template #label>
|
|
||||||
<div class="mb10">附  件</div>
|
|
||||||
</template>
|
|
||||||
<template #input>
|
|
||||||
<vant-file-upload :files.sync="viewData.files" view :del="false"
|
|
||||||
v-if="viewData.files&&viewData.files.length"></vant-file-upload>
|
|
||||||
<span v-else>暂无</span>
|
|
||||||
</template>
|
|
||||||
</van-field>
|
|
||||||
|
|
||||||
<van-field name="sign" label="签字">
|
<template v-if="viewData.fr">
|
||||||
<template #input>
|
<div class="van-cell-group__title mt20">
|
||||||
<van-image width="200" height="100" :src="viewData.manager_sign_data"
|
<div class="van-sidebar-item van-sidebar-item--select">校工会审核信息</div>
|
||||||
v-if="viewData.manager_sign_data"/>
|
</div>
|
||||||
<span v-else>暂无</span>
|
<van-cell-group>
|
||||||
</template>
|
<div style="padding-left: 16px">
|
||||||
</van-field>
|
<van-field label="审 核 人" :value="viewData.fr.username" left-icon="contact" readonly></van-field>
|
||||||
</van-cell-group>
|
<van-field label="审核时间" :value="viewData.fr.time" left-icon="clock-o" readonly></van-field>
|
||||||
</van-form>
|
<van-field label="审核意见" left-icon="chat-o" :value="viewData.fr.opinion ? viewData.fr.opinion : '暂无'" readonly></van-field>
|
||||||
|
<van-field name="sign" label="签字">
|
||||||
|
<template #input>
|
||||||
|
<van-image width="200" height="100" :src="viewData.fr.sign" v-if="viewData.fr.sign" />
|
||||||
|
<span v-else>暂无</span>
|
||||||
|
</template>
|
||||||
|
</van-field>
|
||||||
|
</div>
|
||||||
|
</van-cell-group>
|
||||||
|
</template>
|
||||||
|
|
||||||
<template v-if="viewData.ucr">
|
<template v-if="viewData.vcr">
|
||||||
<div class="van-cell-group__title mt20">
|
<div class="van-cell-group__title mt20">
|
||||||
<div class="van-sidebar-item van-sidebar-item--select">
|
<div class="van-sidebar-item van-sidebar-item--select">校工会主席审核信息</div>
|
||||||
分工会审核信息
|
</div>
|
||||||
</div>
|
<van-cell-group>
|
||||||
</div>
|
<div style="padding-left: 16px">
|
||||||
<van-cell-group>
|
<van-field label="审 核 人" :value="viewData.vcr.username" left-icon="contact" readonly></van-field>
|
||||||
<div style="padding-left: 16px">
|
<van-field label="审核时间" :value="viewData.vcr.time" left-icon="clock-o" readonly></van-field>
|
||||||
<van-field label="审 核 人" :value="viewData.ucr.username" left-icon="contact"
|
<van-field label="审核意见" left-icon="chat-o" :value="viewData.vcr.opinion ? viewData.vcr.opinion : '暂无'" readonly></van-field>
|
||||||
readonly></van-field>
|
<van-field name="sign" label="签字">
|
||||||
<van-field label="审核时间" :value="viewData.ucr.time" left-icon="clock-o"
|
<template #input>
|
||||||
readonly></van-field>
|
<van-image width="200" height="100" :src="viewData.vcr.sign" v-if="viewData.vcr.sign" />
|
||||||
<van-field label="审核意见" left-icon="chat-o"
|
<span v-else>暂无</span>
|
||||||
:value="viewData.ucr.opinion ? viewData.ucr.opinion : '暂无'"
|
</template>
|
||||||
readonly></van-field>
|
</van-field>
|
||||||
<van-field name="sign" label="签字">
|
</div>
|
||||||
<template #input>
|
</van-cell-group>
|
||||||
<van-image width="200" height="100" :src="viewData.ucr.sign"
|
</template>
|
||||||
v-if="viewData.ucr.sign"/>
|
|
||||||
<span v-else>暂无</span>
|
|
||||||
</template>
|
|
||||||
</van-field>
|
|
||||||
</div>
|
|
||||||
</van-cell-group>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template v-if="viewData.fr">
|
<template v-if="handle">
|
||||||
<div class="van-cell-group__title mt20">
|
<slot name="handle"></slot>
|
||||||
<div class="van-sidebar-item van-sidebar-item--select">
|
</template>
|
||||||
校工会审核信息
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<van-cell-group>
|
|
||||||
<div style="padding-left: 16px">
|
|
||||||
<van-field label="审 核 人" :value="viewData.fr.username" left-icon="contact"
|
|
||||||
readonly></van-field>
|
|
||||||
<van-field label="审核时间" :value="viewData.fr.time" left-icon="clock-o"
|
|
||||||
readonly></van-field>
|
|
||||||
<van-field label="审核意见" left-icon="chat-o"
|
|
||||||
:value="viewData.fr.opinion ? viewData.fr.opinion : '暂无'"
|
|
||||||
readonly></van-field>
|
|
||||||
<van-field name="sign" label="签字">
|
|
||||||
<template #input>
|
|
||||||
<van-image width="200" height="100" :src="viewData.fr.sign"
|
|
||||||
v-if="viewData.fr.sign"/>
|
|
||||||
<span v-else>暂无</span>
|
|
||||||
</template>
|
|
||||||
</van-field>
|
|
||||||
</div>
|
|
||||||
</van-cell-group>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
|
|
||||||
<template v-if="viewData.vcr">
|
|
||||||
<div class="van-cell-group__title mt20">
|
|
||||||
<div class="van-sidebar-item van-sidebar-item--select">
|
|
||||||
校工会主席审核信息
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<van-cell-group>
|
|
||||||
<div style="padding-left: 16px">
|
|
||||||
<van-field label="审 核 人" :value="viewData.vcr.username" left-icon="contact"
|
|
||||||
readonly></van-field>
|
|
||||||
<van-field label="审核时间" :value="viewData.vcr.time" left-icon="clock-o"
|
|
||||||
readonly></van-field>
|
|
||||||
<van-field label="审核意见" left-icon="chat-o"
|
|
||||||
:value="viewData.vcr.opinion ? viewData.vcr.opinion : '暂无'"
|
|
||||||
readonly></van-field>
|
|
||||||
<van-field name="sign" label="签字">
|
|
||||||
<template #input>
|
|
||||||
<van-image width="200" height="100" :src="viewData.vcr.sign"
|
|
||||||
v-if="viewData.vcr.sign"/>
|
|
||||||
<span v-else>暂无</span>
|
|
||||||
</template>
|
|
||||||
</van-field>
|
|
||||||
</div>
|
|
||||||
</van-cell-group>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template v-if="handle">
|
|
||||||
<slot name="handle"></slot>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
module.exports = {
|
module.exports = {
|
||||||
props: {
|
props: {
|
||||||
handle: {
|
handle: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: "审核"
|
||||||
|
},
|
||||||
|
id: {
|
||||||
|
type: String,
|
||||||
|
default: ""
|
||||||
|
}
|
||||||
},
|
},
|
||||||
title: {
|
data() {
|
||||||
type: String,
|
return {
|
||||||
default: '审核'
|
viewData: {}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
id: {
|
components: {
|
||||||
type: String,
|
"vant-file-upload": httpVueLoader("/components/plugins/VantFileUpload.vue")
|
||||||
default: ''
|
|
||||||
},
|
},
|
||||||
},
|
methods: {
|
||||||
data() {
|
async getInfo(id) {
|
||||||
return {
|
const { data, code, msg } = await $.get("/platform/fw/condolence/findOne", { id })
|
||||||
viewData: {},
|
if (data) {
|
||||||
|
condolence.toFormData(data)
|
||||||
|
this.viewData = data
|
||||||
|
this.viewData.hospital_stay = data.starting_time + "-" + data.end_time
|
||||||
|
} else {
|
||||||
|
this.viewData = {}
|
||||||
|
this.$toast.fail("获取信息失败")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
if (this.id) {
|
||||||
|
await this.getInfo(this.id)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
components: {
|
|
||||||
'vant-file-upload': httpVueLoader('/components/plugins/VantFileUpload.vue')
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
async getInfo(id) {
|
|
||||||
const {data, code, msg} = await $.get("/platform/fw/condolence/findOne", {id})
|
|
||||||
if (data) {
|
|
||||||
condolence.toFormData(data)
|
|
||||||
this.viewData = data
|
|
||||||
this.viewData.hospital_stay = data.starting_time + "-" + data.end_time
|
|
||||||
} else {
|
|
||||||
this.viewData = {}
|
|
||||||
this.$toast.fail('获取信息失败');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
async created() {
|
|
||||||
await this.getInfo(this.id)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.van-cell-group__title {
|
.van-cell-group__title {
|
||||||
padding-left: 0 !important;
|
padding-left: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.van-sidebar-item {
|
.van-sidebar-item {
|
||||||
font-size: 16px !important;
|
font-size: 16px !important;
|
||||||
text-indent: 4px !important;
|
text-indent: 4px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.van-sidebar-item--select::before {
|
.van-sidebar-item--select::before {
|
||||||
left: 5px !important;
|
left: 5px !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,369 +1,411 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="display: flex;align-items: center;justify-content: center">
|
<div style="display: flex;align-items: center;justify-content: center">
|
||||||
<el-form :model="formData" ref="form" :rules="formRules" v-loading="loading" label-width="170px"
|
<el-form :model="formData" ref="form" :rules="formRules" v-loading="loading" label-width="170px"
|
||||||
style="width: 1000px">
|
style="width: 1000px">
|
||||||
|
|
||||||
<vi-title title="申请变更"></vi-title>
|
<vi-title title="申请变更"></vi-title>
|
||||||
|
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="工  号">
|
<el-form-item label="工  号">
|
||||||
<el-input :value="formData.loginname" disabled></el-input>
|
<el-input :value="formData.loginname" disabled></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="姓  名">
|
<el-form-item label="姓  名">
|
||||||
<el-input :value="formData.username" disabled></el-input>
|
<el-input :value="formData.username" disabled></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="所在单位">
|
<el-form-item label="所在单位">
|
||||||
<el-input :value="formData.unitname" disabled></el-input>
|
<el-input :value="formData.unitname" disabled></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="所在工会">
|
<el-form-item label="所在工会">
|
||||||
<el-input :value="formData.unionname"
|
<el-input :value="formData.unionname"
|
||||||
disabled></el-input>
|
disabled></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-form-item label="变更时间">
|
<el-form-item label="变更时间">
|
||||||
<el-input :value="formData.auditTime" disabled></el-input>
|
<el-input :value="formData.auditTime" disabled></el-input>
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<el-form-item prop="type" label="变更类型">
|
|
||||||
<!-- <dict-select v-model="formData.type" style="width: 100%" clearable placeholder="变更类型"-->
|
|
||||||
<!-- code="MemberChangeType" @change="typeChange"></dict-select>-->
|
|
||||||
<el-select v-model="formData.type" style="width: 100%" clearable placeholder="变更类型" @change="typeChange">
|
|
||||||
<el-option v-for="item in userChangeTypeList" :label="item.name" :value="item.code" :key="item.id"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<!--异动-->
|
|
||||||
<div v-if="formData.type==='1'">
|
|
||||||
<el-form-item prop="type" label="新 单 位">
|
|
||||||
<el-select v-model="formData.currentUnitId" style="width: 100%" filterable clearable
|
|
||||||
@change="unitChange"
|
|
||||||
placeholder="请选择单位">
|
|
||||||
<el-option
|
|
||||||
v-for="item in unitOptions"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<el-form-item prop="type" label="新 工 会">
|
|
||||||
<el-input :value="formData.currentUnionName" disabled placeholder=""></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<el-row :gutter="20" v-if="isThreeUnit">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="新科室" prop="currentThreeUnitId">
|
|
||||||
<el-select v-model="formData.currentThreeUnitId" clearable filterable
|
|
||||||
placeholder="请选择新科室"
|
|
||||||
@change="threeUnitChange"
|
|
||||||
style="width: 100%">
|
|
||||||
<el-option
|
|
||||||
v-for="item in threeUnits"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
<el-form-item prop="type" label="变更类型">
|
||||||
<el-form-item label="工会小组">
|
<!-- <dict-select v-model="formData.type" style="width: 100%" clearable placeholder="变更类型"-->
|
||||||
<el-input :value="formData.currentUnionGroupName" disabled></el-input>
|
<!-- code="MemberChangeType" @change="typeChange"></dict-select>-->
|
||||||
|
<el-select v-model="formData.type" style="width: 100%" clearable placeholder="变更类型"
|
||||||
|
@change="typeChange">
|
||||||
|
<el-option v-for="item in userChangeTypeList" :label="item.name" :value="item.code"
|
||||||
|
:key="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-else-if="welfare_member&&['2'].includes(formData.type)">
|
<!--异动-->
|
||||||
<el-form-item prop="updateWelfareMember" label="福利会员">
|
<div v-if="formData.type==='1'">
|
||||||
<el-radio-group v-model="formData.updateWelfareMember" size="small">
|
<el-row :gutter="20">
|
||||||
<el-radio :label="true" border>享受福利</el-radio>
|
<el-col :span="12">
|
||||||
<el-radio :label="false" border>不享受福利</el-radio>
|
<el-form-item prop="type" label="新单位">
|
||||||
</el-radio-group>
|
<el-select v-model="formData.currentUnitId" style="width: 100%" filterable clearable
|
||||||
</el-form-item>
|
@change="unitChange"
|
||||||
<el-form-item prop="insertMember" label="工会会员">
|
placeholder="请选择单位">
|
||||||
<el-radio-group v-model="formData.insertMember" size="small">
|
<el-option
|
||||||
<el-radio :label="true" border>成为会员</el-radio>
|
v-for="item in unitOptions"
|
||||||
<el-radio :label="false" border>不成为会员</el-radio>
|
:label="item.name"
|
||||||
</el-radio-group>
|
:value="item.id">
|
||||||
</el-form-item>
|
</el-option>
|
||||||
</div>
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
<div v-else-if="welfare_member&&['7'].includes(formData.type)">
|
<el-col :span="12">
|
||||||
<el-form-item prop="updateWelfareMember" label="福利会员">
|
<el-form-item prop="type" label="新工会">
|
||||||
<el-radio-group v-model="formData.updateWelfareMember" size="small">
|
<el-input :value="formData.currentUnionName" readonly placeholder="选择单位后自动填充"></el-input>
|
||||||
<el-radio :label="true" border>享受福利</el-radio>
|
</el-form-item>
|
||||||
<el-radio :label="false" border>不享受福利</el-radio>
|
</el-col>
|
||||||
</el-radio-group>
|
</el-row>
|
||||||
</el-form-item>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-else-if="welfare_member&&['3','4','5','6','8'].includes(formData.type)">
|
<el-row :gutter="20" v-if="isThreeUnit">
|
||||||
<el-form-item prop="updateWelfare" label="福利会员">
|
<el-col :span="12">
|
||||||
<el-radio-group v-model="formData.updateWelfare" size="small">
|
<el-form-item label="新科室" prop="currentThreeUnitId">
|
||||||
<el-radio :label="true" border>取消享受福利</el-radio>
|
<el-select v-model="formData.currentThreeUnitId" clearable filterable
|
||||||
<el-radio :label="false" border>保留享受福利</el-radio>
|
placeholder="请选择新科室"
|
||||||
</el-radio-group>
|
@change="threeUnitChange"
|
||||||
<!-- <span style="color: red">   温馨提醒:此操作将取消该教工正式会员资格</span>-->
|
style="width: 100%">
|
||||||
</el-form-item>
|
<el-option
|
||||||
|
v-for="item in threeUnits"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="工会小组">
|
||||||
|
<el-input :value="formData.currentUnionGroupName" readonly placeholder="选择科室后自动填充"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
|
||||||
<el-form-item prop="updateMember" label="工会会员">
|
<div v-else-if="welfare_member&&['2'].includes(formData.type)">
|
||||||
<el-radio-group v-model="formData.updateMember" size="small">
|
<el-row :gutter="20">
|
||||||
<el-radio :label="true" border>取消会员资格</el-radio>
|
<el-col :span="12">
|
||||||
<el-radio :label="false" border>保留会员资格</el-radio>
|
<el-form-item prop="updateWelfareMember" label="福利会员">
|
||||||
</el-radio-group>
|
<el-radio-group v-model="formData.updateWelfareMember" size="small">
|
||||||
</el-form-item>
|
<el-radio :label="true" border>享受福利</el-radio>
|
||||||
|
<el-radio :label="false" border>不享受福利</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item prop="updateMember" label="工会会员">
|
||||||
|
<el-radio-group v-model="formData.updateMember" size="small">
|
||||||
|
<el-radio :label="true" border>成为会员</el-radio>
|
||||||
|
<el-radio :label="false" border>不成为会员</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
|
||||||
<el-form-item prop="updateUserState" label="是否改变在职状态" style="width: 100%"
|
<div v-else-if="welfare_member&&['7'].includes(formData.type)">
|
||||||
v-if="welfare_member&&['3','4','5','6','8'].includes(formData.type)">
|
<el-form-item prop="updateWelfareMember" label="福利会员">
|
||||||
<dict-select v-model="formData.userState" style="width: 100%" clearable placeholder="变更类型"
|
<el-radio-group v-model="formData.updateWelfareMember" size="small">
|
||||||
code="userState"></dict-select>
|
<el-radio :label="true" border>享受福利</el-radio>
|
||||||
</el-form-item>
|
<el-radio :label="false" border>不享受福利</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
|
||||||
<el-form-item prop="updateUserState" label="是否改变人员类型" style="width: 100%"
|
<div v-else-if="welfare_member&&['3','4','5','6','8'].includes(formData.type)">
|
||||||
v-if="welfare_member&&['3','4','5','6','8'].includes(formData.type)">
|
<el-row :gutter="20">
|
||||||
<dict-select v-model="formData.personType" style="width: 100%" clearable
|
<el-col :span="12">
|
||||||
placeholder="人员类型"
|
<el-form-item prop="updateWelfareMember" label="福利会员">
|
||||||
code="UserType"></dict-select>
|
<el-radio-group v-model="formData.updateWelfareMember" size="small">
|
||||||
</el-form-item>
|
<el-radio :label="true" border>保留享受福利</el-radio>
|
||||||
</div>
|
<el-radio :label="false" border>取消享受福利</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item prop="updateMember" label="工会会员">
|
||||||
|
<el-radio-group v-model="formData.updateMember" size="small">
|
||||||
|
<el-radio :label="true" border>保留会员资格</el-radio>
|
||||||
|
<el-radio :label="false" border>取消会员资格</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item prop="userState" label="原在职状态">
|
||||||
|
<el-input v-model="formData.userState" readonly placeholder="原在职状态"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item prop="updateUserState" label="是否改变在职状态" style="width: 100%">
|
||||||
|
<dict-select v-model="formData.changeUserState" style="width: 100%" clearable
|
||||||
|
placeholder="是否改变在职状态"
|
||||||
|
code="userState"></dict-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item prop="personType" label="原人员类型">
|
||||||
|
<el-input v-model="formData.personType" readonly placeholder="原人员类型"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item prop="updateUserState" label="是否改变人员类型" style="width: 100%">
|
||||||
|
<dict-select v-model="formData.changePersonType" style="width: 100%" clearable
|
||||||
|
placeholder="是否改变人员类型"
|
||||||
|
code="UserType"></dict-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div v-else-if="formData.type==='10'">
|
<div v-else-if="formData.type==='10'">
|
||||||
<el-form-item prop="oldIdCard" label="原身份证号" style="width: 100%">
|
<el-form-item prop="oldIdCard" label="原身份证号" style="width: 100%">
|
||||||
<el-input v-model="formData.oldIdCard" readonly type="text"></el-input>
|
<el-input v-model="formData.oldIdCard" readonly type="text"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="idCard" label="新的身份证号" style="width: 100%">
|
<el-form-item prop="idCard" label="新的身份证号" style="width: 100%">
|
||||||
<el-input v-model="formData.idCard" placeholder="请输入新的身份证号" type="text"></el-input>
|
<el-input v-model="formData.changeIdCard" placeholder="请输入新的身份证号" type="text"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else-if="formData.type==='11'">
|
<div v-else-if="formData.type==='11'">
|
||||||
<el-form-item prop="oldMobile" label="原手机号码" style="width: 100%">
|
<el-form-item prop="oldMobile" label="原手机号码" style="width: 100%">
|
||||||
<el-input v-model="formData.oldMobile" readonly type="text"></el-input>
|
<el-input v-model="formData.oldMobile" readonly type="text"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="mobile" label="新的手机号码" style="width: 100%">
|
<el-form-item prop="mobile" label="新的手机号码" style="width: 100%">
|
||||||
<el-input v-model="formData.mobile" placeholder="请输入新的手机号码" type="text"></el-input>
|
<el-input v-model="formData.changeMobile" placeholder="请输入新的手机号码" type="text"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else-if="formData.type==='12'">
|
<div v-else-if="formData.type==='12'">
|
||||||
<el-form-item prop="oldEducation" label="原学历" style="width: 100%">
|
<el-form-item prop="oldEducation" label="原学历" style="width: 100%">
|
||||||
<el-input v-model="formData.oldEducation" readonly type="text"></el-input>
|
<el-input v-model="formData.oldEducation" readonly type="text"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="education" label="新的学历" style="width: 100%">
|
<el-form-item prop="education" label="新的学历" style="width: 100%">
|
||||||
<dict-select v-model="formData.education" style="width: 100%" clearable placeholder="请选择新的学历"
|
<dict-select v-model="formData.changeEducation" style="width: 100%" clearable
|
||||||
code="Education"></dict-select>
|
placeholder="请选择新的学历"
|
||||||
</el-form-item>
|
code="Education"></dict-select>
|
||||||
</div>
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- <div v-else-if="welfare_member&&['2','7'].includes(formData.type)">
|
<!-- <div v-else-if="welfare_member&&['2','7'].includes(formData.type)">
|
||||||
<el-form-item prop="updateWelfareMember" label="是否享受福利">
|
<el-form-item prop="updateWelfareMember" label="是否享受福利">
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="formData.updateWelfareMember"
|
v-model="formData.updateWelfareMember"
|
||||||
active-color="#13ce66"
|
active-color="#13ce66"
|
||||||
inactive-color="#ff4949">
|
inactive-color="#ff4949">
|
||||||
</el-switch>
|
</el-switch>
|
||||||
<span style="color: red">   温馨提醒:此操作将该教工设为正式会员</span>
|
<span style="color: red">   温馨提醒:此操作将该教工设为正式会员</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>-->
|
</div>-->
|
||||||
|
|
||||||
<el-form-item prop="remark" label="变化原因">
|
<el-form-item prop="remark" label="变化原因">
|
||||||
<el-input v-model="formData.remark" placeholder="变化原因" type="textarea" :rows="4"></el-input>
|
<el-input v-model="formData.remark" placeholder="变化原因" type="textarea" :rows="4"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-row style="display: flex;justify-content:flex-end;">
|
<el-row style="display: flex;justify-content:flex-end;">
|
||||||
<el-button @click="doSubmit" :loading="submitLoading" :disabled="disabled" type="primary">
|
<el-button @click="doSubmit" :loading="submitLoading" :disabled="disabled" type="primary">
|
||||||
提交
|
提交
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
module.exports = {
|
module.exports = {
|
||||||
components: {
|
components: {
|
||||||
'dict-select': httpVueLoader('/components/plugins/DictSelect.vue?v=1.0.0'),
|
'dict-select': httpVueLoader('/components/plugins/DictSelect.vue?v=1.0.0'),
|
||||||
},
|
|
||||||
props: {
|
|
||||||
userid: {type: String},
|
|
||||||
welfare_member: {type: Boolean, default: true},
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
loading: true,
|
|
||||||
disabled: false,
|
|
||||||
submitLoading: false,
|
|
||||||
|
|
||||||
formData: {},
|
|
||||||
formRules: {
|
|
||||||
type: [{required: true, message: '必选', trigger: ['blur', 'change']}],
|
|
||||||
updateWelfareMember: [{required: true, message: '必选', trigger: ['blur', 'change']}],
|
|
||||||
updateMember: [{required: true, message: '必选', trigger: ['blur', 'change']}],
|
|
||||||
updateWelfare: [{required: true, message: '必选', trigger: ['blur', 'change']}],
|
|
||||||
currentUnitId: [{required: true, message: '必选', trigger: ['blur', 'change']}],
|
|
||||||
currentThreeUnitId: [{required: true, message: '请选择新三级单位', trigger: 'change'}],
|
|
||||||
idCard: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
||||||
mobile: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
||||||
education: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
||||||
insertMember: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
||||||
},
|
|
||||||
|
|
||||||
unitOptions: [],
|
|
||||||
threeUnits: [],
|
|
||||||
isThreeUnit: false,
|
|
||||||
|
|
||||||
userChangeTypeList:[],
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
userid(val) {
|
|
||||||
this.flush()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
typeChange() {
|
|
||||||
this.$set(this.formData, "updateWelfareMember", ['2','7'].includes(this.formData.type))
|
|
||||||
this.$set(this.formData, "updateWelfare", ['2', '3', '4', '5', '6', '8'].includes(this.formData.type))
|
|
||||||
this.$set(this.formData, "updateMember", ['2', '3', '4', '5', '6', '8'].includes(this.formData.type))
|
|
||||||
this.$set(this.formData, "insertMember", ['2'].includes(this.formData.type))
|
|
||||||
},
|
},
|
||||||
async doSubmit() {
|
props: {
|
||||||
this.$refs["form"].validate((valid) => {
|
userid: {type: String},
|
||||||
if (valid) {
|
welfare_member: {type: Boolean, default: true},
|
||||||
this.submitLoading = true
|
},
|
||||||
this.$emit("submit", this.formData)
|
data() {
|
||||||
|
return {
|
||||||
|
loading: true,
|
||||||
|
disabled: false,
|
||||||
|
submitLoading: false,
|
||||||
|
|
||||||
|
formData: {},
|
||||||
|
formRules: {
|
||||||
|
type: [{required: true, message: '必选', trigger: ['blur', 'change']}],
|
||||||
|
updateWelfareMember: [{required: true, message: '必选', trigger: ['blur', 'change']}],
|
||||||
|
updateMember: [{required: true, message: '必选', trigger: ['blur', 'change']}],
|
||||||
|
updateWelfare: [{required: true, message: '必选', trigger: ['blur', 'change']}],
|
||||||
|
currentUnitId: [{required: true, message: '必选', trigger: ['blur', 'change']}],
|
||||||
|
currentThreeUnitId: [{required: true, message: '请选择新三级单位', trigger: 'change'}],
|
||||||
|
idCard: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
|
mobile: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
|
education: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
|
insertMember: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
|
},
|
||||||
|
|
||||||
|
unitOptions: [],
|
||||||
|
threeUnits: [],
|
||||||
|
isThreeUnit: false,
|
||||||
|
|
||||||
|
userChangeTypeList: [],
|
||||||
}
|
}
|
||||||
})
|
|
||||||
},
|
},
|
||||||
closeLoading() {
|
watch: {
|
||||||
this.submitLoading = false
|
userid(val) {
|
||||||
},
|
this.flush()
|
||||||
|
|
||||||
unitChange(v) {
|
|
||||||
// const unit = this.unitOptions.find(x => x.id === v)
|
|
||||||
// if (unit) {
|
|
||||||
// this.formData.currentUnionId = unit.unionid
|
|
||||||
// this.formData.currentUnionName = unit.unionname
|
|
||||||
// } else {
|
|
||||||
// this.formData.currentUnionId = ''
|
|
||||||
// this.formData.currentUnionName = ''
|
|
||||||
// }
|
|
||||||
|
|
||||||
this.$set(this.formData, 'currentThreeUnitId', null)
|
|
||||||
this.$set(this.formData, 'currentUnionGroupName', null)
|
|
||||||
this.threeUnits = []
|
|
||||||
if (v) {
|
|
||||||
this.getThreeUnits(v)
|
|
||||||
}
|
|
||||||
const unit = this.unitOptions.find(x => x.id === v)
|
|
||||||
if (unit) {
|
|
||||||
this.$set(this.formData, 'currentUnionId', unit.unionid)
|
|
||||||
this.$set(this.formData, 'currentUnionName', unit.unionname)
|
|
||||||
} else {
|
|
||||||
this.$set(this.formData, 'currentUnionId', null)
|
|
||||||
this.$set(this.formData, 'currentUnionName', null)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
async getThreeUnits(val) {
|
|
||||||
this.threeUnits = await threeUnitsByUnionGroupOrUnitId(val, null)
|
|
||||||
},
|
|
||||||
async threeUnitChange(val) {
|
|
||||||
if (val) {
|
|
||||||
const threeUnit = this.threeUnits.find(v => v.id === val)
|
|
||||||
const groupName = threeUnit.groupname
|
|
||||||
this.$set(this.formData, 'currentUnionGroupName', groupName)
|
|
||||||
} else {
|
|
||||||
this.$set(this.formData, 'currentUnionGroupName', null)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
async flush() {
|
|
||||||
this.loading = true
|
|
||||||
this.disabled = false
|
|
||||||
|
|
||||||
if (!this.userid) {
|
|
||||||
this.formData = {}
|
|
||||||
this.loading = false
|
|
||||||
this.disabled = true
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const resp = await $.get("/platform/member/common/userInfo", {userId: this.userid})
|
|
||||||
if (resp.code === 0) {
|
|
||||||
if (this.$refs["form"])
|
|
||||||
this.$refs["form"].resetFields();
|
|
||||||
|
|
||||||
this.formData = {
|
|
||||||
userId: resp.data.id,
|
|
||||||
loginname: resp.data.loginname,
|
|
||||||
username: resp.data.username,
|
|
||||||
unitname: resp.data.unitname,
|
|
||||||
unionname: resp.data.unionname,
|
|
||||||
originUnitId: resp.data.unitid,
|
|
||||||
originThreeUnitId: resp.data.threeUnitId,
|
|
||||||
originUnionId: resp.data.unionid,
|
|
||||||
userState: resp.data.userState,
|
|
||||||
personType: resp.data.personType,
|
|
||||||
auditTime: moment().format('YYYY-MM-DD'),
|
|
||||||
notes: null,
|
|
||||||
oldIdCard:resp.data.idcard,
|
|
||||||
oldMobile:resp.data.mobile,
|
|
||||||
oldEducation:resp.data.education
|
|
||||||
}
|
}
|
||||||
this.disabled = false
|
|
||||||
} else {
|
|
||||||
this.disabled = true
|
|
||||||
this.$notify.error({
|
|
||||||
title: '错误',
|
|
||||||
message: '获取用户信息失败'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
this.loading = false
|
|
||||||
},
|
},
|
||||||
async getUnits() {
|
methods: {
|
||||||
const resp = await $.post('/platform/member/change/mange/units')
|
typeChange(val) {
|
||||||
if (resp.code === 0) {
|
if (val == '1') {
|
||||||
this.unitOptions = resp.data
|
this.formData.updateWelfareMember = null
|
||||||
}
|
this.formData.updateMember = null
|
||||||
|
} else {
|
||||||
|
this.$set(this.formData, "updateWelfareMember", ['2', '7'].includes(this.formData.type))
|
||||||
|
this.$set(this.formData, "updateWelfareMember", !['3', '4', '5', '6', '8'].includes(this.formData.type))
|
||||||
|
this.$set(this.formData, "updateMember", ['2'].includes(this.formData.type))
|
||||||
|
this.$set(this.formData, "updateMember", !['3', '4', '5', '6', '8'].includes(this.formData.type))
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async doSubmit() {
|
||||||
|
this.$refs["form"].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.submitLoading = true
|
||||||
|
this.$emit("submit", this.formData)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
closeLoading() {
|
||||||
|
this.submitLoading = false
|
||||||
|
},
|
||||||
|
|
||||||
|
unitChange(v) {
|
||||||
|
// const unit = this.unitOptions.find(x => x.id === v)
|
||||||
|
// if (unit) {
|
||||||
|
// this.formData.currentUnionId = unit.unionid
|
||||||
|
// this.formData.currentUnionName = unit.unionname
|
||||||
|
// } else {
|
||||||
|
// this.formData.currentUnionId = ''
|
||||||
|
// this.formData.currentUnionName = ''
|
||||||
|
// }
|
||||||
|
this.$set(this.formData, 'currentThreeUnitId', null)
|
||||||
|
this.$set(this.formData, 'currentUnionGroupName', null)
|
||||||
|
this.threeUnits = []
|
||||||
|
if (v) {
|
||||||
|
this.getThreeUnits(v)
|
||||||
|
}
|
||||||
|
const unit = this.unitOptions.find(x => x.id === v)
|
||||||
|
this.isThreeUnit = unit.unionname.includes("机关");
|
||||||
|
if (unit) {
|
||||||
|
this.$set(this.formData, 'currentUnionId', unit.unionid)
|
||||||
|
this.$set(this.formData, 'currentUnionName', unit.unionname)
|
||||||
|
} else {
|
||||||
|
this.$set(this.formData, 'currentUnionId', null)
|
||||||
|
this.$set(this.formData, 'currentUnionName', null)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
async getThreeUnits(val) {
|
||||||
|
this.threeUnits = await threeUnitsByUnionGroupOrUnitId(val, null)
|
||||||
|
},
|
||||||
|
async threeUnitChange(val) {
|
||||||
|
if (val) {
|
||||||
|
const threeUnit = this.threeUnits.find(v => v.id === val)
|
||||||
|
const groupName = threeUnit.groupname
|
||||||
|
this.$set(this.formData, 'currentUnionGroupName', groupName)
|
||||||
|
} else {
|
||||||
|
this.$set(this.formData, 'currentUnionGroupName', null)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
async flush() {
|
||||||
|
this.loading = true
|
||||||
|
this.disabled = false
|
||||||
|
|
||||||
|
if (!this.userid) {
|
||||||
|
this.formData = {}
|
||||||
|
this.loading = false
|
||||||
|
this.disabled = true
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const resp = await $.get("/platform/member/common/userInfo", {userId: this.userid})
|
||||||
|
if (resp.code === 0) {
|
||||||
|
if (this.$refs["form"])
|
||||||
|
this.$refs["form"].resetFields();
|
||||||
|
|
||||||
|
this.formData = {
|
||||||
|
userId: resp.data.id,
|
||||||
|
loginname: resp.data.loginname,
|
||||||
|
username: resp.data.username,
|
||||||
|
unitname: resp.data.unitname,
|
||||||
|
unionname: resp.data.unionname,
|
||||||
|
originUnitId: resp.data.unitid,
|
||||||
|
originThreeUnitId: resp.data.threeUnitId,
|
||||||
|
originUnionId: resp.data.unionid,
|
||||||
|
userState: resp.data.userState,
|
||||||
|
personType: resp.data.personType,
|
||||||
|
auditTime: moment().format('YYYY-MM-DD'),
|
||||||
|
notes: null,
|
||||||
|
oldIdCard: resp.data.idcard,
|
||||||
|
oldMobile: resp.data.mobile,
|
||||||
|
oldEducation: resp.data.education
|
||||||
|
}
|
||||||
|
this.disabled = false
|
||||||
|
} else {
|
||||||
|
this.disabled = true
|
||||||
|
this.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: '获取用户信息失败'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.loading = false
|
||||||
|
},
|
||||||
|
async getUnits() {
|
||||||
|
const resp = await $.post('/platform/member/change/mange/units')
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.unitOptions = resp.data
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async getUserChangeType() {
|
||||||
|
const resp = await $.get('/platform/member/common/getUserChangType')
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.userChangeTypeList = resp.data
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
async getUserChangeType(){
|
async created() {
|
||||||
const resp = await $.get('/platform/member/common/getUserChangType')
|
// this.isThreeUnit = await getConfigKey('isThreeUnit') === 'true'
|
||||||
if (resp.code === 0){
|
// this.isThreeUnit = await getConfigKey('isThreeUnit') === 'true'
|
||||||
this.userChangeTypeList = resp.data
|
await this.getUnits()
|
||||||
}
|
await this.flush()
|
||||||
},
|
await this.getUserChangeType()
|
||||||
},
|
// getUnits(null).then(res => this.unitOptions = res)
|
||||||
async created() {
|
}
|
||||||
this.isThreeUnit = await getConfigKey('isThreeUnit') === 'true'
|
|
||||||
await this.getUnits()
|
|
||||||
await this.flush()
|
|
||||||
await this.getUserChangeType()
|
|
||||||
// getUnits(null).then(res => this.unitOptions = res)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.is-flex {
|
.is-flex {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.is-flex .el-form-item {
|
.is-flex .el-form-item {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,151 +1,151 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-table :data="memberHistoryRecords" border>
|
<el-table :data="memberHistoryRecords" border>
|
||||||
<el-table-column type="index" label="序号" width="80px"></el-table-column>
|
<el-table-column type="index" label="序号" width="80px"></el-table-column>
|
||||||
<el-table-column label="工号" prop="loginname"></el-table-column>
|
<el-table-column label="工号" prop="loginname"></el-table-column>
|
||||||
<el-table-column label="姓名" prop="username"></el-table-column>
|
<el-table-column label="姓名" prop="username"></el-table-column>
|
||||||
<el-table-column label="变更来源" prop="changeOrigin">
|
<el-table-column label="变更来源" prop="changeOrigin">
|
||||||
<template scope="{row}">
|
<template scope="{row}">
|
||||||
{{ memberChangeOriginOptions.find(v => v.code == row.changeOrigin)?.description }}
|
{{ memberChangeOriginOptions.find((v) => v.code == row.changeOrigin)?.description }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="变更时间" prop="changeTime"></el-table-column>
|
<el-table-column label="变更时间" prop="changeTime"></el-table-column>
|
||||||
<el-table-column label="异动类型" prop="changeTypes">
|
<el-table-column label="异动类型" prop="changeTypes">
|
||||||
<template scope="{row}">
|
<template scope="{row}">
|
||||||
<span style="color: #0e78c5;cursor: pointer" @click="openUserChangeInfo(row)">
|
<span style="color: #0e78c5; cursor: pointer" @click="openUserChangeInfo(row)">
|
||||||
{{
|
{{
|
||||||
userChangeTypeOptions.filter(v => row.changeTypes.includes(v.code)).map(v => v.description).join()
|
userChangeTypeOptions
|
||||||
}}
|
.filter((v) => row.changeTypes.includes(v.code))
|
||||||
</span>
|
.map((v) => v.description)
|
||||||
</template>
|
.join()
|
||||||
</el-table-column>
|
}}
|
||||||
<el-table-column label="状态" prop="stateId">
|
</span>
|
||||||
<template scope="{row}">
|
</template>
|
||||||
<vi-table-state v-if="row.stateId" :state="row"></vi-table-state>
|
</el-table-column>
|
||||||
</template>
|
<el-table-column label="状态" prop="stateId">
|
||||||
</el-table-column>
|
<template scope="{row}">
|
||||||
</el-table>
|
<vi-table-state v-if="row.stateId" :state="row"></vi-table-state>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
<user-change-history ref="userChangeHistory"></user-change-history>
|
<user-change-history ref="userChangeHistory"></user-change-history>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
module.exports = {
|
module.exports = {
|
||||||
components: {
|
components: {
|
||||||
'user-change-history': httpVueLoader('/components/userChangeHistory/UserChangeHistory.vue?v=' + new Date().getTime()),
|
"user-change-history": httpVueLoader("/components/userChangeHistory/userChangeHistory.vue?v=" + new Date().getTime())
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
records: {type: Array, default: []},
|
records: { type: Array, default: [] },
|
||||||
userid: {type: String},
|
userid: { type: String },
|
||||||
audit_info_union: {type: Boolean, default: true},
|
audit_info_union: { type: Boolean, default: true },
|
||||||
audit_info_school: {type: Boolean, default: true}
|
audit_info_school: { type: Boolean, default: true }
|
||||||
},
|
},
|
||||||
model: {
|
model: {
|
||||||
prop: 'records',
|
prop: "records",
|
||||||
event: 'change'
|
event: "change"
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isThreeUnit: false,
|
isThreeUnit: false,
|
||||||
loading: true,
|
loading: true,
|
||||||
changeType: {},
|
changeType: {},
|
||||||
changeOrigin: {},
|
changeOrigin: {},
|
||||||
|
|
||||||
memberHistoryRecords: [],
|
memberHistoryRecords: [],
|
||||||
|
|
||||||
memberChangeOriginOptions: [],
|
memberChangeOriginOptions: [],
|
||||||
userChangeTypeOptions: []
|
userChangeTypeOptions: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
userid(val) {
|
userid(val) {
|
||||||
this.getMemberChangeRecords()
|
this.getMemberChangeRecords()
|
||||||
this.getMemberHistoryRecords()
|
this.getMemberHistoryRecords()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async getMemberHistoryRecords() {
|
async getMemberHistoryRecords() {
|
||||||
const {code, msg, data} = await $.get("/platform/member/common/memberHistoryRecords", {userId: this.userid})
|
const { code, msg, data } = await $.get("/platform/member/common/memberHistoryRecords", { userId: this.userid })
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
data.forEach(v => {
|
data.forEach((v) => {
|
||||||
if (v.changeTypes) {
|
if (v.changeTypes) {
|
||||||
v.changeTypes = JSON.parse(v.changeTypes)
|
v.changeTypes = JSON.parse(v.changeTypes)
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
this.memberHistoryRecords = data
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
openUserChangeInfo({ id }) {
|
||||||
|
this.$refs.userChangeHistory.openUserChangeInfo(id)
|
||||||
|
},
|
||||||
|
|
||||||
|
async onExpand(row, expandedRows) {
|
||||||
|
if (!expandedRows.includes(row)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$set(row, "loading", true)
|
||||||
|
const resp = await $.get("/platform/member/common/findChangeApplyInfo", { id: row.id })
|
||||||
|
this.$set(row, "loading", false)
|
||||||
|
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.$set(row, "info", resp.data)
|
||||||
|
} else {
|
||||||
|
this.$set(row, "info", {})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
async getMemberChangeRecords() {
|
||||||
|
this.loading = true
|
||||||
|
|
||||||
|
if (!this.userid && this.records.length) {
|
||||||
|
this.loading = false
|
||||||
|
return
|
||||||
|
} else if (!this.userid) {
|
||||||
|
this.records = []
|
||||||
|
this.loading = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const resp = await $.get("/platform/member/common/memberChangeRecords", { userId: this.userid })
|
||||||
|
this.loading = false
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.records = resp.data
|
||||||
|
} else {
|
||||||
|
this.$notify.error({
|
||||||
|
title: "错误",
|
||||||
|
message: "获取变更记录失败"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
this.isThreeUnit = (await getConfigKey("isThreeUnit")) === "true"
|
||||||
|
this.getMemberChangeRecords()
|
||||||
|
this.changeType = await member.getChangeType()
|
||||||
|
this.changeOrigin = await member.getChangeOrigin()
|
||||||
|
|
||||||
|
getEnumOptions("MemberChangeOrigin").then((res) => {
|
||||||
|
this.memberChangeOriginOptions = res
|
||||||
})
|
})
|
||||||
this.memberHistoryRecords = data
|
getEnumOptions("UserChangeType").then((res) => {
|
||||||
}
|
this.userChangeTypeOptions = res
|
||||||
|
})
|
||||||
},
|
}
|
||||||
|
|
||||||
openUserChangeInfo({id}) {
|
|
||||||
this.$refs.userChangeHistory.openUserChangeInfo(id)
|
|
||||||
},
|
|
||||||
|
|
||||||
async onExpand(row, expandedRows) {
|
|
||||||
if (!expandedRows.includes(row)) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$set(row, "loading", true)
|
|
||||||
const resp = await $.get("/platform/member/common/findChangeApplyInfo", {id: row.id})
|
|
||||||
this.$set(row, "loading", false)
|
|
||||||
|
|
||||||
if (resp.code === 0) {
|
|
||||||
this.$set(row, "info", resp.data)
|
|
||||||
} else {
|
|
||||||
this.$set(row, "info", {})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
async getMemberChangeRecords() {
|
|
||||||
this.loading = true
|
|
||||||
|
|
||||||
if (!this.userid && this.records.length) {
|
|
||||||
this.loading = false
|
|
||||||
return
|
|
||||||
} else if (!this.userid) {
|
|
||||||
this.records = []
|
|
||||||
this.loading = false
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
const resp = await $.get("/platform/member/common/memberChangeRecords", {userId: this.userid})
|
|
||||||
this.loading = false
|
|
||||||
if (resp.code === 0) {
|
|
||||||
this.records = resp.data
|
|
||||||
} else {
|
|
||||||
this.$notify.error({
|
|
||||||
title: '错误',
|
|
||||||
message: '获取变更记录失败'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
async created() {
|
|
||||||
this.isThreeUnit = await getConfigKey('isThreeUnit') === 'true'
|
|
||||||
this.getMemberChangeRecords()
|
|
||||||
this.changeType = await member.getChangeType()
|
|
||||||
this.changeOrigin = await member.getChangeOrigin()
|
|
||||||
|
|
||||||
getEnumOptions('MemberChangeOrigin').then(res => {
|
|
||||||
this.memberChangeOriginOptions = res
|
|
||||||
})
|
|
||||||
getEnumOptions('UserChangeType').then(res => {
|
|
||||||
this.userChangeTypeOptions = res
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.is-flex {
|
.is-flex {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.is-flex .el-form-item {
|
.is-flex .el-form-item {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,58 +1,51 @@
|
|||||||
/**
|
/** *Desc: *Create by: jug *Create time:2023/6/8/10:29 */
|
||||||
*Desc:
|
|
||||||
*Create by: jug
|
|
||||||
*Create time:2023/6/8/10:29
|
|
||||||
*/
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-input v-model="cnd.memberSearchKeyWord" placeholder="请输入值" style="width: 100%">
|
<el-input v-model="cnd.memberSearchKeyWord" placeholder="请输入值" style="width: 100%">
|
||||||
<el-select v-model="cnd.memberSearchName" slot="prepend" placeholder="请选择字段" style="width: 120px">
|
<el-select v-model="cnd.memberSearchName" slot="prepend" placeholder="请选择字段" style="width: 120px">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="column in columnInfos"
|
v-for="column in columnInfos"
|
||||||
:key="column.COLUMN_NAME"
|
:key="column.COLUMN_NAME"
|
||||||
:label="column.COLUMN_COMMENT"
|
:label="column.COLUMN_COMMENT"
|
||||||
:value="column.COLUMN_NAME">
|
:value="column.COLUMN_NAME"
|
||||||
</el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-input>
|
</el-input>
|
||||||
|
</div>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "MemberCnd",
|
name: "MemberCnd",
|
||||||
props: {},
|
props: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
columnInfos: [],
|
columnInfos: [],
|
||||||
cnd: {}
|
cnd: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
cnd: {
|
||||||
|
handler(val) {
|
||||||
|
this.$emit("cnd", val)
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async getColumnInfo() {
|
||||||
|
const { data, msg, code } = await $.post("/platform/activity/basic/scope/getUserTableColumnInfo")
|
||||||
|
if (code !== 0) {
|
||||||
|
this.$notify.warning(msg)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.columnInfos = data
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getColumnInfo()
|
||||||
}
|
}
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
cnd: {
|
|
||||||
handler(val) {
|
|
||||||
this.$emit('cnd', val)
|
|
||||||
},
|
|
||||||
deep: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
async getColumnInfo() {
|
|
||||||
const {data, msg, code} = await $.post('/platform/activity/basic/scope/getUserTableColumnInfo')
|
|
||||||
if (code !== 0) {
|
|
||||||
this.$notify.warning(msg)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.columnInfos = data
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.getColumnInfo()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped></style>
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|||||||
@@ -204,12 +204,12 @@
|
|||||||
placeholder="更新时间"
|
placeholder="更新时间"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="schoolTime" label="参加工作日期">
|
<el-form-item prop="workDate" label="参加工作日期">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
format="yyyy-MM-dd"
|
format="yyyy-MM-dd"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
v-model="formData.schoolTime"
|
v-model="formData.workDate"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="选择参加工作日期"
|
placeholder="选择参加工作日期"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
@@ -326,7 +326,7 @@
|
|||||||
|
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<h3 style="text-align: center; letter-spacing: 6px">工会会员登记表</h3>
|
<h3 style="text-align: center; letter-spacing: 6px">工会会员登记表</h3>
|
||||||
<!-- <div style="text-align: right; letter-spacing: 2px">填表日期:{{ moment(formData.applyTime).format("YYYY年MM月DD日") }}</div>-->
|
<!-- <div style="text-align: right; letter-spacing: 2px">填表日期:{{ moment(formData.applyTime).format("YYYY年MM月DD日") }}</div>-->
|
||||||
|
|
||||||
<el-descriptions :column="3" border class="descriptions-form">
|
<el-descriptions :column="3" border class="descriptions-form">
|
||||||
<el-descriptions-item label="姓名">{{ formData.username }}</el-descriptions-item>
|
<el-descriptions-item label="姓名">{{ formData.username }}</el-descriptions-item>
|
||||||
|
|||||||
@@ -1,189 +1,185 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="padding-bottom: 20px;">
|
<div style="padding-bottom: 20px">
|
||||||
|
<van-form readonly input-align="right">
|
||||||
<van-form readonly input-align="right">
|
<div class="van-cell-group__title">
|
||||||
<div class="van-cell-group__title">
|
<div class="van-sidebar-item van-sidebar-item--select">基础信息</div>
|
||||||
<div class="van-sidebar-item van-sidebar-item--select">
|
|
||||||
基础信息
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<van-cell-group>
|
|
||||||
<van-field readonly :value="viewData.username" label="姓名"></van-field>
|
|
||||||
<van-field readonly :value="viewData.loginname" label="工资号"></van-field>
|
|
||||||
<van-field readonly :value="viewData.unitname" label="单位"></van-field>
|
|
||||||
<van-field readonly :value="viewData.unionname" label="工会"></van-field>
|
|
||||||
</van-cell-group>
|
|
||||||
<div class="van-cell-group__title">
|
|
||||||
<div class="van-sidebar-item van-sidebar-item--select">
|
|
||||||
作品信息
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<van-cell-group>
|
|
||||||
<van-field readonly name="type" :value="viewData.zpzt" label="作品主题"></van-field>
|
|
||||||
<van-field readonly name="type" :value="viewData.lname" label="活动类别"></van-field>
|
|
||||||
<van-field readonly name="type" :value="viewData.zname" label="作品类别"></van-field>
|
|
||||||
<van-field readonly :value="viewData.zpms" label="简介"
|
|
||||||
input-align="left"
|
|
||||||
style="flex-flow: column"
|
|
||||||
rows="2" maxlength="200" type="textarea" show-word-limit autosize></van-field>
|
|
||||||
|
|
||||||
<van-field label="照片" style="flex-flow: column" input-align="left">
|
|
||||||
<template #label>
|
|
||||||
<div class="mb10">照  片</div>
|
|
||||||
</template>
|
|
||||||
<template #input>
|
|
||||||
<vant-file-upload :files.sync="img2List" view :del="false"
|
|
||||||
v-if="img2List&&img2List.length>0"></vant-file-upload>
|
|
||||||
<span v-else>暂无</span>
|
|
||||||
</template>
|
|
||||||
</van-field>
|
|
||||||
|
|
||||||
<van-field label="视频" style="flex-flow: column" input-align="left">
|
|
||||||
<template #label>
|
|
||||||
<div class="mb10">视  频</div>
|
|
||||||
</template>
|
|
||||||
<template #input>
|
|
||||||
<template v-for="item in videoList" v-if="videoList.length>0">
|
|
||||||
<video id="myVideo" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto"
|
|
||||||
width="640" height="264"
|
|
||||||
data-setup="{}" webkit-playsinline='true' playsinline='true' x-webkit-airplay='true'
|
|
||||||
x5-video-player-type='h5' x5-video-player-fullscreen='true' x5-video-ignore-metadata='true'>
|
|
||||||
<source :src="FILE_DOMAIN+item.filepath" type="video/mp4">
|
|
||||||
</video>
|
|
||||||
</template>
|
|
||||||
<div v-else style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
|
||||||
没有音频。
|
|
||||||
</div>
|
</div>
|
||||||
|
<van-cell-group>
|
||||||
</template>
|
<van-field readonly :value="viewData.username" label="姓名"></van-field>
|
||||||
</van-field>
|
<van-field readonly :value="viewData.loginname" label="工资号"></van-field>
|
||||||
|
<van-field readonly :value="viewData.unitname" label="单位"></van-field>
|
||||||
<van-field label="音频" style="flex-flow: column" input-align="left">
|
<van-field readonly :value="viewData.unionname" label="工会"></van-field>
|
||||||
<template #label>
|
</van-cell-group>
|
||||||
<div class="mb10">音  频</div>
|
<div class="van-cell-group__title">
|
||||||
</template>
|
<div class="van-sidebar-item van-sidebar-item--select">作品信息</div>
|
||||||
<template #input>
|
|
||||||
<template v-for="item in videoList" v-if="audioList.length>0">
|
|
||||||
<audio id="amusic" preload="auto" controls style="width: 100%;outline: none;">
|
|
||||||
<source :src="FILE_DOMAIN+item.filepath"/>
|
|
||||||
</audio>
|
|
||||||
</template>
|
|
||||||
<div v-else style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
|
||||||
没有音频。
|
|
||||||
</div>
|
</div>
|
||||||
|
<van-cell-group>
|
||||||
|
<van-field readonly name="type" :value="viewData.zpzt" label="作品主题"></van-field>
|
||||||
|
<van-field readonly name="type" :value="viewData.lname" label="活动类别"></van-field>
|
||||||
|
<van-field readonly name="type" :value="viewData.zname" label="作品类别"></van-field>
|
||||||
|
<van-field
|
||||||
|
readonly
|
||||||
|
:value="viewData.zpms"
|
||||||
|
label="简介"
|
||||||
|
input-align="left"
|
||||||
|
style="flex-flow: column"
|
||||||
|
rows="2"
|
||||||
|
maxlength="200"
|
||||||
|
type="textarea"
|
||||||
|
show-word-limit
|
||||||
|
autosize
|
||||||
|
></van-field>
|
||||||
|
|
||||||
</template>
|
<van-field label="照片" style="flex-flow: column" input-align="left">
|
||||||
</van-field>
|
<template #label>
|
||||||
|
<div class="mb10">照  片</div>
|
||||||
|
</template>
|
||||||
|
<template #input>
|
||||||
|
<vant-file-upload :files.sync="img2List" view :del="false" v-if="img2List && img2List.length > 0"></vant-file-upload>
|
||||||
|
<span v-else>暂无</span>
|
||||||
|
</template>
|
||||||
|
</van-field>
|
||||||
|
|
||||||
<van-field label="文档" style="flex-flow: column" input-align="left">
|
<van-field label="视频" style="flex-flow: column" input-align="left">
|
||||||
<template #label>
|
<template #label>
|
||||||
<div class="mb10">文  档</div>
|
<div class="mb10">视  频</div>
|
||||||
</template>
|
</template>
|
||||||
<template #input>
|
<template #input>
|
||||||
<template v-for="(item,index) in docList" v-if="docList.length>0">
|
<template v-for="item in videoList" v-if="videoList.length > 0">
|
||||||
<div class="text-nowrap color-puple"
|
<video
|
||||||
@click="previewFile(item.filepath,item.filename,docList,index,item.id)">
|
id="myVideo"
|
||||||
{{ item.filename }}
|
class="video-js vjs-default-skin vjs-big-play-centered"
|
||||||
</div>
|
controls
|
||||||
</template>
|
preload="auto"
|
||||||
<div v-else style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
width="640"
|
||||||
没有文档。
|
height="264"
|
||||||
</div>
|
data-setup="{}"
|
||||||
|
webkit-playsinline="true"
|
||||||
|
playsinline="true"
|
||||||
|
x-webkit-airplay="true"
|
||||||
|
x5-video-player-type="h5"
|
||||||
|
x5-video-player-fullscreen="true"
|
||||||
|
x5-video-ignore-metadata="true"
|
||||||
|
>
|
||||||
|
<source :src="FILE_DOMAIN + item.filepath" type="video/mp4" />
|
||||||
|
</video>
|
||||||
|
</template>
|
||||||
|
<div v-else style="text-align: center; color: #c2bbbb; font-size: 10px">没有音频。</div>
|
||||||
|
</template>
|
||||||
|
</van-field>
|
||||||
|
|
||||||
</template>
|
<van-field label="音频" style="flex-flow: column" input-align="left">
|
||||||
</van-field>
|
<template #label>
|
||||||
|
<div class="mb10">音  频</div>
|
||||||
|
</template>
|
||||||
|
<template #input>
|
||||||
|
<template v-for="item in videoList" v-if="audioList.length > 0">
|
||||||
|
<audio id="amusic" preload="auto" controls style="width: 100%; outline: none">
|
||||||
|
<source :src="FILE_DOMAIN + item.filepath" />
|
||||||
|
</audio>
|
||||||
|
</template>
|
||||||
|
<div v-else style="text-align: center; color: #c2bbbb; font-size: 10px">没有音频。</div>
|
||||||
|
</template>
|
||||||
|
</van-field>
|
||||||
|
|
||||||
|
<van-field label="文档" style="flex-flow: column" input-align="left">
|
||||||
|
<template #label>
|
||||||
|
<div class="mb10">文  档</div>
|
||||||
|
</template>
|
||||||
|
<template #input>
|
||||||
|
<template v-for="(item, index) in docList" v-if="docList.length > 0">
|
||||||
|
<div class="text-nowrap color-puple" @click="previewFile(item.filepath, item.filename, docList, index, item.id)">
|
||||||
|
{{ item.filename }}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<div v-else style="text-align: center; color: #c2bbbb; font-size: 10px">没有文档。</div>
|
||||||
|
</template>
|
||||||
|
</van-field>
|
||||||
|
</van-cell-group>
|
||||||
|
</van-form>
|
||||||
|
|
||||||
</van-cell-group>
|
<template v-if="handle">
|
||||||
</van-form>
|
<slot name="handle"></slot>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
<template v-if="handle">
|
|
||||||
<slot name="handle"></slot>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
module.exports = {
|
module.exports = {
|
||||||
props: {
|
props: {
|
||||||
handle: {
|
handle: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: "审核"
|
||||||
|
},
|
||||||
|
id: {
|
||||||
|
type: String,
|
||||||
|
default: ""
|
||||||
|
}
|
||||||
},
|
},
|
||||||
title: {
|
data() {
|
||||||
type: String,
|
return {
|
||||||
default: '审核'
|
viewData: {},
|
||||||
|
videoList: [],
|
||||||
|
prevImgList: [],
|
||||||
|
img2List: [],
|
||||||
|
audioList: [],
|
||||||
|
docList: [],
|
||||||
|
imgtype: ["gif", "jpg", "png", "jpeg"],
|
||||||
|
videotype: ["flv", "swf", "mkv", "avi", "rm", "rmvb", "wmv", "mp4", "mov", "mpg", "mpeg"],
|
||||||
|
doctype: ["doc", "docx"],
|
||||||
|
audiotype: ["mp3", "wma", "flac", "wav", "m4a", "amr", "au"]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
id: {
|
components: {
|
||||||
type: String,
|
"vant-file-upload": httpVueLoader("/components/plugins/VantFileUpload.vue")
|
||||||
default: ''
|
|
||||||
},
|
},
|
||||||
},
|
methods: {
|
||||||
data() {
|
async getInfo(id) {
|
||||||
return {
|
const { data, code, msg } = await $.get("/platform/hd/wmhd/findOneById", { id })
|
||||||
viewData: {},
|
const refs = await $.get("/mobile/cahd/list/findOne", { id })
|
||||||
videoList: [],
|
|
||||||
prevImgList: [],
|
|
||||||
img2List: [],
|
|
||||||
audioList: [],
|
|
||||||
docList: [],
|
|
||||||
imgtype: ['gif', 'jpg', 'png', 'jpeg'],
|
|
||||||
videotype: ['flv', 'swf', 'mkv', 'avi', 'rm', 'rmvb', 'wmv', 'mp4', 'mov', 'mpg', 'mpeg'],
|
|
||||||
doctype: ['doc', 'docx'],
|
|
||||||
audiotype: ['mp3', 'wma', 'flac', 'wav', 'm4a', 'amr', 'au'],
|
|
||||||
}
|
|
||||||
},
|
|
||||||
components: {
|
|
||||||
'vant-file-upload': httpVueLoader('/components/plugins/VantFileUpload.vue')
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
async getInfo(id) {
|
|
||||||
const {data, code, msg} = await $.get("/platform/hd/wmhd/findOneById", {id})
|
|
||||||
const refs = await $.get("/mobile/cahd/list/findOne", {id})
|
|
||||||
|
|
||||||
if (refs) {
|
if (refs) {
|
||||||
this.viewData = refs[0]
|
this.viewData = refs[0]
|
||||||
data.forEach(val => {
|
data.forEach((val) => {
|
||||||
val.fjname = val.filename
|
val.fjname = val.filename
|
||||||
val.fjurl = val.filepath
|
val.fjurl = val.filepath
|
||||||
val.url = FILE_DOMAIN + val.filepath
|
val.url = FILE_DOMAIN + val.filepath
|
||||||
let filetype = val.fjname.substring(val.fjname.lastIndexOf('.') + 1, val.fjname.length).toLowerCase();
|
let filetype = val.fjname.substring(val.fjname.lastIndexOf(".") + 1, val.fjname.length).toLowerCase()
|
||||||
if (this.videotype.indexOf(filetype) > -1) {
|
if (this.videotype.indexOf(filetype) > -1) {
|
||||||
this.videoList.push(val);
|
this.videoList.push(val)
|
||||||
} else if (this.imgtype.indexOf(filetype) > -1) {
|
} else if (this.imgtype.indexOf(filetype) > -1) {
|
||||||
this.prevImgList.push(FILE_DOMAIN + val.filepath)
|
this.prevImgList.push(FILE_DOMAIN + val.filepath)
|
||||||
this.img2List.push(val);
|
this.img2List.push(val)
|
||||||
} else if (this.doctype.indexOf(filetype) > -1) {
|
} else if (this.doctype.indexOf(filetype) > -1) {
|
||||||
this.docList.push(val);
|
this.docList.push(val)
|
||||||
} else if (this.audiotype.indexOf(filetype) > -1) {
|
} else if (this.audiotype.indexOf(filetype) > -1) {
|
||||||
this.audioList.push(val);
|
this.audioList.push(val)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.viewData = {}
|
this.viewData = {}
|
||||||
this.$toast.fail('获取信息失败');
|
this.$toast.fail("获取信息失败")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
async created() {}
|
||||||
async created() {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.van-cell-group__title {
|
.van-cell-group__title {
|
||||||
padding-left: 0 !important;
|
padding-left: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.van-sidebar-item {
|
.van-sidebar-item {
|
||||||
font-size: 16px !important;
|
font-size: 16px !important;
|
||||||
text-indent: 4px !important;
|
text-indent: 4px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.van-sidebar-item--select::before {
|
.van-sidebar-item--select::before {
|
||||||
left: 5px !important;
|
left: 5px !important;
|
||||||
}
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
<!-- <template v-if="viewData.upa">
|
<!-- <template v-if="viewData.upa">
|
||||||
<div class="van-cell-group__title">
|
<div class="van-cell-group__title">
|
||||||
<div class="van-sidebar-item van-sidebar-item--select">
|
<div class="van-sidebar-item van-sidebar-item--select">
|
||||||
分工会审核信息
|
院级工会审核信息
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<van-cell-group class="mt10">
|
<van-cell-group class="mt10">
|
||||||
@@ -20,6 +20,8 @@
|
|||||||
:readonly="['SELECT'].includes(column.columnFormType)"
|
:readonly="['SELECT'].includes(column.columnFormType)"
|
||||||
:rules="[{ required: column.isRequired, message: (['SELECT'].includes(column.columnFormType) ? '请选择' : '请填写') + column.columnName }]"
|
:rules="[{ required: column.isRequired, message: (['SELECT'].includes(column.columnFormType) ? '请选择' : '请填写') + column.columnName }]"
|
||||||
:required="column.isRequired"
|
:required="column.isRequired"
|
||||||
|
:clearable="true"
|
||||||
|
clear-trigger="always"
|
||||||
@click="selectFieldClick(column)"
|
@click="selectFieldClick(column)"
|
||||||
></van-field>
|
></van-field>
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
<template v-if="viewData.upa">
|
<template v-if="viewData.upa">
|
||||||
<div class="van-cell-group__title">
|
<div class="van-cell-group__title">
|
||||||
<div class="van-sidebar-item van-sidebar-item--select">
|
<div class="van-sidebar-item van-sidebar-item--select">
|
||||||
分工会审核信息
|
院级工会审核信息
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<van-cell-group class="mt10">
|
<van-cell-group class="mt10">
|
||||||
|
|||||||
@@ -1,189 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div style="padding-bottom: 20px;">
|
|
||||||
|
|
||||||
<van-form readonly input-align="right">
|
|
||||||
<div class="van-cell-group__title">
|
|
||||||
<div class="van-sidebar-item van-sidebar-item--select">
|
|
||||||
基础信息
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<van-cell-group>
|
|
||||||
<van-field readonly :value="viewData.username" label="姓名"></van-field>
|
|
||||||
<van-field readonly :value="viewData.loginname" label="工资号"></van-field>
|
|
||||||
<van-field readonly :value="viewData.unitname" label="单位"></van-field>
|
|
||||||
<van-field readonly :value="viewData.unionname" label="工会"></van-field>
|
|
||||||
</van-cell-group>
|
|
||||||
<div class="van-cell-group__title">
|
|
||||||
<div class="van-sidebar-item van-sidebar-item--select">
|
|
||||||
作品信息
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<van-cell-group>
|
|
||||||
<van-field readonly name="type" :value="viewData.zpzt" label="作品主题"></van-field>
|
|
||||||
<van-field readonly name="type" :value="viewData.lname" label="活动类别"></van-field>
|
|
||||||
<van-field readonly name="type" :value="viewData.zname" label="作品类别"></van-field>
|
|
||||||
<van-field readonly :value="viewData.zpms" label="简介"
|
|
||||||
input-align="left"
|
|
||||||
style="flex-flow: column"
|
|
||||||
rows="2" maxlength="200" type="textarea" show-word-limit autosize></van-field>
|
|
||||||
|
|
||||||
<van-field label="照片" style="flex-flow: column" input-align="left">
|
|
||||||
<template #label>
|
|
||||||
<div class="mb10">照  片</div>
|
|
||||||
</template>
|
|
||||||
<template #input>
|
|
||||||
<vant-file-upload :files.sync="img2List" view :del="false"
|
|
||||||
v-if="img2List&&img2List.length>0"></vant-file-upload>
|
|
||||||
<span v-else>暂无</span>
|
|
||||||
</template>
|
|
||||||
</van-field>
|
|
||||||
|
|
||||||
<van-field label="视频" style="flex-flow: column" input-align="left">
|
|
||||||
<template #label>
|
|
||||||
<div class="mb10">视  频</div>
|
|
||||||
</template>
|
|
||||||
<template #input>
|
|
||||||
<template v-for="item in videoList" v-if="videoList.length>0">
|
|
||||||
<video id="myVideo" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto"
|
|
||||||
width="640" height="264"
|
|
||||||
data-setup="{}" webkit-playsinline='true' playsinline='true' x-webkit-airplay='true'
|
|
||||||
x5-video-player-type='h5' x5-video-player-fullscreen='true' x5-video-ignore-metadata='true'>
|
|
||||||
<source :src="FILE_DOMAIN+item.filepath" type="video/mp4">
|
|
||||||
</video>
|
|
||||||
</template>
|
|
||||||
<div v-else style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
|
||||||
没有音频。
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
</van-field>
|
|
||||||
|
|
||||||
<van-field label="音频" style="flex-flow: column" input-align="left">
|
|
||||||
<template #label>
|
|
||||||
<div class="mb10">音  频</div>
|
|
||||||
</template>
|
|
||||||
<template #input>
|
|
||||||
<template v-for="item in videoList" v-if="audioList.length>0">
|
|
||||||
<audio id="amusic" preload="auto" controls style="width: 100%;outline: none;">
|
|
||||||
<source :src="FILE_DOMAIN+item.filepath"/>
|
|
||||||
</audio>
|
|
||||||
</template>
|
|
||||||
<div v-else style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
|
||||||
没有音频。
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
</van-field>
|
|
||||||
|
|
||||||
<van-field label="文档" style="flex-flow: column" input-align="left">
|
|
||||||
<template #label>
|
|
||||||
<div class="mb10">文  档</div>
|
|
||||||
</template>
|
|
||||||
<template #input>
|
|
||||||
<template v-for="(item,index) in docList" v-if="docList.length>0">
|
|
||||||
<div class="text-nowrap color-puple"
|
|
||||||
@click="previewFile(item.filepath,item.filename,docList,index,item.id)">
|
|
||||||
{{ item.filename }}
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<div v-else style="text-align: center;color: #c2bbbb;font-size: 10px;">
|
|
||||||
没有文档。
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
</van-field>
|
|
||||||
|
|
||||||
|
|
||||||
</van-cell-group>
|
|
||||||
</van-form>
|
|
||||||
|
|
||||||
|
|
||||||
<template v-if="handle">
|
|
||||||
<slot name="handle"></slot>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
module.exports = {
|
|
||||||
props: {
|
|
||||||
handle: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
title: {
|
|
||||||
type: String,
|
|
||||||
default: '审核'
|
|
||||||
},
|
|
||||||
id: {
|
|
||||||
type: String,
|
|
||||||
default: ''
|
|
||||||
},
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
viewData: {},
|
|
||||||
videoList: [],
|
|
||||||
prevImgList: [],
|
|
||||||
img2List: [],
|
|
||||||
audioList: [],
|
|
||||||
docList: [],
|
|
||||||
imgtype: ['gif', 'jpg', 'png', 'jpeg'],
|
|
||||||
videotype: ['flv', 'swf', 'mkv', 'avi', 'rm', 'rmvb', 'wmv', 'mp4', 'mov', 'mpg', 'mpeg'],
|
|
||||||
doctype: ['doc', 'docx'],
|
|
||||||
audiotype: ['mp3', 'wma', 'flac', 'wav', 'm4a', 'amr', 'au'],
|
|
||||||
}
|
|
||||||
},
|
|
||||||
components: {
|
|
||||||
'vant-file-upload': httpVueLoader('/components/plugins/VantFileUpload.vue')
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
async getInfo(id) {
|
|
||||||
const {data, code, msg} = await $.get("/platform/hd/wmhd/findOneById", {id})
|
|
||||||
const refs = await $.get("/mobile/cahd/list/findOne", {id})
|
|
||||||
|
|
||||||
if (refs) {
|
|
||||||
this.viewData = refs[0]
|
|
||||||
data.forEach(val => {
|
|
||||||
val.fjname = val.filename
|
|
||||||
val.fjurl = val.filepath
|
|
||||||
val.url = FILE_DOMAIN + val.filepath
|
|
||||||
let filetype = val.fjname.substring(val.fjname.lastIndexOf('.') + 1, val.fjname.length).toLowerCase();
|
|
||||||
if (this.videotype.indexOf(filetype) > -1) {
|
|
||||||
this.videoList.push(val);
|
|
||||||
} else if (this.imgtype.indexOf(filetype) > -1) {
|
|
||||||
this.prevImgList.push(FILE_DOMAIN + val.filepath)
|
|
||||||
this.img2List.push(val);
|
|
||||||
} else if (this.doctype.indexOf(filetype) > -1) {
|
|
||||||
this.docList.push(val);
|
|
||||||
} else if (this.audiotype.indexOf(filetype) > -1) {
|
|
||||||
this.audioList.push(val);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.viewData = {}
|
|
||||||
this.$toast.fail('获取信息失败');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
async created() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style>
|
|
||||||
.van-cell-group__title {
|
|
||||||
padding-left: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.van-sidebar-item {
|
|
||||||
font-size: 16px !important;
|
|
||||||
text-indent: 4px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.van-sidebar-item--select::before {
|
|
||||||
left: 5px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
</style>
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="card">
|
|
||||||
<div class="card-header" v-if="$slots.header">
|
|
||||||
<slot name="header"></slot>
|
|
||||||
</div>
|
|
||||||
<div class="card-body">
|
|
||||||
<slot></slot>
|
|
||||||
</div>
|
|
||||||
<div class="card-footer" v-if="$slots.footer">
|
|
||||||
<slot name="footer"></slot>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
module.exports = {
|
|
||||||
name: "MCard"
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.card {
|
|
||||||
border: none;
|
|
||||||
border-radius: .5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-header {
|
|
||||||
border-bottom:1px dashed rgba(0,0,0,.125);
|
|
||||||
font-size: 1.15rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-header:first-child {
|
|
||||||
border-radius: calc(.5rem - 1px) calc(.5rem - 1px) 0 0
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-body>.van-cell{
|
|
||||||
padding: 5px 0;
|
|
||||||
}
|
|
||||||
.card-body{
|
|
||||||
padding-top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.card-header, .card-footer {
|
|
||||||
background-color: #FFFFFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</style>
|
|
||||||
@@ -1,89 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="loader"></div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
module.exports = {
|
|
||||||
name: "MLoading"
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.loader {
|
|
||||||
z-index: 10000;
|
|
||||||
position: relative;
|
|
||||||
width: 2.5em;
|
|
||||||
height: 2.5em;
|
|
||||||
transform: rotate(165deg);
|
|
||||||
}
|
|
||||||
|
|
||||||
.loader:before, .loader:after {
|
|
||||||
content: "";
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
left: 50%;
|
|
||||||
display: block;
|
|
||||||
width: 0.5em;
|
|
||||||
height: 0.5em;
|
|
||||||
border-radius: 0.25em;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.loader:before {
|
|
||||||
animation: before 2s infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
.loader:after {
|
|
||||||
animation: after 2s infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes before {
|
|
||||||
0% {
|
|
||||||
width: 0.5em;
|
|
||||||
box-shadow: 1em -0.5em rgba(225, 20, 98, 0.75), -1em 0.5em rgba(111, 202, 220, 0.75);
|
|
||||||
}
|
|
||||||
35% {
|
|
||||||
width: 2.5em;
|
|
||||||
box-shadow: 0 -0.5em rgba(225, 20, 98, 0.75), 0 0.5em rgba(111, 202, 220, 0.75);
|
|
||||||
}
|
|
||||||
70% {
|
|
||||||
width: 0.5em;
|
|
||||||
box-shadow: -1em -0.5em rgba(225, 20, 98, 0.75), 1em 0.5em rgba(111, 202, 220, 0.75);
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
box-shadow: 1em -0.5em rgba(225, 20, 98, 0.75), -1em 0.5em rgba(111, 202, 220, 0.75);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes after {
|
|
||||||
0% {
|
|
||||||
height: 0.5em;
|
|
||||||
box-shadow: 0.5em 1em rgba(61, 184, 143, 0.75), -0.5em -1em rgba(233, 169, 32, 0.75);
|
|
||||||
}
|
|
||||||
35% {
|
|
||||||
height: 2.5em;
|
|
||||||
box-shadow: 0.5em 0 rgba(61, 184, 143, 0.75), -0.5em 0 rgba(233, 169, 32, 0.75);
|
|
||||||
}
|
|
||||||
70% {
|
|
||||||
height: 0.5em;
|
|
||||||
box-shadow: 0.5em -1em rgba(61, 184, 143, 0.75), -0.5em 1em rgba(233, 169, 32, 0.75);
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
box-shadow: 0.5em 1em rgba(61, 184, 143, 0.75), -0.5em -1em rgba(233, 169, 32, 0.75);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Attempt to center the whole thing!
|
|
||||||
*/
|
|
||||||
html,
|
|
||||||
body {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.loader {
|
|
||||||
position: absolute;
|
|
||||||
top: calc(50% - 1.25em);
|
|
||||||
left: calc(50% - 1.25em);
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,140 +0,0 @@
|
|||||||
<template>
|
|
||||||
<figure>
|
|
||||||
<div class="dot white"></div>
|
|
||||||
<div class="dot"></div>
|
|
||||||
<div class="dot"></div>
|
|
||||||
<div class="dot"></div>
|
|
||||||
<div class="dot"></div>
|
|
||||||
</figure>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
module.exports = {
|
|
||||||
name: "MTableLoading"
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
body {
|
|
||||||
background: #222;
|
|
||||||
}
|
|
||||||
|
|
||||||
figure {
|
|
||||||
position: absolute;
|
|
||||||
margin: auto;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
width: 6.250em;
|
|
||||||
height: 6.250em;
|
|
||||||
animation: rotate 2.4s linear infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
.white {
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
background: white;
|
|
||||||
animation: flash 2.4s linear infinite;
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dot {
|
|
||||||
position: absolute;
|
|
||||||
margin: auto;
|
|
||||||
width: 2.4em;
|
|
||||||
height: 2.4em;
|
|
||||||
border-radius: 100%;
|
|
||||||
transition: all 1s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dot:nth-child(2) {
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
background: #FF4444;
|
|
||||||
animation: dotsY 2.4s linear infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dot:nth-child(3) {
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
top: 0;
|
|
||||||
background: #FFBB33;
|
|
||||||
animation: dotsX 2.4s linear infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dot:nth-child(4) {
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
right: 0;
|
|
||||||
background: #99CC00;
|
|
||||||
animation: dotsY 2.4s linear infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dot:nth-child(5) {
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
background: #33B5E5;
|
|
||||||
animation: dotsX 2.4s linear infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes rotate {
|
|
||||||
0% {
|
|
||||||
transform: rotate(0);
|
|
||||||
}
|
|
||||||
10% {
|
|
||||||
width: 6.250em;
|
|
||||||
height: 6.250em;
|
|
||||||
}
|
|
||||||
66% {
|
|
||||||
width: 2.4em;
|
|
||||||
height: 2.4em;
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
transform: rotate(360deg);
|
|
||||||
width: 6.250em;
|
|
||||||
height: 6.250em;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes dotsY {
|
|
||||||
66% {
|
|
||||||
opacity: .1;
|
|
||||||
width: 2.4em;
|
|
||||||
}
|
|
||||||
77% {
|
|
||||||
opacity: 1;
|
|
||||||
width: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes dotsX {
|
|
||||||
66% {
|
|
||||||
opacity: .1;
|
|
||||||
height: 2.4em;
|
|
||||||
}
|
|
||||||
77% {
|
|
||||||
opacity: 1;
|
|
||||||
height: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes flash {
|
|
||||||
33% {
|
|
||||||
opacity: 0;
|
|
||||||
border-radius: 0%;
|
|
||||||
}
|
|
||||||
55% {
|
|
||||||
opacity: .6;
|
|
||||||
border-radius: 100%;
|
|
||||||
}
|
|
||||||
66% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
||||||
@@ -1,186 +0,0 @@
|
|||||||
<style>
|
|
||||||
.field .van-field__error-message {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<template>
|
|
||||||
<div>
|
|
||||||
<van-form @submit="onSubmit" ref="form">
|
|
||||||
<template v-for="column in dynamicData">
|
|
||||||
<!-- 文本、数值、时间 -->
|
|
||||||
<template v-if="['VARCHAR','TEXT','INT','DATE','DATETIME'].includes(column.columnType)">
|
|
||||||
<van-field
|
|
||||||
class="field"
|
|
||||||
v-model="column.columnValue"
|
|
||||||
:clickable="['SELECT'].includes(column.columnFormType)"
|
|
||||||
:label="column.columnName"
|
|
||||||
:name="column.columnCode"
|
|
||||||
:type="['INT'].includes(column.columnType) ? 'digit' : ''"
|
|
||||||
:placeholder="(['SELECT'].includes(column.columnFormType) ? '请选择' : '请填写') + column.columnName"
|
|
||||||
:readonly="['SELECT'].includes(column.columnFormType)"
|
|
||||||
:rules="[{ required: column.isRequired, message: (['SELECT'].includes(column.columnFormType) ? '请选择' : '请填写') + column.columnName }]"
|
|
||||||
:required="column.isRequired"
|
|
||||||
:clearable="true"
|
|
||||||
clear-trigger="always"
|
|
||||||
@click="selectFieldClick(column)"
|
|
||||||
></van-field>
|
|
||||||
|
|
||||||
<van-popup v-if="['SELECT'].includes(column.columnFormType)"
|
|
||||||
v-model="pickerStates[column.columnCode + 'Picker']"
|
|
||||||
position="bottom">
|
|
||||||
<template v-if="['DATETIME','DATE'].includes(column.columnType)">
|
|
||||||
<van-datetime-picker
|
|
||||||
:title="column.columnName"
|
|
||||||
:type="column.columnType.toLocaleLowerCase()"
|
|
||||||
show-toolbar
|
|
||||||
@cancel="pickerStates[column.columnCode + 'Picker'] = false; column.columnValue = ''"
|
|
||||||
@confirm="(time)=>{dateTimePickerConfirm(time,column)}"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
<template v-else>
|
|
||||||
<van-picker
|
|
||||||
:columns="column.selectValues"
|
|
||||||
:title="column.columnName"
|
|
||||||
show-toolbar
|
|
||||||
@cancel="pickerStates[column.columnCode + 'Picker'] = false; column.columnValue = ''"
|
|
||||||
@confirm="(value)=>{ordinaryPickerConfirm(value,column)}"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</van-popup>
|
|
||||||
</template>
|
|
||||||
<!-- 单选框 -->
|
|
||||||
<template v-else-if="['BOOLEAN'].includes(column.columnType)">
|
|
||||||
|
|
||||||
</template>
|
|
||||||
<!-- 文件 -->
|
|
||||||
<template v-else-if="['JSON'].includes(column.columnType)">
|
|
||||||
<van-field :required="column.isRequired" :label="column.columnName"
|
|
||||||
:rules="[{ required: column.isRequired, message: '请上传' + column.columnName }]">
|
|
||||||
<template #input>
|
|
||||||
<!-- <van-uploader v-model="fileList" :after-read="(file)=>{fileAfterRead(file,column)}"
|
|
||||||
:max-count="column.fileNumber"/>-->
|
|
||||||
|
|
||||||
<vant_file_upload :files.sync="column.columnValue" :max="column.fileNumber"
|
|
||||||
:type="column.fileType"></vant_file_upload>
|
|
||||||
</template>
|
|
||||||
</van-field>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
</van-form>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<!-- 请在van-form中引用 -->
|
|
||||||
|
|
||||||
<script>
|
|
||||||
module.exports = {
|
|
||||||
name: "TrainDynamicForm",
|
|
||||||
components: {
|
|
||||||
'vant_file_upload': httpVueLoader('/components/plugins/VantFileUpload.vue')
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
dynamicData: []
|
|
||||||
},
|
|
||||||
model: {
|
|
||||||
prop: 'dynamicData',
|
|
||||||
event: 'updateDynamicData'
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
dynamicData: {
|
|
||||||
handler: function (newValue, oldValue) {
|
|
||||||
this.$emit('updateDynamicData', newValue)
|
|
||||||
},
|
|
||||||
deep: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
//所有的picker状态
|
|
||||||
pickerStates: {},
|
|
||||||
fileList: []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
validForm() {
|
|
||||||
try {
|
|
||||||
this.$refs.form.validate().then(() => {
|
|
||||||
return true
|
|
||||||
}).catch(() => {
|
|
||||||
return false
|
|
||||||
})
|
|
||||||
} catch (e) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
/*return new Promise(resolve => {
|
|
||||||
this.$refs.form.validate().then(() => {
|
|
||||||
resolve(true)
|
|
||||||
}).catch(() => {
|
|
||||||
resolve(false)
|
|
||||||
})
|
|
||||||
})*/
|
|
||||||
|
|
||||||
},
|
|
||||||
onSubmit() {
|
|
||||||
|
|
||||||
},
|
|
||||||
selectFieldClick(column) {
|
|
||||||
console.log(column)
|
|
||||||
this.$set(this.pickerStates, column.columnCode + 'Picker', true)
|
|
||||||
if (!['DATE', 'DATETIME'].includes(column.columnType)) {
|
|
||||||
//说明是普通的下拉框
|
|
||||||
// column.selectValues = ['1', '2', '3']
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 时间picker确认
|
|
||||||
* @param time
|
|
||||||
* @param column
|
|
||||||
*/
|
|
||||||
dateTimePickerConfirm(time, column) {
|
|
||||||
if (column.columnType === 'DATE') {
|
|
||||||
column.columnValue = moment(time).format('YYYY-MM-DD')
|
|
||||||
} else if (column.columnType === 'DATETIME') {
|
|
||||||
column.columnValue = moment(time).format('YYYY-MM-DD HH:mm:ss')
|
|
||||||
} else {
|
|
||||||
//预留别的类型
|
|
||||||
column.columnValue = moment(time).format('YYYY-MM-DD HH:mm:ss')
|
|
||||||
}
|
|
||||||
this.pickerStates[column.columnCode + 'Picker'] = false
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 普通picker确认
|
|
||||||
* @param value
|
|
||||||
* @param column
|
|
||||||
*/
|
|
||||||
ordinaryPickerConfirm(value, column) {
|
|
||||||
column.columnValue = value
|
|
||||||
this.pickerStates[column.columnCode + 'Picker'] = false
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 文件读取
|
|
||||||
*/
|
|
||||||
fileAfterRead(file, column) {
|
|
||||||
|
|
||||||
|
|
||||||
console.log(file)
|
|
||||||
console.log(column)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
// console.log(this.dynamicData)
|
|
||||||
// this.dynamicData.forEach(v => {
|
|
||||||
// if (v.columnFormType === 'SELECT') {
|
|
||||||
// v.columnPickerName = v.columnCode+'Picker'
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// console.log(this.dynamicData)
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
@@ -1,158 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div style="padding-bottom: 20px;">
|
|
||||||
|
|
||||||
<van-form readonly input-align="right">
|
|
||||||
<div class="van-cell-group__title">
|
|
||||||
<div class="van-sidebar-item van-sidebar-item--select">
|
|
||||||
申请信息
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<van-cell-group>
|
|
||||||
<van-field readonly :value="viewData.sqrname" label="申请人"></van-field>
|
|
||||||
<van-field readonly :value="viewData.sqsj" label="申请时间"></van-field>
|
|
||||||
<van-field readonly :value="viewData.bbname" label="受补助人"></van-field>
|
|
||||||
<van-field readonly :value="viewData.idcard" label="身份证号"></van-field>
|
|
||||||
<van-field readonly name="type" :value="viewData.bbsex" label="性别"></van-field>
|
|
||||||
<van-field readonly name="type" :value="viewData.zc" label="职称"></van-field>
|
|
||||||
<van-field readonly name="type" :value="viewData.zw" label="职务"></van-field>
|
|
||||||
<van-field readonly :value="viewData.bbunit" label="所在单位"></van-field>
|
|
||||||
<van-field readonly name="way" :value="viewData.bbbirthday" label="出生日期"></van-field>
|
|
||||||
<van-field readonly :value="viewData.lxfs" label="手机号码"></van-field>
|
|
||||||
<van-field readonly :value="difficulty.subsidy[viewData.sq_bzlx]" label="补助类型"></van-field>
|
|
||||||
<van-field readonly :value=" difficulty.sq_knlx[viewData.sq_knlx] " label="困难类型"></van-field>
|
|
||||||
<van-field readonly :value="viewData.apply_reason" label="申请理由"
|
|
||||||
input-align="left"
|
|
||||||
style="flex-flow: column"
|
|
||||||
rows="2" maxlength="200" type="textarea" show-word-limit autosize></van-field>
|
|
||||||
<van-field label="附件" style="flex-flow: column" input-align="left">
|
|
||||||
<template #label>
|
|
||||||
<div class="mb10">附  件</div>
|
|
||||||
</template>
|
|
||||||
<template #input>
|
|
||||||
<vant-file-upload :files.sync="viewData.files" view :del="false"
|
|
||||||
v-if="viewData.files&&viewData.files.length"></vant-file-upload>
|
|
||||||
<span v-else>暂无</span>
|
|
||||||
</template>
|
|
||||||
</van-field>
|
|
||||||
|
|
||||||
<van-field name="sign" label="申请人签字">
|
|
||||||
<template #input>
|
|
||||||
<van-image width="200" height="100" :src="viewData.sqsign" v-if="viewData.sqsign!=null"></van-image>
|
|
||||||
<span v-else>暂无</span>
|
|
||||||
</template>
|
|
||||||
</van-field>
|
|
||||||
</van-cell-group>
|
|
||||||
</van-form>
|
|
||||||
|
|
||||||
<template v-if="viewData.upa">
|
|
||||||
<div class="van-cell-group__title">
|
|
||||||
<div class="van-sidebar-item van-sidebar-item--select">
|
|
||||||
分工会审核信息
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<van-cell-group class="mt10">
|
|
||||||
<div style="padding-left: 16px">
|
|
||||||
<van-field label="审核人员" :value="viewData.upa.username" left-icon="contact" readonly></van-field>
|
|
||||||
<van-field label="审核时间" :value="viewData.upa.auditTime" left-icon="clock-o"
|
|
||||||
readonly></van-field>
|
|
||||||
<van-field label="审核意见" left-icon="chat-o"
|
|
||||||
:value="viewData.upa.auditOpinion ? viewData.upa.auditOpinion : '暂无'"
|
|
||||||
readonly></van-field>
|
|
||||||
<van-field name="sign" label="签字">
|
|
||||||
<template #input>
|
|
||||||
<van-image width="200" height="100" :src="viewData.upa.auditSign"
|
|
||||||
v-if="viewData.upa.auditSign"></van-image>
|
|
||||||
<span v-else>暂无</span>
|
|
||||||
</template>
|
|
||||||
</van-field>
|
|
||||||
</div>
|
|
||||||
</van-cell-group>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template v-if="viewData.sma">
|
|
||||||
<div class="van-cell-group__title">
|
|
||||||
<div class="van-sidebar-item van-sidebar-item--select">
|
|
||||||
校工会审核信息
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<van-cell-group class="mt10">
|
|
||||||
<div style="padding-left: 16px">
|
|
||||||
<van-field label="审核人员" :value="viewData.sma.username" left-icon="contact" readonly></van-field>
|
|
||||||
<van-field label="审核时间" :value="viewData.sma.auditTime" left-icon="clock-o"
|
|
||||||
readonly></van-field>
|
|
||||||
<van-field label="审核意见" left-icon="chat-o"
|
|
||||||
:value="viewData.sma.auditOpinion ? viewData.sma.auditOpinion : '暂无'"
|
|
||||||
readonly></van-field>
|
|
||||||
<van-field name="sign" label="签字">
|
|
||||||
<template #input>
|
|
||||||
<van-image width="200" height="100" :src="viewData.sma.auditSign"
|
|
||||||
v-if="viewData.sma.auditSign"></van-image>
|
|
||||||
<span v-else>暂无</span>
|
|
||||||
</template>
|
|
||||||
</van-field>
|
|
||||||
</div>
|
|
||||||
</van-cell-group>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template v-if="handle">
|
|
||||||
<slot name="handle"></slot>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
module.exports = {
|
|
||||||
props: {
|
|
||||||
handle: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
title: {
|
|
||||||
type: String,
|
|
||||||
default: '审核'
|
|
||||||
},
|
|
||||||
id: {
|
|
||||||
type: String,
|
|
||||||
default: ''
|
|
||||||
},
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
viewData: {},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
components: {
|
|
||||||
'vant-file-upload': httpVueLoader('/components/plugins/VantFileUpload.vue')
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
async getInfo(id) {
|
|
||||||
const {data, code, msg} = await $.get("/platform/fw/difficulty/applylist/findOne", {id})
|
|
||||||
if (data) {
|
|
||||||
condolence.toFormData(data)
|
|
||||||
this.viewData = data
|
|
||||||
} else {
|
|
||||||
this.viewData = {}
|
|
||||||
this.$toast.fail('获取信息失败');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
async created() {
|
|
||||||
await this.getInfo(this.id)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style>
|
|
||||||
.van-cell-group__title {
|
|
||||||
padding-left: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.van-sidebar-item {
|
|
||||||
font-size: 16px !important;
|
|
||||||
text-indent: 4px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.van-sidebar-item--select::before {
|
|
||||||
left: 5px !important;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,214 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div style="padding-bottom: 20px;">
|
|
||||||
|
|
||||||
<van-form readonly input-align="right">
|
|
||||||
<div class="van-cell-group__title">
|
|
||||||
<div class="van-sidebar-item van-sidebar-item--select">
|
|
||||||
申请信息
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<van-cell-group>
|
|
||||||
<van-field :value="viewData.loginname" label="工号" left-icon="contact"></van-field>
|
|
||||||
<van-field label="姓名" :value="viewData.username" left-icon="contact"></van-field>
|
|
||||||
<van-field label="性别" :value="viewData.sex" left-icon="ellipsis"></van-field>
|
|
||||||
<van-field label="民族" left-icon="bar-chart-o" :value="viewData.nation"></van-field>
|
|
||||||
<van-field label="学历" left-icon="coupon-o" :value="viewData.education"></van-field>
|
|
||||||
<van-field label="学位" left-icon="comment-o" :value="viewData.academicDegree"></van-field>
|
|
||||||
<van-field label="政治面貌" left-icon="label-o" :value="viewData.political"></van-field>
|
|
||||||
<van-field :value="viewData.personType" label="人员类型" left-icon="label-o"></van-field>
|
|
||||||
<van-field label="身份证" left-icon="idcard" :value="viewData.idcard"></van-field>
|
|
||||||
<van-field label="联系电话" left-icon="phone-o" :value="viewData.mobile"></van-field>
|
|
||||||
<van-field label="户口所在地" left-icon="wap-home-o"
|
|
||||||
:value="viewData.registeredResidence"></van-field>
|
|
||||||
<van-field label="现居住地" left-icon="home-o" :value="viewData.homeAddress"></van-field>
|
|
||||||
<van-field label="工作单位" left-icon="cluster-o" :value="viewData.unitname"></van-field>
|
|
||||||
<van-field label="职务" left-icon="debit-pay" :value="viewData.position"></van-field>
|
|
||||||
</van-cell-group>
|
|
||||||
</van-form>
|
|
||||||
<van-cell-group class="mt10 up_down">
|
|
||||||
<div class="van-cell" style="flex-flow: column">
|
|
||||||
<div style="display: flex">
|
|
||||||
<div class="van-field__left-icon">
|
|
||||||
<i class="van-icon van-icon-notes-o"></i>
|
|
||||||
</div>
|
|
||||||
<div class="van-cell__title van-field__label">
|
|
||||||
<span>个人工作简历</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<van-divider></van-divider>
|
|
||||||
|
|
||||||
<van-field readonly>
|
|
||||||
<template #input>
|
|
||||||
<div v-html="viewData.position"></div>
|
|
||||||
</template>
|
|
||||||
</van-field>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</van-cell-group>
|
|
||||||
<van-cell-group class="mt10 up_down">
|
|
||||||
<div class="van-cell" style="flex-flow: column">
|
|
||||||
<div style="display: flex">
|
|
||||||
<div class="van-field__left-icon">
|
|
||||||
<i class="van-icon van-icon-award-o"></i>
|
|
||||||
</div>
|
|
||||||
<div class="van-cell__title van-field__label">
|
|
||||||
<span>特长</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<van-divider></van-divider>
|
|
||||||
|
|
||||||
<van-field readonly>
|
|
||||||
<template #input>
|
|
||||||
<div v-html="viewData.specialSkill"></div>
|
|
||||||
</template>
|
|
||||||
</van-field>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</van-cell-group>
|
|
||||||
<van-cell-group class="mt10 up_down">
|
|
||||||
<div class="van-cell" style="flex-flow: column">
|
|
||||||
<div class="van-cell__title van-field__label"
|
|
||||||
style="display: flex;justify-content: space-between">
|
|
||||||
<div style="display: flex;">
|
|
||||||
<div class="van-field__left-icon">
|
|
||||||
<i class="van-icon van-icon-friends-o"></i>
|
|
||||||
</div>
|
|
||||||
<div class="van-cell__title van-field__label" style="width: auto">
|
|
||||||
<span>家庭主要成员及联系方式</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<van-divider></van-divider>
|
|
||||||
|
|
||||||
<div v-if="family && family.length>0">
|
|
||||||
<div v-for="(o,i) in family" class="mt5">
|
|
||||||
<div style="font-weight: 700;display: flex;justify-content: space-between">
|
|
||||||
<span>成员{{ toChinesNum(i + 1) }}</span>
|
|
||||||
</div>
|
|
||||||
<van-form readonly input-align="right">
|
|
||||||
<van-field label="关系" :value="o.relation" left-icon="exchange"></van-field>
|
|
||||||
<van-field label="姓名" :value="o.name" left-icon="user-o"></van-field>
|
|
||||||
<van-field label="联系方式" :value="o.mobile" left-icon="phone-o"></van-field>
|
|
||||||
</van-form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div v-else style="height: 100px">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</van-cell-group>
|
|
||||||
|
|
||||||
|
|
||||||
<template v-if="unionAudit">
|
|
||||||
<div class="van-cell-group__title mt20">
|
|
||||||
<div class="van-sidebar-item van-sidebar-item--select">
|
|
||||||
分工会审核信息
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<van-cell-group>
|
|
||||||
<van-field label="审 核 人" :value="unionAudit.username" left-icon="contact"
|
|
||||||
readonly></van-field>
|
|
||||||
<van-field label="审核时间" :value="moment(unionAudit.auditTime).format('YYYY-MM-DD')"
|
|
||||||
left-icon="clock-o"
|
|
||||||
readonly></van-field>
|
|
||||||
<van-field label="审核意见" left-icon="chat-o" :value="unionAudit.auditOpinion"
|
|
||||||
readonly></van-field>
|
|
||||||
</van-cell-group>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template v-if="schoolAudit">
|
|
||||||
<div class="van-cell-group__title mt20">
|
|
||||||
<div class="van-sidebar-item van-sidebar-item--select">
|
|
||||||
校工会审核信息
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<van-cell-group>
|
|
||||||
<van-field label="审 核 人" :value="schoolAudit.username" left-icon="contact"
|
|
||||||
readonly></van-field>
|
|
||||||
<van-field label="审核时间" :value="moment(schoolAudit.auditTime).format('YYYY-MM-DD')"
|
|
||||||
left-icon="clock-o"
|
|
||||||
readonly></van-field>
|
|
||||||
<van-field label="审核意见" left-icon="chat-o" :value="schoolAudit.auditOpinion"
|
|
||||||
readonly></van-field>
|
|
||||||
</van-cell-group>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template v-if="handle">
|
|
||||||
<slot name="handle"></slot>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
module.exports = {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
info: {},
|
|
||||||
viewData: {},
|
|
||||||
unionAudit: {},
|
|
||||||
schoolAudit: {},
|
|
||||||
family: []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
handle: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
title: {
|
|
||||||
type: String,
|
|
||||||
default: '审核'
|
|
||||||
},
|
|
||||||
user_id: String,
|
|
||||||
record_id: String
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
async getAuditInfo(id) {
|
|
||||||
const {data} = await $.get('/platform/member/common/findChangeApplyInfo', {id: id})
|
|
||||||
if (data !== null) {
|
|
||||||
const {unionAudit, schoolAudit} = data
|
|
||||||
this.info = data
|
|
||||||
this.unionAudit = unionAudit
|
|
||||||
this.schoolAudit = schoolAudit
|
|
||||||
} else {
|
|
||||||
this.unionAudit = null
|
|
||||||
this.schoolAudit = null
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
},
|
|
||||||
async getUserInfo(id) {
|
|
||||||
const {data} = await $.get('/platform/member/common/userInfo', {userId: id})
|
|
||||||
this.viewData = data
|
|
||||||
this.family = JSON.parse(data.family)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.card_title {
|
|
||||||
margin: 5px 0 5px 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.van-cell-group__title {
|
|
||||||
padding-left: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.van-sidebar-item {
|
|
||||||
font-size: 16px !important;
|
|
||||||
text-indent: 4px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.van-sidebar-item--select::before {
|
|
||||||
left: 5px !important;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||