教代会意见:
1、撰写建议-> 代表姓名label改成建议人,所属代表团label改为建议人所属代表团;新增字段记录人、所属讨论组,工作措施删掉 3、我的意见:列表意见人和代表团改为建议人和建议人所属代表团,记录员帮建议人录入建议,录入人和被录入人都可以看到 4、意见办理:校工会审核页面添加意见类别 5、流程还要修改:记录员提交后,流转到校工会和两办,校工会审核(修改类别和承办单位),两办只审阅不审核
This commit is contained in:
+5
-1
@@ -24,6 +24,7 @@ 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;
|
||||
@@ -108,7 +109,10 @@ public class OpinionMineController {
|
||||
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_UNION_PROPOSAL_ADMIN.name())) {
|
||||
cnd.and("info.createUserId", "=", SecurityUtil.getUserId());
|
||||
SqlExpressionGroup group = Cnd.NEW().where();
|
||||
group.and("info.createUserId", "=", SecurityUtil.getUserId())
|
||||
.or("info.suggestUserId", "=", SecurityUtil.getUserId());
|
||||
cnd.and(group);
|
||||
}
|
||||
OpinionSearchParam.buildSearch(cnd, pageForm);
|
||||
cnd.andEX("info.sessionId", "=", sessionId);
|
||||
|
||||
+2
-1
@@ -92,7 +92,8 @@ public class OpinionOfficeAuditController {
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("info.sessionId", "=", sessionId);
|
||||
cnd.and("t.taskName", "=", "office");
|
||||
// cnd.and("t.taskName", "=", "office");
|
||||
cnd.and("t.taskName", "=", "schoolAudit");
|
||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
|
||||
if (approval) {
|
||||
|
||||
+2
-1
@@ -127,7 +127,8 @@ public class OpinionSchoolAuditController {
|
||||
@ApiOperation("修改意见")
|
||||
@SLog(tag = "意见管理系统-校工会审核", msg = "修改意见")
|
||||
public Result edit(@Param("info") OpinionInfo opinionInfo) {
|
||||
dao.update(opinionInfo);
|
||||
// The school-union audit only edits opinion category here, so update the target field explicitly.
|
||||
dao.update(OpinionInfo.class, org.nutz.dao.Chain.make("typeId", opinionInfo.getTypeId()), Cnd.where("id", "=", opinionInfo.getId()));
|
||||
|
||||
ProcessInstance instance = dao.fetch(ProcessInstance.class, Cnd.where(ProcessInstance::getBusinessNo, "=", opinionInfo.getId()));
|
||||
Dict dict = FlowUtil.variableToDict(instance.getVariable());
|
||||
|
||||
+82
-2
@@ -18,6 +18,7 @@ import com.budwk.app.zhgh.democratic.opinion.service.OpinionWriteService;
|
||||
import com.budwk.app.zhgh.democratic.proposal.models.ProposalInfo;
|
||||
import com.budwk.app.zhgh.democratic.proposal.service.ProposalWriteService;
|
||||
import com.budwk.app.zhgh.democratic.teachercongress.delegate.models.Teacher_congress_delegate;
|
||||
import com.budwk.app.zhgh.democratic.teachercongress.discussiongroup.models.Teacher_congress_discussion_group;
|
||||
import com.budwk.app.zhgh.democratic.teachercongress.prepare.models.Teacher_congress_session;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -25,6 +26,9 @@ import lombok.extern.slf4j.Slf4j;
|
||||
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.entity.Record;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
@@ -125,8 +129,84 @@ public class OpinionWriteController {
|
||||
@SaCheckPermission("opinion.write")
|
||||
@ApiOperation("意见详情")
|
||||
public Result detail(@Valid String id) {
|
||||
OpinionInfo info = dao.fetch(OpinionInfo.class, id);
|
||||
return Result.success(info);
|
||||
// Join delegation name for edit echo because the page displays delegation as a readonly name field.
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
tcd.name AS delegationName
|
||||
FROM opinion_info info
|
||||
LEFT JOIN teacher_congress_delegation tcd ON tcd.id = info.delegationId
|
||||
$condition
|
||||
""");
|
||||
sql.setCondition(Cnd.where("info.id", "=", id));
|
||||
sql.setCallback(Sqls.callback.record());
|
||||
dao.execute(sql);
|
||||
return Result.success(sql.getObject(Record.class));
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("opinion.write")
|
||||
public Result listDiscussionGroup(@Valid String sessionId, String recorderUserId, String recorderUserCode) {
|
||||
// Only expose discussion groups managed by the current recorder to avoid cross-recorder selection.
|
||||
Cnd cnd = Cnd.where("sessionId", "=", sessionId).and("delFlag", "=", false);
|
||||
if (StrUtil.isNotBlank(recorderUserId)) {
|
||||
cnd.and("recorderUserId", "=", recorderUserId);
|
||||
}
|
||||
if (StrUtil.isBlank(recorderUserId) && StrUtil.isNotBlank(recorderUserCode)) {
|
||||
cnd.and("recorderUserCode", "=", recorderUserCode);
|
||||
}
|
||||
List<Teacher_congress_discussion_group> list = dao.query(
|
||||
Teacher_congress_discussion_group.class,
|
||||
cnd.asc("code")
|
||||
);
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("opinion.write")
|
||||
public Result discussionGroupDetail(@Valid String id) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
tcdg.id,
|
||||
tcdg.code,
|
||||
tcdg.name,
|
||||
tcdg.sessionId,
|
||||
tcdg.recorderUserId,
|
||||
tcdg.recorderUserCode,
|
||||
tcdg.recorderUserName,
|
||||
vu.mobile AS recorderUserMobile
|
||||
FROM teacher_congress_discussion_group tcdg
|
||||
LEFT JOIN vw_user vu ON vu.id = tcdg.recorderUserId
|
||||
$condition
|
||||
""");
|
||||
sql.setCondition(Cnd.where("tcdg.id", "=", id).and("tcdg.delFlag", "=", false));
|
||||
sql.setCallback(Sqls.callback.record());
|
||||
dao.execute(sql);
|
||||
return Result.success(sql.getObject(Record.class));
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("opinion.write")
|
||||
public Result searchSuggestUserDelegation(@Valid String sessionId, @Valid String userId) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
tcd.id,
|
||||
tcd.name,
|
||||
tcd.code
|
||||
FROM vw_user vu
|
||||
LEFT JOIN teacher_congress_delegation_unit tcdu ON tcdu.unitId = vu.unitId AND tcdu.sessionId = @sessionId
|
||||
LEFT JOIN teacher_congress_delegation tcd ON tcd.id = tcdu.delegationId
|
||||
WHERE vu.id = @userId
|
||||
AND tcd.id IS NOT NULL
|
||||
AND tcd.delFlag = 0
|
||||
ORDER BY CAST(tcd.code AS UNSIGNED), tcd.code ASC
|
||||
LIMIT 1
|
||||
""");
|
||||
sql.setParam("sessionId", sessionId);
|
||||
sql.setParam("userId", userId);
|
||||
sql.setCallback(Sqls.callback.record());
|
||||
dao.execute(sql);
|
||||
return Result.success(sql.getObject(Record.class));
|
||||
}
|
||||
|
||||
@At
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ public class OpinionOfficeSuffixInterceptor implements FlowInterceptor {
|
||||
Dao dao = ServiceContext.find(Dao.class);
|
||||
|
||||
String opinionId = execution.getProcessInstance().getBusinessNo();
|
||||
String officeResult = execution.getArgs().getStr(FlowConst.TASK_FORM_DATA_PREFIX + "officeResult");
|
||||
String officeResult = execution.getArgs().getStr(FlowConst.TASK_FORM_DATA_PREFIX + "schoolResult");
|
||||
|
||||
if (StrUtil.isNotBlank(officeResult) && "YES".equals(officeResult)) {
|
||||
// 删除原来的记录
|
||||
|
||||
@@ -75,6 +75,29 @@ public class OpinionInfo extends BaseModel {
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String delegationId;
|
||||
|
||||
@Column
|
||||
@Comment("建议人ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String suggestUserId;
|
||||
|
||||
@Column
|
||||
@Comment("建议人name")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String suggestUserName;
|
||||
|
||||
@Column
|
||||
@Comment("建议人code")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 120)
|
||||
private String suggestUserLoginName;
|
||||
|
||||
@Column
|
||||
@Comment("建议人所属代表团ID")
|
||||
private String suggestUserDelegationId;
|
||||
|
||||
@Column
|
||||
@Comment("建议人所属代表团名称")
|
||||
private String suggestUserDelegationName;
|
||||
|
||||
@Column
|
||||
@Comment("单位")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
|
||||
+3
@@ -32,6 +32,9 @@ public class OpinionWriteServiceImpl extends BaseServiceImpl<OpinionInfo> implem
|
||||
@Override
|
||||
public String generateOpinionCode(String sessionId, String delegationId) {
|
||||
Teacher_congress_delegation delegation = dao().fetch(Teacher_congress_delegation.class, delegationId);
|
||||
if (delegation == null) {
|
||||
return "";
|
||||
}
|
||||
|
||||
Sql sql = Sqls.fetchString("""
|
||||
SELECT
|
||||
|
||||
Reference in New Issue
Block a user