diff --git a/src/main/java/com/budwk/app/sys/services/impl/SysUserServiceImpl.java b/src/main/java/com/budwk/app/sys/services/impl/SysUserServiceImpl.java index 4ffba70d..63a91406 100644 --- a/src/main/java/com/budwk/app/sys/services/impl/SysUserServiceImpl.java +++ b/src/main/java/com/budwk/app/sys/services/impl/SysUserServiceImpl.java @@ -309,9 +309,9 @@ public class SysUserServiceImpl extends BaseServiceImpl implements Sys String decodePwd = Base64Decoder.decodeStr(passowrd); String hashedPassword = PwdUtil.getPassword(decodePwd, user.getSalt()); if (!Strings.sNull(hashedPassword).equalsIgnoreCase(user.getPassword())) { -// if (Globals.sso) { - throw new BaseException("用户名或者密码不正确"); -// } + if (Globals.sso) { + throw new BaseException("用户名或者密码不正确"); + } } user = this.fetchLinks(user, "unit"); if (Lang.isNotEmpty(user.getUnit()) && StrUtil.isNotBlank(user.getUnit().getUnionId())) { diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/service/OutlayManageUnionAllocateService.java b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/service/OutlayManageUnionAllocateService.java index 986186d8..a146ca91 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/service/OutlayManageUnionAllocateService.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/service/OutlayManageUnionAllocateService.java @@ -11,41 +11,41 @@ import java.math.BigDecimal; import java.util.List; /** - * 分工会季度额度分配服务。 + * 分工会分配项目额度分配服务。 * - *

该服务统一处理季度额度的分配、批量分配和重置回滚, - * 保证季度记录与年度预算表金额始终同步。

+ *

该服务统一处理会费、评优奖励等分配项目的额度分配、批量分配和重置回滚, + * 保证分配项目记录与年度预算表金额始终同步。

* * @author zhf */ public interface OutlayManageUnionAllocateService extends BaseService { /** - * 修改单个分工会的季度分配金额。 + * 修改单个分工会的分配项目金额。 * - * @param id outlay_allocate_union 表主键,用于定位当前编辑的季度分配记录 - * @param allocateMoney 本次要设置的季度分配金额,传入的是最终金额,不是增量金额 + * @param id outlay_allocate_union 表主键,用于定位当前编辑的分配项目记录 + * @param allocateMoney 本次要设置的分配项目金额,传入的是最终金额,不是增量金额 * @return Result 成功时返回 success;失败时返回错误信息,前端据此提示用户 */ Result doEdit(String id, BigDecimal allocateMoney); /** - * 批量设置某一季度所有分工会的分配金额。 + * 批量设置某一分配项目所有分工会的分配金额。 * - * @param allocateMoney 本次批量设置的季度分配金额,所有命中的分工会都会写入该金额 - * @param quarterly 要操作的季度,例如 1/2/3/4 - * @param year 要操作的年份,用于筛选对应季度的有效分配记录 + * @param allocateMoney 本次批量设置的分配项目金额,所有命中的分工会都会写入该金额 + * @param quarterly 要操作的分配项目编码,复用 OUTLAY_QUARTERLY 字典 + * @param year 要操作的年份,用于筛选对应分配项目的有效记录 * @return Result 成功时返回 success;失败时返回错误信息 */ Result doBatchAllocate(BigDecimal allocateMoney, Integer quarterly, Integer year); /** - * 判断某年某季度是否已经做过额度分配。 + * 判断某年某分配项目是否已经做过额度分配。 * - *

只要当前季度记录中存在分配额度大于 0 的有效记录, - * 就认为该季度已经分配过额度,前端据此决定是否提示再次分配。

+ *

只要当前分配项目记录中存在分配额度大于 0 的有效记录, + * 就认为该分配项目已经分配过额度,前端据此决定是否提示再次分配。

* - * @param quarterly 要检查的季度,例如 1/2/3/4 + * @param quarterly 要检查的分配项目编码,取值由 OUTLAY_QUARTERLY 字典维护 * @param year 要检查的年份 * @return true 已分配过;false 未分配 */ @@ -60,15 +60,28 @@ public interface OutlayManageUnionAllocateService extends BaseService readImportExcel(TempFile file); /** - * 根据导入数据按分工会逐条分配季度额度。 + * 根据导入数据按分工会逐条分配项目额度。 * * @param importList 导入预览数据 - * @param quarterly 当前季度 + * @param quarterly 当前分配项目编码 * @param year 当前年度 * @return 导入分配结果 */ Result doImportAllocate(List importList, Integer quarterly, Integer year); + /** + * 给指定分工会新增评优奖励分配记录。 + * + *

评优奖励属于 OUTLAY_QUARTERLY 字典中的独立分配项目,只针对单个分工会新增; + * 新增后同步累加年度预算表总额度,分工会经费分配详情会按分配项目展示该记录。

+ * + * @param year 当前预算年度 + * @param unionId 要新增评优奖励的分工会 ID + * @param allocateMoney 本次新增的评优奖励金额 + * @return Result 成功时返回 success;失败时返回校验原因 + */ + Result doAddAwardAllocate(Integer year, String unionId, BigDecimal allocateMoney); + /** * 导出分工会额度导入模板。 * @@ -77,24 +90,24 @@ public interface OutlayManageUnionAllocateService extends BaseService页面支持切换年度和季度,所以重置动作必须严格使用前端当前选择值, - * 不能再按系统当前自然季度处理,否则会出现页面筛选季度和实际重置季度不一致的问题。

+ *

页面支持切换年度和分配项目,所以重置动作必须严格使用前端当前选择值, + * 不能再按系统当前默认项目处理,否则会出现页面筛选项目和实际重置项目不一致的问题。

* - * @param quarterly 要重置的季度,例如 1/2/3/4 + * @param quarterly 要重置的分配项目编码 * @param year 要重置的年份 * @return Result 成功时返回 success;失败时返回错误信息 */ Result deleteAllocateRecord(Integer quarterly, Integer year); /** - * 按指定年度季度生成分工会预算记录。 + * 按指定年度分配项目生成分工会预算记录。 * - *

生成前会先校验该年度季度是否已存在有效记录; + *

生成前会先校验该年度分配项目是否已存在有效记录; * 若已存在,则直接提示前端需要先重置后再重新生成。

* - * @param quarterly 要生成的季度,例如 1/2/3/4 + * @param quarterly 要生成的分配项目编码 * @param year 要生成的年份 * @return Result 成功时返回 success;失败时返回错误信息 */ diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/service/impl/OutlayManageUnionAllocateServiceImpl.java b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/service/impl/OutlayManageUnionAllocateServiceImpl.java index ae2a70b1..f20a3895 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/service/impl/OutlayManageUnionAllocateServiceImpl.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/service/impl/OutlayManageUnionAllocateServiceImpl.java @@ -33,13 +33,15 @@ import java.util.Map; import java.util.Set; /** - * 分工会季度额度分配实现。 + * 分工会分配项目额度分配实现。 * * @author zhf */ @IocBean(args = {"refer:dao"}) public class OutlayManageUnionAllocateServiceImpl extends BaseServiceImpl implements OutlayManageUnionAllocateService { + private static final int AWARD_PROJECT_CODE = 4; + public OutlayManageUnionAllocateServiceImpl(Dao dao) { super(dao); } @@ -50,9 +52,9 @@ public class OutlayManageUnionAllocateServiceImpl extends BaseServiceImpl importList, Integer quarterly, Integer year) { - Result validateResult = validateCurrentQuarterOperation(quarterly); + Result validateResult = validateCurrentPeriodOperation(quarterly); if (validateResult != null) { return validateResult; } @@ -155,7 +157,7 @@ public class OutlayManageUnionAllocateServiceImpl extends BaseServiceImpl unionList = dao().query(Sys_union.class, Cnd.NEW()); Map unionMap = new HashMap<>(); @@ -190,7 +192,7 @@ public class OutlayManageUnionAllocateServiceImpl extends BaseServiceImpl 0) { + return Result.error("该分工会本年度已存在评优奖励记录,请直接编辑已有记录!"); + } + + OutLayAllocateUnion allocateUnion = new OutLayAllocateUnion(); + allocateUnion.setYear(year); + allocateUnion.setUnionId(unionId); + allocateUnion.setQuarterly(AWARD_PROJECT_CODE); + allocateUnion.setAllocateHeadMoney(getCurrentYearSurplusMoney(year, unionId)); + allocateUnion.setAllocateMoney(BigDecimal.ZERO); + insert(allocateUnion); + // 新增评优奖励后复用统一金额同步规则,确保分配项目记录和年度预算表 totalQuota 同步。 + applyAllocateMoney(allocateUnion, allocateMoney); + return Result.success(); + } + @Override public Workbook exportImportTemplate() { List entityList = new ArrayList<>(); + entityList.add(new ExcelExportEntity("工会名称", "unionName", 20)); entityList.add(new ExcelExportEntity("工会编码", "unionCode", 20)); entityList.add(new ExcelExportEntity("分配额度", "allocateMoney", 20)); + List unionList = dao().query(Sys_union.class, Cnd.NEW().asc("unionCode")); + List templateList = new ArrayList<>(); + for (Sys_union union : unionList) { + OutlayUnionAllocateImportVo item = new OutlayUnionAllocateImportVo(); + item.setUnionName(union.getName()); + item.setUnionCode(union.getUnionCode()); + templateList.add(item); + } ExportParams exportParams = new ExportParams(); exportParams.setType(ExcelType.XSSF); - return ExcelExportUtil.exportExcel(exportParams, entityList, new ArrayList<>()); + return ExcelExportUtil.exportExcel(exportParams, entityList, templateList); } @Override @@ -220,7 +264,7 @@ public class OutlayManageUnionAllocateServiceImpl extends BaseServiceImpl 0) { - return Result.error("当前季度已分配,如需重新分配请点击重置分配记录!"); + return Result.error("当前分配项目已分配,如需重新分配请点击重置分配记录!"); } - // 第一季度需要承接上一年度剩余额度,其余季度承接当年预算额度,确保生成记录时的分配前额度准确。 + // 第一个会费项目需要承接上一年度剩余额度,其余项目承接当年预算额度,确保生成记录时的分配前额度准确。 Integer sourceYear = quarterly == 1 ? year - 1 : year; List outlayManageUnionList = dao().query(OutlayManageUnion.class, Cnd.where(OutlayManageUnion::getYear, "=", sourceYear)); @@ -270,10 +314,10 @@ public class OutlayManageUnionAllocateServiceImpl extends BaseServiceImpl allocateUnionList = dao().query(OutLayAllocateUnion.class, + Cnd.where(OutLayAllocateUnion::getUnionId, "=", allocateUnion.getUnionId()) + .and(OutLayAllocateUnion::getYear, "=", allocateUnion.getYear()) + .and(OutLayAllocateUnion::getDelFlag, "=", false)); + BigDecimal allocatedTotalMoney = allocateUnionList.stream() + .map(OutLayAllocateUnion::getAllocateMoney) + .map(this::defaultValue) + .reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal nonAllocateMoney = defaultValue(manageUnion.getTotalQuota()).subtract(allocatedTotalMoney); + if (nonAllocateMoney.compareTo(BigDecimal.ZERO) == 0) { + return headMoney; + } + return BigDecimal.ZERO; + } + /** * 当前年份预算表不存在时,按“分配前额度 + 本次分配额度”创建年度预算记录。 * - * @param allocateUnion 当前季度分配记录,allocateHeadMoney 表示生成记录时的剩余额度快照 - * @param allocateMoney 本次要设置的季度分配额度 + * @param allocateUnion 当前分配项目记录,allocateHeadMoney 表示生成记录时的剩余额度快照 + * @param allocateMoney 本次要设置的分配项目额度 * @return OutlayManageUnion 新建的年度预算实体 */ private OutlayManageUnion buildManageUnion(OutLayAllocateUnion allocateUnion, BigDecimal allocateMoney) { @@ -347,38 +427,55 @@ public class OutlayManageUnionAllocateServiceImpl extends BaseServiceImpl 待插入的季度分配记录 + * @return List 待插入的分配项目记录 */ private List buildAllocateUnionList(List outlayManageUnionList, Integer quarterly, Integer year) { List unionList = dao().query(Sys_union.class, Cnd.NEW()); diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/union/controller/OutlayManageUnionAllocateController.java b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/union/controller/OutlayManageUnionAllocateController.java index 7ffa4b90..9f0c9ffa 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/union/controller/OutlayManageUnionAllocateController.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/union/controller/OutlayManageUnionAllocateController.java @@ -38,13 +38,13 @@ import java.util.List; /** * @author zhf * @date 2026/2/3 11:12 - * @description 分工会经费分配 + * @description 分工会经费分配项目管理 */ @IocBean @At("/platform/outlay/outlayManage/unionAllocate") @Ok("json:full") @Slf4j -@Api(tags = "分工会经费分配") +@Api(tags = "分工会经费分配项目管理") public class OutlayManageUnionAllocateController { @Inject @@ -100,11 +100,13 @@ public class OutlayManageUnionAllocateController { @At @ApiOperation("一键批量分配所有工会额度") @Aop(TransAop.READ_COMMITTED) - @SLog(tag = "分工会预算-季度预算分配", msg = "一键批量分配所有工会额度") + @SLog(tag = "分工会预算-分配项目预算分配", msg = "一键批量分配所有工会额度") @SaCheckPermission("outlay.outlayManage.union.allocate") public Result doBatchAllocate(@Param("allocateMoney") BigDecimal allocateMoney, @Param("quarterly") Integer quarterly, @Param("year") Integer year) { + // 参数说明:allocateMoney 为本次写入的分配额度;quarterly 承载 OUTLAY_QUARTERLY 字典编码,对应会费、评优奖励等分配项目;year 为预算年度。 + // 返回 Result,成功时前端刷新列表,失败时 msg 字段用于页面提示。 if (allocateMoney == null || quarterly == null || year == null) { return Result.error("参数错误!"); } @@ -112,7 +114,7 @@ public class OutlayManageUnionAllocateController { } @At - @ApiOperation("校验当前季度是否已分配额度") + @ApiOperation("校验当前分配项目是否已分配额度") @SaCheckPermission("outlay.outlayManage.union.allocate") public Result hasAllocated(@Param("quarterly") Integer quarterly, @Param("year") Integer year) { @@ -139,11 +141,13 @@ public class OutlayManageUnionAllocateController { @At @ApiOperation("导入分配分工会额度") @Aop(TransAop.READ_COMMITTED) - @SLog(tag = "分工会预算-季度预算分配", msg = "导入分配分工会额度") + @SLog(tag = "分工会预算-分配项目预算分配", msg = "导入分配分工会额度") @SaCheckPermission("outlay.outlayManage.union.allocate") public Result doImportAllocate(String data, @Param("quarterly") Integer quarterly, @Param("year") Integer year) { + // 参数说明:data 为导入预览行 JSON;quarterly 为分配项目字典编码;year 为预算年度。 + // 返回 Result,成功表示导入额度已同步到分配项目记录和年度预算表,失败时 msg 字段返回具体校验原因。 if (StrUtil.isBlank(data) || quarterly == null || year == null) { return Result.error("参数错误!"); } @@ -151,6 +155,22 @@ public class OutlayManageUnionAllocateController { return outlayManageUnionAllocateService.doImportAllocate(importList, quarterly, year); } + @At + @ApiOperation("新增单个分工会评优奖励") + @Aop(TransAop.READ_COMMITTED) + @SLog(tag = "分工会预算-分配项目预算分配", msg = "新增单个分工会评优奖励") + @SaCheckPermission("outlay.outlayManage.union.allocate") + public Result doAddAwardAllocate(@Param("year") Integer year, + @Param("unionId") String unionId, + @Param("allocateMoney") BigDecimal allocateMoney) { + // 参数说明:year 为预算年度;unionId 为分工会 ID;allocateMoney 为本次新增的评优奖励金额。 + // 返回 Result,成功后前端刷新分配列表;失败时 msg 字段返回参数或重复新增等校验原因。 + if (year == null || StrUtil.isBlank(unionId) || allocateMoney == null) { + return Result.error("参数错误!"); + } + return outlayManageUnionAllocateService.doAddAwardAllocate(year, unionId, allocateMoney); + } + @At @Ok("void") @ApiOperation("下载导入分配模板") @@ -166,12 +186,13 @@ public class OutlayManageUnionAllocateController { @At - @ApiOperation("重置预算季度记录") + @ApiOperation("重置预算分配记录") @Aop(TransAop.READ_COMMITTED) - @SLog(tag = "分工会预算-季度预算分配", msg = "重置预算季度记录") + @SLog(tag = "分工会预算-分配项目预算分配", msg = "重置预算分配记录") @SaCheckPermission("outlay.outlayManage.union.allocate") public Result deleteAllocateRecord(@Param("quarterly") Integer quarterly, @Param("year") Integer year) { + // 参数说明:quarterly 为当前要重置的分配项目编码,year 为预算年度;返回 Result 用于提示重置是否成功。 if (quarterly == null || year == null) { return Result.error("参数错误!"); } @@ -179,11 +200,13 @@ public class OutlayManageUnionAllocateController { } @At - @ApiOperation("预算季度记录生成") - @SLog(tag = "分工会预算-季度预算分配", msg = "生成了预算分配记录") + @ApiOperation("预算分配记录生成") + @Aop(TransAop.READ_COMMITTED) + @SLog(tag = "分工会预算-分配项目预算分配", msg = "生成了预算分配记录") @SaCheckPermission("outlay.outlayManage.union.allocate") public Result doAllocateRecord(@Param("quarterly") Integer quarterly, @Param("year") Integer year) { + // 参数说明:quarterly 为本次生成记录的分配项目编码,year 为预算年度;返回 Result 用于前端提示生成结果。 if (quarterly == null || year == null) { return Result.error("参数错误!"); } diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/union/controller/OutlayManageUnionIncomeExpenseController.java b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/union/controller/OutlayManageUnionIncomeExpenseController.java new file mode 100644 index 00000000..53e6b90f --- /dev/null +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/union/controller/OutlayManageUnionIncomeExpenseController.java @@ -0,0 +1,142 @@ +package com.budwk.app.zhgh.dayofficework.outlay.outlayManage.union.controller; + +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.dev33.satoken.annotation.SaCheckPermission; +import cn.hutool.core.date.DateUtil; +import com.budwk.app.base.constant.RoleConstant; +import com.budwk.app.base.page.Pagination; +import com.budwk.app.base.param.PageForm; +import com.budwk.app.base.result.Result; +import com.budwk.app.base.service.BaseService; +import com.budwk.app.base.utils.CommonDownloadUtil; +import com.budwk.app.web.commons.auth.utils.AuthUtil; +import com.budwk.app.web.commons.auth.utils.SecurityUtil; +import com.budwk.app.zhgh.dayofficework.outlay.outlayManage.union.vo.OutlayUnionIncomeExpenseVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.apache.poi.ss.usermodel.Workbook; +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.Strings; +import org.nutz.mvc.annotation.At; +import org.nutz.mvc.annotation.Ok; + +import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; +import java.util.List; + +/** + * 二级分工会经费收支使用情况表。 + */ +@IocBean +@At("/platform/outlay/outlayManage/unionIncomeExpense") +@Ok("json:full") +@Slf4j +@Api(tags = "二级分工会经费收支使用情况表") +public class OutlayManageUnionIncomeExpenseController { + + @Inject + private BaseService baseService; + + @At("") + @Ok("beetl:/platform/zhgh/dayofficework/outlay/outlayManage/union/incomeExpense/index.html") + @SaCheckPermission("outlay.outlayManage.union.incomeExpense") + public void index() { + } + + @At + @ApiOperation("分页查询") + @SaCheckPermission("outlay.outlayManage.union.incomeExpense") + public Result pageData(PageForm pageForm, Integer year, String unionId) { + Sql sql = buildIncomeExpenseSql(year, unionId); + Pagination pagination = baseService.listPageVO(pageForm, sql, OutlayUnionIncomeExpenseVO.class); + return Result.success(pagination); + } + + @At + @Ok("void") + @ApiOperation("导出") + @SaCheckPermission("outlay.outlayManage.union.incomeExpense") + public void doExport(Integer year, String unionId, HttpServletResponse response) { + Integer queryYear = getQueryYear(year); + Sql sql = buildIncomeExpenseSql(queryYear, unionId); + List list = baseService.listVO(sql, OutlayUnionIncomeExpenseVO.class); + + ArrayList entities = new ArrayList<>(); + entities.add(new ExcelExportEntity("单位", "unionName", 25)); + entities.add(new ExcelExportEntity("年初数", "beginMoney", 20)); + entities.add(new ExcelExportEntity("1-4月会费", "feeJanApr", 20)); + entities.add(new ExcelExportEntity("5-8月会费", "feeMayAug", 20)); + entities.add(new ExcelExportEntity("9-12月会费", "feeSepDec", 20)); + entities.add(new ExcelExportEntity("评优奖励", "awardMoney", 20)); + entities.add(new ExcelExportEntity("1-12月支出", "usedMoney", 20)); + entities.add(new ExcelExportEntity("经费余额", "remainMoney", 20)); + + ExportParams exportParams = new ExportParams(); + exportParams.setType(ExcelType.XSSF); + Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entities, list); + CommonDownloadUtil.download(queryYear + "年二级分工会经费收支使用情况表.xlsx", workbook, response); + } + + /** + * 统计参数说明: + * year 为统计年度,未传时默认当前年份;unionId 为二级分工会主键,管理员可为空查询全部。 + * 返回 VO 中 beginMoney 是年初数,feeJanApr/feeMayAug/feeSepDec 是三个会费收入段, + * awardMoney 是评优奖励,usedMoney 是年度支出,remainMoney 是当前经费余额。 + */ + private Sql buildIncomeExpenseSql(Integer year, String unionId) { + Sql sql = Sqls.create(""" + SELECT + mu.year AS year, + mu.unionId AS unionId, + COALESCE(mu.unionName, su.name) AS unionName, + COALESCE(mu.unionCode, su.unionCode) AS unionCode, + COALESCE(SUM(CASE WHEN au.quarterly = 1 THEN au.allocateHeadMoney ELSE 0 END), 0) AS beginMoney, + COALESCE(SUM(CASE WHEN au.quarterly = 1 THEN au.allocateMoney ELSE 0 END), 0) AS feeJanApr, + COALESCE(SUM(CASE WHEN au.quarterly = 2 THEN au.allocateMoney ELSE 0 END), 0) AS feeMayAug, + COALESCE(SUM(CASE WHEN au.quarterly = 3 THEN au.allocateMoney ELSE 0 END), 0) AS feeSepDec, + COALESCE(SUM(CASE WHEN au.quarterly = 4 THEN au.allocateMoney ELSE 0 END), 0) AS awardMoney, + COALESCE(mu.usedQuota, 0) AS usedMoney, + COALESCE(mu.totalQuota, 0) - COALESCE(mu.usedQuota, 0) AS remainMoney + FROM outlay_manage_union mu + LEFT JOIN sys_union su ON su.id = mu.unionId + LEFT JOIN outlay_allocate_union au ON au.year = mu.year + AND au.unionId = mu.unionId + AND au.delFlag = 0 + $condition + """); + Cnd cnd = Cnd.NEW(); + cnd.and("mu.delFlag", "=", false); + cnd.and("mu.year", "=", getQueryYear(year)); + cnd.and("mu.totalQuota", "IS NOT", null); + cnd.andEX("mu.unionId", "=", unionId); + if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) { + cnd.and("mu.unionId", "=", SecurityUtil.getUnionId()); + } + cnd.groupBy("mu.year"); + cnd.groupBy("mu.unionId"); + cnd.groupBy("mu.unionName"); + cnd.groupBy("mu.unionCode"); + cnd.groupBy("su.name"); + cnd.groupBy("su.unionCode"); + cnd.groupBy("mu.usedQuota"); + cnd.groupBy("mu.totalQuota"); + cnd.asc("mu.unionCode"); + sql.setCondition(cnd); + return sql; + } + + private Integer getQueryYear(Integer year) { + if (year != null) { + return year; + } + return DateUtil.thisYear(); + } +} diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/union/controller/OutlayManageUnionUseDetailController.java b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/union/controller/OutlayManageUnionUseDetailController.java index f5f0d912..c4948be5 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/union/controller/OutlayManageUnionUseDetailController.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/union/controller/OutlayManageUnionUseDetailController.java @@ -116,7 +116,7 @@ public class OutlayManageUnionUseDetailController { } @At - @ApiOperation("查询分工会今年每个季度的分配情况") + @ApiOperation("查询分工会今年每个分配项目的分配情况") @SaCheckPermission("outlay.outlayManage.union.useDetail") public Result queryQuarterlyList(Integer year, String unionId){ Sql sql = Sqls.create(""" diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/union/model/OutLayAllocateUnion.java b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/union/model/OutLayAllocateUnion.java index 532995ad..fcce0286 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/union/model/OutLayAllocateUnion.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/union/model/OutLayAllocateUnion.java @@ -37,7 +37,7 @@ public class OutLayAllocateUnion extends BaseModel implements Serializable { private String unionId; @Column - @Comment("季度") + @Comment("分配项目") @ColDefine(type = ColType.INT) private Integer quarterly; diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/union/vo/OutlayUnionAllocateImportVo.java b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/union/vo/OutlayUnionAllocateImportVo.java index 0390f0f6..7c2297ee 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/union/vo/OutlayUnionAllocateImportVo.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/union/vo/OutlayUnionAllocateImportVo.java @@ -6,22 +6,20 @@ import lombok.Data; import java.math.BigDecimal; /** - * 分工会季度额度导入行数据。 + * 分工会分配项目额度导入行数据。 */ @Data public class OutlayUnionAllocateImportVo { + @Excel(name = "工会名称") + private String unionName; + @Excel(name = "工会编码") private String unionCode; @Excel(name = "分配额度") private BigDecimal allocateMoney; - /** - * 预览时展示匹配到的工会名称。 - */ - private String unionName; - /** * 预览时展示当前行错误信息。 */ diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/union/vo/OutlayUnionIncomeExpenseVO.java b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/union/vo/OutlayUnionIncomeExpenseVO.java new file mode 100644 index 00000000..f4abf90a --- /dev/null +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/union/vo/OutlayUnionIncomeExpenseVO.java @@ -0,0 +1,34 @@ +package com.budwk.app.zhgh.dayofficework.outlay.outlayManage.union.vo; + +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 二级分工会经费收支使用情况表数据。 + */ +@Data +public class OutlayUnionIncomeExpenseVO { + + private Integer year; + + private String unionId; + + private String unionName; + + private String unionCode; + + private BigDecimal beginMoney; + + private BigDecimal feeJanApr; + + private BigDecimal feeMayAug; + + private BigDecimal feeSepDec; + + private BigDecimal awardMoney; + + private BigDecimal usedMoney; + + private BigDecimal remainMoney; +} diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/controller/UnionReimburseCollectController.java b/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/controller/UnionReimburseCollectController.java index 766f6aff..ae499ab4 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/controller/UnionReimburseCollectController.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/controller/UnionReimburseCollectController.java @@ -111,8 +111,6 @@ public class UnionReimburseCollectController { cnd.and(seg); } - cnd.and("info.stateId", "in", List.of(3, 2)); - applyListSort(cnd, pageForm); sql.setCondition(cnd); Pagination pagination = unionReimburseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); @@ -185,29 +183,26 @@ public class UnionReimburseCollectController { @Ok("void") @SaCheckPermission(value = {"unionReimburse.collect", "h5.unionReimburse.collect"}, mode = SaMode.OR) @ApiOperation("导出报销汇总表") - public void onExport(@Param(value = "year") Integer year, + public void onExport(PageForm pageForm, + @Param(value = "year") Integer year, @Param(value = "unionId") String unionId, @Param(value = "unitId") String unitId, @Param(value = "reimburseProject") String reimburseProject, - @Param(value = "userName") String userName, + @Param(value = "searchKeyword") String searchKeyword, HttpServletResponse response) { - //查询审核通过的数据 + // 导出复用收集列表筛选口径,保证下载结果与页面当前查询条件一致。 Sql sql = Sqls.create(""" SELECT - t1.*, - ins.state instanceState + info.* FROM - union_reimburse t1 - LEFT JOIN `wf_process_instance` ins ON ins.businessNo = t1.id + union_reimburse info $condition """); - Cnd cnd = buildCondition(year, unionId, unitId, reimburseProject, userName, "t1."); - // 只查询流程实例状态为20的数据(已完成状态) - cnd.and("ins.state", "=", 20); + Cnd cnd = buildCondition(year, unionId, unitId, reimburseProject, searchKeyword, "info."); if (!isAdmin()) { - cnd.andEX("t1.unionId", "=", SecurityUtil.getUnionId()); + cnd.andEX("info.unionId", "=", SecurityUtil.getUnionId()); } - cnd.desc("t1.createTime"); + applyListSort(cnd, pageForm); sql.setCondition(cnd); List list = unionReimburseService.listVO(sql,UnionReimburseCollectExcelVO.class); @@ -242,11 +237,13 @@ public class UnionReimburseCollectController { item.setCreateTime(DateUtil.format(DateUtil.parse(item.getCreateTime()), "yyyy-MM-dd HH:mm:ss")); } - // 拼接备注字段(仿照系统代码逻辑,使用activityName和condolenceName字段) + item.setStateName(formatStateName(item.getStateId())); + + // 备注字段与页面表格保持一致:慰问显示被慰问人,其他项目显示活动名称。 if (cn.hutool.core.util.StrUtil.isNotBlank(item.getActivityName())) { item.setRemark("活动名称:" + item.getActivityName()); - } else if (cn.hutool.core.util.StrUtil.isNotBlank(item.getCondolenceName())) { - item.setRemark("慰问对象:" + item.getCondolenceName()); + } else if (cn.hutool.core.util.StrUtil.isNotBlank(item.getCondolenceUserName())) { + item.setRemark("被慰问人:" + item.getCondolenceUserName()); } }); @@ -263,12 +260,12 @@ public class UnionReimburseCollectController { * @param unionId 工会ID * @param unitId 单位ID * @param reimburseProject 报销项目 - * @param userName 经办人姓名 + * @param searchKeyword 经办人姓名或工号 * @param prefix 表前缀 * @return 查询条件 */ private Cnd buildCondition(Integer year, String unionId, String unitId, - String reimburseProject, String userName, String prefix) { + String reimburseProject, String searchKeyword, String prefix) { Cnd cnd = Cnd.NEW(); // 年度查询条件 @@ -281,9 +278,12 @@ public class UnionReimburseCollectController { // 报销项目查询条件 cnd.andEX(prefix + "reimburseProject", "=", reimburseProject); - // 经办人姓名查询条件 - if (StrUtil.isNotBlank(userName)) { - cnd.and(prefix + "userName", "like", "%" + userName + "%"); + // 经办人姓名或工号查询条件 + if (StrUtil.isNotBlank(searchKeyword)) { + SqlExpressionGroup seg = new SqlExpressionGroup(); + seg.orLike(prefix + "userName", searchKeyword); + seg.orLike(prefix + "loginName", searchKeyword); + cnd.and(seg); } return cnd; @@ -318,4 +318,18 @@ public class UnionReimburseCollectController { default -> null; }; } + + private String formatStateName(Integer stateId) { + if (stateId == null) { + return ""; + } + return switch (stateId) { + case 1 -> "待提交"; + case 2 -> "待审核确认"; + case 3 -> "报销成功"; + case 4 -> "拒绝"; + case 5 -> "退回"; + default -> String.valueOf(stateId); + }; + } } diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/model/UnionReimburse.java b/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/model/UnionReimburse.java index d4235db4..665ee424 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/model/UnionReimburse.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/model/UnionReimburse.java @@ -175,6 +175,11 @@ public class UnionReimburse extends BaseModel { @ColDefine(type = ColType.VARCHAR, width = 100) private String bankOfDeposit; + @Column + @Comment("支付明细") + @ColDefine(type = ColType.MYSQL_JSON) + private List paymentDetails; + /** * 慰问 */ diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/service/impl/UnionReimburseServiceImpl.java b/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/service/impl/UnionReimburseServiceImpl.java index ea0718ae..dfa08007 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/service/impl/UnionReimburseServiceImpl.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/service/impl/UnionReimburseServiceImpl.java @@ -369,13 +369,15 @@ public class UnionReimburseServiceImpl extends BaseServiceImpl i if (Integer.valueOf(3).equals(dbRecord.getStateId())) { return Result.success(); } - Result validateResult = validateFundSourceBeforeSubmit(dbRecord); - if (validateResult != null) { - return validateResult; - } - Result deductResult = deductBudgetAndSaveUseDetail(dbRecord); - if (deductResult != null && deductResult.getCode() != 0) { - return deductResult; + if (!skipBudgetDeduct(dbRecord)) { + Result validateResult = validateFundSourceBeforeSubmit(dbRecord); + if (validateResult != null) { + return validateResult; + } + Result deductResult = deductBudgetAndSaveUseDetail(dbRecord); + if (deductResult != null && deductResult.getCode() != 0) { + return deductResult; + } } } dbRecord.setReviewTime(new Date()); @@ -422,7 +424,7 @@ public class UnionReimburseServiceImpl extends BaseServiceImpl i if (dbRecord == null) { return Result.error("未找到对应的报销记录"); } - if (Integer.valueOf(3).equals(dbRecord.getStateId())) { + if (Integer.valueOf(3).equals(dbRecord.getStateId()) && !skipBudgetDeduct(dbRecord)) { OutlayUseDetail oldDetail = dao().fetch(OutlayUseDetail.class, Cnd.where("outlayReimburseId", "=", dbRecord.getId())); BigDecimal oldMoney = oldDetail != null && oldDetail.getAdjustMoney() != null ? oldDetail.getAdjustMoney() @@ -652,6 +654,16 @@ public class UnionReimburseServiceImpl extends BaseServiceImpl i return Result.error("不支持的经费来源"); } + /** + * 慰问和专项活动费用不占用经费预算,审核通过及后续调整实际金额时都不写预算台账。 + */ + private boolean skipBudgetDeduct(UnionReimburse unionReimburse) { + return unionReimburse != null && Set.of( + "UNION_REIMBURSE_PROJECT_1", + "UNION_REIMBURSE_PROJECT_4" + ).contains(unionReimburse.getReimburseProject()); + } + /** * 已通过报销单修改实际金额时,用差额同步预算主表和使用明细,避免重复全量扣减。 */ diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/vo/UnionReimburseCollectExcelVO.java b/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/vo/UnionReimburseCollectExcelVO.java index 83400096..5030099b 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/vo/UnionReimburseCollectExcelVO.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/vo/UnionReimburseCollectExcelVO.java @@ -22,23 +22,30 @@ public class UnionReimburseCollectExcelVO implements Serializable { @Excel(name = "所属单位", width = 20) private String unitName; + @Excel(name = "申请时间", width = 30) + private String createTime; + @Excel(name = "报销项目", width = 20) private String reimburseProject; @Excel(name = "备注", width = 20) private String remark; - @Excel(name = "金额", width = 20) + @Excel(name = "申请状态", width = 20) + private String stateName; + private Double money; - @Excel(name = "申请时间", width = 30) - private String createTime; + private Integer stateId; private String reimburseFundSource; //活动名称 private String activityName; + //被慰问人姓名 + private String condolenceUserName; + //被慰问人 private String condolenceName; diff --git a/src/main/resources/views/platform/zhgh/dayofficework/outlay/outlayManage/union/allocate/index.html b/src/main/resources/views/platform/zhgh/dayofficework/outlay/outlayManage/union/allocate/index.html index 9ea27294..8bb2ec53 100644 --- a/src/main/resources/views/platform/zhgh/dayofficework/outlay/outlayManage/union/allocate/index.html +++ b/src/main/resources/views/platform/zhgh/dayofficework/outlay/outlayManage/union/allocate/index.html @@ -18,9 +18,9 @@ layout("/layouts/platform.html"){ value-format="yyyy"> - + @@ -42,10 +42,13 @@ layout("/layouts/platform.html"){ 一键分配 - 季度记录生成 + + 新增评优奖励 + + 分配记录生成 - 重置季度记录 + 重置分配记录 - -
将Excel文件拖到此处,或点击上传
+ :file-list="importFileList"> + 点击上传
@@ -152,6 +153,41 @@ layout("/layouts/platform.html"){ 确 定 + + + + + + + + + + + + + + + + + + + 取 消 + 确 定 + + @@ -170,48 +206,62 @@ layout("/layouts/platform.html"){ unionList: [], tableColumns: [ {prop: 'year', label: '年度'}, - {prop: 'quarterly', label: '季度'}, + {prop: 'quarterly', label: '分配项目'}, {prop: 'unionName', label: '工会名称'}, {prop: 'allocateHeadMoney', label: '分配前额度'}, {prop: 'allocateMoney', label: '分配额度'}, ], - quarterlyList: [], + periodList: [], batchAllocateDialogVisible: false, batchAllocateForm: { allocateMode: "uniform", allocateMoney: 0, importPreviewList: [] }, - importFileList: [] + importFileList: [], + awardAllocateDialogVisible: false, + awardAllocateForm: { + year: this.$moment().format("YYYY"), + unionId: "", + allocateMoney: 0 + } } }, methods: { /** - * 确认提示文案优先展示页面当前筛选季度。 - * 未选择季度时再回退到系统当前自然季度,避免提示文案与用户当前查看条件不一致。 + * 确认提示文案优先展示页面当前筛选的分配项目名称。 + * 未选择分配项目时再回退到当前会费项目,避免提示文案与用户当前查看条件不一致。 */ - getPromptQuarter() { - return this.pageForm.quarterly || this.$moment().quarter() + getPromptProjectName() { + return this.getProjectName(this.pageForm.quarterly || this.getCurrentFeeProject()) }, /** - * 季度记录生成、重置记录都要按页面当前筛选的年度和季度执行。 - * 这里统一封装请求参数,避免前后端再次出现“提示季度”和“实际执行季度”不一致的问题。 + * 分配记录生成、重置记录都要按页面当前筛选的年度和分配项目执行。 + * quarterly 参数承载 OUTLAY_QUARTERLY 字典编码,例如 1-4月会费、5-8月会费、9-12月会费、评优奖励。 */ - getCurrentQuarterParams() { + getCurrentProjectParams() { return { - quarterly: this.pageForm.quarterly || this.$moment().quarter(), + quarterly: this.pageForm.quarterly || this.getCurrentFeeProject(), year: this.pageForm.year } }, /** - * 生成、重置、一键分配都只允许操作当前自然季度。 - * 这里统一做前端入口校验,避免同类判断分散在多个按钮方法里难维护。 + * 生成、重置、一键分配都只允许操作当前会费项目。 + * 当前会费项目按月份划分:1-4月会费、5-8月会费、9-12月会费。 */ - validateCurrentQuarterAction(actionName) { - const currentQuarter = this.$moment().quarter() - const selectedQuarter = Number(this.getCurrentQuarterParams().quarterly) - if (selectedQuarter !== currentQuarter) { - this.$message.warning('当前仅允许操作第' + currentQuarter + '季度' + actionName + ',请切换后再操作') + getCurrentFeeProject() { + return Math.floor(this.$moment().month() / 4) + 1 + }, + getProjectName(code) { + const options = this.dict.type.OUTLAY_QUARTERLY || [] + const project = options.find((item) => String(item.code || item.value || item.dictValue) === String(code)) + return project ? (project.label || project.name || project.dictLabel || code) : code + }, + validateCurrentProjectAction(actionName) { + const currentProject = this.getCurrentFeeProject() + const selectedProject = Number(this.getCurrentProjectParams().quarterly) + if (selectedProject !== currentProject) { + this.$message.warning('当前仅允许操作【' + this.getProjectName(currentProject) + '】' + actionName + ',请切换后再操作') return false } return true @@ -237,7 +287,7 @@ layout("/layouts/platform.html"){ }) }, deleteAllocateRecord() { - if (!this.validateCurrentQuarterAction('记录重置')) { + if (!this.validateCurrentProjectAction('记录重置')) { return } // 重置动作以当前列表是否已有记录为前置条件,避免用户在空列表场景下误操作。 @@ -245,13 +295,13 @@ layout("/layouts/platform.html"){ this.$message.warning('当前列表无可重置记录') return } - this.$confirm('确定要重置【第' + this.getPromptQuarter() + '季度】的预算记录吗?', '提示', { + this.$confirm('确定要重置【' + this.getPromptProjectName() + '】的预算记录吗?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => { this.formLoading = true - this.$axios.post("/platform/outlay/outlayManage/unionAllocate/deleteAllocateRecord", this.getCurrentQuarterParams()).then((resp) => { + this.$axios.post("/platform/outlay/outlayManage/unionAllocate/deleteAllocateRecord", this.getCurrentProjectParams()).then((resp) => { if (resp.code === 0) { this.$message.success(resp.msg) this.doSearch() @@ -262,16 +312,16 @@ layout("/layouts/platform.html"){ }) }, doAllocateRecord() { - if (!this.validateCurrentQuarterAction('记录生成')) { + if (!this.validateCurrentProjectAction('记录生成')) { return } - this.$confirm('确定要生成【第' + this.getPromptQuarter() + '季度】的预算记录吗?', '提示', { + this.$confirm('确定要生成【' + this.getPromptProjectName() + '】的预算记录吗?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => { this.formLoading = true - this.$axios.post("/platform/outlay/outlayManage/unionAllocate/doAllocateRecord", this.getCurrentQuarterParams()).then((resp) => { + this.$axios.post("/platform/outlay/outlayManage/unionAllocate/doAllocateRecord", this.getCurrentProjectParams()).then((resp) => { if (resp.code === 0) { this.$message.success(resp.msg) this.doSearch() @@ -282,14 +332,14 @@ layout("/layouts/platform.html"){ }) }, showBatchAllocateDialog() { - if (!this.validateCurrentQuarterAction('一键分配')) { + if (!this.validateCurrentProjectAction('一键分配')) { return } if (this.tableData.length === 0) { - this.$message.warning('当前没有可分配的工会记录,请先生成季度记录') + this.$message.warning('当前没有可分配的工会记录,请先生成分配记录') return } - const currentParams = this.getCurrentQuarterParams() + const currentParams = this.getCurrentProjectParams() const openDialog = () => { this.resetBatchAllocateForm() this.batchAllocateDialogVisible = true @@ -302,7 +352,7 @@ layout("/layouts/platform.html"){ return } if (resp.data) { - this.$confirm('温馨提示:当前季度已分配过额度,再次分配将覆盖本季度原有分配结果,是否继续?', '温馨提示', { + this.$confirm('温馨提示:当前分配项目已分配过额度,再次分配将覆盖本项目原有分配结果,是否继续?', '温馨提示', { confirmButtonText: '继续', cancelButtonText: '取消', type: 'warning' @@ -323,6 +373,46 @@ layout("/layouts/platform.html"){ } this.importFileList = [] }, + showAwardAllocateDialog() { + this.$set(this.awardAllocateForm, "year", this.pageForm.year) + this.$set(this.awardAllocateForm, "unionId", this.pageForm.unionId || "") + this.$set(this.awardAllocateForm, "allocateMoney", 0) + this.$set(this, "awardAllocateDialogVisible", true) + }, + closeAwardAllocateDialog() { + this.$set(this, "awardAllocateDialogVisible", false) + }, + doAddAwardAllocate() { + if (!this.awardAllocateForm.year) { + this.$message.warning("请选择年度") + return + } + if (!this.awardAllocateForm.unionId) { + this.$message.warning("请选择所属工会") + return + } + if (!this.awardAllocateForm.allocateMoney || this.awardAllocateForm.allocateMoney <= 0) { + this.$message.warning("请输入有效的评优奖励金额") + return + } + this.formLoading = true + this.$axios.post("/platform/outlay/outlayManage/unionAllocate/doAddAwardAllocate", { + year: this.awardAllocateForm.year, + unionId: this.awardAllocateForm.unionId, + allocateMoney: this.awardAllocateForm.allocateMoney + }).then((resp) => { + if (resp.code === 0) { + this.$message.success(resp.msg) + this.closeAwardAllocateDialog() + this.$set(this.pageForm, "year", this.awardAllocateForm.year) + this.$set(this.pageForm, "quarterly", "4") + this.$set(this.pageForm, "unionId", this.awardAllocateForm.unionId) + this.doSearch() + } + }).finally(() => { + this.formLoading = false + }) + }, downloadImportTemplate() { this.$downLoad("/platform/outlay/outlayManage/unionAllocate/downloadImportTemplate") }, @@ -349,7 +439,7 @@ layout("/layouts/platform.html"){ this.$set(this.batchAllocateForm, "importPreviewList", []) }, doBatchAllocate() { - const currentParams = this.getCurrentQuarterParams() + const currentParams = this.getCurrentProjectParams() if (this.batchAllocateForm.allocateMode === "uniform") { if (!this.batchAllocateForm.allocateMoney || this.batchAllocateForm.allocateMoney <= 0) { this.$message.warning('请输入有效的分配额度') @@ -401,8 +491,8 @@ layout("/layouts/platform.html"){ this.unionList = data }) this.$businessTool.getDictOptions("OUTLAY_QUARTERLY").then((data) => { - let quarter = this.$moment().quarter(); - this.$set(this.pageForm, "quarterly", data[quarter - 1].code) + let project = this.getCurrentFeeProject(); + this.$set(this.pageForm, "quarterly", data[project - 1].code) this.pageData() }) diff --git a/src/main/resources/views/platform/zhgh/dayofficework/outlay/outlayManage/union/incomeExpense/index.html b/src/main/resources/views/platform/zhgh/dayofficework/outlay/outlayManage/union/incomeExpense/index.html new file mode 100644 index 00000000..11cd4393 --- /dev/null +++ b/src/main/resources/views/platform/zhgh/dayofficework/outlay/outlayManage/union/incomeExpense/index.html @@ -0,0 +1,163 @@ + + + +
+ + + +
+ + + + diff --git a/src/main/resources/views/platform/zhgh/dayofficework/outlay/outlayManage/union/useDetail/quarterlyOutlayAllocate.js b/src/main/resources/views/platform/zhgh/dayofficework/outlay/outlayManage/union/useDetail/quarterlyOutlayAllocate.js index 98a5a2ac..4d5d5226 100644 --- a/src/main/resources/views/platform/zhgh/dayofficework/outlay/outlayManage/union/useDetail/quarterlyOutlayAllocate.js +++ b/src/main/resources/views/platform/zhgh/dayofficework/outlay/outlayManage/union/useDetail/quarterlyOutlayAllocate.js @@ -4,10 +4,10 @@ let OUTLAY_MANAGE_UNION_QUARTERLY_ALLOCATE = { `