commit
This commit is contained in:
+1
-2
@@ -137,7 +137,6 @@ public class ActivityDeclareMineController {
|
||||
} else {
|
||||
cnd.orderBy("info." + pageParam.getPageOrderName(), PageUtil.getOrder(pageParam.getPageOrderBy()));
|
||||
}
|
||||
cnd.groupBy("t.id");
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = activityDeclareService.listPageMap(pageParam.getPageNumber(), pageParam.getPageSize(), sql);
|
||||
return Result.success().addData(pagination);
|
||||
@@ -178,7 +177,7 @@ public class ActivityDeclareMineController {
|
||||
@Ok("void")
|
||||
@SaCheckPermission("activityDeclare.mine")
|
||||
@SLog(tag = "活动申报", msg = "导出活动申报表")
|
||||
public void doExport(@Valid String id, HttpServletResponse response) {
|
||||
public void doExportDeclare(@Valid String id, HttpServletResponse response) {
|
||||
HashMap<String, Object> docData = new HashMap<>();
|
||||
|
||||
Sql sql = Sqls.create("""
|
||||
|
||||
+28
-15
@@ -37,6 +37,7 @@ import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -87,9 +88,6 @@ public class ActivityReimbursementApplyController {
|
||||
.mapToDouble(v -> ObjectUtil.defaultIfNull(v.getActualPrice(), 0D))
|
||||
.sum();
|
||||
activityReimbursementInfo.setActualMoney(new BigDecimal(sum));
|
||||
if (StrUtil.isBlank(activityReimbursementInfo.getDeclareId())) {
|
||||
activityReimbursementInfo.setDeclareId(activityReimbursementInfo.getId());
|
||||
}
|
||||
dao.insertOrUpdate(activityReimbursementInfo);
|
||||
return Result.success();
|
||||
}
|
||||
@@ -110,9 +108,6 @@ public class ActivityReimbursementApplyController {
|
||||
.mapToDouble(v -> ObjectUtil.defaultIfNull(v.getActualPrice(), 0D))
|
||||
.sum();
|
||||
activityReimbursementInfo.setActualMoney(new BigDecimal(sum));
|
||||
if (StrUtil.isBlank(activityReimbursementInfo.getDeclareId())) {
|
||||
activityReimbursementInfo.setDeclareId(activityReimbursementInfo.getId());
|
||||
}
|
||||
dao.insertOrUpdate(activityReimbursementInfo);
|
||||
|
||||
// 开启流程实例
|
||||
@@ -146,9 +141,6 @@ public class ActivityReimbursementApplyController {
|
||||
.mapToDouble(v -> ObjectUtil.defaultIfNull(v.getActualPrice(), 0D))
|
||||
.sum();
|
||||
activityReimbursementInfo.setActualMoney(new BigDecimal(sum));
|
||||
if (StrUtil.isBlank(activityReimbursementInfo.getDeclareId())) {
|
||||
activityReimbursementInfo.setDeclareId(activityReimbursementInfo.getId());
|
||||
}
|
||||
dao.insertOrUpdate(activityReimbursementInfo);
|
||||
|
||||
Dict dict = Dict.create();
|
||||
@@ -162,14 +154,33 @@ public class ActivityReimbursementApplyController {
|
||||
@At
|
||||
@ApiOperation("获取当前用户活动报销")
|
||||
@SaCheckPermission("activityReimbursement.apply")
|
||||
public Result getActivityReimbursementByUser() {
|
||||
// 查询reimbursement表里面没有,在declare表里面有的申请记录
|
||||
Sql sql = Sqls.create("SELECT declareId FROM activity_reimbursement_info WHERE userId = @userId").setParam("userId", SecurityUtil.getUserId());
|
||||
public Result getActivityReimbursementByUser(String id) {
|
||||
if (StrUtil.isNotBlank(id)) {
|
||||
ActivityReimbursementInfo reimbursementInfo = dao.fetch(ActivityReimbursementInfo.class, id);
|
||||
ActivityDeclareInfo info = dao.fetch(ActivityDeclareInfo.class, reimbursementInfo.getDeclareId());
|
||||
return Result.success().addData(List.of(info));
|
||||
}
|
||||
|
||||
// 查询已经报销成功的记录
|
||||
Sql reiSql = Sqls.create("""
|
||||
SELECT
|
||||
info.declareId
|
||||
FROM
|
||||
activity_reimbursement_info info
|
||||
LEFT JOIN wf_process_instance ins ON ins.businessNo = info.id
|
||||
WHERE
|
||||
userId = @userId
|
||||
AND ins.state IN (10, 20)
|
||||
""").setParam("userId", SecurityUtil.getUserId());
|
||||
reiSql.setCallback(Sqls.callback.strList());
|
||||
dao.execute(reiSql);
|
||||
List<String> reiDecIdList = reiSql.getList(String.class);
|
||||
|
||||
Sql sql = Sqls.create("select declareId from activity_reimbursement_info where userId = @userId").setParam("userId", SecurityUtil.getUserId());
|
||||
sql.setCallback(Sqls.callback.strList());
|
||||
dao.execute(sql);
|
||||
List<String> declareIdList = sql.getList(String.class);
|
||||
|
||||
|
||||
Sql applySql = Sqls.create("""
|
||||
SELECT
|
||||
info.*
|
||||
@@ -178,10 +189,12 @@ public class ActivityReimbursementApplyController {
|
||||
LEFT JOIN wf_process_instance ins ON info.id = ins.businessNo
|
||||
$condition
|
||||
""");
|
||||
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (Lang.isNotEmpty(declareIdList)) {
|
||||
cnd.and("info.id", "in", declareIdList);
|
||||
cnd.and("info.id", "not in", declareIdList);
|
||||
}
|
||||
if (Lang.isNotEmpty(reiDecIdList)) {
|
||||
cnd.and("info.id", "not in", reiDecIdList);
|
||||
}
|
||||
cnd.and("info.userId", "=", SecurityUtil.getUserId());
|
||||
cnd.and("ins.state", "=", 20);
|
||||
|
||||
+7
@@ -5,6 +5,7 @@ import com.budwk.app.zhgh.activity.declarereimbursement.declare.models.ActivityD
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
@@ -22,6 +23,12 @@ import java.util.List;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ActivityReimbursementInfo extends ActivityDeclareInfo {
|
||||
|
||||
@Name
|
||||
@Comment("ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@PrevInsert(uu32 = true)
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("申报id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ public class MemberStatisticsServiceImpl extends BaseServiceImpl<Sys_user> imple
|
||||
cnd.orderBy(pageForm.getPageOrderName(), pageForm.getPageOrderBy().equalsIgnoreCase("ascending") ? "ASC" : "DESC");
|
||||
}
|
||||
|
||||
if (Lang.isNotEmpty(pageForm.getAge()) && !"0".equals(pageForm.getAge().get(0)) && !"0".equals(pageForm.getAge().get(1))) {
|
||||
if (Lang.isNotEmpty(pageForm.getAge()) && !"0".equals(pageForm.getAge().get(1))) {
|
||||
if (reverseSelection) {
|
||||
cnd.andNot("TIMESTAMPDIFF(YEAR, u.birthday, CURDATE())", "between", pageForm.getAge().toArray());
|
||||
} else {
|
||||
|
||||
+1
-1
@@ -174,7 +174,7 @@ public class MemberPaymentChartSummaryController {
|
||||
) subquery ON subquery.unionId = un.id
|
||||
GROUP BY
|
||||
un.id,
|
||||
un.unionname,
|
||||
un.name,
|
||||
un.unioncode
|
||||
ORDER BY
|
||||
un.unioncode;
|
||||
|
||||
+12
-3
@@ -5,8 +5,10 @@ import cn.afterturn.easypoi.excel.ExcelImportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.ImportParams;
|
||||
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 cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
@@ -104,9 +106,9 @@ public class MemberPaymentSummaryController {
|
||||
public Result modify(@Param("ids") String[] ids, String paymentMoney, boolean isPay, String remark) {
|
||||
List<String> idList = Arrays.asList(ids);
|
||||
if (Lang.isNotEmpty(idList)) {
|
||||
if (!isPay) {
|
||||
if (isPay) {
|
||||
//未缴费设为已缴费
|
||||
memberPaymentService.update(Chain.make("paymentMoney", paymentMoney)
|
||||
memberPaymentService.update(Chain.make("paymentMoney", NumberUtil.mul(paymentMoney, "100"))
|
||||
.add("remark", remark).add("isPayment", 1)
|
||||
.add("paymentTime", new Date()),
|
||||
Cnd.where("id", "in", idList));
|
||||
@@ -134,9 +136,16 @@ public class MemberPaymentSummaryController {
|
||||
@ApiOperation("下载导入模版")
|
||||
@SaCheckPermission("member.payment.summary")
|
||||
public void downloadImportTemp(HttpServletResponse response) {
|
||||
List<ExcelExportEntity> exportEntities = new ArrayList<>();
|
||||
exportEntities.add(new ExcelExportEntity("工号", "loginname", 20));
|
||||
exportEntities.add(new ExcelExportEntity("姓名", "username", 20));
|
||||
exportEntities.add(new ExcelExportEntity("缴纳金额", "paymentBase", 20));
|
||||
exportEntities.add(new ExcelExportEntity("是否缴费", "isPay", 20));
|
||||
exportEntities.add(new ExcelExportEntity("备注", "remark", 20));
|
||||
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, MemberPaymentTemp.class, new ArrayList<>());
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, exportEntities, new ArrayList<>());
|
||||
CommonDownloadUtil.download("会员缴费导入模版.xlsx", workbook, response);
|
||||
}
|
||||
|
||||
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package com.budwk.app.zhgh.user.childManage.h5controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author hqw
|
||||
* @name:H5ChildManageController
|
||||
* @Date 2025/9/4 8:52
|
||||
* @注释
|
||||
*/
|
||||
@Slf4j
|
||||
@IocBean
|
||||
@Ok("json")
|
||||
@At("/platform/childManage/manage/h5")
|
||||
public class H5ChildManageController {
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhghh5/staffmanage/childmanage/")
|
||||
@SaCheckPermission("childManage.h5")
|
||||
public void index() {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user