init
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
package io.v.nutz.zhgh.offerAdvice.constant;
|
||||
|
||||
public interface OfferAdviceState {
|
||||
|
||||
/**
|
||||
* 未提交
|
||||
*/
|
||||
Integer unSubmitted = 3000;
|
||||
|
||||
/**
|
||||
* 待校工会审核
|
||||
*/
|
||||
Integer awaitSchoolUnionAudit = 3005;
|
||||
|
||||
/**
|
||||
* 校工会审核拒绝
|
||||
*/
|
||||
Integer schoolUnionAuditReject = 3010;
|
||||
|
||||
/**
|
||||
* 待分管校领导审批
|
||||
*/
|
||||
Integer awaitLeaderAudit = 3015;
|
||||
|
||||
/**
|
||||
* 审核通过
|
||||
*/
|
||||
Integer auditPass = 3020;
|
||||
|
||||
}
|
||||
+137
@@ -0,0 +1,137 @@
|
||||
package io.v.nutz.zhgh.offerAdvice.controller;
|
||||
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.service.SimpleService;
|
||||
import io.v.nutz.base.utils.Roles;
|
||||
import io.v.nutz.base.model.Audit;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
import io.v.nutz.zhgh.offerAdvice.constant.OfferAdviceState;
|
||||
import io.v.nutz.zhgh.offerAdvice.model.OfferAdvice;
|
||||
import io.v.nutz.sys.models.Sys_user;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.web.commons.slog.annotation.SLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
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.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 org.nutz.trans.Trans;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @FileName io.v.nutz.offerAdvice.controller.OfferAdviceLeaderController
|
||||
* @Description: 分管校领导审核
|
||||
* @Author zxc
|
||||
* @Date 2022/6/23:15:37
|
||||
* @Version V1.0
|
||||
**/
|
||||
@IocBean
|
||||
@At("/platform/offerAdvice/leaderAudit")
|
||||
@Ok("json:full")
|
||||
public class OfferAdviceLeaderAuditController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
|
||||
@Inject
|
||||
private SimpleService simpleService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/offerAdvice/leaderAudit.html")
|
||||
@RequiresPermissions("offerAdvice.leaderAudit")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 页面数据
|
||||
*
|
||||
* @param pageForm 分页参数
|
||||
* @param subjectName 主题名称
|
||||
* @param year 年度
|
||||
* @param auditState 审核state
|
||||
* @return {@link Object}
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("offerAdvice.leaderAudit")
|
||||
public Object pageData(PageForm pageForm,
|
||||
@Param(value = "subjectName", required = false) String subjectName,
|
||||
@Param(value = "year", required = false) Integer year,
|
||||
@Param(value = "auditState", required = false) Integer auditState) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
oa.*,
|
||||
type.typeName,
|
||||
state.stateName
|
||||
FROM
|
||||
offer_advice oa
|
||||
LEFT JOIN proposal_type type ON type.id = oa.typeId
|
||||
LEFT JOIN audit_state state ON state.stateId = oa.stateCode
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("YEAR(createTime)", "=", year);
|
||||
cnd.and(Cnd.likeEX("oa.subjectName", subjectName));
|
||||
|
||||
switch (auditState) {
|
||||
case -1 -> {
|
||||
cnd.and("oa.stateCode", "=", OfferAdviceState.awaitLeaderAudit);
|
||||
}
|
||||
case 1 -> {
|
||||
cnd.and("oa.stateCode", "=", OfferAdviceState.auditPass);
|
||||
}
|
||||
case 0 -> {
|
||||
cnd.and("oa.stateCode", ">=", OfferAdviceState.awaitLeaderAudit);
|
||||
}
|
||||
}
|
||||
if (!ShiroUtil.hasRole("sysadmin")) {
|
||||
Sql underTakeSql = Sqls.create("""
|
||||
select cbdwid from sys_user_role where roleId = @leaderRoleId and userId = @userId
|
||||
""");
|
||||
underTakeSql.setParam("leaderRoleId", Roles.IN_CHARGE_LEADER);
|
||||
underTakeSql.setParam("userId", ShiroUtil.getPrincipalProperty("id"));
|
||||
cnd.and("oa.undertakeUnitId", "in", underTakeSql);
|
||||
}
|
||||
cnd.asc("oa.stateCode");
|
||||
sql.setCondition(cnd);
|
||||
return simpleService.list(pageForm, sql);
|
||||
}
|
||||
|
||||
/**
|
||||
* 做审核
|
||||
*
|
||||
* @param audit 审核
|
||||
* @param id id
|
||||
* @return {@link Object}
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@SLog(tag = "建议献策分管校领导审核", param = true, result = true)
|
||||
@RequiresPermissions("offerAdvice.leaderAudit")
|
||||
public Object doAudit(Audit audit, String id, boolean publicity) {
|
||||
Sys_user principal = (Sys_user) ShiroUtil.getPrincipal();
|
||||
audit.setAuditor(principal.getId());
|
||||
audit.setAuditTime(new Date());
|
||||
audit.setUsername(principal.getUsername());
|
||||
audit.setLoginname(principal.getLoginname());
|
||||
|
||||
Trans.exec(() -> {
|
||||
dao.insert(audit);
|
||||
Chain chain = Chain.make("stateCode", OfferAdviceState.auditPass);
|
||||
chain.add("leaderAuditId", audit.getId());
|
||||
chain.add("publicity", publicity);
|
||||
dao.update(OfferAdvice.class, chain, Cnd.where("id", "=", id));
|
||||
});
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
package io.v.nutz.zhgh.offerAdvice.controller;
|
||||
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.service.SimpleService;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
import io.v.nutz.zhgh.offerAdvice.constant.OfferAdviceState;
|
||||
import io.v.nutz.zhgh.offerAdvice.model.OfferAdvice;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.web.commons.slog.annotation.SLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
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.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;
|
||||
|
||||
/**
|
||||
* @FileName io.v.nutz.offerAdvice.controller.OfferAdviceMineController
|
||||
* @Description: TODO
|
||||
* @Author zxc
|
||||
* @Date 2022/6/23:14:43
|
||||
* @Version V1.0
|
||||
**/
|
||||
@IocBean
|
||||
@At("/platform/offerAdviceMine")
|
||||
@Ok("json:full")
|
||||
public class OfferAdviceMineController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
|
||||
@Inject
|
||||
private SimpleService simpleService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/offerAdvice/mine.html")
|
||||
@RequiresPermissions("offerAdvice.mine")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 页面数据
|
||||
*
|
||||
* @param pageForm 分页参数
|
||||
* @param subjectName 主题名称
|
||||
* @return {@link Object}
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("offerAdvice.mine")
|
||||
public Object pageData(PageForm pageForm,
|
||||
@Param(value = "subjectName", required = false) String subjectName,
|
||||
@Param(value = "year", required = false) Integer year) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
oa.*,
|
||||
type.typeName,
|
||||
state.stateName
|
||||
FROM
|
||||
offer_advice oa
|
||||
LEFT JOIN proposal_type type ON type.id = oa.typeId
|
||||
LEFT JOIN audit_state state ON state.stateId = oa.stateCode
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) {
|
||||
cnd.and("createUserId", "=", ShiroUtil.getPrincipalProperty("id"));
|
||||
}
|
||||
cnd.andEX("YEAR(createTime)", "=", year);
|
||||
cnd.and(Cnd.likeEX("oa.subjectName", subjectName));
|
||||
cnd.asc("oa.stateCode");
|
||||
sql.setCondition(cnd);
|
||||
return simpleService.list(pageForm, sql);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param id id
|
||||
* @return {@link Object}
|
||||
*/
|
||||
@At("/doDelete/?")
|
||||
@ViReturn
|
||||
@RequiresPermissions("offerAdvice.mine")
|
||||
@SLog(tag = "建言献策删除", param = true)
|
||||
public Object doDelete(String id) {
|
||||
Assert.notBlank(id);
|
||||
dao.clear(OfferAdvice.class, Cnd.where("id", "=", id));
|
||||
return null;
|
||||
}
|
||||
|
||||
@At("/doSubmit/?")
|
||||
@ViReturn
|
||||
@RequiresPermissions("offerAdvice.mine")
|
||||
@SLog(tag = "建言献策提交", param = true)
|
||||
public Object doSubmit(String id) {
|
||||
Assert.notBlank(id);
|
||||
Chain chain = Chain.make("isSubmit", 1);
|
||||
chain.add("stateCode", OfferAdviceState.awaitSchoolUnionAudit);
|
||||
dao.update(OfferAdvice.class, chain, Cnd.where("id", "=", id));
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
package io.v.nutz.zhgh.offerAdvice.controller;
|
||||
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.service.SimpleService;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
import io.v.nutz.zhgh.offerAdvice.constant.OfferAdviceState;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
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.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
/**
|
||||
* @FileName io.v.nutz.offerAdvice.controller.OfferAdviceQueryController
|
||||
* @Description: 综合查询
|
||||
* @Author zxc
|
||||
* @Date 2022/6/23:15:37
|
||||
* @Version V1.0
|
||||
**/
|
||||
@IocBean
|
||||
@At("/platform/offerAdviceQuery")
|
||||
@Ok("json:full")
|
||||
public class OfferAdviceQueryController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
|
||||
@Inject
|
||||
private SimpleService simpleService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/offerAdvice/query.html")
|
||||
@RequiresPermissions("offerAdvice.query")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 页面数据
|
||||
*
|
||||
* @param pageForm 分页参数
|
||||
* @param subjectName 主题名称
|
||||
* @param year 年度
|
||||
* @param unitId 单位
|
||||
* @param unionId 工会
|
||||
* @return {@link Object}
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("offerAdvice.query")
|
||||
public Object pageData(PageForm pageForm,
|
||||
@Param(value = "subjectName", required = false) String subjectName,
|
||||
@Param(value = "year", required = false) Integer year,
|
||||
@Param(value = "unitId", required = false) String unitId,
|
||||
@Param(value = "unionId", required = false) String unionId) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
oa.*,
|
||||
type.typeName,
|
||||
state.stateName,
|
||||
u.unitname as unitName,
|
||||
u.unionname as unionName
|
||||
FROM
|
||||
offer_advice oa
|
||||
LEFT JOIN proposal_type type ON type.id = oa.typeId
|
||||
LEFT JOIN audit_state state ON state.stateId = oa.stateCode
|
||||
LEFT JOIN `user` u on u.id = oa.createUserId
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("YEAR(createTime)", "=", year);
|
||||
cnd.and(Cnd.likeEX("oa.subjectName", subjectName));
|
||||
cnd.andEX("oa.createUnitId", "=", unitId);
|
||||
cnd.andEX("oa.createUnionId", "=", unionId);
|
||||
|
||||
cnd.and("oa.stateCode", "=", OfferAdviceState.auditPass);
|
||||
cnd.and("oa.publicity", "=", 1);
|
||||
|
||||
sql.setCondition(cnd);
|
||||
return simpleService.list(pageForm, sql);
|
||||
}
|
||||
|
||||
}
|
||||
+128
@@ -0,0 +1,128 @@
|
||||
package io.v.nutz.zhgh.offerAdvice.controller;
|
||||
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.service.SimpleService;
|
||||
import io.v.nutz.base.model.Audit;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
import io.v.nutz.zhgh.offerAdvice.constant.OfferAdviceState;
|
||||
import io.v.nutz.zhgh.offerAdvice.model.OfferAdvice;
|
||||
import io.v.nutz.sys.models.Sys_user;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.web.commons.slog.annotation.SLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
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.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 org.nutz.trans.Trans;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @FileName io.v.nutz.offerAdvice.controller.OfferAdviceSchoolUnionAuditController
|
||||
* @Description: 校工会审核
|
||||
* @Author zxc
|
||||
* @Date 2022/6/23:15:37
|
||||
* @Version V1.0
|
||||
**/
|
||||
@IocBean
|
||||
@At("/platform/offerAdvice/schoolUnionAudit")
|
||||
@Ok("json:full")
|
||||
public class OfferAdviceSchoolUnionAuditController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
|
||||
@Inject
|
||||
private SimpleService simpleService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/offerAdvice/schoolUnionAudit.html")
|
||||
@RequiresPermissions("offerAdvice.schoolUnionAudit")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 页面数据
|
||||
*
|
||||
* @param pageForm 分页参数
|
||||
* @param subjectName 主题名称
|
||||
* @param year 年度
|
||||
* @param auditState 审核state
|
||||
* @return {@link Object}
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("offerAdvice.schoolUnionAudit")
|
||||
public Object pageData(PageForm pageForm,
|
||||
@Param(value = "subjectName", required = false) String subjectName,
|
||||
@Param(value = "year", required = false) Integer year,
|
||||
@Param(value = "auditState", required = false) Integer auditState) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
oa.*,
|
||||
type.typeName,
|
||||
state.stateName
|
||||
FROM
|
||||
offer_advice oa
|
||||
LEFT JOIN proposal_type type ON type.id = oa.typeId
|
||||
LEFT JOIN audit_state state ON state.stateId = oa.stateCode
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("YEAR(createTime)", "=", year);
|
||||
cnd.and(Cnd.likeEX("oa.subjectName", subjectName));
|
||||
|
||||
switch (auditState) {
|
||||
case -1 -> {
|
||||
cnd.and("oa.stateCode", "=", OfferAdviceState.awaitSchoolUnionAudit);
|
||||
}
|
||||
case 1 -> {
|
||||
cnd.and("oa.stateCode", ">", OfferAdviceState.awaitSchoolUnionAudit);
|
||||
}
|
||||
case 0 -> {
|
||||
cnd.and("oa.stateCode", ">=", OfferAdviceState.awaitSchoolUnionAudit);
|
||||
}
|
||||
}
|
||||
|
||||
cnd.asc("oa.stateCode");
|
||||
sql.setCondition(cnd);
|
||||
return simpleService.list(pageForm, sql);
|
||||
}
|
||||
|
||||
/**
|
||||
* 做审核
|
||||
*
|
||||
* @param audit 审核
|
||||
* @param id id
|
||||
* @return {@link Object}
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@SLog(tag = "建议献策校工会审核", param = true, result = true)
|
||||
@RequiresPermissions("offerAdvice.schoolUnionAudit")
|
||||
public Object doAudit(Audit audit, String id, String undertakeUnitId) {
|
||||
Sys_user principal = (Sys_user) ShiroUtil.getPrincipal();
|
||||
audit.setAuditor(principal.getId());
|
||||
audit.setAuditTime(new Date());
|
||||
audit.setUsername(principal.getUsername());
|
||||
audit.setLoginname(principal.getLoginname());
|
||||
|
||||
Trans.exec(() -> {
|
||||
dao.insert(audit);
|
||||
Chain chain = Chain.make("stateCode", OfferAdviceState.awaitLeaderAudit);
|
||||
chain.add("undertakeUnitId", undertakeUnitId);
|
||||
chain.add("schoolUnionAuditId", audit.getId());
|
||||
dao.update(OfferAdvice.class, chain, Cnd.where("id", "=", id));
|
||||
});
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package io.v.nutz.zhgh.offerAdvice.controller;
|
||||
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.zhgh.offerAdvice.constant.OfferAdviceState;
|
||||
import io.v.nutz.zhgh.offerAdvice.model.OfferAdvice;
|
||||
import io.v.nutz.sys.models.Sys_user;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.web.commons.slog.annotation.SLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||
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;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @FileName io.v.nutz.offerAdvice.controller.OfferAdviceWriteController
|
||||
* @Description: 撰写建言献策
|
||||
* @Author zxc
|
||||
* @Date 2022/6/23:10:06
|
||||
* @Version V1.0
|
||||
**/
|
||||
@IocBean
|
||||
@At("/platform/offerAdviceWrite")
|
||||
@Ok("json:full")
|
||||
public class OfferAdviceWriteController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/offerAdvice/write.html")
|
||||
@RequiresPermissions("offerAdvice.write")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 做处理程序
|
||||
*
|
||||
* @param offerAdvice 提供建议
|
||||
* @return {@link Object}
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("offerAdvice.write")
|
||||
@SLog(tag = "建言献策撰写", param = true)
|
||||
public Object doHandler(@Param("offerAdvice") OfferAdvice offerAdvice) {
|
||||
Sys_user sysUser = (Sys_user) ShiroUtil.getPrincipal();
|
||||
if (offerAdvice.getIsSubmit()) {
|
||||
offerAdvice.setStateCode(OfferAdviceState.awaitSchoolUnionAudit);
|
||||
} else {
|
||||
offerAdvice.setStateCode(OfferAdviceState.unSubmitted);
|
||||
}
|
||||
if (StrUtil.isBlank(offerAdvice.getId())) {
|
||||
offerAdvice.setCreateUserId(sysUser.getId());
|
||||
offerAdvice.setCreateLoginName(sysUser.getLoginname());
|
||||
offerAdvice.setCreateUserName(sysUser.getUsername());
|
||||
offerAdvice.setCreateTime(new Date());
|
||||
offerAdvice.setCreateUnitId(sysUser.getUnitid());
|
||||
offerAdvice.setCreateUnionId(sysUser.getUnit().getUnionid());
|
||||
dao.insert(offerAdvice);
|
||||
} else {
|
||||
dao.updateIgnoreNull(offerAdvice);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询单条信息
|
||||
*
|
||||
* @param id id
|
||||
* @return {@link Object}
|
||||
*/
|
||||
@At("/findOne/?")
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object findOne(String id) {
|
||||
Assert.notBlank(id);
|
||||
OfferAdvice offerAdvice = dao.fetch(OfferAdvice.class, id);
|
||||
return dao.fetchLinks(offerAdvice, null);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
package io.v.nutz.zhgh.offerAdvice.model;
|
||||
|
||||
import cn.wizzer.framework.base.model.BaseModel;
|
||||
import io.v.nutz.base.model.Audit;
|
||||
import io.v.nutz.zhgh.proposal.models.ProposalType;
|
||||
import io.v.nutz.zhgh.proposal.models.ProposalUndertake;
|
||||
import io.v.nutz.sys.models.Sys_file;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @FileName io.v.nutz.offerAdviceSuggestion.model.OfferAdviceSuggestion
|
||||
* @Description: TODO
|
||||
* @Author zxc
|
||||
* @Date 2022/6/23:09:54
|
||||
* @Version V1.0
|
||||
**/
|
||||
@Table
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class OfferAdvice extends BaseModel {
|
||||
|
||||
@Name
|
||||
@Comment("id")
|
||||
@PrevInsert(uu32 = true)
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("主题")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String subjectName;
|
||||
|
||||
@Column
|
||||
@Comment("提案类型")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String typeId;
|
||||
|
||||
@Column
|
||||
@Comment("创建人ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String createUserId;
|
||||
|
||||
@Column
|
||||
@Comment("创建人工号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String createLoginName;
|
||||
|
||||
@Column
|
||||
@Comment("创建人姓名")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String createUserName;
|
||||
|
||||
@Column
|
||||
@Comment("创建时间")
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
private Date createTime;
|
||||
|
||||
@Column
|
||||
@Comment("创建人单位")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String createUnitId;
|
||||
|
||||
@Column
|
||||
@Comment("创建人工会")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String createUnionId;
|
||||
|
||||
@Column
|
||||
@Comment("案由")
|
||||
@ColDefine(type = ColType.TEXT)
|
||||
private String brief;
|
||||
|
||||
@Column
|
||||
@Comment("建议措施")
|
||||
@ColDefine(type = ColType.TEXT)
|
||||
private String measures;
|
||||
|
||||
@Column
|
||||
@Comment("状态")
|
||||
@ColDefine(type = ColType.INT, width = 4)
|
||||
private Integer stateCode;
|
||||
|
||||
@Column
|
||||
@Comment("附件")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<Sys_file> files;
|
||||
|
||||
@Column
|
||||
@Comment("校工会建议是否公示")
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
private Boolean schoolUnionPublicity;
|
||||
|
||||
@Column
|
||||
@Comment("是否公示")
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
private Boolean publicity;
|
||||
|
||||
@Column
|
||||
@Comment("校工会审核ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String schoolUnionAuditId;
|
||||
|
||||
@Column
|
||||
@Comment("承办单位ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String undertakeUnitId;
|
||||
|
||||
@Column
|
||||
@Comment("领导审核ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String leaderAuditId;
|
||||
|
||||
@Column
|
||||
@Comment("是否提交")
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
private Boolean isSubmit;
|
||||
|
||||
@One(field = "schoolUnionAuditId")
|
||||
private Audit schoolUnionAuditInfo;
|
||||
|
||||
@One(field = "leaderAuditId")
|
||||
private Audit leaderAuditInfo;
|
||||
|
||||
@One(field = "undertakeUnitId")
|
||||
private ProposalUndertake underTakeInfo;
|
||||
|
||||
@One(field = "typeId")
|
||||
private ProposalType type;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user