bug整改
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
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.wizzer.framework.base.Result;
|
||||
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.jsoup.Jsoup;
|
||||
import org.jsoup.nodes.Document;
|
||||
import org.jsoup.nodes.Element;
|
||||
import org.jsoup.select.Elements;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
@@ -38,6 +37,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpSession;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -210,12 +210,19 @@ public class SysHomeController {
|
||||
@RequiresAuthentication
|
||||
public Result listHomeActivity() {
|
||||
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();
|
||||
|
||||
List<Sys_home_activity> allowActivityList = new ArrayList<>();
|
||||
|
||||
// 今天的时间
|
||||
Date today = DateUtil.date();
|
||||
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();
|
||||
String allowUserSql = activity.getAllowUserSql();
|
||||
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);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,10 +7,10 @@ import cn.hutool.core.util.StrUtil;
|
||||
import cn.wizzer.framework.base.Result;
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
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.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.services.*;
|
||||
import io.v.nutz.web.commons.controller.ViCommonCon;
|
||||
@@ -102,7 +102,10 @@ public class SysUnionMangeCon {
|
||||
}
|
||||
sysUserRoleService.insert(role);
|
||||
} 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)) {
|
||||
// cnd.and("unionid", "=", unionid);
|
||||
// }
|
||||
|
||||
+9
-6
@@ -9,6 +9,7 @@ import io.v.nutz.base.service.BaseService;
|
||||
import io.v.nutz.base.service.SimpleService;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
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 org.apache.shiro.authz.annotation.Logical;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
@@ -94,7 +95,7 @@ public class ActivityUnionApplyUserController {
|
||||
cnd.andEx("tissue.type", "=", type);
|
||||
cnd.andEx("tissue.state", "=", 3);
|
||||
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)) {
|
||||
cnd.where().andLike("tissue.name", name);
|
||||
@@ -172,18 +173,20 @@ public class ActivityUnionApplyUserController {
|
||||
@ViReturn
|
||||
@RequiresPermissions(value = {"activity.club.applyUser", "activity.union.applyUser", "activity.school.applyUser"}, logical = Logical.OR)
|
||||
public Object getReportedUser(String tissueId) {
|
||||
ActivityTissue tissue = baseService.dao().fetch(ActivityTissue.class, Cnd.where("id", "=", tissueId));
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
atp.userId
|
||||
FROM
|
||||
activity_tissue_person atp
|
||||
LEFT JOIN `user` u ON atp.userId = u.id
|
||||
WHERE
|
||||
atp.tissueId = @tissueId
|
||||
AND u.unionid = @unionId
|
||||
$condition
|
||||
""");
|
||||
sql.setParam("tissueId", tissueId);
|
||||
sql.setParam("unionId", Vi.getUnionId());
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("atp.tissueId", "=", tissueId);
|
||||
if (tissue.getSignUpMethod() != 3 && tissue.getType() != 40003) {
|
||||
cnd.and("u.unionid", "=", Vi.getUnionId());
|
||||
}
|
||||
List<NutMap> list = baseService.listMap(sql);
|
||||
List<String> userIds = list.stream().map(v -> v.getString("userId")).collect(Collectors.toList());
|
||||
return userIds;
|
||||
|
||||
+5
-4
@@ -3,6 +3,7 @@ package io.v.nutz.zhgh.activity.controller.union;
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
import com.deepoove.poi.config.Configure;
|
||||
import com.deepoove.poi.policy.HackLoopTableRenderPolicy;
|
||||
@@ -125,7 +126,7 @@ public class ActivityUnionManageController {
|
||||
""");
|
||||
if (!ShiroUtil.hasRole("sysadmin")) {
|
||||
if (activity_type == 40002) {
|
||||
cnd.and("unionId", "=", vi.getUnionId());
|
||||
cnd.and("unionId", "=", Vi.getUnionId());
|
||||
} else if (activity_type == 40003) {
|
||||
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)
|
||||
@RequiresPermissions(value = {"activity.union.info", "activity.club.info", "activity.school.info2"}, logical = Logical.OR)
|
||||
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());
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) {
|
||||
tissue.setState(1);
|
||||
@@ -166,8 +169,6 @@ public class ActivityUnionManageController {
|
||||
tissue.setClubId(vi.getClubId());
|
||||
}
|
||||
|
||||
|
||||
|
||||
tissue.getGoods().forEach(v -> {
|
||||
v.setActivityCode(tissue.getActivityCode());
|
||||
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
|
||||
@ViReturn
|
||||
@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("""
|
||||
SELECT
|
||||
JT.bankName,
|
||||
@@ -116,15 +116,15 @@ public class FundsApplyController {
|
||||
JSON_TABLE(
|
||||
budgets,
|
||||
'$[*]' COLUMNS(
|
||||
payeeId VARCHAR(255) PATH '$.payeeId',
|
||||
username VARCHAR(255) PATH '$.username',
|
||||
bankName VARCHAR(255) PATH '$.bankName',
|
||||
bankCardNum VARCHAR(255) PATH '$.bankCardNum'
|
||||
)
|
||||
) AS JT
|
||||
WHERE
|
||||
JT.payeeId = @payeeId
|
||||
JT.username = @username
|
||||
ORDER BY bx.apply_time DESC LIMIT 1
|
||||
""").setParam("payeeId", payeeId);
|
||||
""").setParam("username", username);
|
||||
sql.setCallback(Sqls.callback.map());
|
||||
dao.execute(sql);
|
||||
return sql.getResult();
|
||||
|
||||
@@ -8,6 +8,7 @@ import cn.wizzer.framework.base.service.BaseService;
|
||||
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.Goods;
|
||||
@@ -24,6 +25,7 @@ import io.v.nutz.zhgh.jf.service.ActivityBxService;
|
||||
import io.v.nutz.zhgh.jf.service.ActivityFileService;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.boot.starter.ftp.FtpService;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
@@ -38,6 +40,7 @@ import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
@@ -69,6 +72,9 @@ public class ReimbursementCon {
|
||||
@Inject
|
||||
private BaseService baseService;
|
||||
|
||||
@Inject
|
||||
private FtpService ftpService;
|
||||
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/jf/activitybx/reimbursement.html")
|
||||
@@ -315,9 +321,16 @@ public class ReimbursementCon {
|
||||
}
|
||||
|
||||
private PictureRenderData getImage(String base64) throws IOException {
|
||||
String s = base64.split(",")[1];
|
||||
byte[] bytes = Base64.getDecoder().decode(s);
|
||||
return new PictureRenderData(70, 30, ".png", bytes);
|
||||
if (base64.startsWith("data")) {
|
||||
String s = base64.split(",")[1];
|
||||
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.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.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.service.ActivityBxService;
|
||||
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;
|
||||
@@ -28,6 +30,7 @@ import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URLEncoder;
|
||||
@@ -50,9 +53,10 @@ public class ReimbursementViewCon {
|
||||
|
||||
@Inject
|
||||
private Vi vi;
|
||||
|
||||
@Inject
|
||||
private ActivityBxService activityBxService;
|
||||
@Inject
|
||||
private FtpService ftpService;
|
||||
|
||||
private SysUnionService sysUnionService;
|
||||
|
||||
@@ -127,9 +131,16 @@ public class ReimbursementViewCon {
|
||||
}
|
||||
|
||||
private PictureRenderData getImage(String base64) throws IOException {
|
||||
String s = base64.split(",")[1];
|
||||
byte[] bytes = Base64.getDecoder().decode(s);
|
||||
return new PictureRenderData(100, 30, ".png", bytes);
|
||||
if (base64.startsWith("data:")) {
|
||||
String s = base64.split(",")[1];
|
||||
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
|
||||
|
||||
+3
-1
@@ -83,7 +83,9 @@ public class ActivityReimbursementApplyController {
|
||||
List<ActivityBx.Budget> budgets = activityBx.getBudgets();
|
||||
double sum = budgets.stream().mapToDouble(ActivityBx.Budget::getActualPrice).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) {
|
||||
activityBx.setFiles(null);
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package io.v.nutz.zhgh.member;
|
||||
|
||||
import io.v.nutz.base.utils.Roles;
|
||||
import io.v.nutz.zhgh.member.constant.MemberOrigin;
|
||||
import io.v.nutz.zhgh.member.constant.MemberStatus;
|
||||
import io.v.nutz.base.utils.ViResource;
|
||||
import io.v.nutz.sys.models.Sys_user;
|
||||
import io.v.nutz.sys.models.Sys_user_role;
|
||||
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.util.ByteSource;
|
||||
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.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.MemberChangeApplyState;
|
||||
import io.v.nutz.zhgh.member.constant.MemberChangeRecordMode;
|
||||
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.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
|
||||
@@ -3,17 +3,16 @@ package io.v.nutz.zhgh.member.controller;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.wizzer.framework.base.Result;
|
||||
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.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.member.UserMode;
|
||||
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.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.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
@@ -205,7 +204,7 @@ public class MemberCommonController {
|
||||
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()));
|
||||
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())) {
|
||||
//从变更来的 特殊 需要审核
|
||||
@@ -221,8 +220,8 @@ public class MemberCommonController {
|
||||
);
|
||||
}
|
||||
|
||||
String userState = StrUtil.blankToDefault(changeRecord.getUserState(), "");
|
||||
if (!userState.equals(sysUserMap.getString("userState", ""))) {
|
||||
String userState = StrUtil.blankToDefault(changeRecord.getChangeUserState(), "");
|
||||
if (StrUtil.isNotBlank(userState) && !userState.equals(sysUserMap.getString("userState", ""))) {
|
||||
compareData.add(NutMap.NEW()
|
||||
.addv("columnName", "在职状态")
|
||||
.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()){
|
||||
//说明要改变会员状态
|
||||
@@ -240,7 +248,7 @@ public class MemberCommonController {
|
||||
);
|
||||
}
|
||||
|
||||
if(changeRecord.getUpdateWelfare()!=null && changeRecord.getUpdateWelfare()){
|
||||
if(changeRecord.getUpdateWelfareMember()!=null && changeRecord.getUpdateWelfareMember()){
|
||||
//说明要改变福利会员状态
|
||||
compareData.add(NutMap.NEW()
|
||||
.addv("columnName", "福利会员资格")
|
||||
@@ -267,7 +275,7 @@ public class MemberCommonController {
|
||||
COLUMN_COMMENT
|
||||
FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE TABLE_NAME = 'sys_user'
|
||||
AND TABLE_SCHEMA = 'union_cpu'
|
||||
AND TABLE_SCHEMA = 'zhgh_hrbnu'
|
||||
""");
|
||||
List<NutMap> userTableColumnInfos = sysUserService.listMap(userColumnSql);
|
||||
|
||||
|
||||
@@ -3,10 +3,10 @@ package io.v.nutz.zhgh.member.controller;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
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.model.MemberCheckSelfTask;
|
||||
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.nutz.dao.Cnd;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
|
||||
+5
-5
@@ -1,16 +1,16 @@
|
||||
package io.v.nutz.zhgh.member.controller.apply;
|
||||
|
||||
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.zhgh.member.constant.MemberApplyState;
|
||||
import io.v.nutz.zhgh.member.handle.MemberApplyAuditHandle;
|
||||
import io.v.nutz.zhgh.member.model.MemberApplyRecord;
|
||||
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.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.RequiresPermissions;
|
||||
import org.nutz.dao.Sqls;
|
||||
|
||||
@@ -5,21 +5,21 @@ import cn.hutool.core.util.StrUtil;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
import com.deepoove.poi.config.Configure;
|
||||
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.Roles;
|
||||
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.models.Sys_user;
|
||||
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.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 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.ddr.poi.html.HtmlRenderPolicy;
|
||||
import org.nutz.dao.Chain;
|
||||
|
||||
+6
-6
@@ -1,18 +1,18 @@
|
||||
package io.v.nutz.zhgh.member.controller.change;
|
||||
|
||||
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.utils.Vi;
|
||||
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.MemberChangeRecordMode;
|
||||
import io.v.nutz.zhgh.member.handle.MemberChangeAuditHandle;
|
||||
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.RequiresPermissions;
|
||||
import org.nutz.dao.Sqls;
|
||||
|
||||
+2
-2
@@ -1,16 +1,16 @@
|
||||
package io.v.nutz.zhgh.member.controller.change;
|
||||
|
||||
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.Vi;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.zhgh.member.constant.MemberChangeApplyState;
|
||||
import io.v.nutz.zhgh.member.constant.MemberChangeOrigin;
|
||||
import io.v.nutz.zhgh.member.constant.MemberChangeRecordMode;
|
||||
import io.v.nutz.zhgh.member.handle.MemberChangeAuditHandle;
|
||||
import io.v.nutz.zhgh.member.model.MemberChangeRecord;
|
||||
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.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
|
||||
+36
-18
@@ -10,13 +10,20 @@ import cn.hutool.core.util.StrUtil;
|
||||
import cn.wizzer.framework.base.Result;
|
||||
import com.google.common.base.Joiner;
|
||||
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.Roles;
|
||||
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.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.utils.ShiroUtil;
|
||||
import io.v.nutz.zhgh.data.constant.UserChangeType;
|
||||
import io.v.nutz.zhgh.member.MemberMode;
|
||||
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.template.MemberTemp;
|
||||
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 org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
@@ -109,10 +109,12 @@ public class MemberChangeManageController {
|
||||
@Param(value = "sex", required = false) String sex,
|
||||
@Param(value = "personType", required = false) String personType,
|
||||
@Param(value = "userState", required = false) String userState,
|
||||
@Param(value = "preparedBy", required = false) String preparedBy,
|
||||
@Param(value = "changeDate", required = false) String changeDate,
|
||||
@Param(value = "changeType", required = false) String changeType,
|
||||
@Param(value = "changeTypes", required = false) Integer[] changeTypes,
|
||||
@Param(value = "changed", required = false) Integer changed,
|
||||
@Param(value = "myUnionGroupUser", required = false) Integer myUnionGroupUser,
|
||||
@Param(value = "isMember", required = false) Integer isMember) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
@@ -154,9 +156,16 @@ public class MemberChangeManageController {
|
||||
cnd.and("u.unionId", "=", Vi.getUnionId());
|
||||
} else if (ShiroUtil.hasRole("ghxzzz")) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.or("u.unionGroupId", "in", io.v.nutz.web.commons.utils.ShiroUtil.getUnionGroupIds());
|
||||
seg.or("u.unionGroupId", "is", null);
|
||||
cnd.and(seg);
|
||||
if (myUnionGroupUser == null) {
|
||||
seg.or("u.unionGroupId", "in", ShiroUtil.getUnionGroupIds());
|
||||
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());
|
||||
}
|
||||
|
||||
@@ -169,6 +178,7 @@ public class MemberChangeManageController {
|
||||
cnd.andEX("u.sex", "=", sex);
|
||||
cnd.andEX("u.personType", "=", personType);
|
||||
cnd.andEX("u.userState", "=", userState);
|
||||
cnd.andEX("u.preparedBy", "=", preparedBy);
|
||||
|
||||
if (StrUtil.isNotBlank(changeDateBefore) && StrUtil.isNotBlank(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())) {
|
||||
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)) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
for (Integer type : changeTypes) {
|
||||
@@ -249,7 +260,7 @@ public class MemberChangeManageController {
|
||||
} else if (ShiroUtil.hasRole("ghxzzz")) {
|
||||
cnd.and("u.unionId", "=", Vi.getUnionId());
|
||||
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);
|
||||
cnd.and(seg);
|
||||
}
|
||||
@@ -301,7 +312,11 @@ public class MemberChangeManageController {
|
||||
memberChangeRecord = MemberChangeAuditHandle.CREATE.next(memberChangeRecord, null);
|
||||
MemberChangeAuditHandle.SCHOOL.next(memberChangeRecord, audit);
|
||||
} 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);
|
||||
MemberChangeAuditHandle.UNION.next(memberChangeRecord, audit);
|
||||
}
|
||||
@@ -363,7 +378,7 @@ public class MemberChangeManageController {
|
||||
@Param(value = "memberSearchKeyWord", required = false) String memberSearchKeyWord,
|
||||
@Param(value = "isAppendWelfareMember", required = false) Boolean isAppendWelfareMember) {
|
||||
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("""
|
||||
SELECT u.* from $table
|
||||
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));
|
||||
MemberChangeRecord changeRecord = new MemberChangeRecord();
|
||||
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.setUpdateWelfareMember(true);
|
||||
changeRecord.setUserId(userId);
|
||||
@@ -536,6 +551,9 @@ public class MemberChangeManageController {
|
||||
public Object units() {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("unitlevel", "=", 2);
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,SchoolUnionAdmin")) {
|
||||
cnd.and("id", "!=", "DZJF000");
|
||||
}
|
||||
return sysUnitService.dao().query("unit_union", cnd);
|
||||
}
|
||||
|
||||
@@ -635,7 +653,7 @@ public class MemberChangeManageController {
|
||||
//判断是否在系统中
|
||||
Sys_user user = userMap.get(v.getLoginname());
|
||||
Sys_user_role userRole = new Sys_user_role();
|
||||
if (org.nutz.lang.Lang.isNotEmpty(user)) {
|
||||
if (Lang.isNotEmpty(user)) {
|
||||
user.setUnitid(unitId);
|
||||
user.setSex(v.getSex());
|
||||
user.setMobile(v.getMobile());
|
||||
@@ -683,7 +701,7 @@ public class MemberChangeManageController {
|
||||
sysUnitService.dao().updateIgnoreNull(needUpdateUser);
|
||||
|
||||
//如果有错误数据就返回给前端
|
||||
if (org.nutz.lang.Lang.isNotEmpty(errorInfos)) {
|
||||
if (Lang.isNotEmpty(errorInfos)) {
|
||||
NutMap nutMap = NutMap.NEW();
|
||||
nutMap.setv("totalCount", memberImportList.size());
|
||||
nutMap.setv("successCount", doCleanRoleUsers.size());
|
||||
|
||||
+4
-4
@@ -2,14 +2,14 @@ package io.v.nutz.zhgh.member.controller.change;
|
||||
|
||||
import cn.wizzer.framework.page.Pagination;
|
||||
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.zhgh.member.model.MemberChangeRecord;
|
||||
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.ViService;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
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.nutz.dao.Cnd;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
@@ -80,7 +80,7 @@ public class MemberChangeRecordsController {
|
||||
} else if (ShiroUtil.hasRole("ghxzzz")) {
|
||||
cnd.and("u.unionId", "=", Vi.getUnionId());
|
||||
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);
|
||||
cnd.and(seg);
|
||||
}
|
||||
|
||||
+3
-3
@@ -4,11 +4,11 @@ import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||
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.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
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.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.dao.Cnd;
|
||||
|
||||
+1
-3
@@ -1,13 +1,12 @@
|
||||
package io.v.nutz.zhgh.member.controller.check;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
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.utils.Roles;
|
||||
import io.v.nutz.zhgh.member.constant.MemberChangeApplyState;
|
||||
import io.v.nutz.zhgh.member.model.MemberChangeRecord;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
@@ -15,7 +14,6 @@ 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.json.Json;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
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 io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
import io.v.nutz.base.service.SimpleService;
|
||||
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.model.MemberChangeRecord;
|
||||
import io.v.nutz.zhgh.member.model.MemberCheckSelfTask;
|
||||
import io.v.nutz.zhgh.member.model.MemberCheckTask;
|
||||
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.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
|
||||
+21
-20
@@ -4,9 +4,12 @@ import cn.hutool.core.util.StrUtil;
|
||||
import cn.wizzer.framework.base.Result;
|
||||
import com.google.common.base.Joiner;
|
||||
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.utils.Vi;
|
||||
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.member.constant.MemberChangeApplyState;
|
||||
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.model.MemberChangeRecord;
|
||||
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.nutz.dao.Chain;
|
||||
import org.nutz.dao.Cnd;
|
||||
@@ -67,11 +67,11 @@ public class MemberCheckUnionController {
|
||||
@Param(value = "taskId", required = false) String taskId,
|
||||
@Param(value = "unionId", required = false) String unionId,
|
||||
@Param(value = "unitId", required = false) String unitId,
|
||||
@Param(value = "sex", required = false) String sex,
|
||||
@Param(value = "changed", required = false) Integer changed,
|
||||
@Param(value = "isMember", required = false) Integer isMember,
|
||||
@Param(value = "unionGroupId", required = false) String unionGroupId,
|
||||
@Param(value = "threeUnitId", required = false) String threeUnitId,
|
||||
@Param(value = "preparedBy", required = false) String preparedBy,
|
||||
@Param(value = "userStates", required = false) String[] userStates,
|
||||
@Param(value = "personTypes", required = false) String[] personTypes,
|
||||
@Param(value = "changeTypes", required = false) Integer[] changeTypes,
|
||||
@@ -86,6 +86,7 @@ public class MemberCheckUnionController {
|
||||
u.birthday,
|
||||
u.personType,
|
||||
u.userState,
|
||||
u.preparedBy,
|
||||
u.unionname,
|
||||
u.unitname,
|
||||
u.threeUnitName,
|
||||
@@ -114,18 +115,18 @@ public class MemberCheckUnionController {
|
||||
cnd.and("u.unionId", "=", Vi.getUnionId());
|
||||
} else if (ShiroUtil.hasRole("ghxzzz")) {
|
||||
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);
|
||||
cnd.and(seg);
|
||||
cnd.and("u.unionid", "=", Vi.getUnionId());
|
||||
}
|
||||
|
||||
}
|
||||
cnd.andEX("u.sex", "=", sex);
|
||||
cnd.andEX("u.unionid", "=", unionId);
|
||||
cnd.andEX("u.unitid", "=", unitId);
|
||||
cnd.andEX("u.unionGroupId", "=", unionGroupId);
|
||||
cnd.andEX("u.threeUnitId", "=", threeUnitId);
|
||||
cnd.andEX("u.preparedBy", "=", preparedBy);
|
||||
cnd.and(Cnd.likeEX("u." + pageForm.getSearchName(), pageForm.getSearchKeyword()));
|
||||
|
||||
cnd.andEX("u.member", "=", isMember);
|
||||
@@ -143,7 +144,7 @@ public class MemberCheckUnionController {
|
||||
cnd.desc("changeTime");
|
||||
}
|
||||
|
||||
if (org.nutz.lang.Lang.isNotEmpty(changeTypes)) {
|
||||
if (Lang.isNotEmpty(changeTypes)) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
for (Integer type : changeTypes) {
|
||||
seg.or(new Static("JSON_CONTAINS(his.changeTypes, CAST(%d AS JSON), '$')".formatted(type)));
|
||||
@@ -151,7 +152,7 @@ public class MemberCheckUnionController {
|
||||
cnd.and(seg);
|
||||
}
|
||||
|
||||
if (org.nutz.lang.Lang.isNotEmpty(userStates)) {
|
||||
if (Lang.isNotEmpty(userStates)) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
for (String state : userStates) {
|
||||
seg.orEquals("u.userState", state);
|
||||
@@ -159,7 +160,7 @@ public class MemberCheckUnionController {
|
||||
cnd.and(seg);
|
||||
}
|
||||
|
||||
if (org.nutz.lang.Lang.isNotEmpty(personTypes)) {
|
||||
if (Lang.isNotEmpty(personTypes)) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
for (String personType : personTypes) {
|
||||
seg.orEquals("u.personType", personType);
|
||||
@@ -167,7 +168,7 @@ public class MemberCheckUnionController {
|
||||
cnd.and(seg);
|
||||
}
|
||||
|
||||
if (org.nutz.lang.Lang.isNotEmpty(changeOrigins)) {
|
||||
if (Lang.isNotEmpty(changeOrigins)) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
for (Integer c : changeOrigins) {
|
||||
seg.orEquals("u.changeOrigin", c);
|
||||
@@ -218,7 +219,7 @@ public class MemberCheckUnionController {
|
||||
} else if (ShiroUtil.hasRole("ghxzzz")) {
|
||||
cnd.and("u.unionId", "=", Vi.getUnionId());
|
||||
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);
|
||||
cnd.and(seg);
|
||||
}
|
||||
@@ -230,7 +231,7 @@ public class MemberCheckUnionController {
|
||||
cnd.andEX("u.unitid", "=", unitId);
|
||||
cnd.andEX("u.member", "=", isMember);
|
||||
|
||||
if (org.nutz.lang.Lang.isNotEmpty(changeTypes)) {
|
||||
if (Lang.isNotEmpty(changeTypes)) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
for (Integer type : changeTypes) {
|
||||
seg.or(new Static("JSON_CONTAINS(his.changeTypes, CAST(%d AS JSON), '$')".formatted(type)));
|
||||
@@ -238,7 +239,7 @@ public class MemberCheckUnionController {
|
||||
cnd.and(seg);
|
||||
}
|
||||
|
||||
if (org.nutz.lang.Lang.isNotEmpty(userStates)) {
|
||||
if (Lang.isNotEmpty(userStates)) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
for (String state : userStates) {
|
||||
seg.orEquals("u.userState", state);
|
||||
@@ -246,7 +247,7 @@ public class MemberCheckUnionController {
|
||||
cnd.and(seg);
|
||||
}
|
||||
|
||||
if (org.nutz.lang.Lang.isNotEmpty(personTypes)) {
|
||||
if (Lang.isNotEmpty(personTypes)) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
for (String personType : personTypes) {
|
||||
seg.orEquals("u.personType", personType);
|
||||
@@ -254,7 +255,7 @@ public class MemberCheckUnionController {
|
||||
cnd.and(seg);
|
||||
}
|
||||
|
||||
if (org.nutz.lang.Lang.isNotEmpty(changeOrigins)) {
|
||||
if (Lang.isNotEmpty(changeOrigins)) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
for (Integer c : changeOrigins) {
|
||||
seg.orEquals("u.changeOrigin", c);
|
||||
@@ -309,11 +310,11 @@ public class MemberCheckUnionController {
|
||||
dao.execute(userSql);
|
||||
String userState = StrUtil.blankToDefault(userSql.getString(), "");
|
||||
|
||||
if (memberChangeRecord.getType() == UserChangeType.ON_DUTY.getCode()) {
|
||||
if (userState.equals(UserChangeType.ON_DUTY.getDescription())) {
|
||||
return Result.error("该用户当前的状态已经是" + UserChangeType.ON_DUTY.getDescription() + ",您无需变更!");
|
||||
}
|
||||
}
|
||||
// if (memberChangeRecord.getType() == UserChangeType.ON_DUTY.getCode()) {
|
||||
// if (userState.equals(UserChangeType.ON_DUTY.getDescription())) {
|
||||
// return Result.error("该用户当前的状态已经是" + UserChangeType.ON_DUTY.getDescription() + ",您无需变更!");
|
||||
// }
|
||||
// }
|
||||
if (memberChangeRecord.getType() == UserChangeType.RESIGN.getCode()) {
|
||||
if (userState.equals(UserChangeType.RESIGN.getDescription())) {
|
||||
return Result.error("该用户当前的状态已经是" + UserChangeType.RESIGN.getDescription() + ",您无需变更!");
|
||||
|
||||
+10
-10
@@ -4,8 +4,15 @@ import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||
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.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.member.MemberMode;
|
||||
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.model.MemberChangeRecord;
|
||||
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.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.dao.Cnd;
|
||||
@@ -123,7 +123,7 @@ public class MemberBatchMakeController {
|
||||
} else if (ShiroUtil.hasRole("ghxzzz")) {
|
||||
cnd.and("unionId", "=", Vi.getUnionId());
|
||||
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);
|
||||
cnd.and(seg);
|
||||
}
|
||||
@@ -217,7 +217,7 @@ public class MemberBatchMakeController {
|
||||
} else if (ShiroUtil.hasRole("ghxzzz")) {
|
||||
cnd.and("unionId", "=", Vi.getUnionId());
|
||||
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);
|
||||
cnd.and(seg);
|
||||
}
|
||||
|
||||
+13
-8
@@ -2,8 +2,12 @@ package io.v.nutz.zhgh.member.controller.info;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
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.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.member.MemberMode;
|
||||
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.model.MemberChangeRecord;
|
||||
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.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Chain;
|
||||
@@ -71,7 +71,8 @@ public class MemberDataManageController {
|
||||
@Param(value = "startLoginNames", required = false) String startLoginNames,
|
||||
@Param(value = "endLoginNames", required = false) String endLoginNames,
|
||||
@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("""
|
||||
SELECT
|
||||
@@ -83,6 +84,7 @@ public class MemberDataManageController {
|
||||
welfareMember,
|
||||
personType,
|
||||
userState,
|
||||
preparedBy,
|
||||
unioncode,
|
||||
unionname,
|
||||
unionid,
|
||||
@@ -123,6 +125,7 @@ public class MemberDataManageController {
|
||||
cnd.andEX("campusName", "=", campus);
|
||||
cnd.andEX("personType", "in", personTypes);
|
||||
cnd.andEX("userState", "in", userStates);
|
||||
cnd.andEX("preparedBy", "in", preparedBys);
|
||||
|
||||
if (StrUtil.isNotBlank(startLoginNames)) {
|
||||
String[] loginNames = startLoginNames.split(",");
|
||||
@@ -146,7 +149,7 @@ public class MemberDataManageController {
|
||||
if (ShiroUtil.hasRole("H04")) {
|
||||
cnd.and("unionid", "=", Vi.getUnionId());
|
||||
} 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")) {
|
||||
cnd.and("unionid", "=", Vi.getUnionId());
|
||||
} 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 = "confirm", required = false) Boolean confirm,
|
||||
@Param(value = "personTypes", required = false) String[] personTypes,
|
||||
@Param(value = "preparedBys", required = false) String[] preparedBys,
|
||||
@Param(value = "userStates", required = false) String[] userStates) {
|
||||
|
||||
|
||||
@@ -343,6 +347,7 @@ public class MemberDataManageController {
|
||||
cnd.andEX("campusName", "=", campus);
|
||||
cnd.andEX("personType", "in", personTypes);
|
||||
cnd.andEX("userState", "in", userStates);
|
||||
cnd.andEX("preparedBy", "in", preparedBys);
|
||||
|
||||
if (StrUtil.isNotBlank(startLoginNames)) {
|
||||
String[] loginNames = startLoginNames.split(",");
|
||||
@@ -366,7 +371,7 @@ public class MemberDataManageController {
|
||||
if (ShiroUtil.hasRole("H04")) {
|
||||
cnd.and("unionid", "=", Vi.getUnionId());
|
||||
} 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.hutool.core.util.StrUtil;
|
||||
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.service.AsyncService;
|
||||
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.UserMode;
|
||||
import io.v.nutz.zhgh.member.model.MemberHistory;
|
||||
import io.v.nutz.zhgh.member.service.MemberHistoryService;
|
||||
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.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.dao.Cnd;
|
||||
@@ -159,7 +159,7 @@ public class MemberGroupInfoController {
|
||||
} else if (ShiroUtil.hasRole("ghxzzz")) {
|
||||
cnd.and("unionId", "=", Vi.getUnionId());
|
||||
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);
|
||||
cnd.and(seg);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
package io.v.nutz.zhgh.member.controller.info;
|
||||
|
||||
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.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.model.UserHistory;
|
||||
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.model.MemberChangeRecord;
|
||||
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.nutz.dao.Chain;
|
||||
import org.nutz.dao.Cnd;
|
||||
@@ -132,7 +132,7 @@ public class MemberMakeController {
|
||||
if (ShiroUtil.hasRole("H04")) {
|
||||
cnd.and("unionid", "=", Vi.getUnionId());
|
||||
} else {
|
||||
cnd.and("unionGroupId", "in", io.v.nutz.web.commons.utils.ShiroUtil.getUnionGroupIds());
|
||||
cnd.and("unionGroupId", "in", ShiroUtil.getUnionGroupIds());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -6,8 +6,8 @@ import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
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.zhgh.member.service.MemberService;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.dao.Cnd;
|
||||
|
||||
@@ -2,12 +2,12 @@ package io.v.nutz.zhgh.member.controller.inquire;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
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.zhgh.data.model.UserHistory;
|
||||
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.data.model.UserHistory;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
@@ -69,7 +69,7 @@ public class MemberHistoyController {
|
||||
} else if (ShiroUtil.hasRole("ghxzzz")) {
|
||||
cnd.and("u.unionId", "=", Vi.getUnionId());
|
||||
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);
|
||||
cnd.and(seg);
|
||||
}
|
||||
|
||||
+15
-61
@@ -6,16 +6,16 @@ import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
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.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.service.ViService;
|
||||
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.member.constant.MemberStatus;
|
||||
import io.v.nutz.zhgh.member.service.MemberService;
|
||||
import io.v.nutz.zhgh.member.utils.MemberUtils;
|
||||
import lombok.Data;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
@@ -80,6 +80,7 @@ public class MemberInquireIntegrateController {
|
||||
@Param(value = "unionGroupId", required = false) String[] unionGroupId,
|
||||
@Param(value = "personTypes", required = false) String[] personTypes,
|
||||
@Param(value = "userStates", required = false) String[] userStates,
|
||||
@Param(value = "preparedBys", required = false) String[] preparedBys,
|
||||
@Param(value = "memberStatus", required = false) String[] memberStatus,
|
||||
@Param(value = "campus", required = false) String campus,
|
||||
@Param(value = "memberType", required = false) String memberType,
|
||||
@@ -92,7 +93,7 @@ public class MemberInquireIntegrateController {
|
||||
@Param(value = "memberSearchKeyWord", required = false) String memberSearchKeyWord) {
|
||||
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("""
|
||||
SELECT u.* from $table
|
||||
@@ -143,7 +144,12 @@ public class MemberInquireIntegrateController {
|
||||
}
|
||||
|
||||
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())) {
|
||||
@@ -241,7 +247,7 @@ public class MemberInquireIntegrateController {
|
||||
private String endDate;
|
||||
|
||||
@Excel(name = "参加工作日期", width = 20d)
|
||||
private String schoolTime;
|
||||
private String workDate;
|
||||
|
||||
@Excel(name = "录用职位", width = 20d)
|
||||
private String position;
|
||||
@@ -443,6 +449,7 @@ public class MemberInquireIntegrateController {
|
||||
@Param(value = "unionGroupId", required = false) String[] unionGroupId,
|
||||
@Param(value = "personTypes", required = false) String[] personTypes,
|
||||
@Param(value = "userStates", required = false) String[] userStates,
|
||||
@Param(value = "preparedBys", required = false) String[] preparedBys,
|
||||
@Param(value = "memberStatus", required = false) String[] memberStatus,
|
||||
@Param(value = "campus", required = false) String campus,
|
||||
@Param(value = "memberType", required = false) String memberType,
|
||||
@@ -455,62 +462,9 @@ public class MemberInquireIntegrateController {
|
||||
@Param(value = "memberSearchKeyWord", required = false) String memberSearchKeyWord,
|
||||
String props) {
|
||||
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);
|
||||
|
||||
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("""
|
||||
SELECT u.* from $table
|
||||
|
||||
+1
-1
@@ -4,8 +4,8 @@ import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||
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.utils.Vi;
|
||||
import io.v.nutz.sys.services.SysUserService;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
+1
-1
@@ -5,10 +5,10 @@ import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
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.services.SysDictService;
|
||||
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.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.dao.Sqls;
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
package io.v.nutz.zhgh.member.handle;
|
||||
|
||||
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.Roles;
|
||||
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.zhgh.data.constant.UserChangeType;
|
||||
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.MemberOrigin;
|
||||
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 org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Chain;
|
||||
@@ -106,29 +106,29 @@ public enum MemberApplyAuditHandle {
|
||||
|
||||
MemberApplyToDoHandler.COMPLETE_UNION_TASK.exec(record,NutMap.NEW().addv("nodeName",audit.getAuditPass() ? "基层工会通过" : "基层工会拒绝"));
|
||||
|
||||
if (audit.getAuditPass()) {
|
||||
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
su.loginname
|
||||
FROM
|
||||
sys_user_role sur
|
||||
LEFT JOIN sys_user su ON su.id = sur.userId
|
||||
WHERE
|
||||
sur.roleId = @roleId
|
||||
""").setParam("roleId", Roles.H03);
|
||||
|
||||
List<NutMap> mapList = sysUserService.listMap(sql);
|
||||
|
||||
MemberApplyToDoHandler.CREATE_SCHOOL_TASK.exec(record,NutMap.NEW().addv("schoolLeader",mapList));
|
||||
|
||||
/* mapList.forEach(v -> {
|
||||
// sendMsg.pushWeChatMsg("会员系统", user.getUsername() + "提交了会员申请待您审核,请前往智慧工会进行审核!", v.getString("loginname"));
|
||||
});*/
|
||||
} else {
|
||||
// sendMsg.pushWeChatMsg("会员系统", "院级工会拒绝了您的会员申请", user.getLoginname());
|
||||
MemberApplyToDoHandler.REFUSE_UNION_TASK.exec(record,NutMap.NEW().addv("nodeName","基层工会拒绝"));
|
||||
}
|
||||
// if (audit.getAuditPass()) {
|
||||
//
|
||||
// Sql sql = Sqls.create("""
|
||||
// SELECT
|
||||
// su.loginname
|
||||
// FROM
|
||||
// sys_user_role sur
|
||||
// LEFT JOIN sys_user su ON su.id = sur.userId
|
||||
// WHERE
|
||||
// sur.roleId = @roleId
|
||||
// """).setParam("roleId", Roles.H03);
|
||||
//
|
||||
// List<NutMap> mapList = sysUserService.listMap(sql);
|
||||
//
|
||||
// MemberApplyToDoHandler.CREATE_SCHOOL_TASK.exec(record,NutMap.NEW().addv("schoolLeader",mapList));
|
||||
//
|
||||
///* mapList.forEach(v -> {
|
||||
//// sendMsg.pushWeChatMsg("会员系统", user.getUsername() + "提交了会员申请待您审核,请前往智慧工会进行审核!", v.getString("loginname"));
|
||||
// });*/
|
||||
// } else {
|
||||
//// sendMsg.pushWeChatMsg("会员系统", "院级工会拒绝了您的会员申请", user.getLoginname());
|
||||
// MemberApplyToDoHandler.REFUSE_UNION_TASK.exec(record,NutMap.NEW().addv("nodeName","基层工会拒绝"));
|
||||
// }
|
||||
|
||||
|
||||
return record;
|
||||
|
||||
@@ -1,23 +1,18 @@
|
||||
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.sys.models.User;
|
||||
import io.v.nutz.sys.services.SysLocalProcessService;
|
||||
import io.v.nutz.sys.services.impl.SysLocalProcessServiceImpl;
|
||||
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.service.MemberService;
|
||||
import io.v.nutz.zhgh.member.service.impl.MemberServiceImpl;
|
||||
import io.v.nutz.zhgh.zgfw.model.difficult.Zgfw_knbf;
|
||||
import lombok.Getter;
|
||||
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.Daos;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
package io.v.nutz.zhgh.member.handle;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import io.v.nutz.base.lang.Enum;
|
||||
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.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.model.UserHistory;
|
||||
import io.v.nutz.zhgh.member.constant.MemberChangeApplyState;
|
||||
import io.v.nutz.zhgh.member.constant.MemberChangeOrigin;
|
||||
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 org.nutz.dao.Cnd;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
@@ -118,7 +118,8 @@ public enum MemberChangeAuditHandle {
|
||||
|
||||
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();
|
||||
Sys_user user = recordViService.dao().fetch(Sys_user.class, record.getUserId());
|
||||
BeanUtils.copyProperties(user, history);
|
||||
|
||||
@@ -1,25 +1,26 @@
|
||||
package io.v.nutz.zhgh.member.handle;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
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.model.UserHistory;
|
||||
import io.v.nutz.zhgh.member.MemberMode;
|
||||
import io.v.nutz.zhgh.member.UserMode;
|
||||
import io.v.nutz.zhgh.member.WelfareMemberMode;
|
||||
import io.v.nutz.zhgh.member.constant.MemberStatus;
|
||||
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 org.nutz.dao.Chain;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.lang.Strings;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 会员变更Handle
|
||||
@@ -37,7 +38,7 @@ public enum MemberChangeHandle {
|
||||
UNIT_CHANGE(UserChangeType.UNIT_CHANGE.getCode()) {
|
||||
@Override
|
||||
public void change(MemberChangeRecord record) {
|
||||
archive(record.getUserId(), UserChangeType.UNIT_CHANGE);
|
||||
archive(record, UserChangeType.UNIT_CHANGE);
|
||||
sysUserService.update(Chain.make("unitid", record.getCurrentUnitId())
|
||||
.add("unionid", record.getCurrentUnionId())
|
||||
.add("threeUnitId", record.getCurrentThreeUnitId()), Cnd.where("id", "=", record.getUserId()));
|
||||
@@ -48,14 +49,11 @@ public enum MemberChangeHandle {
|
||||
NEW(UserChangeType.NEW.getCode()) {
|
||||
@Override
|
||||
public void change(MemberChangeRecord record) {
|
||||
archive(record.getUserId(), UserChangeType.NEW);
|
||||
if (null != record.getInsertMember() && record.getInsertMember()){
|
||||
UserMode.addMemberRole(record.getUserId());
|
||||
archive(record, UserChangeType.NEW);
|
||||
if (null != record.getUpdateMember() && record.getUpdateMember()){
|
||||
sysUserService.update(Chain.make("schoolTime", DateUtil.today()),Cnd.where("id","=",record.getUserId()));
|
||||
}
|
||||
if (null != record.getUpdateWelfareMember() && record.getUpdateWelfareMember()) {
|
||||
sysUserService.update(Chain.make("welfareMember", WelfareMemberMode.NORMAL.getCode()).add("schoolTime", DateUtil.today()), Cnd.where("id", "=", record.getUserId()));
|
||||
}
|
||||
updateMemberAndWelfareMember(record);
|
||||
sysUserService.clearCache();
|
||||
sysRoleService.clearCache();
|
||||
}
|
||||
@@ -63,105 +61,102 @@ public enum MemberChangeHandle {
|
||||
RESIGN(UserChangeType.RESIGN.getCode()) {
|
||||
@Override
|
||||
public void change(MemberChangeRecord record) {
|
||||
archive(record.getUserId(), UserChangeType.RESIGN);
|
||||
archive(record, UserChangeType.RESIGN);
|
||||
UserMode.removeMemberRole(record.getUserId());
|
||||
updateWelfareMember(record);
|
||||
updateMemberStatus(MemberStatus.TURN_OUT, record.getUserId());
|
||||
updateMemberAndWelfareMember(record);
|
||||
// updateMemberStatus(MemberStatus.TURN_OUT, record.getUserId());
|
||||
updateUserStateAndPersonType(record);
|
||||
}
|
||||
},
|
||||
DIE(UserChangeType.DIE.getCode()) {
|
||||
@Override
|
||||
public void change(MemberChangeRecord record) {
|
||||
archive(record.getUserId(), UserChangeType.DIE);
|
||||
archive(record, UserChangeType.DIE);
|
||||
UserMode.removeMemberRole(record.getUserId());
|
||||
updateWelfareMember(record);
|
||||
updateMemberStatus(MemberStatus.WITHDRAWAL, record.getUserId());
|
||||
updateMemberAndWelfareMember(record);
|
||||
updateUserStateAndPersonType(record);
|
||||
}
|
||||
},
|
||||
RETIREMENT(UserChangeType.RETIREMENT.getCode()) {
|
||||
@Override
|
||||
public void change(MemberChangeRecord record) {
|
||||
archive(record.getUserId(), UserChangeType.RETIREMENT);
|
||||
archive(record, UserChangeType.RETIREMENT);
|
||||
UserMode.removeMemberRole(record.getUserId());
|
||||
updateWelfareMember(record);
|
||||
updateMemberStatus(MemberStatus.KEEP, record.getUserId());
|
||||
updateMemberAndWelfareMember(record);
|
||||
updateUserStateAndPersonType(record);
|
||||
}
|
||||
},
|
||||
// EXPELLED(UserChangeType.EXPELLED.getCode()) {
|
||||
// @Override
|
||||
// public void change(MemberChangeRecord record) {
|
||||
// archive(record.getUserId(), UserChangeType.EXPELLED);
|
||||
// UserMode.removeMemberRole(record.getUserId());
|
||||
// updateWelfareMember(record);
|
||||
// updateMemberStatus(MemberStatus.EXPELLED, record.getUserId());
|
||||
// updateUserStateAndPersonType(record);
|
||||
// }
|
||||
// },
|
||||
/*EXPELLED(UserChangeType.EXPELLED.getCode()) {
|
||||
@Override
|
||||
public void change(MemberChangeRecord record) {
|
||||
archive(record, UserChangeType.EXPELLED);
|
||||
UserMode.removeMemberRole(record.getUserId());
|
||||
updateWelfareMember(record);
|
||||
updateUserStateAndPersonType(record);
|
||||
}
|
||||
},*/
|
||||
RESTORE(UserChangeType.RESTORE.getCode()) {
|
||||
@Override
|
||||
public void change(MemberChangeRecord record) {
|
||||
archive(record.getUserId(), UserChangeType.RESTORE);
|
||||
archive(record, UserChangeType.RESTORE);
|
||||
UserMode.addMemberRole(record.getUserId());
|
||||
updateMemberStatus(MemberStatus.RESTORE, record.getUserId());
|
||||
if (record.getUpdateWelfareMember()) {
|
||||
sysUserService.update(Chain.make("welfareMember", WelfareMemberMode.NORMAL.getCode()), Cnd.where("id", "=", record.getUserId()));
|
||||
}
|
||||
updateMemberAndWelfareMember(record);
|
||||
}
|
||||
},
|
||||
WITHDRAWAL(UserChangeType.WITHDRAWAL.getCode()) {
|
||||
@Override
|
||||
public void change(MemberChangeRecord record) {
|
||||
archive(record.getUserId(), UserChangeType.WITHDRAWAL);
|
||||
archive(record, UserChangeType.WITHDRAWAL);
|
||||
UserMode.removeMemberRole(record.getUserId());
|
||||
updateWelfareMember(record);
|
||||
updateMemberStatus(MemberStatus.WITHDRAWAL, record.getUserId());
|
||||
updateMemberAndWelfareMember(record);
|
||||
updateUserStateAndPersonType(record);
|
||||
}
|
||||
},
|
||||
CARD_CHANGE(UserChangeType.CARD_CHANGE.getCode()){
|
||||
@Override
|
||||
public void change(MemberChangeRecord record) {
|
||||
archive(record.getUserId(), UserChangeType.CARD_CHANGE);
|
||||
if (Strings.isNotBlank(record.getIdCard())) {
|
||||
sysUserService.update(Chain.make("idcard", record.getIdCard()), Cnd.where("id", "=", record.getUserId()));
|
||||
archive(record, UserChangeType.CARD_CHANGE);
|
||||
if (Strings.isNotBlank(record.getChangeIdCard())) {
|
||||
sysUserService.update(Chain.make("idcard", record.getChangeIdCard()), Cnd.where("id", "=", record.getUserId()));
|
||||
}
|
||||
}
|
||||
},
|
||||
MOBILE_CHANGE(UserChangeType.MOBILE_CHANGE.getCode()){
|
||||
@Override
|
||||
public void change(MemberChangeRecord record) {
|
||||
archive(record.getUserId(), UserChangeType.MOBILE_CHANGE);
|
||||
if (Strings.isNotBlank(record.getMobile())) {
|
||||
sysUserService.update(Chain.make("mobile", record.getMobile()), Cnd.where("id", "=", record.getUserId()));
|
||||
archive(record, UserChangeType.MOBILE_CHANGE);
|
||||
if (Strings.isNotBlank(record.getChangeMobile())) {
|
||||
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
|
||||
public void change(MemberChangeRecord record) {
|
||||
archive(record.getUserId(), UserChangeType.EDUCATION_CHANGE);
|
||||
archive(record, UserChangeType.EDUCATION_CHANGE);
|
||||
if (Strings.isNotBlank(record.getEducation())) {
|
||||
sysUserService.update(Chain.make("education", record.getEducation()), Cnd.where("id", "=", record.getUserId()));
|
||||
}
|
||||
}
|
||||
};
|
||||
};*/
|
||||
|
||||
/**
|
||||
* 存档
|
||||
*
|
||||
* @param userId
|
||||
* @param record
|
||||
* @param changeType
|
||||
*/
|
||||
private static void archive(String userId, UserChangeType changeType) {
|
||||
// Sys_user user = sysUserService.fetch(userId);
|
||||
// UserHistory history = new UserHistory();
|
||||
// BeanUtils.copyProperties(user,history);
|
||||
// history.setChangeTime(new Date());
|
||||
// history.setChangeType(changeType.getCode());
|
||||
// sysUserService.insert(history);
|
||||
private static void archive(MemberChangeRecord record, UserChangeType changeType) {
|
||||
int count = sysUserService.dao().count(UserHistory.class, Cnd.where("memberChangeRecordId", "=", record.getId()));
|
||||
if (count == 0) {
|
||||
Sys_user user = sysUserService.fetch(record.getUserId());
|
||||
UserHistory history = new UserHistory();
|
||||
BeanUtil.copyProperties(user, 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 变更记录
|
||||
*/
|
||||
public static void updateWelfareMember(MemberChangeRecord record) {
|
||||
//record.getUpdateWelfareMember() (true:增加福利会员 false:取消福利会员);针对入会(恢复)
|
||||
if (null != record.getUpdateWelfareMember() && record.getUpdateWelfareMember()) {
|
||||
sysUserService.update(Chain.make("welfareMember", WelfareMemberMode.NORMAL.getCode()), Cnd.where("id", "=", record.getUserId()));
|
||||
public static void updateMemberAndWelfareMember(MemberChangeRecord record) {
|
||||
if (null != record.getUpdateWelfareMember()) {
|
||||
sysUserService.update(Chain.make("welfareMember", record.getUpdateWelfareMember() ? WelfareMemberMode.NORMAL.getCode() : WelfareMemberMode.NONE.getCode()), Cnd.where("id", "=", record.getUserId()));
|
||||
}
|
||||
//record.getUpdateWelfare() (true:取消 false:不取消);针对(退休、离职、退会、去世)
|
||||
if (null != record.getUpdateWelfare() && record.getUpdateWelfare()){
|
||||
sysUserService.update(Chain.make("welfareMember", WelfareMemberMode.NONE.getCode()), Cnd.where("id", "=", record.getUserId()));
|
||||
if (null != record.getUpdateMember()){
|
||||
sysUserService.update(Chain.make("member", record.getUpdateMember() ? MemberMode.NORMAL.getCode() : MemberMode.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 变更记录
|
||||
*/
|
||||
public static void updateUserStateAndPersonType(MemberChangeRecord record){
|
||||
Chain chain = null;
|
||||
if (Strings.isNotBlank(record.getUserState()) && Strings.isNotBlank(record.getPersonType())){
|
||||
chain = Chain.make("userState",record.getUserState()).add("personType",record.getPersonType());
|
||||
} else if (Strings.isNotBlank(record.getUserState()) && Strings.isBlank(record.getPersonType())){
|
||||
chain = Chain.make("userState",record.getUserState());
|
||||
} else if (Strings.isBlank(record.getUserState()) && Strings.isNotBlank(record.getPersonType())){
|
||||
chain = Chain.make("personType",record.getPersonType());
|
||||
Chain chain = Chain.make("eCard",null);
|
||||
if (Strings.isNotBlank(record.getChangeUserState())) {
|
||||
chain.add("userState", record.getChangeUserState());
|
||||
}
|
||||
if (Strings.isNotBlank(record.getChangePersonType())) {
|
||||
chain.add("personType", record.getChangePersonType());
|
||||
}
|
||||
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.impl.SysLocalProcessServiceImpl;
|
||||
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.service.MemberService;
|
||||
import io.v.nutz.zhgh.member.service.impl.MemberServiceImpl;
|
||||
@@ -107,19 +106,19 @@ public enum MemberChangeToDoHandler {
|
||||
CREATE_UNION_TASK() {
|
||||
@Override
|
||||
public void exec(MemberChangeRecord record, NutMap extra) {
|
||||
List<String> unionLeader = Vi.getUnionLeader(record.getUserId());
|
||||
// List<String> unionLeader = Vi.getUnionLeader(record.getUserId());
|
||||
|
||||
localProcessService.createTask(
|
||||
"member_change_record@" + record.getId(),
|
||||
"member_change_record_union_audit",
|
||||
"基层工会审核",
|
||||
ShiroUtil.getUserId(),
|
||||
unionLeader,
|
||||
"/platform/member/change/audit/union",
|
||||
"/platform/member/change/audit/union",
|
||||
"/platform/member/change/audit/union",
|
||||
"/platform/member/change/audit/union"
|
||||
);
|
||||
// localProcessService.createTask(
|
||||
// "member_change_record@" + record.getId(),
|
||||
// "member_change_record_union_audit",
|
||||
// "基层工会审核",
|
||||
// ShiroUtil.getUserId(),
|
||||
// unionLeader,
|
||||
// "/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(), "基层工会审核");
|
||||
|
||||
@@ -150,32 +149,32 @@ public enum MemberChangeToDoHandler {
|
||||
CREATE_SCHOOL_TASK() {
|
||||
@Override
|
||||
public void exec(MemberChangeRecord record, NutMap extra) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
u.loginname
|
||||
FROM
|
||||
sys_user_role sur
|
||||
LEFT JOIN sys_user u ON u.id = sur.userid
|
||||
WHERE
|
||||
sur.roleId = @roleId
|
||||
GROUP BY
|
||||
sur.userId
|
||||
""").setParam("roleId", Roles.H03);
|
||||
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());
|
||||
localProcessService.createTask(
|
||||
"member_change_record@" + record.getId(),
|
||||
"member_change_record_school_audit",
|
||||
"校工会审核",
|
||||
ShiroUtil.getUserId(),
|
||||
schoolLeader,
|
||||
"/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(), "校工会审核");
|
||||
// Sql sql = Sqls.create("""
|
||||
// SELECT
|
||||
// u.loginname
|
||||
// FROM
|
||||
// sys_user_role sur
|
||||
// LEFT JOIN sys_user u ON u.id = sur.userid
|
||||
// WHERE
|
||||
// sur.roleId = @roleId
|
||||
// GROUP BY
|
||||
// sur.userId
|
||||
// """).setParam("roleId", Roles.H03);
|
||||
// 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());
|
||||
// localProcessService.createTask(
|
||||
// "member_change_record@" + record.getId(),
|
||||
// "member_change_record_school_audit",
|
||||
// "校工会审核",
|
||||
// ShiroUtil.getUserId(),
|
||||
// schoolLeader,
|
||||
// "/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(), "校工会审核");
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -64,11 +64,6 @@ public class MemberApplyRecord {
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
public String schoolAuditId;
|
||||
|
||||
@Column
|
||||
@Comment("个人签字Id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
public String signId;
|
||||
|
||||
@One(field = "unionAuditId")
|
||||
public Audit unionAudit;
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
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.AuditState;
|
||||
import io.v.nutz.sys.models.Sys_union;
|
||||
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.experimental.Accessors;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
@@ -124,40 +124,30 @@ public class MemberChangeRecord {
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
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
|
||||
@Comment("身份证号异动")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
private String idCard;
|
||||
private String changeIdCard;
|
||||
|
||||
@Column
|
||||
@Comment("手机号异动")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
private String mobile;
|
||||
private String changeMobile;
|
||||
|
||||
@Column
|
||||
@Comment("学历异动")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
private String education;
|
||||
private String changeEducation;
|
||||
|
||||
@Column
|
||||
@Comment("在职状态")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
private String userState;
|
||||
private String changeUserState;
|
||||
|
||||
@Column
|
||||
@Comment("人员类别")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
private String personType;
|
||||
private String changePersonType;
|
||||
|
||||
@Column
|
||||
@Comment("任务id")
|
||||
|
||||
@@ -67,4 +67,9 @@ public class MemberCheckTask extends BaseModel {
|
||||
@Comment("创建模式1.小组核对2.个人核对")
|
||||
@ColDefine(type = ColType.INT)
|
||||
private Integer createTaskMode;
|
||||
|
||||
@Column
|
||||
@Comment("核对模式(字典)")
|
||||
@ColDefine(type = ColType.INT)
|
||||
private Integer welfareCheckFilterMode;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
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.zhgh.member.model.MemberHistory;
|
||||
|
||||
/**
|
||||
* Todo
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
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.zhgh.member.service.MemberCheckPersonalService;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package io.v.nutz.zhgh.member.service.impl;
|
||||
|
||||
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.sys.services.SysRoleService;
|
||||
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.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
|
||||
@@ -3,9 +3,9 @@ package io.v.nutz.zhgh.member.service.impl;
|
||||
import cn.wizzer.framework.page.Pagination;
|
||||
import io.v.nutz.base.dao.CndPlus;
|
||||
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.sys.models.Sys_user;
|
||||
import io.v.nutz.zhgh.member.service.MemberService;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package io.v.nutz.zhgh.member.utils;
|
||||
|
||||
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.data.constant.UserChangeType;
|
||||
import io.v.nutz.zhgh.member.MemberMode;
|
||||
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.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
@@ -39,10 +39,6 @@ public class MemberUtils {
|
||||
member = MemberMode.NONE.getCode();
|
||||
memberStatus = MemberStatus.TURN_OUT.getCode();
|
||||
}
|
||||
if (type == UserChangeType.DIE.getCode()) {
|
||||
member = MemberMode.NONE.getCode();
|
||||
memberStatus = MemberStatus.WITHDRAWAL.getCode();
|
||||
}
|
||||
if (type == UserChangeType.RETIREMENT.getCode()) {
|
||||
member = MemberMode.NONE.getCode();
|
||||
memberStatus = MemberStatus.KEEP.getCode();
|
||||
@@ -71,6 +67,7 @@ public class MemberUtils {
|
||||
String[] unitId,
|
||||
String[] personTypes,
|
||||
String[] userStates,
|
||||
String[] preparedBys,
|
||||
String[] memberTypes,
|
||||
String[] sexTypes,
|
||||
String[] age,
|
||||
@@ -168,6 +165,7 @@ public class MemberUtils {
|
||||
cnd.andEX("u.campus", EQ_OR_NEQ_OP, campus);
|
||||
cnd.andEX("u.personType", IN_OR_NIN_OP, personTypes);
|
||||
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("sur.jdhid", EQ_OR_NEQ_OP, teacherMeetingId);
|
||||
cnd.andEX("sur.roleid", IN_OR_NIN_OP, roleIds);
|
||||
|
||||
+9
-4
@@ -20,6 +20,7 @@ import org.nutz.dao.FieldFilter;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.Daos;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
import org.nutz.dao.util.cri.Static;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
@@ -300,8 +301,6 @@ public class UnionActivityRegisterController {
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object searchNoRegisterUser(String searchKey, String activityId) {
|
||||
|
||||
|
||||
ActivityTissue tissue = simpleService.dao().fetch(ActivityTissue.class, Cnd.where("id", "=", activityId));
|
||||
|
||||
Sql sql = Sqls.create("""
|
||||
@@ -317,10 +316,16 @@ public class UnionActivityRegisterController {
|
||||
""");
|
||||
String unionId = Vi.getUnionId();
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (tissue.getSignUpMethod() != 3) {
|
||||
if (tissue.getSignUpMethod() != 3 && tissue.getType() != 40003) {
|
||||
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) {
|
||||
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 ) )
|
||||
|
||||
+2
-2
@@ -53,7 +53,7 @@ public class CondolenceAgentController {
|
||||
|
||||
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", 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()));
|
||||
@@ -75,7 +75,7 @@ public class CondolenceAgentController {
|
||||
""");
|
||||
cnd.and("con.state_id", "=", 2000);
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin")) {
|
||||
cnd.and("us.unionid", "=", vi.getUnionId());
|
||||
cnd.and("us.unionid", "=", Vi.getUnionId());
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
return condolenceService.count(sql);
|
||||
|
||||
@@ -29,6 +29,7 @@ import org.nutz.mvc.annotation.Param;
|
||||
* @DateTime: 2020/11/20 11:49
|
||||
* @Description: 会计审核
|
||||
*/
|
||||
// 江南大学,校工会审核
|
||||
@At("/platform/fw/condolence/fr")
|
||||
@IocBean
|
||||
@RequiresAuthentication
|
||||
@@ -44,6 +45,11 @@ public class CondolenceFrCon {
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At("/h5")
|
||||
@Ok("beetl:/mobile/condolence/schoolunionaudit/index.html")
|
||||
@RequiresPermissions("fw.condolence.fr")
|
||||
public void h5() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@@ -66,6 +72,7 @@ public class CondolenceFrCon {
|
||||
be.username be_username,
|
||||
be.loginname be_loginname,
|
||||
sqr.username sqr_username,
|
||||
sqr.loginname sqr_loginname,
|
||||
be.unitname be_unitname,
|
||||
be.unionname be_unionname,
|
||||
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.web.commons.base.Globals;
|
||||
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.CondolenceType;
|
||||
import io.v.nutz.zhgh.zgfw.service.CondolenceService;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||
@@ -111,7 +111,7 @@ public class CondolenceReadCon {
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06,wyh02")) {
|
||||
SqlExpressionGroup group2 = new SqlExpressionGroup();
|
||||
if (ShiroUtil.hasAnyRoles("gh01,H04")) {
|
||||
group2.or("be.unionid", "=", vi.getUnionId());
|
||||
group2.or("be.unionid", "=", Vi.getUnionId());
|
||||
/*group2.or("con.state_id", ">=", 2000);*/
|
||||
}
|
||||
/* if (ShiroUtil.hasAnyRoles("SchoolUnionAccountant")) {
|
||||
|
||||
@@ -53,6 +53,12 @@ public class CondolenceUcrCon {
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At("/h5")
|
||||
@Ok("beetl:/mobile/condolence/branchunionaudit/index.html")
|
||||
@RequiresPermissions("fw.condolence.ucr")
|
||||
public void h5() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("fw.condolence.ucr")
|
||||
@@ -74,6 +80,7 @@ public class CondolenceUcrCon {
|
||||
be.username be_username,
|
||||
be.loginname be_loginname,
|
||||
sqr.username sqr_username,
|
||||
sqr.loginname sqr_loginname,
|
||||
be.unitname be_unitname,
|
||||
be.unionname be_unionname,
|
||||
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.utils.DateUtil;
|
||||
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.zhgh.zgfw.handler.condolence.CondolenceToDoHandler;
|
||||
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 org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||
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.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: 1V
|
||||
* @DateTime: 2020/11/20 11:49
|
||||
* @Description: 校工会审核
|
||||
*/
|
||||
@At({"/platform/fw/condolence/vcr","/platform/fw/condolence/vcr/school"})
|
||||
// 江南大学,校工会主席审核
|
||||
@At({"/platform/fw/condolence/vcr", "/platform/fw/condolence/vcr/school"})
|
||||
@IocBean
|
||||
@RequiresAuthentication
|
||||
@Ok("json")
|
||||
@@ -36,27 +42,36 @@ public class CondolenceVcrCon {
|
||||
@Inject
|
||||
private Vi vi;
|
||||
|
||||
@Inject
|
||||
private SysMsgService sysMsgService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zgfw/condolence/vcr.html")
|
||||
@RequiresPermissions("fw.condolence.vcr")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At("/h5")
|
||||
@Ok("beetl:/mobile/condolence/schoolchairmanaudit/index.html")
|
||||
@RequiresPermissions("fw.condolence.vcr")
|
||||
public void h5() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("fw.condolence.vcr")
|
||||
public Object pageData(@Param(value = "year",required = false) String year,
|
||||
@Param(value = "unitId",required = false) String unitId,
|
||||
@Param(value = "unionId",required = false) String unionId,
|
||||
@Param(value = "isAudit",required = false) Boolean isAudit,
|
||||
@Param(value = "type",required = false) String type,
|
||||
@Param(value = "way",required = false) String way,
|
||||
@Param(value = "searchName",required = false) String searchName,
|
||||
@Param(value = "searchKeyword",required = false) String searchKeyword,
|
||||
@Param("pageNumber") int pageNumber,@Param("pageSize") int pageSize,
|
||||
@Param(value = "pageOrderName",required = false) String pageOrderName,
|
||||
@Param(value = "pageOrderBy",required = false) String pageOrderBy) {
|
||||
public Object pageData(@Param(value = "year", required = false) String year,
|
||||
@Param(value = "unitId", required = false) String unitId,
|
||||
@Param(value = "unionId", required = false) String unionId,
|
||||
@Param(value = "isAudit", required = false) Boolean isAudit,
|
||||
@Param(value = "type", required = false) String type,
|
||||
@Param(value = "way", required = false) String way,
|
||||
@Param(value = "searchName", required = false) String searchName,
|
||||
@Param(value = "searchKeyword", required = false) String searchKeyword,
|
||||
@Param("pageNumber") int pageNumber, @Param("pageSize") int pageSize,
|
||||
@Param(value = "pageOrderName", required = false) String pageOrderName,
|
||||
@Param(value = "pageOrderBy", required = false) String pageOrderBy) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
con.*,
|
||||
@@ -64,6 +79,7 @@ public class CondolenceVcrCon {
|
||||
be.username be_username,
|
||||
be.loginname be_loginname,
|
||||
sqr.username sqr_username,
|
||||
sqr.loginname sqr_loginname,
|
||||
be.unitname be_unitname,
|
||||
be.unionname be_unionname,
|
||||
state.state_name,
|
||||
@@ -130,12 +146,26 @@ public class CondolenceVcrCon {
|
||||
}
|
||||
condolenceService.updateIgnoreNull(condolence);
|
||||
CondolenceToDoHandler.COMPLETE_SCHOOL_TASK.exec(condolence, review.getOpinion());
|
||||
if (pass == 1){
|
||||
if (pass == 1) {
|
||||
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.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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+153
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
+474
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+151
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+224
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
+69
-102
@@ -3,9 +3,7 @@ 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.service.AuditService;
|
||||
import io.v.nutz.base.utils.DateUtil;
|
||||
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.SysUserService;
|
||||
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.nutz.aop.interceptor.ioc.TransAop;
|
||||
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;
|
||||
@@ -25,7 +24,9 @@ import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Strings;
|
||||
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.List;
|
||||
|
||||
/**
|
||||
@@ -35,34 +36,72 @@ import java.util.List;
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json")
|
||||
@At("/platform/fw/difficulty/apply")
|
||||
public class DifficultyApply {
|
||||
@At("/platform/difficulty/apply")
|
||||
public class DifficultyApplyController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private SysUserService sysUserService;
|
||||
|
||||
@Inject
|
||||
private ZgfwKnbfService zgfwKnbfService;
|
||||
@Inject
|
||||
private ZgfwKnbfJtcyService zgfwKnbfJtcyService;
|
||||
|
||||
|
||||
@Inject
|
||||
private AuditService auditService;
|
||||
|
||||
@Inject
|
||||
private SysSignatureService sysSignatureService;
|
||||
|
||||
@Inject
|
||||
private Vi vi;
|
||||
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zgfw/difficulty/apply.html")
|
||||
@RequiresPermissions("difficulty.apply")
|
||||
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
|
||||
@ViReturn
|
||||
@@ -71,106 +110,34 @@ public class DifficultyApply {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
su.id,
|
||||
su.username,su.birthday,
|
||||
su.loginname,su.mobile,su.sex,
|
||||
un.`name` unit_name,
|
||||
uni.unionname
|
||||
id,
|
||||
username,
|
||||
birthday,
|
||||
loginname,
|
||||
mobile,
|
||||
sex,
|
||||
unitname,
|
||||
unionname,
|
||||
unionid,
|
||||
unitid
|
||||
FROM
|
||||
sys_user su
|
||||
LEFT JOIN sys_unit un ON un.id = su.unitid
|
||||
LEFT JOIN sys_union uni ON uni.id = un.unionid $condition
|
||||
`user` $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)) {
|
||||
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||
group.orLike("su.username", key);
|
||||
group.orLike("su.loginname", key);
|
||||
group.orLike("username", key);
|
||||
group.orLike("loginname", key);
|
||||
cnd.and(group);
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
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();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+112
@@ -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;
|
||||
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.base.utils.ViResource;
|
||||
import io.v.nutz.sys.services.SysLocalProcessService;
|
||||
import io.v.nutz.sys.services.impl.SysLocalProcessServiceImpl;
|
||||
@@ -24,7 +23,7 @@ public enum DifficultToDoHandler {
|
||||
START_PROCESS(){
|
||||
@Override
|
||||
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);
|
||||
String username = sql.getString();
|
||||
|
||||
@@ -32,9 +31,9 @@ public enum DifficultToDoHandler {
|
||||
"【困难帮扶】" + username,
|
||||
"zgfw_knbf@" + knbf.getId(),
|
||||
"",
|
||||
knbf.getSqr(),
|
||||
"/platform/fw/difficulty/applylist",
|
||||
"/platform/fw/difficulty/applylist"
|
||||
knbf.getUserId(),
|
||||
"/platform/difficulty/applylist",
|
||||
"/platform/difficulty/applylist"
|
||||
);
|
||||
}
|
||||
},
|
||||
@@ -45,7 +44,7 @@ public enum DifficultToDoHandler {
|
||||
CREATE_APPLY_RE_MODIFY_TASK(){
|
||||
@Override
|
||||
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);
|
||||
String loginname = sql.getString();
|
||||
|
||||
@@ -55,10 +54,10 @@ public enum DifficultToDoHandler {
|
||||
"退回重新修改",
|
||||
ShiroUtil.getUserId(),
|
||||
List.of(loginname),
|
||||
"/platform/fw/difficulty/applylist",
|
||||
"/platform/fw/difficulty/applylist",
|
||||
"/platform/fw/difficulty/applylist",
|
||||
"/platform/fw/difficulty/applylist"
|
||||
"/platform/difficulty/applylist",
|
||||
"/platform/difficulty/applylist",
|
||||
"/platform/difficulty/applylist",
|
||||
"/platform/difficulty/applylist"
|
||||
);
|
||||
}
|
||||
},
|
||||
@@ -85,17 +84,17 @@ public enum DifficultToDoHandler {
|
||||
CREATE_UNION_TASK(){
|
||||
@Override
|
||||
public void exec(Zgfw_knbf knbf) {
|
||||
List<String> unionLeader = zgfwKnbfService.getUnionLeader(knbf.getSqr());
|
||||
List<String> unionLeader = zgfwKnbfService.getUnionLeader(knbf.getUserId());
|
||||
localProcessService.createTask(
|
||||
"zgfw_knbf@" + knbf.getId(),
|
||||
"union_president_audit",
|
||||
"branchUnionAudit",
|
||||
"分工会审核",
|
||||
ShiroUtil.getUserId(),
|
||||
unionLeader,
|
||||
"/platform/fw/difficulty/unionchairman",
|
||||
"/platform/fw/difficulty/unionchairman",
|
||||
"/platform/fw/difficulty/unionchairman",
|
||||
"/platform/fw/difficulty/unionchairman"
|
||||
"/platform/difficulty/branchUnionAudit",
|
||||
"/platform/difficulty/branchUnionAudit",
|
||||
"/platform/difficulty/branchUnionAudit",
|
||||
"/platform/difficulty/branchUnionAudit"
|
||||
);
|
||||
localProcessService.updateProcessNodeName("zgfw_knbf@" + knbf.getId(), "分工会审核");
|
||||
}
|
||||
@@ -108,7 +107,7 @@ public enum DifficultToDoHandler {
|
||||
@Override
|
||||
public void exec(Zgfw_knbf knbf) {
|
||||
localProcessService.completeTask(
|
||||
"union_president_audit",
|
||||
"branchUnionAudit",
|
||||
"zgfw_knbf@" + knbf.getId(),
|
||||
ShiroUtil.getUserId(),
|
||||
""
|
||||
@@ -117,36 +116,36 @@ public enum DifficultToDoHandler {
|
||||
},
|
||||
|
||||
/**
|
||||
* 创建财务任务
|
||||
* 创建校工会初审任务
|
||||
*/
|
||||
CREATE_FINANCE_TASK(){
|
||||
@Override
|
||||
public void exec(Zgfw_knbf knbf) {
|
||||
List<String> schoolUnionAccountant = Vi.getSchoolUnionAccountant();
|
||||
List<String> list = zgfwKnbfService.getSchoolUnionDifficultyAdmin();
|
||||
localProcessService.createTask(
|
||||
"zgfw_knbf@" + knbf.getId(),
|
||||
"two_dzz_audit",
|
||||
"财务审核",
|
||||
"schoolUnionInitialAudit",
|
||||
"校工会初审",
|
||||
ShiroUtil.getUserId(),
|
||||
schoolUnionAccountant,
|
||||
"/platform/fw/difficulty/twoOrganization",
|
||||
"/platform/fw/difficulty/twoOrganization",
|
||||
"/platform/fw/difficulty/twoOrganization",
|
||||
"/platform/fw/difficulty/twoOrganization"
|
||||
list,
|
||||
"/platform/difficulty/schoolUnionInitialAudit",
|
||||
"/platform/difficulty/schoolUnionInitialAudit",
|
||||
"/platform/difficulty/schoolUnionInitialAudit",
|
||||
"/platform/difficulty/schoolUnionInitialAudit"
|
||||
);
|
||||
|
||||
localProcessService.updateProcessNodeName("zgfw_knbf@" + knbf.getId(), "财务审核");
|
||||
localProcessService.updateProcessNodeName("zgfw_knbf@" + knbf.getId(), "校工会初审");
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 财务完成
|
||||
* 校工会初审任务完成
|
||||
*/
|
||||
COMPLETE_FINANCE_TASK(){
|
||||
@Override
|
||||
public void exec(Zgfw_knbf knbf) {
|
||||
localProcessService.completeTask(
|
||||
"two_dzz_audit",
|
||||
"schoolUnionInitialAudit",
|
||||
"zgfw_knbf@" + knbf.getId(),
|
||||
ShiroUtil.getUserId(),
|
||||
""
|
||||
@@ -163,14 +162,14 @@ public enum DifficultToDoHandler {
|
||||
List<String> list = zgfwKnbfService.getSchoolUnionDifficultyAdmin();
|
||||
localProcessService.createTask(
|
||||
"zgfw_knbf@" + knbf.getId(),
|
||||
"school_standing_audit",
|
||||
"校工会审核",
|
||||
"schoolUnionFinalAudit",
|
||||
"工会常委会审核",
|
||||
ShiroUtil.getUserId(),
|
||||
list,
|
||||
"/platform/fw/difficulty/schoolmanager",
|
||||
"/platform/fw/difficulty/schoolmanager",
|
||||
"/platform/fw/difficulty/schoolmanager",
|
||||
"/platform/fw/difficulty/schoolmanager"
|
||||
"/platform/difficulty/schoolUnionFinalAudit",
|
||||
"/platform/difficulty/schoolUnionFinalAudit",
|
||||
"/platform/difficulty/schoolUnionFinalAudit",
|
||||
"/platform/difficulty/schoolUnionFinalAudit"
|
||||
);
|
||||
|
||||
localProcessService.updateProcessNodeName("zgfw_knbf@" + knbf.getId(), "校工会审核");
|
||||
@@ -184,7 +183,7 @@ public enum DifficultToDoHandler {
|
||||
@Override
|
||||
public void exec(Zgfw_knbf knbf) {
|
||||
localProcessService.completeTask(
|
||||
"school_standing_audit",
|
||||
"schoolUnionFinalAudit",
|
||||
"zgfw_knbf@" + knbf.getId(),
|
||||
ShiroUtil.getUserId(),
|
||||
""
|
||||
@@ -200,10 +199,15 @@ public enum DifficultToDoHandler {
|
||||
public void exec(Zgfw_knbf knbf) {
|
||||
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 Dao dao = ViResource.dao;
|
||||
public ZgfwKnbfService zgfwKnbfService = ViResource.ioc.get(ZgfwKnbfServiceImpl.class);
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
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 lombok.Data;
|
||||
import org.nutz.dao.DB;
|
||||
@@ -8,6 +10,7 @@ import org.nutz.dao.entity.annotation.*;
|
||||
import org.nutz.integration.json4excel.annotation.J4EIgnore;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -30,43 +33,43 @@ public class Zgfw_knbf implements Serializable {
|
||||
|
||||
@Column
|
||||
@Comment("申请时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String sqsj;
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
private Date applyTime;
|
||||
|
||||
@Column
|
||||
@Comment("申请模式")
|
||||
@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
|
||||
@Comment("申请人id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String sqr;
|
||||
private String userId;
|
||||
|
||||
@Column
|
||||
@Comment("受补助人id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String bbzrusername;
|
||||
@Comment("申请人姓名")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String userName;
|
||||
|
||||
@Column
|
||||
@Comment("身份证")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String idcard;
|
||||
|
||||
@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;
|
||||
@Comment("申请人工号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String loginName;
|
||||
|
||||
@Column
|
||||
@Comment("性别")
|
||||
@@ -74,196 +77,94 @@ public class Zgfw_knbf implements Serializable {
|
||||
private String sex;
|
||||
|
||||
@Column
|
||||
@Comment("职称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String zc;
|
||||
@Comment("单位")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String unitId;
|
||||
|
||||
@Column
|
||||
@Comment("职务")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String zw;
|
||||
@Comment("单位名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 500)
|
||||
private String unitName;
|
||||
|
||||
@Column
|
||||
@Comment("人事编制")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String rsbz;
|
||||
@Comment("分工会id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String unionId;
|
||||
|
||||
@Column
|
||||
@Comment("参加工作时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String cjgzsj;
|
||||
@Comment("工会名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 500)
|
||||
private String unionName;
|
||||
|
||||
@Column
|
||||
@Comment("医保状况")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String ybzk;
|
||||
@Comment("月收入")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
private String monthlyIncome;
|
||||
|
||||
@Column
|
||||
@Comment("联系方式")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String lxfs;
|
||||
@Comment("出生日期")
|
||||
@ColDefine(type = ColType.DATE)
|
||||
private Date birthday;
|
||||
|
||||
@Column
|
||||
@Comment("本人年总收入")
|
||||
@ColDefine(type = ColType.INT)
|
||||
private Integer brnzsr;
|
||||
|
||||
@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;
|
||||
@Comment("联系电话")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String mobile;
|
||||
|
||||
@Column
|
||||
@Comment("家庭住址")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 200)
|
||||
private String jtzz;
|
||||
private String homeAddress;
|
||||
|
||||
@Column
|
||||
@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("主要致困原因备注")
|
||||
@Comment("补助标准")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 500)
|
||||
private String zyzkyybz;
|
||||
private String subsidyStandards;
|
||||
|
||||
@Column
|
||||
@Comment("家庭成员")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<JSONObject> familyList;
|
||||
|
||||
@Column
|
||||
@Comment("申请理由")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 500)
|
||||
private String apply_reason;
|
||||
private String reason;
|
||||
|
||||
@Column
|
||||
@Comment("补助类型")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 4)
|
||||
private String sq_bzlx;
|
||||
|
||||
@Column
|
||||
@Comment("困难类型")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 4)
|
||||
private String sq_knlx;
|
||||
|
||||
@Comment("备注")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 500)
|
||||
private String remarks;
|
||||
|
||||
@Column
|
||||
@Comment("附件")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 500)
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<Sys_file> files;
|
||||
|
||||
@Many(field = "sqid")
|
||||
private List<Zgfw_knbf_jtcy> jtcys;
|
||||
@Column
|
||||
@Comment("申请人签字")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 500)
|
||||
private String signature;
|
||||
|
||||
@Column
|
||||
@Comment("申请人签字 对应id")
|
||||
@Comment("分工会审核记录id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String applicantsign;
|
||||
private String branchUnionAuditId;
|
||||
|
||||
@Column
|
||||
@Comment("工会主席审核记录 id")
|
||||
@Comment("校工会初审审核记录id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String union_president_audit;
|
||||
|
||||
private String schoolUnionInitialAuditId;
|
||||
|
||||
@Column
|
||||
@Comment("校工会经办人审核记录 id")
|
||||
@Comment("工会常委会审核记录id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String school_manager_audit;
|
||||
private String schoolUnionFinalAuditId;
|
||||
|
||||
@Column
|
||||
@Comment("校工会副主席审核记录 id")
|
||||
@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 通过)")
|
||||
@Comment("状态")
|
||||
@ColDefine(type = ColType.INT, width = 4)
|
||||
private Integer zt;
|
||||
private Integer stateId;
|
||||
|
||||
@Column
|
||||
@Comment("单据号")
|
||||
@@ -272,4 +173,15 @@ public class Zgfw_knbf implements Serializable {
|
||||
})
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user