Merge branch 'main' of https://dd3skj.picp.vip/zhaoxinyu/v4
# Conflicts: # src/main/resources/views/platform/zhghh5/sys/home/todo.js
This commit is contained in:
+5
-5
@@ -42,7 +42,7 @@ import java.util.List;
|
||||
@Slf4j
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@Api(tags = "慈善捐款明细")
|
||||
@Api(tags = "慈善捐助明细")
|
||||
@At("/platform/contribution/detailed")
|
||||
public class ContributionDetailedController {
|
||||
|
||||
@@ -86,9 +86,9 @@ public class ContributionDetailedController {
|
||||
|
||||
List<ExcelExportEntity> entityList = new ArrayList<>();
|
||||
entityList.add(new ExcelExportEntity("序号", "index", 10));
|
||||
entityList.add(new ExcelExportEntity("捐款项目", "contributionName", 20));
|
||||
entityList.add(new ExcelExportEntity("捐款人工号", "loginName", 20));
|
||||
entityList.add(new ExcelExportEntity("捐款人姓名", "userName", 20));
|
||||
entityList.add(new ExcelExportEntity("捐助项目", "contributionName", 20));
|
||||
entityList.add(new ExcelExportEntity("捐助人工号", "loginName", 20));
|
||||
entityList.add(new ExcelExportEntity("捐助人姓名", "userName", 20));
|
||||
entityList.add(new ExcelExportEntity("联系方式", "mobile", 20));
|
||||
entityList.add(new ExcelExportEntity("所属工会", "unionName", 20));
|
||||
entityList.add(new ExcelExportEntity("所属单位", "unitName", 20));
|
||||
@@ -99,6 +99,6 @@ public class ContributionDetailedController {
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entityList, listMap);
|
||||
CommonDownloadUtil.download("捐款明细.xlsx", workbook, response);
|
||||
CommonDownloadUtil.download("捐助明细.xlsx", workbook, response);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-6
@@ -36,7 +36,7 @@ import java.util.List;
|
||||
@Slf4j
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@Api(tags = "慈善捐款项目")
|
||||
@Api(tags = "慈善捐助项目")
|
||||
@At("/platform/contribution/list")
|
||||
public class ContributionProjectController {
|
||||
|
||||
@@ -76,9 +76,9 @@ public class ContributionProjectController {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("新增/修改慈善捐款项目")
|
||||
@ApiOperation("新增/修改慈善捐助项目")
|
||||
@SaCheckPermission("contribution.list")
|
||||
@SLog(type = "contribution", tag = "新增/修改慈善捐款项目", msg = "新增/修改慈善捐款项目")
|
||||
@SLog(type = "contribution", tag = "新增/修改慈善捐助项目", msg = "新增/修改慈善捐助项目")
|
||||
public Object onSubmit(ContributionProject project) {
|
||||
if(StrUtil.isBlank(project.getId())) {
|
||||
project.setContributionCreationDate(DateUtil.now());
|
||||
@@ -88,16 +88,16 @@ public class ContributionProjectController {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("删除慈善捐款项目")
|
||||
@ApiOperation("删除慈善捐助项目")
|
||||
@SaCheckPermission("contribution.list")
|
||||
@SLog(type = "contribution", tag = "删除慈善捐款项目", msg = "删除慈善捐款项目")
|
||||
@SLog(type = "contribution", tag = "删除慈善捐助项目", msg = "删除慈善捐助项目")
|
||||
public Object onDelete(String id) {
|
||||
typeService.dao().delete(ContributionProject.class, id);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("查询慈善捐款项目")
|
||||
@ApiOperation("查询慈善捐助项目")
|
||||
@SaCheckPermission("contribution.list")
|
||||
public Result queryContributionList() {
|
||||
List<ContributionProject> list = typeService.dao().query(
|
||||
|
||||
+3
-3
@@ -34,7 +34,7 @@ import java.util.stream.Collectors;
|
||||
@Slf4j
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@Api(tags = "慈善捐款分工会统计")
|
||||
@Api(tags = "慈善捐助分工会统计")
|
||||
@At("/platform/contribution/statistics")
|
||||
public class ContributionStatisticsController {
|
||||
|
||||
@@ -66,13 +66,13 @@ public class ContributionStatisticsController {
|
||||
.stream()
|
||||
.toList();
|
||||
|
||||
//这个项目每个分工会有多少个人捐款
|
||||
//这个项目每个分工会有多少个人捐助
|
||||
List<ContributionApply> list = userList.stream()
|
||||
.filter(n -> n.getUnionId().equals(union.getId()) && n.getContributionId().equals(contributionId))
|
||||
.toList();
|
||||
map.setv("contributionUserNum", list.size());
|
||||
|
||||
//捐款多少笔
|
||||
//捐助多少笔
|
||||
long conCount = applyList.stream()
|
||||
.filter(n -> n.getUnionId().equals(union.getId()) && n.getContributionId().equals(contributionId))
|
||||
.count();
|
||||
|
||||
+32
-7
@@ -6,6 +6,8 @@ import com.budwk.app.base.annotation.SLog;
|
||||
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.zhgh.staffbenefit.contribution.model.ContributionApply;
|
||||
import com.budwk.app.zhgh.staffbenefit.contribution.model.ContributionProject;
|
||||
import com.budwk.app.zhgh.staffbenefit.contribution.model.ContributionType;
|
||||
import com.budwk.app.zhgh.staffbenefit.contribution.service.ContributionTypeService;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -13,9 +15,13 @@ import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
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.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
@@ -31,7 +37,7 @@ import java.util.List;
|
||||
@Slf4j
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@Api(tags = "慈善捐款专题")
|
||||
@Api(tags = "慈善捐助专题")
|
||||
@At("/platform/contribution/type")
|
||||
public class ContributionTypeController {
|
||||
|
||||
@@ -63,28 +69,47 @@ public class ContributionTypeController {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("新增/修改慈善捐款专题")
|
||||
@ApiOperation("新增/修改慈善捐助专题")
|
||||
@SaCheckPermission("contribution.type")
|
||||
@SLog(type = "contribution", tag = "新增/修改慈善捐款专题", msg = "新增/修改慈善捐款专题")
|
||||
@SLog(type = "contribution", tag = "新增/修改慈善捐助专题", msg = "新增/修改慈善捐助专题")
|
||||
public Object onSubmit(ContributionType type) {
|
||||
typeService.insertOrUpdate(type);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("删除慈善捐款专题")
|
||||
@ApiOperation("删除慈善捐助专题")
|
||||
@SaCheckPermission("contribution.type")
|
||||
@SLog(type = "contribution", tag = "删除慈善捐款专题", msg = "删除慈善捐款专题")
|
||||
@SLog(type = "contribution", tag = "删除慈善捐助专题", msg = "删除慈善捐助专题")
|
||||
public Object onDelete(String id) {
|
||||
typeService.delete(id);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("查询慈善捐款专题")
|
||||
@SaCheckPermission("contribution.type")
|
||||
@ApiOperation("查询慈善捐助专题")
|
||||
@SaCheckPermission("contribution")
|
||||
public Result queryContributionType() {
|
||||
List<ContributionType> list = typeService.query(Cnd.NEW().desc(ContributionType::getTypeCode));
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("查询单个慈善捐助专题")
|
||||
@SaCheckPermission("contribution")
|
||||
public Result fetchOne(String id) {
|
||||
ContributionType type = typeService.fetch(id);
|
||||
List<ContributionProject> list = dao.query(ContributionProject.class, Cnd.where(ContributionProject::getContributionTypeCode, "=", type.getTypeCode()).and(ContributionProject::getIsContributionEnable, "=", true));
|
||||
|
||||
List<String> projects = list.stream().map(ContributionProject::getId).toList();
|
||||
|
||||
List<ContributionApply> applyList = dao.query(ContributionApply.class, Cnd.where(ContributionApply::getContributionId, "in", projects));
|
||||
double sum = applyList.stream().mapToDouble(ContributionApply::getMoney).sum();
|
||||
|
||||
NutMap nutMap = Lang.obj2nutmap(type);
|
||||
nutMap.put("projectCount", list.size());
|
||||
nutMap.put("totalMoney", sum);
|
||||
nutMap.put("peopleCount", applyList.size());
|
||||
return Result.success(nutMap);
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -19,7 +19,7 @@ import java.util.List;
|
||||
* @Description TODO
|
||||
*/
|
||||
@Data
|
||||
@Comment("慈善捐款明细")
|
||||
@Comment("慈善捐助明细")
|
||||
@Accessors(chain = true)
|
||||
@Table("contribution_apply")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@@ -82,7 +82,7 @@ public class ContributionApply extends BaseModel {
|
||||
private String mobile;
|
||||
|
||||
@Column
|
||||
@Comment("捐款金额")
|
||||
@Comment("捐助金额")
|
||||
@ColDefine(type = ColType.DOUBLE)
|
||||
private double money;
|
||||
|
||||
@@ -92,12 +92,12 @@ public class ContributionApply extends BaseModel {
|
||||
private String payMode;
|
||||
|
||||
@Column
|
||||
@Comment("捐款时间")
|
||||
@Comment("捐助时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String contributionTime;
|
||||
|
||||
@Column
|
||||
@Comment("捐款图片")
|
||||
@Comment("捐助图片")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<JSONObject> contributionFiles;
|
||||
}
|
||||
|
||||
+7
-7
@@ -18,7 +18,7 @@ import java.util.List;
|
||||
* @Description TODO
|
||||
*/
|
||||
@Data
|
||||
@Comment("慈善捐款")
|
||||
@Comment("慈善捐助")
|
||||
@Accessors(chain = true)
|
||||
@Table("contribution_project")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@@ -41,7 +41,7 @@ public class ContributionProject extends BaseModel {
|
||||
private String contributionIntroduce;
|
||||
|
||||
@Column
|
||||
@Comment("所属捐款专题")
|
||||
@Comment("所属捐助专题")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
private String contributionTypeCode;
|
||||
|
||||
@@ -61,22 +61,22 @@ public class ContributionProject extends BaseModel {
|
||||
private Boolean isContributionEnable;
|
||||
|
||||
@Column
|
||||
@Comment("捐款模式")
|
||||
@Comment("捐助模式")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
private String contributionMode;
|
||||
private Integer contributionMode;
|
||||
|
||||
@Column
|
||||
@Comment("捐款链接")
|
||||
@Comment("捐助链接")
|
||||
@ColDefine(type = ColType.TEXT)
|
||||
private String contributionUrl;
|
||||
|
||||
@Column
|
||||
@Comment("捐款开启时间")
|
||||
@Comment("捐助开启时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 40)
|
||||
private String contributionStartTime;
|
||||
|
||||
@Column
|
||||
@Comment("捐款结束时间")
|
||||
@Comment("捐助结束时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 40)
|
||||
private String contributionEndTime;
|
||||
}
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ import java.util.List;
|
||||
* @Description TODO
|
||||
*/
|
||||
@Data
|
||||
@Comment("慈善捐款专题")
|
||||
@Comment("慈善捐助专题")
|
||||
@Accessors(chain = true)
|
||||
@Table("contribution_type")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ import org.nutz.dao.sql.Sql;
|
||||
public interface ContributionApplyService extends BaseService<ContributionApply> {
|
||||
|
||||
/**
|
||||
* 生成查询捐款明细的sql
|
||||
* 生成查询捐助明细的sql
|
||||
* @return
|
||||
*/
|
||||
Sql generateSql(String unionId, String unitId, String payMode, String contributionName);
|
||||
|
||||
+4
-4
@@ -74,9 +74,9 @@ public class PsychologyDoctorController {
|
||||
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@ApiOperation("新增/修改心理咨询师")
|
||||
@ApiOperation("新增/修改咨询师")
|
||||
@SaCheckPermission("psychology.doctorManage")
|
||||
@SLog(tag = "心理咨询系统-心理咨询师", msg = "新增/修改心理咨询师")
|
||||
@SLog(tag = "心理咨询系统-咨询师", msg = "新增/修改咨询师")
|
||||
public Object onSubmit(PsychologyDoctor doctor) {
|
||||
Sys_role role = sysRoleService.getByCode(RoleConstant.PSYCHOLOGY_DOCTOR);
|
||||
if(StrUtil.isBlank(doctor.getId())) {
|
||||
@@ -102,9 +102,9 @@ public class PsychologyDoctorController {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("删除心理咨询师")
|
||||
@ApiOperation("删除咨询师")
|
||||
@SaCheckPermission("psychology.doctorManage")
|
||||
@SLog(tag = "心理咨询系统-心理咨询师", msg = "删除心理咨询师")
|
||||
@SLog(tag = "心理咨询系统-咨询师", msg = "删除咨询师")
|
||||
public Object onDelete(String id) {
|
||||
doctorService.delete(id);
|
||||
return Result.success();
|
||||
|
||||
Reference in New Issue
Block a user