diff --git a/esua-epdc/epdc-admin/epdc-admin-client/src/main/java/com/elink/esua/epdc/dto/GridStyleDTO.java b/esua-epdc/epdc-admin/epdc-admin-client/src/main/java/com/elink/esua/epdc/dto/GridStyleDTO.java new file mode 100755 index 000000000..3281bbc9a --- /dev/null +++ b/esua-epdc/epdc-admin/epdc-admin-client/src/main/java/com/elink/esua/epdc/dto/GridStyleDTO.java @@ -0,0 +1,74 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 网格风采 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-17 + */ +@Data +public class GridStyleDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 网格风采主键 + */ + private String id; + + /** + * 标题 + */ + private String title; + + /** + * 内容 + */ + private String content; + + /** + * 图片 + */ + private String headerPhoto; + + /** + * 地址 + */ + private String address; + + /** + * 时间 + */ + private Date date; + + private String[] allDeptIds; + + private Long deptId; + + private String parentDeptNames; + + private String allDeptNames; +} diff --git a/esua-epdc/epdc-admin/epdc-admin-client/src/main/java/com/elink/esua/epdc/dto/VoluntaryStyleDTO.java b/esua-epdc/epdc-admin/epdc-admin-client/src/main/java/com/elink/esua/epdc/dto/VoluntaryStyleDTO.java new file mode 100755 index 000000000..3dbed456d --- /dev/null +++ b/esua-epdc/epdc-admin/epdc-admin-client/src/main/java/com/elink/esua/epdc/dto/VoluntaryStyleDTO.java @@ -0,0 +1,74 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 志愿风采 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-17 + */ +@Data +public class VoluntaryStyleDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 志愿风采主键 + */ + private String id; + + /** + * 标题 + */ + private String title; + + /** + * 内容 + */ + private String content; + + /** + * 图片 + */ + private String headerPhoto; + + /** + * 地址 + */ + private String address; + + /** + * 时间 + */ + private Date date; + + private String[] allDeptIds; + + private Long deptId; + + private String parentDeptNames; + + private String allDeptNames; +} diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/controller/GridStyleController.java b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/controller/GridStyleController.java new file mode 100755 index 000000000..9de0111c6 --- /dev/null +++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/controller/GridStyleController.java @@ -0,0 +1,100 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.controller; + +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.dto.GridStyleDTO; +import com.elink.esua.epdc.excel.GridStyleExcel; +import com.elink.esua.epdc.service.GridStyleService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 网格风采 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-17 + */ +@RestController +@RequestMapping("gridstyle") +public class GridStyleController { + + @Autowired + private GridStyleService gridStyleService; + + @GetMapping("page") + public Result> page(@RequestParam Map params) { + PageData page = gridStyleService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id) { + GridStyleDTO data = gridStyleService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody GridStyleDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + gridStyleService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody GridStyleDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + gridStyleService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids) { + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + gridStyleService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = gridStyleService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, GridStyleExcel.class); + } + + + @PostMapping("getListByDeptId") + public Result> getListByDeptId(@RequestBody GridStyleDTO dto) { + return new Result>().ok(gridStyleService.getListByDeptId(dto.getDeptId())); + } + +} diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/controller/VoluntaryStyleController.java b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/controller/VoluntaryStyleController.java new file mode 100755 index 000000000..4f160bb20 --- /dev/null +++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/controller/VoluntaryStyleController.java @@ -0,0 +1,99 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.controller; + +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.dto.VoluntaryStyleDTO; +import com.elink.esua.epdc.excel.VoluntaryStyleExcel; +import com.elink.esua.epdc.service.VoluntaryStyleService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 志愿风采 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-17 + */ +@RestController +@RequestMapping("voluntarystyle") +public class VoluntaryStyleController { + + @Autowired + private VoluntaryStyleService voluntaryStyleService; + + @GetMapping("page") + public Result> page(@RequestParam Map params) { + PageData page = voluntaryStyleService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id) { + VoluntaryStyleDTO data = voluntaryStyleService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody VoluntaryStyleDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + voluntaryStyleService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody VoluntaryStyleDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + voluntaryStyleService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids) { + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + voluntaryStyleService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = voluntaryStyleService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, VoluntaryStyleExcel.class); + } + + @PostMapping("getListByDeptId") + public Result> getListByDeptId(@RequestBody VoluntaryStyleDTO dto) { + return new Result>().ok(voluntaryStyleService.getListByDeptId(dto.getDeptId())); + } + +} diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/dao/GridStyleDao.java b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/dao/GridStyleDao.java new file mode 100755 index 000000000..5c84d4025 --- /dev/null +++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/dao/GridStyleDao.java @@ -0,0 +1,37 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.entity.GridStyleEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 网格风采 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-17 + */ +@Mapper +public interface GridStyleDao extends BaseDao { + + List getListByDeptId(@Param("deptId") Long deptId); +} diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/dao/VoluntaryStyleDao.java b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/dao/VoluntaryStyleDao.java new file mode 100755 index 000000000..c85ff1744 --- /dev/null +++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/dao/VoluntaryStyleDao.java @@ -0,0 +1,37 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.entity.VoluntaryStyleEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 志愿风采 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-17 + */ +@Mapper +public interface VoluntaryStyleDao extends BaseDao { + + List getListByDeptId(@Param("deptId") Long deptId); +} diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/entity/GridStyleEntity.java b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/entity/GridStyleEntity.java new file mode 100755 index 000000000..b25cae505 --- /dev/null +++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/entity/GridStyleEntity.java @@ -0,0 +1,67 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.elink.esua.epdc.commons.mybatis.entity.DeptScope; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 网格风采 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-17 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("grid_style") +public class GridStyleEntity extends DeptScope { + + private static final long serialVersionUID = 1L; + + /** + * 标题 + */ + private String title; + + /** + * 内容 + */ + private String content; + + /** + * 图片 + */ + private String headerPhoto; + + /** + * 地址 + */ + private String address; + + /** + * 时间 + */ + private Date date; + + private String deptId; + +} diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/entity/VoluntaryStyleEntity.java b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/entity/VoluntaryStyleEntity.java new file mode 100755 index 000000000..236fc3510 --- /dev/null +++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/entity/VoluntaryStyleEntity.java @@ -0,0 +1,68 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.elink.esua.epdc.commons.mybatis.entity.DeptScope; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 志愿风采 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-17 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@TableName("voluntary_style") +public class VoluntaryStyleEntity extends DeptScope { + + + private static final long serialVersionUID = 2742920848306891141L; + + /** + * 标题 + */ + private String title; + + /** + * 内容 + */ + private String content; + + /** + * 图片 + */ + private String headerPhoto; + + /** + * 地址 + */ + private String address; + + /** + * 时间 + */ + private Date date; + + private String deptId; + +} diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/excel/GridStyleExcel.java b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/excel/GridStyleExcel.java new file mode 100755 index 000000000..5f3b41eb6 --- /dev/null +++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/excel/GridStyleExcel.java @@ -0,0 +1,53 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 网格风采 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-17 + */ +@Data +public class GridStyleExcel { + + @Excel(name = "网格风采主键") + private String id; + + @Excel(name = "标题") + private String title; + + @Excel(name = "内容") + private String content; + + @Excel(name = "图片") + private String headerPhoto; + + @Excel(name = "地址") + private String address; + + @Excel(name = "时间") + private Date date; + + +} \ No newline at end of file diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/excel/VoluntaryStyleExcel.java b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/excel/VoluntaryStyleExcel.java new file mode 100755 index 000000000..e7d07630d --- /dev/null +++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/excel/VoluntaryStyleExcel.java @@ -0,0 +1,53 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 志愿风采 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-17 + */ +@Data +public class VoluntaryStyleExcel { + + @Excel(name = "志愿风采主键") + private String id; + + @Excel(name = "标题") + private String title; + + @Excel(name = "内容") + private String content; + + @Excel(name = "图片") + private String headerPhoto; + + @Excel(name = "地址") + private String address; + + @Excel(name = "时间") + private Date date; + + +} \ No newline at end of file diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/redis/GridStyleRedis.java b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/redis/GridStyleRedis.java new file mode 100755 index 000000000..013675e3c --- /dev/null +++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/redis/GridStyleRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 网格风采 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-17 + */ +@Component +public class GridStyleRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/redis/VoluntaryStyleRedis.java b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/redis/VoluntaryStyleRedis.java new file mode 100755 index 000000000..7007bef19 --- /dev/null +++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/redis/VoluntaryStyleRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 志愿风采 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-17 + */ +@Component +public class VoluntaryStyleRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/GridStyleService.java b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/GridStyleService.java new file mode 100755 index 000000000..d093dc0d1 --- /dev/null +++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/GridStyleService.java @@ -0,0 +1,97 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.dto.GridStyleDTO; +import com.elink.esua.epdc.entity.GridStyleEntity; + +import java.util.List; +import java.util.Map; + +/** + * 网格风采 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-17 + */ +public interface GridStyleService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2023-07-17 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2023-07-17 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return GridStyleDTO + * @author generator + * @date 2023-07-17 + */ + GridStyleDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2023-07-17 + */ + void save(GridStyleDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2023-07-17 + */ + void update(GridStyleDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2023-07-17 + */ + void delete(String[] ids); + + List getListByDeptId(Long deptId); +} diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/VoluntaryStyleService.java b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/VoluntaryStyleService.java new file mode 100755 index 000000000..0906f7544 --- /dev/null +++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/VoluntaryStyleService.java @@ -0,0 +1,102 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.dto.VoluntaryStyleDTO; +import com.elink.esua.epdc.entity.VoluntaryStyleEntity; + +import java.util.List; +import java.util.Map; + +/** + * 志愿风采 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-17 + */ +public interface VoluntaryStyleService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2023-07-17 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2023-07-17 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return VoluntaryStyleDTO + * @author generator + * @date 2023-07-17 + */ + VoluntaryStyleDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2023-07-17 + */ + void save(VoluntaryStyleDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2023-07-17 + */ + void update(VoluntaryStyleDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2023-07-17 + */ + void delete(String[] ids); + + /** + * 根据组织ID获取志愿风采 + * @param deptId + * @return + */ + List getListByDeptId(Long deptId); +} diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/GridStyleServiceImpl.java b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/GridStyleServiceImpl.java new file mode 100755 index 000000000..c01c4d834 --- /dev/null +++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/GridStyleServiceImpl.java @@ -0,0 +1,156 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.exception.RenException; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.security.user.SecurityUser; +import com.elink.esua.epdc.commons.tools.security.user.UserDetail; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.dao.GridStyleDao; +import com.elink.esua.epdc.dto.GridStyleDTO; +import com.elink.esua.epdc.dto.ParentAndAllDeptDTO; +import com.elink.esua.epdc.entity.GridStyleEntity; +import com.elink.esua.epdc.service.GridStyleService; +import com.elink.esua.epdc.service.SysDeptService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 网格风采 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-17 + */ +@Service +public class GridStyleServiceImpl extends BaseServiceImpl implements GridStyleService { + + @Resource + private SysDeptService deptService; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, GridStyleDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, GridStyleDTO.class); + } + + private QueryWrapper getWrapper(Map params) { + String id = (String) params.get(FieldConstant.ID_HUMP); + String title = (String) params.get("title"); + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + wrapper.like(StringUtils.isNotBlank(title), "TITLE", title); + return wrapper; + } + + @Override + public GridStyleDTO get(String id) { + GridStyleEntity entity = baseDao.selectById(id); + GridStyleDTO dto = ConvertUtils.sourceToTarget(entity, GridStyleDTO.class); + if (null != entity.getAllDeptIds()) { + dto.setAllDeptIds(entity.getAllDeptIds().split(",")); + dto.setDeptId(Long.valueOf(entity.getDeptId())); + } + return dto; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(GridStyleDTO dto) { + if (dto.getAllDeptIds().length == 0) { + setDeptId(dto); + } + GridStyleEntity entity = ConvertUtils.sourceToTarget(dto, GridStyleEntity.class); + biuldDept(dto, entity); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(GridStyleDTO dto) { + GridStyleEntity entity = ConvertUtils.sourceToTarget(dto, GridStyleEntity.class); + biuldDept(dto, entity); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public List getListByDeptId(Long deptId) { + if (null != deptId) { + List entities = baseDao.getListByDeptId(deptId); + return ConvertUtils.sourceToTarget(entities, GridStyleDTO.class); + } else + return new ArrayList<>(); + + } + + private void setDeptId(GridStyleDTO dto) { + UserDetail user = SecurityUser.getUser(); + String deptId = String.valueOf(user.getDeptId()); + dto.setDeptId(user.getDeptId()); + dto.setAllDeptIds(new String[]{deptId}); + } + + private void biuldDept(GridStyleDTO dto, GridStyleEntity entity) { + ParentAndAllDeptDTO parentResult; + String deptId = ""; + if (dto.getAllDeptIds() != null && dto.getAllDeptIds().length > 1) { + deptId = dto.getAllDeptIds()[dto.getAllDeptIds().length - 1]; + entity.setDeptId(deptId); + parentResult = deptService.getParentAndAllDept(deptId); + } else { + parentResult = deptService.getParentAndAllDept(deptId); + } + if (null == parentResult) { + throw new RenException("获取部门信息失败"); + } else { + entity.setAllDeptIds(parentResult.getAllDeptIds()); + entity.setAllDeptNames(parentResult.getAllDeptNames()); + entity.setParentDeptIds(parentResult.getParentDeptIds()); + entity.setParentDeptNames(parentResult.getParentDeptNames()); + } + } + +} diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/VoluntaryStyleServiceImpl.java b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/VoluntaryStyleServiceImpl.java new file mode 100755 index 000000000..1ba9c9d30 --- /dev/null +++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/VoluntaryStyleServiceImpl.java @@ -0,0 +1,156 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.exception.RenException; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.security.user.SecurityUser; +import com.elink.esua.epdc.commons.tools.security.user.UserDetail; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.dao.VoluntaryStyleDao; +import com.elink.esua.epdc.dto.ParentAndAllDeptDTO; +import com.elink.esua.epdc.dto.VoluntaryStyleDTO; +import com.elink.esua.epdc.entity.VoluntaryStyleEntity; +import com.elink.esua.epdc.service.SysDeptService; +import com.elink.esua.epdc.service.VoluntaryStyleService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 志愿风采 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2023-07-17 + */ +@Service +public class VoluntaryStyleServiceImpl extends BaseServiceImpl implements VoluntaryStyleService { + + @Resource + private SysDeptService deptService; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, VoluntaryStyleDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, VoluntaryStyleDTO.class); + } + + private QueryWrapper getWrapper(Map params) { + String id = (String) params.get(FieldConstant.ID_HUMP); + String title = (String) params.get("title"); + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + wrapper.like(StringUtils.isNotBlank(title), "TITLE", title); + return wrapper; + } + + @Override + public VoluntaryStyleDTO get(String id) { + VoluntaryStyleEntity entity = baseDao.selectById(id); + VoluntaryStyleDTO dto = ConvertUtils.sourceToTarget(entity, VoluntaryStyleDTO.class); + if (null != entity.getAllDeptIds()) { + dto.setAllDeptIds(entity.getAllDeptIds().split(",")); + dto.setDeptId(Long.valueOf(entity.getDeptId())); + } + return dto; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(VoluntaryStyleDTO dto) { + if (dto.getAllDeptIds().length == 0) { + setDeptId(dto); + } + VoluntaryStyleEntity entity = ConvertUtils.sourceToTarget(dto, VoluntaryStyleEntity.class); + biuldDept(dto, entity); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(VoluntaryStyleDTO dto) { + VoluntaryStyleEntity entity = ConvertUtils.sourceToTarget(dto, VoluntaryStyleEntity.class); + biuldDept(dto, entity); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public List getListByDeptId(Long deptId) { + if (null != deptId) { + List entities = baseDao.getListByDeptId(deptId); + return ConvertUtils.sourceToTarget(entities, VoluntaryStyleDTO.class); + } else + return new ArrayList<>(); + + } + + private void setDeptId(VoluntaryStyleDTO dto) { + UserDetail user = SecurityUser.getUser(); + String deptId = String.valueOf(user.getDeptId()); + dto.setDeptId(user.getDeptId()); + dto.setAllDeptIds(new String[]{deptId}); + } + + private void biuldDept(VoluntaryStyleDTO dto, VoluntaryStyleEntity entity) { + ParentAndAllDeptDTO parentResult; + String deptId = ""; + if (dto.getAllDeptIds() != null && dto.getAllDeptIds().length > 1) { + deptId = dto.getAllDeptIds()[dto.getAllDeptIds().length - 1]; + entity.setDeptId(deptId); + parentResult = deptService.getParentAndAllDept(deptId); + } else { + parentResult = deptService.getParentAndAllDept(deptId); + } + if (null == parentResult) { + throw new RenException("获取部门信息失败"); + } else { + entity.setAllDeptIds(parentResult.getAllDeptIds()); + entity.setAllDeptNames(parentResult.getAllDeptNames()); + entity.setParentDeptIds(parentResult.getParentDeptIds()); + entity.setParentDeptNames(parentResult.getParentDeptNames()); + } + } + +} diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/mapper/GridStyleDao.xml b/esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/mapper/GridStyleDao.xml new file mode 100755 index 000000000..5888d7950 --- /dev/null +++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/mapper/GridStyleDao.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/mapper/VoluntaryStyleDao.xml b/esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/mapper/VoluntaryStyleDao.xml new file mode 100755 index 000000000..e472539d9 --- /dev/null +++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/mapper/VoluntaryStyleDao.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiAdminController.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiAdminController.java index 006e25fb6..ece0ade61 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiAdminController.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiAdminController.java @@ -10,6 +10,7 @@ import com.elink.esua.epdc.service.AdminService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import javax.websocket.server.PathParam; import java.util.List; /** @@ -126,4 +127,23 @@ public class ApiAdminController { return adminService.listSimpleDictInfo(dictType); } + /** + * 网格风采 + * @param deptId + * @return + */ + @GetMapping("sys/gridstyle/getListByDeptId") + public Result> getGridStyleListByDeptId(@PathParam("deptId") String deptId) { + return adminService.getGridStyleListByDeptId(deptId); + } + + /** + * 志愿风采 + * @param deptId + * @return + */ + @GetMapping("sys/voluntarystyle/getListByDeptId") + public Result> getVoluntarystyleListByDeptId(@PathParam("deptId") String deptId) { + return adminService.getVoluntarystyleListByDeptId(deptId); + } } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/AdminFeignClient.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/AdminFeignClient.java index d6d951ff9..d12d3761d 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/AdminFeignClient.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/AdminFeignClient.java @@ -27,7 +27,7 @@ import java.util.List; * @date 2019/9/7 9:27 */ //@FeignClient(name = ServiceConstant.EPDC_ADMIN_SERVER, fallback = AdminFeignClientFallback.class, url = "http://127.0.0.1:9092") - @FeignClient(name = ServiceConstant.EPDC_ADMIN_SERVER, fallback = AdminFeignClientFallback.class) +@FeignClient(name = ServiceConstant.EPDC_ADMIN_SERVER, fallback = AdminFeignClientFallback.class) public interface AdminFeignClient { /** @@ -211,4 +211,9 @@ public interface AdminFeignClient { @GetMapping("sys/appsys/listSimple/{dictType}") Result> listSimpleDictInfo(@PathVariable("dictType") String dictType); + @PostMapping("sys/gridstyle/getListByDeptId") + Result> getGridStyleListByDeptId(GridStyleDTO dto); + + @PostMapping("sys/voluntarystyle/getListByDeptId") + Result> getVoluntarystyleListByDeptId(VoluntaryStyleDTO dto); } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/AdminFeignClientFallback.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/AdminFeignClientFallback.java index 927db1268..4020eb1de 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/AdminFeignClientFallback.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/AdminFeignClientFallback.java @@ -27,6 +27,7 @@ public class AdminFeignClientFallback implements AdminFeignClient { public Result getCompleteDept(Long gridId) { return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "getCompleteDept", gridId); } + @Override public Result getParentAndAllDept(Long deptId) { return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "getParentAndAllDept", deptId); @@ -64,27 +65,27 @@ public class AdminFeignClientFallback implements AdminFeignClient { @Override public Result updateAvatar(String avatar) { - return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "updateAvatar",avatar); + return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "updateAvatar", avatar); } @Override public Result modifyPwd(ModifyPwdDTO dto) { - return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "modifyPwd",dto); + return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "modifyPwd", dto); } @Override public Result getDeptTypeKey(Long deptId) { - return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "getDeptTypeKey",deptId); + return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "getDeptTypeKey", deptId); } @Override public Result userRelationWorkAndAnalyOpenId(SendMessageFormDTO formDto) { - return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "userRelationWorkAndAnalyOpenId",formDto); + return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "userRelationWorkAndAnalyOpenId", formDto); } @Override public Result getAppMenu(AppUserIdMenuDTO dto) { - return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "getAppMenu",dto); + return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "getAppMenu", dto); } @Override @@ -104,16 +105,26 @@ public class AdminFeignClientFallback implements AdminFeignClient { @Override public Result getDeptIdByItude(DeptItudeFormDTO dto) { - return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "getDeptIdByItude",dto); + return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "getDeptIdByItude", dto); } @Override public Result getGridByCoordinate(GisFormDTO formDTO) { - return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "getGridByCoordinate",formDTO); + return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "getGridByCoordinate", formDTO); } @Override public Result> listSimpleDictInfo(@PathVariable("dictType") String dictType) { return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "listSimpleDictInfo", dictType); } + + @Override + public Result> getGridStyleListByDeptId(GridStyleDTO dto) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "getGridStyleListByDeptId", dto); + } + + @Override + public Result> getVoluntarystyleListByDeptId(VoluntaryStyleDTO dto) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "getVoluntarystyleListByDeptId", dto); + } } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AdminService.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AdminService.java index 59260e759..0e8e47dda 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AdminService.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AdminService.java @@ -92,4 +92,18 @@ public interface AdminService { Result> listSimpleDictInfo(String dictType); Result getDeptTree(); + + /** + * 根据部门ID获取网格风采 + * @param deptId + * @return + */ + Result> getGridStyleListByDeptId(String deptId); + + /** + * 根据部门ID获取志愿风采 + * @param deptId + * @return + */ + Result> getVoluntarystyleListByDeptId(String deptId); } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AdminServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AdminServiceImpl.java index d09b528c4..9d3c8ff2c 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AdminServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AdminServiceImpl.java @@ -39,6 +39,7 @@ public class AdminServiceImpl implements AdminService { .concat(completeDept.getGrid()); return new Result().ok(deptName); } + @Override public Result getComplete(Long gridId) { Result adminResult = adminFeignClient.getCompleteDept(gridId); @@ -55,7 +56,7 @@ public class AdminServiceImpl implements AdminService { @Override public Result getAreaInfo(CityAreaFormDTO formDto) { - log.info("formDto:"+formDto); + log.info("formDto:" + formDto); return adminFeignClient.getAreaInfo(formDto); } @@ -69,6 +70,26 @@ public class AdminServiceImpl implements AdminService { return adminFeignClient.getDeptTree(); } + @Override + public Result> getGridStyleListByDeptId(String deptId) { + if (null != deptId) { + GridStyleDTO dto = new GridStyleDTO(); + dto.setDeptId(Long.valueOf(deptId)); + return adminFeignClient.getGridStyleListByDeptId(dto); + } else + return new Result<>(); + } + + @Override + public Result> getVoluntarystyleListByDeptId(String deptId) { + if (null != deptId) { + VoluntaryStyleDTO dto = new VoluntaryStyleDTO(); + dto.setDeptId(Long.valueOf(deptId)); + return adminFeignClient.getVoluntarystyleListByDeptId(dto); + } else + return new Result<>(); + } + @Override public Result getDeptIdByItude(DeptItudeFormDTO dto) { return adminFeignClient.getDeptIdByItude(dto);