commit
This commit is contained in:
+6
-2
@@ -32,6 +32,7 @@ import com.deepoove.poi.config.Configure;
|
|||||||
import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy;
|
import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.ddr.poi.html.HtmlRenderPolicy;
|
||||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Dao;
|
import org.nutz.dao.Dao;
|
||||||
@@ -132,7 +133,6 @@ public class ActivityDeclareMineController {
|
|||||||
} else {
|
} else {
|
||||||
cnd.orderBy("info." + pageParam.getPageOrderName(), PageUtil.getOrder(pageParam.getPageOrderBy()));
|
cnd.orderBy("info." + pageParam.getPageOrderName(), PageUtil.getOrder(pageParam.getPageOrderBy()));
|
||||||
}
|
}
|
||||||
cnd.groupBy("info.id");
|
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
Pagination<NutMap> pagination = activityDeclareService.listPageMap(pageParam.getPageNumber(), pageParam.getPageSize(), sql);
|
Pagination<NutMap> pagination = activityDeclareService.listPageMap(pageParam.getPageNumber(), pageParam.getPageSize(), sql);
|
||||||
return Result.success().addData(pagination);
|
return Result.success().addData(pagination);
|
||||||
@@ -278,11 +278,15 @@ public class ActivityDeclareMineController {
|
|||||||
docData.put("budgets", list);
|
docData.put("budgets", list);
|
||||||
|
|
||||||
LoopRowTableRenderPolicy policy = new LoopRowTableRenderPolicy();
|
LoopRowTableRenderPolicy policy = new LoopRowTableRenderPolicy();
|
||||||
|
HtmlRenderPolicy htmlRenderPolicy = new HtmlRenderPolicy();
|
||||||
|
htmlRenderPolicy.getConfig().setShowDefaultTableBorderInTableCell(true);
|
||||||
|
|
||||||
Configure config = Configure.builder()
|
Configure config = Configure.builder()
|
||||||
.bind("budgets", policy)
|
.bind("budgets", policy)
|
||||||
|
.bind("info.activityContent", htmlRenderPolicy)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
String fileName = Globals.AppName + "【" + info.getString("activityName") + "】申报表.docx";
|
String fileName = "【" + info.getString("activityName") + "】申报表.docx";
|
||||||
|
|
||||||
try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream()) {
|
try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream()) {
|
||||||
XWPFTemplate.compile(sysOfficeTemplateUtil.getTemplate("activity_declare"), config).render(docData).writeAndClose(byteArrayOutputStream);
|
XWPFTemplate.compile(sysOfficeTemplateUtil.getTemplate("activity_declare"), config).render(docData).writeAndClose(byteArrayOutputStream);
|
||||||
|
|||||||
+13
-5
@@ -226,13 +226,22 @@ public class ActivityReimbursementApplyController {
|
|||||||
reiDecIdList = reiDecIdList.stream().filter(v -> StrUtil.isNotBlank(v)).toList();
|
reiDecIdList = reiDecIdList.stream().filter(v -> StrUtil.isNotBlank(v)).toList();
|
||||||
|
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
cnd.and("outlayManageSource", "=", outlayManageSource);
|
cnd.and("info.outlayManageSource", "=", outlayManageSource);
|
||||||
if (Objects.equals(outlayManageSource, "ACTIVITY_BUDGET_TYPE_TWO")) {
|
if (Objects.equals(outlayManageSource, "ACTIVITY_BUDGET_TYPE_TWO")) {
|
||||||
cnd.and("unionId", "=", SecurityUtil.getUnionId());
|
cnd.and("info.unionId", "=", SecurityUtil.getUnionId());
|
||||||
} else if (Objects.equals(outlayManageSource, "ACTIVITY_BUDGET_TYPE_THREE")) {
|
} else if (Objects.equals(outlayManageSource, "ACTIVITY_BUDGET_TYPE_THREE")) {
|
||||||
cnd.and("clubId", "=", clubId);
|
cnd.and("info.clubId", "=", clubId);
|
||||||
}
|
}
|
||||||
Sql sql = Sqls.create("select declareId from activity_reimbursement_info $condition");
|
cnd.and("ins.state", "in", List.of(10, 20));
|
||||||
|
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
info.declareId
|
||||||
|
FROM
|
||||||
|
activity_reimbursement_info info
|
||||||
|
LEFT JOIN wf_process_instance ins ON ins.businessNo = info.id
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
sql.setCallback(Sqls.callback.strList());
|
sql.setCallback(Sqls.callback.strList());
|
||||||
dao.execute(sql);
|
dao.execute(sql);
|
||||||
@@ -249,7 +258,6 @@ public class ActivityReimbursementApplyController {
|
|||||||
$condition
|
$condition
|
||||||
""");
|
""");
|
||||||
Cnd applyCnd = Cnd.NEW();
|
Cnd applyCnd = Cnd.NEW();
|
||||||
|
|
||||||
if (Objects.equals(outlayManageSource, "ACTIVITY_BUDGET_TYPE_TWO")) {
|
if (Objects.equals(outlayManageSource, "ACTIVITY_BUDGET_TYPE_TWO")) {
|
||||||
applyCnd.and("info.unionId", "=", SecurityUtil.getUnionId());
|
applyCnd.and("info.unionId", "=", SecurityUtil.getUnionId());
|
||||||
activityType = "BRANCH_UNION";
|
activityType = "BRANCH_UNION";
|
||||||
|
|||||||
+5
-2
@@ -140,7 +140,7 @@ public class ExecutiveCommitteePushController {
|
|||||||
|
|
||||||
ExecutiveCommitteeConfig config = dao.fetch(ExecutiveCommitteeConfig.class,
|
ExecutiveCommitteeConfig config = dao.fetch(ExecutiveCommitteeConfig.class,
|
||||||
Cnd.where("teacherMeetId", "=", teacherMeetId));
|
Cnd.where("teacherMeetId", "=", teacherMeetId));
|
||||||
/* if (ObjectUtil.isEmpty(config)) {
|
if (ObjectUtil.isEmpty(config)) {
|
||||||
return Result.error("请先配置基础信息");
|
return Result.error("请先配置基础信息");
|
||||||
}
|
}
|
||||||
if (config.getFirstStartTime().getTime() > System.currentTimeMillis()) {
|
if (config.getFirstStartTime().getTime() > System.currentTimeMillis()) {
|
||||||
@@ -148,7 +148,7 @@ public class ExecutiveCommitteePushController {
|
|||||||
}
|
}
|
||||||
if (config.getFirstEndTime().getTime() < System.currentTimeMillis()) {
|
if (config.getFirstEndTime().getTime() < System.currentTimeMillis()) {
|
||||||
return Result.error("一次预选已结束");
|
return Result.error("一次预选已结束");
|
||||||
}*/
|
}
|
||||||
|
|
||||||
int dbCount = dao.count(ExecutiveCommitteeOnePush.class,
|
int dbCount = dao.count(ExecutiveCommitteeOnePush.class,
|
||||||
Cnd.where("teacherMeetId", "=", teacherMeetId)
|
Cnd.where("teacherMeetId", "=", teacherMeetId)
|
||||||
@@ -206,6 +206,9 @@ public class ExecutiveCommitteePushController {
|
|||||||
if (ObjectUtil.isEmpty(config)) {
|
if (ObjectUtil.isEmpty(config)) {
|
||||||
return Result.error("请先配置基础信息");
|
return Result.error("请先配置基础信息");
|
||||||
}
|
}
|
||||||
|
if (config.getFirstEndTime().getTime() < System.currentTimeMillis()) {
|
||||||
|
return Result.error("预选已结束不能删除!");
|
||||||
|
}
|
||||||
int num = dao.clear(ExecutiveCommitteeOnePush.class, Cnd.where("id", "=", id));
|
int num = dao.clear(ExecutiveCommitteeOnePush.class, Cnd.where("id", "=", id));
|
||||||
return num >= 0 ? Result.success() : Result.error();
|
return num >= 0 ? Result.success() : Result.error();
|
||||||
}
|
}
|
||||||
|
|||||||
+53
-27
@@ -29,6 +29,7 @@ import com.budwk.app.zhgh.democratic.proposal.models.ProposalConsolidation;
|
|||||||
import com.budwk.app.zhgh.democratic.proposal.models.ProposalInfo;
|
import com.budwk.app.zhgh.democratic.proposal.models.ProposalInfo;
|
||||||
import com.budwk.app.zhgh.democratic.proposal.models.ProposalMerge;
|
import com.budwk.app.zhgh.democratic.proposal.models.ProposalMerge;
|
||||||
import com.budwk.app.zhgh.democratic.proposal.models.ProposalUndertake;
|
import com.budwk.app.zhgh.democratic.proposal.models.ProposalUndertake;
|
||||||
|
import com.budwk.app.zhgh.democratic.proposal.param.ProposalQueryComprehensiveParam;
|
||||||
import com.budwk.app.zhgh.democratic.teachercongress.prepare.models.Teacher_congress_session;
|
import com.budwk.app.zhgh.democratic.teachercongress.prepare.models.Teacher_congress_session;
|
||||||
import com.deepoove.poi.XWPFTemplate;
|
import com.deepoove.poi.XWPFTemplate;
|
||||||
import com.deepoove.poi.config.Configure;
|
import com.deepoove.poi.config.Configure;
|
||||||
@@ -436,18 +437,18 @@ public class ProposalCommonServiceImpl extends BaseServiceImpl<ProposalInfo> imp
|
|||||||
return delegationIds;
|
return delegationIds;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ProposalUndertake getSelfManageUndertake() {
|
public ProposalUndertake getSelfManageUndertake() {
|
||||||
Sys_role role = sysRoleService.getByCode(RoleConstant.PROPOSAL_UNIT_LEADER.name());
|
Sys_role role = sysRoleService.getByCode(RoleConstant.PROPOSAL_UNIT_LEADER.name());
|
||||||
Sys_user_role userRole = dao().fetch(Sys_user_role.class, Cnd.where(Sys_user_role::getRoleId, "=", role.getId())
|
Sys_user_role userRole = dao().fetch(Sys_user_role.class, Cnd.where(Sys_user_role::getRoleId, "=", role.getId())
|
||||||
.and(Sys_user_role::getUserId, "=", SecurityUtil.getUserId()));
|
.and(Sys_user_role::getUserId, "=", SecurityUtil.getUserId()));
|
||||||
if(Lang.isEmpty(userRole)) {
|
if (Lang.isEmpty(userRole)) {
|
||||||
throw new RuntimeException("当前登录用户不是" + role.getName());
|
throw new RuntimeException("当前登录用户不是" + role.getName());
|
||||||
}
|
}
|
||||||
return dao().fetch(ProposalUndertake.class, Cnd.where(ProposalUndertake::getId, "=", userRole.getUnderTakeId()));
|
return dao().fetch(ProposalUndertake.class, Cnd.where(ProposalUndertake::getId, "=", userRole.getUnderTakeId()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> getConsolidation(String id) {
|
public List<String> getConsolidation(String id) {
|
||||||
ProposalConsolidation consolidation = dao().fetch(ProposalConsolidation.class, Cnd.where(new Static("JSON_CONTAINS(consolidationIds,'\"" + id + "\"')")));
|
ProposalConsolidation consolidation = dao().fetch(ProposalConsolidation.class, Cnd.where(new Static("JSON_CONTAINS(consolidationIds,'\"" + id + "\"')")));
|
||||||
if (ObjectUtil.isNotEmpty(consolidation)) {
|
if (ObjectUtil.isNotEmpty(consolidation)) {
|
||||||
@@ -462,6 +463,7 @@ public class ProposalCommonServiceImpl extends BaseServiceImpl<ProposalInfo> imp
|
|||||||
|
|
||||||
Teacher_congress_session session = dao().fetch(Teacher_congress_session.class, sessionId);
|
Teacher_congress_session session = dao().fetch(Teacher_congress_session.class, sessionId);
|
||||||
docData.put("sessionName", session.getFullName());
|
docData.put("sessionName", session.getFullName());
|
||||||
|
docData.put("startDate", DateUtil.format(session.getStartDate(), "yyyy年MM月dd日"));
|
||||||
|
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
@@ -489,26 +491,43 @@ public class ProposalCommonServiceImpl extends BaseServiceImpl<ProposalInfo> imp
|
|||||||
docData.put("notCaseFilingSum", list.stream().filter(v -> StrUtil.isNotBlank(v.getString("caseFilingResult")) && v.getString("caseFilingResult").equals("NOT")).count());
|
docData.put("notCaseFilingSum", list.stream().filter(v -> StrUtil.isNotBlank(v.getString("caseFilingResult")) && v.getString("caseFilingResult").equals("NOT")).count());
|
||||||
|
|
||||||
Set<String> underTakeNames = new HashSet<>();
|
Set<String> underTakeNames = new HashSet<>();
|
||||||
|
|
||||||
Sql caseUnitSql = Sqls.create("""
|
Sql caseUnitSql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
task.extVariable
|
info.*,
|
||||||
|
IF(mer.proposalId IS NOT NULL, 1, 0) AS merge,
|
||||||
|
type.name AS typeName,
|
||||||
|
tcs.fullName AS sessionName,
|
||||||
|
tcd.`name` AS delegationName,
|
||||||
|
ins.id AS instanceId,
|
||||||
|
ins.businessNo,
|
||||||
|
ins.state instanceState,
|
||||||
|
ins.variable instanceVariable,
|
||||||
|
ins.processDefineId instanceProcessDefineId,
|
||||||
|
t.displayName curTaskName,
|
||||||
|
GROUP_CONCAT(DISTINCT CASE WHEN pru.isMaster = 1 THEN pru.unitName END) AS masterUnitName,
|
||||||
|
GROUP_CONCAT(DISTINCT CASE WHEN pru.isMaster = 0 THEN pru.unitName END) AS slaveUnitNames
|
||||||
FROM
|
FROM
|
||||||
bpm_process_task task
|
proposal_info info
|
||||||
INNER JOIN ( SELECT processInstanceId, MAX( endOn ) AS maxEndOn FROM bpm_process_task WHERE processTaskNodeCode = 70 AND taskStatus = 'COMPLETE' GROUP BY processInstanceId ) latestTask ON task.processInstanceId = latestTask.processInstanceId\s
|
LEFT JOIN proposal_type type on type.id = info.typeId
|
||||||
AND task.endOn = latestTask.maxEndOn
|
LEFT JOIN proposal_merge mer ON mer.proposalId = info.id
|
||||||
LEFT JOIN bpm_process_instance inst ON inst.id = task.processInstanceId
|
LEFT JOIN teacher_congress_session tcs on tcs.id = info.sessionId
|
||||||
WHERE
|
LEFT JOIN teacher_congress_delegation tcd on tcd.id = info.delegationId
|
||||||
inst.processInstanceBusinessId IN (@businessIds)
|
LEFT JOIN teacher_congress_delegate tcde on tcde.loginName = info.createUserLoginName
|
||||||
""");
|
LEFT JOIN wf_process_instance ins ON ins.businessNo = info.id
|
||||||
caseUnitSql.setParam("businessIds", list.stream().map(v -> v.getString("id")).toList());
|
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskState = 10
|
||||||
|
LEFT JOIN proposal_reply_unit pru ON pru.proposalId = info.id
|
||||||
|
WHERE info.sessionId=@sessionId GROUP BY info.id
|
||||||
|
""").setParam("sessionId", sessionId);
|
||||||
List<NutMap> caseUnitList = listMap(caseUnitSql);
|
List<NutMap> caseUnitList = listMap(caseUnitSql);
|
||||||
for (NutMap v : caseUnitList) {
|
for (NutMap v : caseUnitList) {
|
||||||
JSONObject extVariable = Json.fromJson(JSONObject.class, v.getString("extVariable"));
|
String hostUnitName = v.getString("masterUnitName");
|
||||||
String hostUnitName = extVariable.getStr("hostUnit");
|
if (StrUtil.isNotBlank(hostUnitName)){
|
||||||
List<String> helpUnitNames = extVariable.getBeanList("helpUnits", String.class);
|
underTakeNames.add(hostUnitName);
|
||||||
underTakeNames.add(hostUnitName);
|
}
|
||||||
underTakeNames.addAll(helpUnitNames);
|
if (StrUtil.isNotBlank(v.getString("slaveUnitNames"))){
|
||||||
|
List<String> helpUnitNames = Arrays.asList(v.getString("slaveUnitNames").split("、"));
|
||||||
|
underTakeNames.addAll(helpUnitNames);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//承办单位数量
|
//承办单位数量
|
||||||
@@ -519,7 +538,7 @@ public class ProposalCommonServiceImpl extends BaseServiceImpl<ProposalInfo> imp
|
|||||||
//提案办理的详细情况
|
//提案办理的详细情况
|
||||||
Sql transactSql = Sqls.create("""
|
Sql transactSql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
concat( type.`name`, '(', type.CODE, ')' ) AS typeName,
|
type.`name` AS typeName,
|
||||||
count( info.id ) AS sum,
|
count( info.id ) AS sum,
|
||||||
count(case when info.caseFilingResult = 'CONFIRM_FILING' then info.id end) confirmFilingCount,
|
count(case when info.caseFilingResult = 'CONFIRM_FILING' then info.id end) confirmFilingCount,
|
||||||
count(case when info.caseFilingResult = 'SUGGESTION' then info.id end) suggestionCount,
|
count(case when info.caseFilingResult = 'SUGGESTION' then info.id end) suggestionCount,
|
||||||
@@ -536,6 +555,13 @@ public class ProposalCommonServiceImpl extends BaseServiceImpl<ProposalInfo> imp
|
|||||||
transactSql.setParam("sessionId", sessionId);
|
transactSql.setParam("sessionId", sessionId);
|
||||||
List<NutMap> transactList = listMap(transactSql);
|
List<NutMap> transactList = listMap(transactSql);
|
||||||
|
|
||||||
|
docData.put("typesSummary", transactList.stream()
|
||||||
|
.map(proposal -> proposal.getString("typeName") + ": " + proposal.getInt("sum") + "条")
|
||||||
|
.collect(Collectors.joining(",")));
|
||||||
|
docData.put("typeNames", transactList.stream()
|
||||||
|
.map(proposal -> proposal.getString("typeName"))
|
||||||
|
.collect(Collectors.joining(",")));
|
||||||
|
|
||||||
int sum = transactList.stream().mapToInt(v -> v.getInt("sum")).sum();
|
int sum = transactList.stream().mapToInt(v -> v.getInt("sum")).sum();
|
||||||
docData.put("transactSum", sum);
|
docData.put("transactSum", sum);
|
||||||
docData.put("transactConfirmFilingSum", transactList.stream().mapToInt(v -> v.getInt("confirmFilingCount")).sum());
|
docData.put("transactConfirmFilingSum", transactList.stream().mapToInt(v -> v.getInt("confirmFilingCount")).sum());
|
||||||
|
|||||||
+1
@@ -190,6 +190,7 @@ public class TeacherCongressDelegatePushServiceImpl extends BaseServiceImpl<Teac
|
|||||||
""");
|
""");
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
cnd.andEX("info.sessionId", "=", sessionId);
|
cnd.andEX("info.sessionId", "=", sessionId);
|
||||||
|
cnd.andEX("info.representativeType", "=", "正式代表");
|
||||||
cnd.andEX("info.unionId", "=", unionId);
|
cnd.andEX("info.unionId", "=", unionId);
|
||||||
cnd.andEX("info.schoolLeader", "!=", 1);
|
cnd.andEX("info.schoolLeader", "!=", 1);
|
||||||
SqlExpressionGroup group = new SqlExpressionGroup();
|
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||||
|
|||||||
+14
-3
@@ -183,7 +183,8 @@ layout("/layouts/platform_h5.html"){
|
|||||||
this.$refs.proposalInfoRef.onOpen(row)
|
this.$refs.proposalInfoRef.onOpen(row)
|
||||||
this.formData = {
|
this.formData = {
|
||||||
processTaskId: row.taskId,
|
processTaskId: row.taskId,
|
||||||
taskName: row.curTaskName
|
taskName: row.curTaskName,
|
||||||
|
instanceId: row.instanceId
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -200,6 +201,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
title: "提示",
|
title: "提示",
|
||||||
message: "您确定要提交吗?"
|
message: "您确定要提交吗?"
|
||||||
}).then(async () => {
|
}).then(async () => {
|
||||||
|
debugger
|
||||||
const formData = {
|
const formData = {
|
||||||
...this.formData,
|
...this.formData,
|
||||||
submitType: val
|
submitType: val
|
||||||
@@ -207,7 +209,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
// 不满意
|
// 不满意
|
||||||
if (this.formData.tf_feedback === 'DISSATISFIED') {
|
if (this.formData.tf_feedback === 'DISSATISFIED') {
|
||||||
const caseInfo = await this.getCaseInfo(this.formData.instanceId)
|
const caseInfo = await this.getCaseInfo(this.formData.instanceId)
|
||||||
formData.tf_hostUnitId = caseInfo.tf_hostUnitId
|
formData.tf_masterUnitId = caseInfo.tf_masterUnitId
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$axios.post("/flow/common/executeTask", {
|
this.$axios.post("/flow/common/executeTask", {
|
||||||
@@ -226,7 +228,16 @@ layout("/layouts/platform_h5.html"){
|
|||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 获取立案信息
|
||||||
|
async getCaseInfo(instId) {
|
||||||
|
const {
|
||||||
|
data,
|
||||||
|
code
|
||||||
|
} = await this.$axios.post('/platform/proposal/feedbackEvaluation/caseInfo', {instId})
|
||||||
|
if (code === 0) {
|
||||||
|
return data
|
||||||
|
}
|
||||||
|
},
|
||||||
onRevoke(row) {
|
onRevoke(row) {
|
||||||
this.$dialog.confirm({
|
this.$dialog.confirm({
|
||||||
title: "提示",
|
title: "提示",
|
||||||
|
|||||||
Reference in New Issue
Block a user