diff --git a/esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/constant/StrConstant.java b/esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/constant/StrConstant.java new file mode 100644 index 000000000..583d683f6 --- /dev/null +++ b/esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/constant/StrConstant.java @@ -0,0 +1,41 @@ +package com.elink.esua.epdc.commons.tools.constant; + +import org.apache.commons.codec.CharEncoding; +import org.springframework.http.MediaType; + + +/** + * 字符串常量 + * + * @author work@yujt.net.cn + * @date 2019/12/13 11:19 + */ +public interface StrConstant { + + String UTF_8 = CharEncoding.UTF_8; + + String ISO_8859_1 = CharEncoding.ISO_8859_1; + + String JAVASCRIPT = "javascript"; + + String APPLICATION_JSON_UTF8_VALUE = MediaType.APPLICATION_JSON_UTF8_VALUE; + + String EXCEL_SUFFIX_2003 = ".xls"; + + String EXCEL_SUFFIX_2007 = ".xlsx"; + + /** + * 连字符号、短杠 + */ + String HYPHEN = "-"; + + /** + * 英文逗号 + */ + String COMMA = ","; + + /** + * 冒号 + */ + String COLON = ":"; +} diff --git a/esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/utils/ExcelUtils.java b/esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/utils/ExcelUtils.java index f451aa620..f3f675bcb 100644 --- a/esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/utils/ExcelUtils.java +++ b/esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/utils/ExcelUtils.java @@ -11,9 +11,12 @@ package com.elink.esua.epdc.commons.tools.utils; import cn.afterturn.easypoi.excel.ExcelExportUtil; import cn.afterturn.easypoi.excel.entity.ExportParams; import org.apache.commons.lang3.StringUtils; +import org.apache.poi.hssf.usermodel.HSSFCell; +import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.usermodel.Workbook; import org.springframework.beans.BeanUtils; +import org.springframework.web.multipart.MultipartFile; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletResponse; @@ -80,4 +83,66 @@ public class ExcelUtils { exportExcel(response, fileName, targetList, targetClass); } + + /** + * 获取单元格内容 + * @param cell + * @return + */ + public static String getCellContent(Cell cell){ + String value = ""; + if (cell.getCellType() == HSSFCell.CELL_TYPE_NUMERIC) { + value = String.valueOf(cell.getNumericCellValue()); + } else { + value = cell.getStringCellValue(); + } + //内容超过25个字进行长度限制,否则数据库会超限 + /*if(value.length() > 25){ + value = value.substring(0,25) + "..."; + }*/ + return value; + } + + /** + * 获取excle版本 + * @param mFile + * @return + */ + public static String getExcelInfo(MultipartFile mFile) { + String fileName = mFile.getOriginalFilename();// 获取文件名 + String isExcel2003 = "true";// 根据文件名判断文件是2003版本还是2007版本 + try { + if (!validateExcel(fileName)) {// 验证文件名是否合格 + return ""; + } + if (isExcel2007(fileName)) { + isExcel2003 = "false"; + } + return isExcel2003; + } catch (Exception e) { + e.printStackTrace(); + } + return ""; + } + + /** + * 验证EXCEL文件 + * @param filePath + * @return + */ + public static boolean validateExcel(String filePath) { + if (filePath == null || !(isExcel2003(filePath) || isExcel2007(filePath))) { + return false; + } + return true; + } + + // @描述:是否是2003的excel,返回true是2003 + public static boolean isExcel2003(String filePath) { + return filePath.matches("^.+\\.(?i)(xls)$"); + } + // @描述:是否是2007的excel,返回true是2007 + public static boolean isExcel2007(String filePath) { + return filePath.matches("^.+\\.(?i)(xlsx)$"); + } } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiEvaluateController.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiEvaluateController.java new file mode 100644 index 000000000..58a161c20 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiEvaluateController.java @@ -0,0 +1,80 @@ +package com.elink.esua.epdc.controller; + +import com.elink.esua.epdc.common.token.dto.TokenDto; +import com.elink.esua.epdc.commons.tools.annotation.LoginUser; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.evaluate.form.EvaluateOfficerAppFormDTO; +import com.elink.esua.epdc.dto.evaluate.form.EvaluateOptionAppFormDTO; +import com.elink.esua.epdc.dto.evaluate.form.EvaluateSubmitFormDTO; +import com.elink.esua.epdc.dto.evaluate.result.EvaluateOfficerAppResultDTO; +import com.elink.esua.epdc.dto.evaluate.result.EvaluateOptionAppResultDTO; +import com.elink.esua.epdc.dto.evaluate.result.RoleResultDTO; +import com.elink.esua.epdc.service.EvaluateService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 移动端接口-项目模块 + * @Author LPF + * @Date 2019/11/18 13:32 + */ +@RestController +@RequestMapping("custom/evaluate") +public class ApiEvaluateController { + + @Autowired + private EvaluateService evaluateService; + + + /** + * 街道干部列表 + * @Params: [ formDto] + * @Return: com.elink.esua.epdc.commons.tools.utils.Result> + * @Author: lipengfei + * @Date: 2019/11/19 16:34 + */ + @GetMapping("getDeptOfficer") + public Result> getDeptOfficer(@LoginUser TokenDto tokenDto) { + EvaluateOfficerAppFormDTO formDto = new EvaluateOfficerAppFormDTO(); + formDto.setGridId(tokenDto.getGridId()); + return evaluateService.getDeptOfficer(formDto); + } + /** + * 评价列表 + * @Params: [ formDto] + * @Return: com.elink.esua.epdc.commons.tools.utils.Result> + * @Author: lipengfei + * @Date: 2019/11/19 16:34 + */ + @GetMapping("getOptionList") + public Result> getOptionList(EvaluateOptionAppFormDTO formDto) { + return evaluateService.getOptionList(formDto); + } + /** + * 评价状态 + * @Params: [ formDto] + * @Return: com.elink.esua.epdc.commons.tools.utils.Result<> + * @Author: lipengfei + * @Date: 2019/11/19 16:34 + */ + @GetMapping("getAvailable") + public Result getAvailable() { + return evaluateService.getAvailable(); + } + /** + * 评价提交 + * @Params: [ formDto] + * @Return: com.elink.esua.epdc.commons.tools.utils.Result> + * @Author: lipengfei + * @Date: 2019/11/19 16:34 + */ + @PostMapping("evaluateSubmit") + public Result evaluateSubmit(EvaluateSubmitFormDTO formDto, @LoginUser TokenDto tokenDto) { + formDto.setFullName(tokenDto.getRealName()); + formDto.setMobile(tokenDto.getMobile()); + return evaluateService.evaluateSubmit(formDto); + } +} diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/EvaluateFeignClient.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/EvaluateFeignClient.java new file mode 100644 index 000000000..8359a05ac --- /dev/null +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/EvaluateFeignClient.java @@ -0,0 +1,74 @@ +package com.elink.esua.epdc.feign; + +import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.config.FeignRequestInterceptor; +import com.elink.esua.epdc.dto.evaluate.form.EvaluateOfficerAppFormDTO; +import com.elink.esua.epdc.dto.evaluate.form.EvaluateOptionAppFormDTO; +import com.elink.esua.epdc.dto.evaluate.form.EvaluateSubmitFormDTO; +import com.elink.esua.epdc.dto.evaluate.result.EvaluateOfficerAppResultDTO; +import com.elink.esua.epdc.dto.evaluate.result.EvaluateOptionAppResultDTO; +import com.elink.esua.epdc.dto.evaluate.result.RoleResultDTO; +import com.elink.esua.epdc.feign.fallback.EvaluateFeignClientFallback; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; + +import java.util.List; + +/** + * 评价模块调用-移动app端 + * @Author LPF + * @Date 2019/11/18 16:39 + */ +@FeignClient(name = ServiceConstant.EPDC_CUSTOM_SERVER, fallback = EvaluateFeignClientFallback.class, configuration = FeignRequestInterceptor.class) +public interface EvaluateFeignClient { + + + + /** + * 街道干部列表 + * @Params: [formDto] + * @Return: com.elink.esua.epdc.commons.tools.utils.Result> + * @Author: lipengfei + * @Date: 2019/11/19 16:42 + */ + @GetMapping(value = "custom/evaluateofficer/getDeptOfficer", consumes = MediaType.APPLICATION_JSON_VALUE) + Result> getDeptOfficer(EvaluateOfficerAppFormDTO formDto); + + /** + * 评价列表 + * @Params: [formDto] + * @Return: com.elink.esua.epdc.commons.tools.utils.Result> + * @Author: lipengfei + * @Date: 2019/11/19 16:42 + */ + @GetMapping(value = "custom/evaluateoption/getOptionList", consumes = MediaType.APPLICATION_JSON_VALUE) + Result> getOptionList(EvaluateOptionAppFormDTO formDto); + /** + * 评价提交 + * @Params: [formDto] + * @Return: com.elink.esua.epdc.commons.tools.utils.Result<> + * @Author: lipengfei + * @Date: 2019/11/19 16:42 + */ + @PostMapping(value = "custom/evaluateinfo/evaluateSubmit", consumes = MediaType.APPLICATION_JSON_VALUE) + Result evaluateSubmit(EvaluateSubmitFormDTO formDto); + + /** + * 评价状态 + * @Params: [formDto] + * @Return: com.elink.esua.epdc.commons.tools.utils.Result<> + * @Author: lipengfei + * @Date: 2019/11/19 16:42 + */ + @PostMapping(value = "custom/evaluaterole/getAppAvailable", consumes = MediaType.APPLICATION_JSON_VALUE) + Result getAvailable(); + + + + + +} diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/EvaluateFeignClientFallback.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/EvaluateFeignClientFallback.java new file mode 100644 index 000000000..6c1204623 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/EvaluateFeignClientFallback.java @@ -0,0 +1,45 @@ +package com.elink.esua.epdc.feign.fallback; + + +import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; +import com.elink.esua.epdc.commons.tools.utils.ModuleUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.evaluate.form.EvaluateOfficerAppFormDTO; +import com.elink.esua.epdc.dto.evaluate.form.EvaluateOptionAppFormDTO; +import com.elink.esua.epdc.dto.evaluate.form.EvaluateSubmitFormDTO; +import com.elink.esua.epdc.dto.evaluate.result.EvaluateOfficerAppResultDTO; +import com.elink.esua.epdc.dto.evaluate.result.EvaluateOptionAppResultDTO; +import com.elink.esua.epdc.dto.evaluate.result.RoleResultDTO; +import com.elink.esua.epdc.feign.EvaluateFeignClient; +import org.springframework.stereotype.Component; +import org.springframework.web.bind.annotation.PathVariable; + +import java.util.List; + +/** + * @Author LPF + * @Date 2019/11/18 16:39 + */ +@Component +public class EvaluateFeignClientFallback implements EvaluateFeignClient { + + + @Override + public Result> getDeptOfficer(EvaluateOfficerAppFormDTO formDto) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_CUSTOM_SERVER, "getDeptOfficer", formDto); + } + @Override + public Result> getOptionList(EvaluateOptionAppFormDTO formDto) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_CUSTOM_SERVER, "getOptionList", formDto); + } + @Override + public Result evaluateSubmit(EvaluateSubmitFormDTO formDto) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_CUSTOM_SERVER, "evaluateSubmit", formDto); + } + @Override + public Result getAvailable() { + return ModuleUtils.feignConError(ServiceConstant.EPDC_CUSTOM_SERVER, "getAvailable"); + } + + +} diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/EvaluateService.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/EvaluateService.java new file mode 100644 index 000000000..fdba0cfb8 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/EvaluateService.java @@ -0,0 +1,51 @@ +package com.elink.esua.epdc.service; + +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.evaluate.form.EvaluateOfficerAppFormDTO; +import com.elink.esua.epdc.dto.evaluate.form.EvaluateOptionAppFormDTO; +import com.elink.esua.epdc.dto.evaluate.form.EvaluateSubmitFormDTO; +import com.elink.esua.epdc.dto.evaluate.result.EvaluateOfficerAppResultDTO; +import com.elink.esua.epdc.dto.evaluate.result.EvaluateOptionAppResultDTO; +import com.elink.esua.epdc.dto.evaluate.result.RoleResultDTO; + +import java.util.List; + +/** + * 项目模块-移动App端 + * @Author LPF + * @Date 2019/11/18 13:34 + */ +public interface EvaluateService { + + + /** + * 街道干部列表 + * @Params: [userDetail, formDto] + * @Return: com.elink.esua.epdc.commons.tools.utils.Result> + * @Author: lipengfei + * @Date: 2019/11/19 16:37 + */ + Result> getDeptOfficer(EvaluateOfficerAppFormDTO formDto); + /** + * 评价列表 + * @Params: [userDetail, formDto] + * @Return: com.elink.esua.epdc.commons.tools.utils.Result> + * @Author: lipengfei + * @Date: 2019/11/19 16:37 + */ + Result> getOptionList(EvaluateOptionAppFormDTO formDto); + + Result getAvailable(); + /** + * 评价提交 + * @Params: [userDetail, itemId] + * @Return: com.elink.esua.epdc.commons.tools.utils.Result + * @Author: lipengfei + * @Date: 2019/11/19 16:34 + */ + Result evaluateSubmit(EvaluateSubmitFormDTO formDto); + + + + +} diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/EvaluateServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/EvaluateServiceImpl.java new file mode 100644 index 000000000..57df991c4 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/EvaluateServiceImpl.java @@ -0,0 +1,49 @@ +package com.elink.esua.epdc.service.impl; + + +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.evaluate.form.EvaluateOfficerAppFormDTO; +import com.elink.esua.epdc.dto.evaluate.form.EvaluateOptionAppFormDTO; +import com.elink.esua.epdc.dto.evaluate.form.EvaluateSubmitFormDTO; +import com.elink.esua.epdc.dto.evaluate.result.EvaluateOfficerAppResultDTO; +import com.elink.esua.epdc.dto.evaluate.result.EvaluateOptionAppResultDTO; +import com.elink.esua.epdc.dto.evaluate.result.RoleResultDTO; +import com.elink.esua.epdc.feign.EvaluateFeignClient; +import com.elink.esua.epdc.service.EvaluateService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 项目模块-移动app端 + * @Author LPF + * @Date 2019/11/18 16:34 + */ +@Service +public class EvaluateServiceImpl implements EvaluateService { + + @Autowired + private EvaluateFeignClient evaluateFeignClient; + + + + @Override + public Result> getDeptOfficer(EvaluateOfficerAppFormDTO formDto) { + return evaluateFeignClient.getDeptOfficer(formDto); + } + @Override + public Result> getOptionList(EvaluateOptionAppFormDTO formDto) { + return evaluateFeignClient.getOptionList(formDto); + } + @Override + public Result getAvailable() { + return evaluateFeignClient.getAvailable(); + } + + + @Override + public Result evaluateSubmit(EvaluateSubmitFormDTO formDto){ + return evaluateFeignClient.evaluateSubmit(formDto); + } +} diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/EvaluateDeptDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/EvaluateDeptDTO.java new file mode 100644 index 000000000..44361ea9e --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/EvaluateDeptDTO.java @@ -0,0 +1,107 @@ +/** + * 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.evaluate; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 评价部门表 评价部门表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@Data +public class EvaluateDeptDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 部门ID + */ + private String deptId; + + /** + * 部门名称 + */ + private String deptName; + + /** + * 父所有部门ID + */ + private String parentDeptIds; + + /** + * 父所有部门名称 + */ + private String parentDeptNames; + + /** + * 所有部门ID + */ + private String allDeptIds; + + /** + * 所有部门名称 + */ + private String allDeptNames; + + /** + * 干部人数 + */ + private Integer officerCount; + + /** + * 删除标识 0:否,1:是 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/EvaluateDetailDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/EvaluateDetailDTO.java new file mode 100644 index 000000000..aa17f7195 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/EvaluateDetailDTO.java @@ -0,0 +1,91 @@ +/** + * 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.evaluate; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 评价详情表 评价详情表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-06 + */ +@Data +public class EvaluateDetailDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 信息ID 评价信息表主键 + */ + private String infoId; + + /** + * 评价类别(1.点赞,2.吐槽) + */ + private Integer roleCode; + + /** + * 选项ID 选项表主键 + */ + private String optionId; + + /** + * 是否选中(0-否,1-是) + */ + private String selectFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 删除标识 0:否,1:是 + */ + private String delFlag; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/EvaluateInfoDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/EvaluateInfoDTO.java new file mode 100644 index 000000000..3d0703301 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/EvaluateInfoDTO.java @@ -0,0 +1,98 @@ +/** + * 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.evaluate; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 评价信息表 评价信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-06 + */ +@Data +public class EvaluateInfoDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 提交人姓名 + */ + private String fullName; + + /** + * 联系电话 + */ + private String mobile; + + /** + * 干部ID 干部信息表主键 + */ + private String officerId; + + /** + * 评价类别(1.点赞,2.吐槽) + */ + private Integer roleCode; + + /** + * 评价内容 + */ + private String content; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 删除标识 0:否,1:是 + */ + private String delFlag; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + private Integer optionCount; + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/EvaluateOfficerDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/EvaluateOfficerDTO.java new file mode 100644 index 000000000..ee06037e8 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/EvaluateOfficerDTO.java @@ -0,0 +1,107 @@ +/** + * 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.evaluate; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 干部信息表 干部信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@Data +public class EvaluateOfficerDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 部门ID 部门表主键ID + */ + private String deptId; + + /** + * 姓名 + */ + private String fullName; + + /** + * 性别(0-女,1-男) + */ + private String sex; + + /** + * 职位 + */ + private String position; + + /** + * 点赞次数 + */ + private Integer likesCount; + + /** + * 被踩次数 + */ + private Integer opposeCount; + + /** + * 排序 + */ + private Integer sort; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 删除标识 0:否,1:是 + */ + private String delFlag; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/EvaluateOptionDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/EvaluateOptionDTO.java new file mode 100644 index 000000000..fb3275437 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/EvaluateOptionDTO.java @@ -0,0 +1,92 @@ +/** + * 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.evaluate; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 评价选项表 评价选项表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@Data +public class EvaluateOptionDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 权限编码(1.点赞,2.吐槽) + */ + private Integer roleCode; + + /** + * 评价选项 + */ + private String optionContent; + + /** + * 显示顺序 + */ + private Integer sort; + + /** + * 可用标记(0-不可用,1-可用) + */ + private String available; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 删除标识 0:否,1:是 + */ + private String delFlag; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/EvaluateOptions.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/EvaluateOptions.java new file mode 100644 index 000000000..12b28c441 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/EvaluateOptions.java @@ -0,0 +1,19 @@ +package com.elink.esua.epdc.dto.evaluate; + +import com.elink.esua.epdc.dto.evaluate.result.EvaluateOptionAppResultDTO; +import lombok.Data; + +import java.util.List; + +/** + * 评价选项 + * + * @author work@yujt.net.cn + * @date 2019/11/27 10:03 + */ +@Data +public class EvaluateOptions { + private List optionList; +} + + diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/EvaluateRoleDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/EvaluateRoleDTO.java new file mode 100644 index 000000000..7125bfda0 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/EvaluateRoleDTO.java @@ -0,0 +1,87 @@ +/** + * 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.evaluate; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 评价权限表 评价权限表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@Data +public class EvaluateRoleDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 权限编码(1.点赞,2.吐槽) + */ + private Integer roleCode; + + /** + * 权限描述 + */ + private String ruleDesc; + + /** + * 可用标记(0-不可用,1-可用) + */ + private String available; + + /** + * 删除标识 0:否,1:是 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/EvaluateSelectOption.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/EvaluateSelectOption.java new file mode 100644 index 000000000..ece866621 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/EvaluateSelectOption.java @@ -0,0 +1,27 @@ +package com.elink.esua.epdc.dto.evaluate; + +import lombok.Data; + +import java.util.List; + +/** + * 评价选项 + * + * @author work@yujt.net.cn + * @date 2019/11/27 10:03 + */ +@Data +public class EvaluateSelectOption { + /** + * 主键 + */ + private String optionId; + + /** + * 选中状态 + */ + private String selectFlag; + +} + + diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/EvaluateShowOption.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/EvaluateShowOption.java new file mode 100644 index 000000000..b7c0a1f1c --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/EvaluateShowOption.java @@ -0,0 +1,25 @@ +package com.elink.esua.epdc.dto.evaluate; + +import lombok.Data; + +/** + * 评价选项 + * + * @author work@yujt.net.cn + * @date 2019/11/27 10:03 + */ +@Data +public class EvaluateShowOption { + /** + * 主键 + */ + private Integer index; + + /** + * 选项 + */ + private String optionContent; + +} + + diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/EvaluateUpdateDeptOfficerCountDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/EvaluateUpdateDeptOfficerCountDTO.java new file mode 100644 index 000000000..bc237a07b --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/EvaluateUpdateDeptOfficerCountDTO.java @@ -0,0 +1,51 @@ +/** + * 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.evaluate; + +import lombok.Data; + +import java.io.Serializable; + + +/** + * 评价部门表 评价部门表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@Data +public class EvaluateUpdateDeptOfficerCountDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 部门ID + */ + private String deptId; + + /** + * 干部人数 + */ + private Integer officerCount; + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/form/EvaluateOfficerAppFormDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/form/EvaluateOfficerAppFormDTO.java new file mode 100644 index 000000000..61c651536 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/form/EvaluateOfficerAppFormDTO.java @@ -0,0 +1,61 @@ +/** + * 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.evaluate.form; + +import lombok.Data; + +import javax.validation.constraints.Min; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; + + +/** + * 干部信息表 干部信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@Data +public class EvaluateOfficerAppFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 网格Id + */ + @NotNull(message = "网格Id不能为空") + private Long gridId; + + /** + * 页码,从1开始 + */ + @Min(value = 1, message = "页码必须大于0") + private int pageIndex; + /** + * 页容量,默认20页 + */ + @Min(value = 1, message = "每页条数必须大于必须大于0") + private int pageSize = 10; + + /** + * 街道ID + */ + private Long deptId; + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/form/EvaluateOptionAppFormDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/form/EvaluateOptionAppFormDTO.java new file mode 100644 index 000000000..874cb1aa9 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/form/EvaluateOptionAppFormDTO.java @@ -0,0 +1,45 @@ +/** + * 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.evaluate.form; + +import lombok.Data; + +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.Date; + + +/** + * 评价选项表 评价选项表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@Data +public class EvaluateOptionAppFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 权限编码(1.点赞,2.吐槽) + */ + @NotNull(message = "评价类别不能为空") + private Integer roleCode; + + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/form/EvaluateOptionFormDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/form/EvaluateOptionFormDTO.java new file mode 100644 index 000000000..192cf059c --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/form/EvaluateOptionFormDTO.java @@ -0,0 +1,46 @@ +/** + * 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.evaluate.form; + +import lombok.Data; + +import java.io.Serializable; + + +/** + * 评价选项表 评价选项表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@Data +public class EvaluateOptionFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 可用标记(0-不可用,1-可用) + */ + private String available; + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/form/EvaluateRoleFormDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/form/EvaluateRoleFormDTO.java new file mode 100644 index 000000000..6adc2e417 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/form/EvaluateRoleFormDTO.java @@ -0,0 +1,41 @@ +/** + * 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.evaluate.form; + +import lombok.Data; + +import java.io.Serializable; + + +/** + * 评价权限表 评价权限表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@Data +public class EvaluateRoleFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 可用标记(0-不可用,1-可用) + */ + private String available; + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/form/EvaluateSubmitFormDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/form/EvaluateSubmitFormDTO.java new file mode 100644 index 000000000..ce39dcfb7 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/form/EvaluateSubmitFormDTO.java @@ -0,0 +1,78 @@ +/** + * 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.evaluate.form; + +import com.elink.esua.epdc.dto.evaluate.EvaluateSelectOption; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; +import java.io.Serializable; +import java.util.Date; +import java.util.List; + + +/** + * 评价信息表 评价信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-06 + */ +@Data +public class EvaluateSubmitFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + + /** + * 提交人姓名 + */ + @NotBlank(message = "联系电话不能为空") + private String fullName; + + /** + * 联系电话 + */ + @NotBlank(message = "联系电话不能为空") + private String mobile; + + /** + * 干部ID 干部信息表主键 + */ + @NotBlank(message = "联系电话不能为空") + private String officerId; + + /** + * 评价类别(1.点赞,2.吐槽) + */ + @NotNull(message = "评价类别不能为空") + private Integer roleCode; + + /** + * 评价内容 + */ + @Size(min = 0, max = 50, message = "评价内容在50字以内") + private String content; + + /** + * 评价选项 + */ + private List optionList; + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/result/EvaluateDeptCountResultDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/result/EvaluateDeptCountResultDTO.java new file mode 100644 index 000000000..51d736a40 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/result/EvaluateDeptCountResultDTO.java @@ -0,0 +1,113 @@ +/** + * 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.evaluate.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 评价部门表 评价部门表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@Data +public class EvaluateDeptCountResultDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 部门ID + */ + private String deptId; + + /** + * 部门名称 + */ + private String deptName; + /** + * 干部人数 + */ + private Integer officerCount; + + /** + * 被评价干部人数 + */ + private Integer beEvaluatedCount; + + /** + * 评价总人数 + */ + private Integer evaluatePeopleCount; + + /** + * 评价总次数 + */ + private Integer evaluateCount; + + /** + * 被点赞总次数 + */ + private Integer likeCount; + + /** + * 被吐槽总次数 + */ + private Integer opposeCount; + + + + /** + * 删除标识 0:否,1:是 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/result/EvaluateInfoResultDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/result/EvaluateInfoResultDTO.java new file mode 100644 index 000000000..b40fea6e6 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/result/EvaluateInfoResultDTO.java @@ -0,0 +1,107 @@ +/** + * 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.evaluate.result; + +import com.elink.esua.epdc.dto.evaluate.EvaluateSelectOption; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; + + +/** + * 评价信息表 评价信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-06 + */ +@Data +public class EvaluateInfoResultDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 提交人姓名 + */ + private String fullName; + + /** + * 联系电话 + */ + private String mobile; + + /** + * 干部ID 干部信息表主键 + */ + private String officerId; + + /** + * 评价类别(1.点赞,2.吐槽) + */ + private Integer roleCode; + + /** + * 评价内容 + */ + private String content; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 删除标识 0:否,1:是 + */ + private String delFlag; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + private Integer optionCount; + + /** + * 评价选项 + */ + private List optionsList; + + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/result/EvaluateOfficerAppResultDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/result/EvaluateOfficerAppResultDTO.java new file mode 100644 index 000000000..085570500 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/result/EvaluateOfficerAppResultDTO.java @@ -0,0 +1,60 @@ +/** + * 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.evaluate.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 干部信息表 干部信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@Data +public class EvaluateOfficerAppResultDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String officerId; + + + + /** + * 姓名 + */ + private String fullName; + + /** + * 性别(0-女,1-男) + */ + private String sex; + + /** + * 职位 + */ + private String position; + + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/result/EvaluateOfficerCountResultDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/result/EvaluateOfficerCountResultDTO.java new file mode 100644 index 000000000..f9ff4f248 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/result/EvaluateOfficerCountResultDTO.java @@ -0,0 +1,127 @@ +/** + * 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.evaluate.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 干部信息表 干部信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@Data +public class EvaluateOfficerCountResultDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 部门ID 部门表主键ID + */ + private String deptId; + + /** + * 姓名 + */ + private String fullName; + + /** + * 性别(0-女,1-男) + */ + private String sex; + + /** + * 职位 + */ + private String position; + + /** + * 点赞次数 + */ + private Integer likesCount; + + /** + * 评价总人数 + */ + private Integer evaluatePeopleCount; + + /** + * 评价总次数 + */ + private Integer evaluateCount; + + /** + * 点赞选项次数 + */ + private Integer likesOptionCount; + + /** + * 吐槽选项次数 + */ + private Integer opposeOptionCount; + + /** + * 被踩次数 + */ + private Integer opposeCount; + + /** + * 排序 + */ + private Integer sort; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 删除标识 0:否,1:是 + */ + private String delFlag; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/result/EvaluateOptionAppResultDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/result/EvaluateOptionAppResultDTO.java new file mode 100644 index 000000000..a8b6be60d --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/result/EvaluateOptionAppResultDTO.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.dto.evaluate.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 评价选项表 评价选项表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@Data +public class EvaluateOptionAppResultDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String optionId; + + /** + * 权限编码(1.点赞,2.吐槽) + */ + private Integer roleCode; + + /** + * 评价选项 + */ + private String optionContent; + + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/result/RoleDictDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/result/RoleDictDTO.java new file mode 100644 index 000000000..4fc574460 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/result/RoleDictDTO.java @@ -0,0 +1,23 @@ + +package com.elink.esua.epdc.dto.evaluate.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * role表下拉字典项 + * + * @author wgf + * @date 2020/02/10 09:29 + */ +@Data +public class RoleDictDTO implements Serializable { + + private static final long serialVersionUID = -4827806651372425347L; + + private String dictName; + + private Integer dictValue; + +} diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/result/RoleResultDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/result/RoleResultDTO.java new file mode 100644 index 000000000..921fa3fda --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/result/RoleResultDTO.java @@ -0,0 +1,22 @@ + +package com.elink.esua.epdc.dto.evaluate.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * role表下拉字典项 + * + * @author wgf + * @date 2020/02/10 09:29 + */ +@Data +public class RoleResultDTO implements Serializable { + + private static final long serialVersionUID = -4827806651372425347L; + + private String available; + + +} diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/controller/EvaluateDeptController.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/controller/EvaluateDeptController.java new file mode 100644 index 000000000..eca3acced --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/controller/EvaluateDeptController.java @@ -0,0 +1,109 @@ +/** + * 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.modules.evaluate.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.evaluate.result.EvaluateDeptCountResultDTO; +import com.elink.esua.epdc.dto.evaluate.EvaluateDeptDTO; +import com.elink.esua.epdc.modules.evaluate.excel.EvaluateDeptCountExcel; +import com.elink.esua.epdc.modules.evaluate.excel.EvaluateDeptExcel; +import com.elink.esua.epdc.modules.evaluate.service.EvaluateDeptService; +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 qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@RestController +@RequestMapping("evaluatedept") +public class EvaluateDeptController { + + @Autowired + private EvaluateDeptService evaluateDeptService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + //PageData page = evaluateDeptService.page(params); + PageData page = evaluateDeptService.getDeptPage(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + EvaluateDeptDTO data = evaluateDeptService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody EvaluateDeptDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + evaluateDeptService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody EvaluateDeptDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + evaluateDeptService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + evaluateDeptService.delete(ids); + return new Result(); + } + @GetMapping("countPage") + public Result> countPage(@RequestParam Map params){ + PageData page = evaluateDeptService.getEvaluateDeptCountPage(params); + System.out.println(params); + return new Result>().ok(page); + } + @GetMapping("countExport") + public void countExport(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = evaluateDeptService.countExport(params); + + ExcelUtils.exportExcelToTarget(response, null, list, EvaluateDeptCountExcel.class); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = evaluateDeptService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, EvaluateDeptExcel.class); + } + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/controller/EvaluateDetailController.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/controller/EvaluateDetailController.java new file mode 100644 index 000000000..8d0788f91 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/controller/EvaluateDetailController.java @@ -0,0 +1,94 @@ +/** + * 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.modules.evaluate.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.UpdateGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.dto.evaluate.EvaluateDetailDTO; +import com.elink.esua.epdc.modules.evaluate.excel.EvaluateDetailExcel; +import com.elink.esua.epdc.modules.evaluate.service.EvaluateDetailService; +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 qu qu@elink-cn.com + * @since v1.0.0 2020-02-06 + */ +@RestController +@RequestMapping("evaluatedetail") +public class EvaluateDetailController { + + @Autowired + private EvaluateDetailService evaluateDetailService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = evaluateDetailService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + EvaluateDetailDTO data = evaluateDetailService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody EvaluateDetailDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + evaluateDetailService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody EvaluateDetailDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + evaluateDetailService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + evaluateDetailService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = evaluateDetailService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, EvaluateDetailExcel.class); + } + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/controller/EvaluateInfoController.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/controller/EvaluateInfoController.java new file mode 100644 index 000000000..5e7893ab7 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/controller/EvaluateInfoController.java @@ -0,0 +1,103 @@ +/** + * 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.modules.evaluate.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.UpdateGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.dto.evaluate.EvaluateInfoDTO; +import com.elink.esua.epdc.dto.evaluate.form.EvaluateSubmitFormDTO; +import com.elink.esua.epdc.dto.evaluate.result.EvaluateInfoResultDTO; +import com.elink.esua.epdc.modules.evaluate.excel.EvaluateInfoExcel; +import com.elink.esua.epdc.modules.evaluate.service.EvaluateDetailService; +import com.elink.esua.epdc.modules.evaluate.service.EvaluateInfoService; +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 qu qu@elink-cn.com + * @since v1.0.0 2020-02-06 + */ +@RestController +@RequestMapping("evaluateinfo") +public class EvaluateInfoController { + + @Autowired + private EvaluateInfoService evaluateInfoService; + + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = evaluateInfoService.infoPage(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + EvaluateInfoDTO data = evaluateInfoService.get(id); + return new Result().ok(data); + } + @PostMapping("evaluateSubmit") + public Result evaluateSubmit(@RequestBody EvaluateSubmitFormDTO formDto){ + ValidatorUtils.validateEntity(formDto); + return evaluateInfoService.evaluateSubmit(formDto); + } + + @PostMapping + public Result save(@RequestBody EvaluateInfoDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + evaluateInfoService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody EvaluateInfoDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + evaluateInfoService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + evaluateInfoService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = evaluateInfoService.listExport(params); + ExcelUtils.exportExcelToTarget(response, null, list, EvaluateInfoExcel.class); + } + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/controller/EvaluateOfficerController.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/controller/EvaluateOfficerController.java new file mode 100644 index 000000000..06f540797 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/controller/EvaluateOfficerController.java @@ -0,0 +1,129 @@ +/** + * 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.modules.evaluate.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.evaluate.form.EvaluateOfficerAppFormDTO; +import com.elink.esua.epdc.dto.evaluate.result.EvaluateOfficerAppResultDTO; +import com.elink.esua.epdc.dto.evaluate.result.EvaluateOfficerCountResultDTO; +import com.elink.esua.epdc.dto.evaluate.EvaluateOfficerDTO; +import com.elink.esua.epdc.modules.evaluate.excel.EvaluateOfficerCountExcel; +import com.elink.esua.epdc.modules.evaluate.excel.EvaluateOfficerExcel; +import com.elink.esua.epdc.modules.evaluate.service.EvaluateOfficerService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 干部信息表 干部信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@RestController +@RequestMapping("evaluateofficer") +public class EvaluateOfficerController { + + @Autowired + private EvaluateOfficerService evaluateOfficerService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + //PageData page = evaluateOfficerService.page(params); + PageData page = evaluateOfficerService.getOfficerPage(params); + return new Result>().ok(page); + } + @GetMapping("countPage") + public Result> countPage(@RequestParam Map params){ + PageData page = evaluateOfficerService.getEvaluateOfficerCountPage(params); + System.out.println(params); + return new Result>().ok(page); + } + @GetMapping("countExport") + public void countExport(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = evaluateOfficerService.countExport(params); + ExcelUtils.exportExcelToTarget(response, null, list, EvaluateOfficerCountExcel.class); + } + @GetMapping("getDeptOfficer") + public Result> getDeptOfficer(@RequestBody EvaluateOfficerAppFormDTO formDto){ + ValidatorUtils.validateEntity(formDto); + List list = evaluateOfficerService.getDeptOfficer(formDto); + return new Result>().ok(list); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + EvaluateOfficerDTO data = evaluateOfficerService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody EvaluateOfficerDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + evaluateOfficerService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody EvaluateOfficerDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + evaluateOfficerService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + evaluateOfficerService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = evaluateOfficerService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, EvaluateOfficerExcel.class); + } + + /*** + * 导入分类Excel表格 + * @Author wanggongfeng + * @Description excle层级导入 ,@PathVariable("deptId") String deptId + * @Date 2020/02/07 8:20 + */ + @PostMapping("importExcel/{deptId}") + public Result importExcel(@RequestParam("file") MultipartFile file, @PathVariable("deptId") String deptId) { + return evaluateOfficerService.insertPartyList(file, deptId); + //return new Result(); + } + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/controller/EvaluateOptionController.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/controller/EvaluateOptionController.java new file mode 100644 index 000000000..2a03a0e4c --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/controller/EvaluateOptionController.java @@ -0,0 +1,137 @@ +/** + * 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.modules.evaluate.controller; + +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +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.evaluate.EvaluateOptionDTO; +import com.elink.esua.epdc.dto.evaluate.EvaluateOptions; +import com.elink.esua.epdc.dto.evaluate.form.EvaluateOptionAppFormDTO; +import com.elink.esua.epdc.dto.evaluate.form.EvaluateOptionFormDTO; +import com.elink.esua.epdc.dto.evaluate.result.EvaluateOptionAppResultDTO; +import com.elink.esua.epdc.dto.evaluate.result.RoleDictDTO; +import com.elink.esua.epdc.modules.evaluate.excel.EvaluateOptionExcel; +import com.elink.esua.epdc.modules.evaluate.service.EvaluateOptionService; +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 qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@RestController +@RequestMapping("evaluateoption") +public class EvaluateOptionController { + + @Autowired + private EvaluateOptionService evaluateOptionService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + //PageData page = evaluateOptionService.page(params); + PageData page = evaluateOptionService.getOptionPage(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + EvaluateOptionDTO data = evaluateOptionService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody EvaluateOptionDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + evaluateOptionService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody EvaluateOptionDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + evaluateOptionService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + evaluateOptionService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = evaluateOptionService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, EvaluateOptionExcel.class); + } + @GetMapping("getOptionList") + public Result> getOptionList(@RequestBody EvaluateOptionAppFormDTO formDto){ + ValidatorUtils.validateEntity(formDto); + List list = evaluateOptionService.getOptionList(formDto); + return new Result>().ok(list); + } + @GetMapping("optionShowList") + public Result optionShowList(){ + List optionList = evaluateOptionService.optionShowList(); + EvaluateOptions evalOption = new EvaluateOptions(); + evalOption.setOptionList(optionList); + return new Result().ok(evalOption); + } + + /** + * 更新可用标记 + * @param evaluateOptionFormDTO + * @Author: wanggongfeng + * @return + */ + @PostMapping("updateOptionInfo") + public Result updateOptionInfo(@RequestBody EvaluateOptionFormDTO evaluateOptionFormDTO){ + EvaluateOptionDTO dto = ConvertUtils.sourceToTarget(evaluateOptionFormDTO, EvaluateOptionDTO.class); + evaluateOptionService.update(dto); + return new Result(); + } + + /** + * role表查询评价类别 + * @return + */ + @GetMapping("listSimple") + public Result> listSimpleDictInfo() { + // 字典分类数据 + return evaluateOptionService.listSimpleDictInfo(); + } + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/controller/EvaluateRoleController.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/controller/EvaluateRoleController.java new file mode 100644 index 000000000..12b46ff24 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/controller/EvaluateRoleController.java @@ -0,0 +1,131 @@ +/** + * 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.modules.evaluate.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.evaluate.EvaluateRoleDTO; +import com.elink.esua.epdc.dto.evaluate.form.EvaluateRoleFormDTO; +import com.elink.esua.epdc.dto.evaluate.result.RoleResultDTO; +import com.elink.esua.epdc.modules.evaluate.excel.EvaluateRoleExcel; +import com.elink.esua.epdc.modules.evaluate.service.EvaluateRoleService; +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 qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@RestController +@RequestMapping("evaluaterole") +public class EvaluateRoleController { + + @Autowired + private EvaluateRoleService evaluateRoleService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = evaluateRoleService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + EvaluateRoleDTO data = evaluateRoleService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody EvaluateRoleDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + evaluateRoleService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody EvaluateRoleDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + evaluateRoleService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + evaluateRoleService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = evaluateRoleService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, EvaluateRoleExcel.class); + } + + /** + * 获取可用标记 + * @Author: wanggongfeng + * @return + */ + @GetMapping("getAvailable") + public Result getAvailable(){ + EvaluateRoleDTO data = evaluateRoleService.getAvailable(); + return new Result().ok(data); + } + /** + * 获取可用标记 + * @Author: wanggongfeng + * @return + */ + @GetMapping("getAppAvailable") + public Result getAppAvailable(){ + EvaluateRoleDTO data = evaluateRoleService.getAvailable(); + RoleResultDTO role = new RoleResultDTO(); + role.setAvailable(data.getAvailable()); + return new Result().ok(role); + } + + /** + * 更新可用标记 + * @param evaluateRoleFormDTO + * @Author: wanggongfeng + * @return + */ + @PostMapping("updateRoleInfo") + public Result updateRoleInfo(@RequestBody EvaluateRoleFormDTO evaluateRoleFormDTO){ + evaluateRoleService.updateAll(evaluateRoleFormDTO); + return new Result(); + } + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/dao/EvaluateDeptDao.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/dao/EvaluateDeptDao.java new file mode 100644 index 000000000..dda627b08 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/dao/EvaluateDeptDao.java @@ -0,0 +1,51 @@ +/** + * 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.modules.evaluate.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.dto.evaluate.result.EvaluateDeptCountResultDTO; +import com.elink.esua.epdc.dto.evaluate.EvaluateDeptDTO; +import com.elink.esua.epdc.modules.evaluate.entity.EvaluateDeptEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; +import java.util.Map; + +/** + * 评价部门表 评价部门表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@Mapper +public interface EvaluateDeptDao extends BaseDao { + /** + * 条件查询 + * @param params + * @return + */ + List getDeptPage(Map params); + /** + * 部门统计列表 + * @Params: [params] + * @Return: java.util.List + * @Author: liuchuang + * @Date: 2019/9/5 19:42 + */ + List getEvaluateDeptCount(Map params); +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/dao/EvaluateDetailDao.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/dao/EvaluateDetailDao.java new file mode 100644 index 000000000..614cbb1ca --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/dao/EvaluateDetailDao.java @@ -0,0 +1,33 @@ +/** + * 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.modules.evaluate.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.modules.evaluate.entity.EvaluateDetailEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 评价详情表 评价详情表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-06 + */ +@Mapper +public interface EvaluateDetailDao extends BaseDao { + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/dao/EvaluateInfoDao.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/dao/EvaluateInfoDao.java new file mode 100644 index 000000000..dfb2d805a --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/dao/EvaluateInfoDao.java @@ -0,0 +1,44 @@ +/** + * 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.modules.evaluate.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.dto.evaluate.result.EvaluateInfoResultDTO; +import com.elink.esua.epdc.modules.evaluate.entity.EvaluateInfoEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; +import java.util.Map; + +/** + * 评价信息表 评价信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-06 + */ +@Mapper +public interface EvaluateInfoDao extends BaseDao { + + /** + * 条件查询 + * @param params + * @return + */ + List getInfoPage(Map params); + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/dao/EvaluateOfficerDao.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/dao/EvaluateOfficerDao.java new file mode 100644 index 000000000..237609bfa --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/dao/EvaluateOfficerDao.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.modules.evaluate.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.dto.evaluate.EvaluateOfficerDTO; +import com.elink.esua.epdc.dto.evaluate.EvaluateUpdateDeptOfficerCountDTO; +import com.elink.esua.epdc.dto.evaluate.form.EvaluateOfficerAppFormDTO; +import com.elink.esua.epdc.dto.evaluate.result.EvaluateOfficerAppResultDTO; +import com.elink.esua.epdc.dto.evaluate.result.EvaluateOfficerCountResultDTO; +import com.elink.esua.epdc.modules.evaluate.entity.EvaluateOfficerEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +/** + * 干部信息表 干部信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@Mapper +public interface EvaluateOfficerDao extends BaseDao { + /** + * 条件查询 + * @param params + * @return + */ + List getOfficerPage(Map params); + + void updateCount(@Param("id")String id,@Param("type")String type); + + /** + * 数据批量插入 + * @param evaluateOfficerEntities + */ + void insertList(@Param("evaluateOfficerEntities")EvaluateOfficerEntity[] evaluateOfficerEntities); + + /** + * 清空当前街道数据 + * @param deptId + */ + void deleteByDeptId(@Param("deptId")String deptId); + /** + * 干部统计列表 + * @Params: [params] + * @Return: java.util.List + * @Author: liuchuang + * @Date: 2019/9/5 19:42 + */ + List getEvaluateOfficerCount(Map params); + + /** + * 干部列表 + * @param formDto + */ + List getDeptOfficer(EvaluateOfficerAppFormDTO formDto); + + /** + * 街道干部管理表干部人数加1 + * @param deptId + */ + void officerCountAddOne(@Param("deptId")String deptId); + + /** + * 街道干部管理表干部人数减少对应数量 + * @param evaluateUpdateDeptOfficerCountDTO + */ + void updateOfficerCount(EvaluateUpdateDeptOfficerCountDTO evaluateUpdateDeptOfficerCountDTO); + + /** + * 导入操作时更新街道干部管理表干部人数 + * @param evaluateUpdateDeptOfficerCountDTO + */ + void updateOfficerCountByDeptId(EvaluateUpdateDeptOfficerCountDTO evaluateUpdateDeptOfficerCountDTO); + + // 清空该人员相关评价数据 + void deleteEvaluateInfoById(@Param("ids")String[] ids); + + void deleteEvaluateDetailById(@Param("ids")String[] ids); + + void deleteEvaluateDetailByDeptId(@Param("deptId")String deptId); + + void deleteEvaluateInfoByDeptId(@Param("deptId")String deptId); +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/dao/EvaluateOptionDao.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/dao/EvaluateOptionDao.java new file mode 100644 index 000000000..429b53d93 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/dao/EvaluateOptionDao.java @@ -0,0 +1,63 @@ +/** + * 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.modules.evaluate.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.dto.evaluate.EvaluateOptionDTO; +import com.elink.esua.epdc.dto.evaluate.form.EvaluateOptionAppFormDTO; +import com.elink.esua.epdc.dto.evaluate.result.EvaluateOptionAppResultDTO; +import com.elink.esua.epdc.dto.evaluate.result.RoleDictDTO; +import com.elink.esua.epdc.modules.evaluate.entity.EvaluateOptionEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; +import java.util.Map; + +/** + * 评价选项表 评价选项表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@Mapper +public interface EvaluateOptionDao extends BaseDao { + /** + * 条件查询 + * @param params + * @return + */ + List getOptionPage(Map params); + + /** + * 选项列表 + * @param formDto + * @return + */ + List getOptionList(EvaluateOptionAppFormDTO formDto); + /** + * 选项显示列表(后台) + * @return + */ + List optionShowList(); + + /** + * role表查询评价类别(后台) + * @return + */ + List listSimpleDictInfo(); +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/dao/EvaluateRoleDao.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/dao/EvaluateRoleDao.java new file mode 100644 index 000000000..8245eb2c3 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/dao/EvaluateRoleDao.java @@ -0,0 +1,43 @@ +/** + * 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.modules.evaluate.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.modules.evaluate.entity.EvaluateRoleEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 评价权限表 评价权限表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@Mapper +public interface EvaluateRoleDao extends BaseDao { + /** + * 获取启用状态 + * @return + */ + EvaluateRoleEntity getAvailable(); + + /** + * 更新全部 + * @param entity + */ + void updateAll(EvaluateRoleEntity entity); +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/entity/EvaluateDeptEntity.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/entity/EvaluateDeptEntity.java new file mode 100644 index 000000000..aceec954d --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/entity/EvaluateDeptEntity.java @@ -0,0 +1,73 @@ +/** + * 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.modules.evaluate.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 评价部门表 评价部门表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_evaluate_dept") +public class EvaluateDeptEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 部门ID + */ + private String deptId; + + /** + * 部门名称 + */ + private String deptName; + + /** + * 父所有部门ID + */ + private String parentDeptIds; + + /** + * 父所有部门名称 + */ + private String parentDeptNames; + + /** + * 所有部门ID + */ + private String allDeptIds; + + /** + * 所有部门名称 + */ + private String allDeptNames; + + /** + * 干部人数 + */ + private Integer officerCount; + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/entity/EvaluateDetailEntity.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/entity/EvaluateDetailEntity.java new file mode 100644 index 000000000..eb3c9d66b --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/entity/EvaluateDetailEntity.java @@ -0,0 +1,61 @@ +/** + * 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.modules.evaluate.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 评价详情表 评价详情表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-06 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_evaluate_detail") +public class EvaluateDetailEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 信息ID 评价信息表主键 + */ + private String infoId; + + /** + * 评价类别(1.点赞,2.吐槽) + */ + private Integer roleCode; + + /** + * 选项ID 选项表主键 + */ + private String optionId; + + /** + * 是否选中(0-否,1-是) + */ + private String selectFlag; + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/entity/EvaluateInfoEntity.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/entity/EvaluateInfoEntity.java new file mode 100644 index 000000000..6bc0ee56f --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/entity/EvaluateInfoEntity.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.modules.evaluate.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 评价信息表 评价信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-06 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_evaluate_info") +public class EvaluateInfoEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 提交人姓名 + */ + private String fullName; + + /** + * 联系电话 + */ + private String mobile; + + /** + * 干部ID 干部信息表主键 + */ + private String officerId; + + /** + * 评价类别(1.点赞,2.吐槽) + */ + private Integer roleCode; + + /** + * 评价内容 + */ + private String content; + + private Integer optionCount; + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/entity/EvaluateOfficerEntity.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/entity/EvaluateOfficerEntity.java new file mode 100644 index 000000000..6c4de264f --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/entity/EvaluateOfficerEntity.java @@ -0,0 +1,73 @@ +/** + * 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.modules.evaluate.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 干部信息表 干部信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_evaluate_officer") +public class EvaluateOfficerEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 部门ID 部门表主键ID + */ + private String deptId; + + /** + * 姓名 + */ + private String fullName; + + /** + * 性别(0-女,1-男) + */ + private String sex; + + /** + * 职位 + */ + private String position; + + /** + * 点赞次数 + */ + private Integer likesCount; + + /** + * 被踩次数 + */ + private Integer opposeCount; + + /** + * 排序 + */ + private Integer sort; + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/entity/EvaluateOptionEntity.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/entity/EvaluateOptionEntity.java new file mode 100644 index 000000000..72b00037c --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/entity/EvaluateOptionEntity.java @@ -0,0 +1,58 @@ +/** + * 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.modules.evaluate.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 评价选项表 评价选项表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_evaluate_option") +public class EvaluateOptionEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 权限编码(1.点赞,2.吐槽) + */ + private Integer roleCode; + + /** + * 评价选项 + */ + private String optionContent; + + /** + * 显示顺序 + */ + private Integer sort; + + /** + * 可用标记(0-不可用,1-可用) + */ + private String available; + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/entity/EvaluateRoleEntity.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/entity/EvaluateRoleEntity.java new file mode 100644 index 000000000..c7b835811 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/entity/EvaluateRoleEntity.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.modules.evaluate.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 评价权限表 评价权限表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_evaluate_role") +public class EvaluateRoleEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 权限编码(1.点赞,2.吐槽) + */ + private Integer roleCode; + + /** + * 权限描述 + */ + private String ruleDesc; + + /** + * 可用标记(0-不可用,1-可用) + */ + private String available; + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/excel/EvaluateDeptCountExcel.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/excel/EvaluateDeptCountExcel.java new file mode 100644 index 000000000..eb5c6c191 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/excel/EvaluateDeptCountExcel.java @@ -0,0 +1,77 @@ +/** + * 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.modules.evaluate.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 评价部门表 评价部门表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@Data +public class EvaluateDeptCountExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "部门ID") + private String deptId; + + @Excel(name = "部门名称") + private String deptName; + + @Excel(name = "干部人数") + private Integer officerCount; + + /** + * 被评价干部人数 + */ + @Excel(name = "被评价干部人数") + private Integer beEvaluatedCount; + + /** + * 评价总人数 + */ + @Excel(name = "评价总人数") + private Integer evaluatePeopleCount; + + /** + * 评价总次数 + */ + @Excel(name = "评价总次数") + private Integer evaluateCount; + + /** + * 被点赞总次数 + */ + @Excel(name = "被点赞总次数") + private Integer likeCount; + + /** + * 被吐槽总次数 + */ + @Excel(name = "被吐槽总次数") + private Integer opposeCount; + + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/excel/EvaluateDeptExcel.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/excel/EvaluateDeptExcel.java new file mode 100644 index 000000000..12a59e621 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/excel/EvaluateDeptExcel.java @@ -0,0 +1,77 @@ +/** + * 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.modules.evaluate.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 评价部门表 评价部门表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@Data +public class EvaluateDeptExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "部门ID") + private String deptId; + + @Excel(name = "部门名称") + private String deptName; + + @Excel(name = "父所有部门ID") + private String parentDeptIds; + + @Excel(name = "父所有部门名称") + private String parentDeptNames; + + @Excel(name = "所有部门ID") + private String allDeptIds; + + @Excel(name = "所有部门名称") + private String allDeptNames; + + @Excel(name = "干部人数") + private Integer officerCount; + + @Excel(name = "删除标识 0:否,1:是") + private String delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/excel/EvaluateDetailExcel.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/excel/EvaluateDetailExcel.java new file mode 100644 index 000000000..372f2ee99 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/excel/EvaluateDetailExcel.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.modules.evaluate.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 评价详情表 评价详情表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-06 + */ +@Data +public class EvaluateDetailExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "信息ID 评价信息表主键") + private String infoId; + + @Excel(name = "评价类别(1.点赞,2.吐槽)") + private Integer roleCode; + + @Excel(name = "选项ID 选项表主键") + private String optionId; + + @Excel(name = "是否选中(0-否,1-是)") + private String selectFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "删除标识 0:否,1:是") + private String delFlag; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/excel/EvaluateInfoExcel.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/excel/EvaluateInfoExcel.java new file mode 100644 index 000000000..8240465fc --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/excel/EvaluateInfoExcel.java @@ -0,0 +1,71 @@ +/** + * 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.modules.evaluate.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 评价信息表 评价信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-06 + */ +@Data +public class EvaluateInfoExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "提交人姓名") + private String fullName; + + @Excel(name = "联系电话") + private String mobile; + + @Excel(name = "干部ID 干部信息表主键") + private String officerId; + + @Excel(name = "评价类别(1.点赞,2.吐槽)") + private Integer roleCode; + + @Excel(name = "评价内容") + private String content; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "删除标识 0:否,1:是") + private String delFlag; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/excel/EvaluateOfficerCountExcel.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/excel/EvaluateOfficerCountExcel.java new file mode 100644 index 000000000..a1368ded5 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/excel/EvaluateOfficerCountExcel.java @@ -0,0 +1,77 @@ +/** + * 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.modules.evaluate.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +/** + * 干部信息表 干部信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@Data +public class EvaluateOfficerCountExcel { + + /*@Excel(name = "主键") + private String id; + + @Excel(name = "部门ID 部门表主键ID") + private String deptId;*/ + + @Excel(name = "干部姓名") + private String fullName; + + @Excel(name = "性别", replace = {"女_0", "男_1"}) + private String sex; + + @Excel(name = "单位职务") + private String position; + + @Excel(name = "点赞次数") + private Integer likesCount; + + @Excel(name = "被踩次数") + private Integer opposeCount; + + /** + * 评价总人数 + */ + @Excel(name = "评价总人数") + private Integer evaluatePeopleCount; + + /** + * 评价总次数 + */ + @Excel(name = "评价总次数") + private Integer evaluateCount; + + /** + * 点赞选项次数 + */ + @Excel(name = "点赞选项次数") + private Integer likesOptionCount; + + /** + * 吐槽选项次数 + */ + @Excel(name = "吐槽选项次数") + private Integer opposeOptionCount; + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/excel/EvaluateOfficerExcel.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/excel/EvaluateOfficerExcel.java new file mode 100644 index 000000000..352dd730a --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/excel/EvaluateOfficerExcel.java @@ -0,0 +1,75 @@ +/** + * 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.modules.evaluate.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +/** + * 干部信息表 干部信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@Data +public class EvaluateOfficerExcel { + + /*@Excel(name = "主键") + private String id; + + @Excel(name = "部门ID 部门表主键ID") + private String deptId;*/ + + @Excel(name = "干部姓名") + private String fullName; + + @Excel(name = "性别", replace = {"女_0","男_1"}) + private String sex; + + @Excel(name = "单位职务") + private String position; + + @Excel(name = "点赞次数") + private Integer likesCount; + + @Excel(name = "被踩次数") + private Integer opposeCount; + + @Excel(name = "排序") + private Integer sort; + + /* @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "删除标识 0:否,1:是") + private String delFlag; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime;*/ + + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/excel/EvaluateOptionExcel.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/excel/EvaluateOptionExcel.java new file mode 100644 index 000000000..d6e30a50e --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/excel/EvaluateOptionExcel.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.modules.evaluate.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 评价选项表 评价选项表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@Data +public class EvaluateOptionExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "权限编码(1.点赞,2.吐槽)") + private Integer roleCode; + + @Excel(name = "评价选项") + private String optionContent; + + @Excel(name = "显示顺序") + private Integer sort; + + @Excel(name = "可用标记(0-不可用,1-可用)") + private String available; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "删除标识 0:否,1:是") + private String delFlag; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/excel/EvaluateRoleExcel.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/excel/EvaluateRoleExcel.java new file mode 100644 index 000000000..1b4d77f65 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/excel/EvaluateRoleExcel.java @@ -0,0 +1,65 @@ +/** + * 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.modules.evaluate.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 评价权限表 评价权限表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@Data +public class EvaluateRoleExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "权限编码(1.点赞,2.吐槽)") + private Integer roleCode; + + @Excel(name = "权限描述") + private String ruleDesc; + + @Excel(name = "可用标记(0-不可用,1-可用)") + private String available; + + @Excel(name = "删除标识 0:否,1:是") + private String delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/redis/EvaluateDeptRedis.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/redis/EvaluateDeptRedis.java new file mode 100644 index 000000000..4e52d30e6 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/redis/EvaluateDeptRedis.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.modules.evaluate.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 评价部门表 评价部门表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@Component +public class EvaluateDeptRedis { + @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-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/redis/EvaluateDetailRedis.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/redis/EvaluateDetailRedis.java new file mode 100644 index 000000000..a299a0f56 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/redis/EvaluateDetailRedis.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.modules.evaluate.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 评价详情表 评价详情表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-06 + */ +@Component +public class EvaluateDetailRedis { + @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-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/redis/EvaluateInfoRedis.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/redis/EvaluateInfoRedis.java new file mode 100644 index 000000000..f2bcf17df --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/redis/EvaluateInfoRedis.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.modules.evaluate.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 评价信息表 评价信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-06 + */ +@Component +public class EvaluateInfoRedis { + @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-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/redis/EvaluateOfficerRedis.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/redis/EvaluateOfficerRedis.java new file mode 100644 index 000000000..345915017 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/redis/EvaluateOfficerRedis.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.modules.evaluate.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 干部信息表 干部信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@Component +public class EvaluateOfficerRedis { + @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-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/redis/EvaluateOptionRedis.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/redis/EvaluateOptionRedis.java new file mode 100644 index 000000000..7fb78b5e9 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/redis/EvaluateOptionRedis.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.modules.evaluate.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 评价选项表 评价选项表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@Component +public class EvaluateOptionRedis { + @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-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/redis/EvaluateRoleRedis.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/redis/EvaluateRoleRedis.java new file mode 100644 index 000000000..0995767dd --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/redis/EvaluateRoleRedis.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.modules.evaluate.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 评价权限表 评价权限表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@Component +public class EvaluateRoleRedis { + @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-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/service/EvaluateDeptService.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/service/EvaluateDeptService.java new file mode 100644 index 000000000..b08cf1b24 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/service/EvaluateDeptService.java @@ -0,0 +1,105 @@ +/** + * 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.modules.evaluate.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.evaluate.result.EvaluateDeptCountResultDTO; +import com.elink.esua.epdc.dto.evaluate.EvaluateDeptDTO; +import com.elink.esua.epdc.modules.evaluate.entity.EvaluateDeptEntity; + +import java.util.List; +import java.util.Map; + +/** + * 评价部门表 评价部门表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +public interface EvaluateDeptService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-02-05 + */ + PageData page(Map params); + + /** + * 分页条件查询 + * @param params + * @return + */ + PageData getDeptPage(Map params); + + PageData getEvaluateDeptCountPage(Map params); + List countExport(Map params); + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-02-05 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return EvaluateDeptDTO + * @author generator + * @date 2020-02-05 + */ + EvaluateDeptDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-02-05 + */ + void save(EvaluateDeptDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-02-05 + */ + void update(EvaluateDeptDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-02-05 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/service/EvaluateDetailService.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/service/EvaluateDetailService.java new file mode 100644 index 000000000..6e9fdeb32 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/service/EvaluateDetailService.java @@ -0,0 +1,95 @@ +/** + * 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.modules.evaluate.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.evaluate.EvaluateDetailDTO; +import com.elink.esua.epdc.modules.evaluate.entity.EvaluateDetailEntity; + +import java.util.List; +import java.util.Map; + +/** + * 评价详情表 评价详情表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-06 + */ +public interface EvaluateDetailService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-02-06 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-02-06 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return EvaluateDetailDTO + * @author generator + * @date 2020-02-06 + */ + EvaluateDetailDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-02-06 + */ + void save(EvaluateDetailDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-02-06 + */ + void update(EvaluateDetailDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-02-06 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/service/EvaluateInfoService.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/service/EvaluateInfoService.java new file mode 100644 index 000000000..8ec99b331 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/service/EvaluateInfoService.java @@ -0,0 +1,111 @@ +/** + * 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.modules.evaluate.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.evaluate.EvaluateInfoDTO; +import com.elink.esua.epdc.dto.evaluate.form.EvaluateSubmitFormDTO; +import com.elink.esua.epdc.dto.evaluate.result.EvaluateInfoResultDTO; +import com.elink.esua.epdc.modules.evaluate.entity.EvaluateInfoEntity; + +import java.util.List; +import java.util.Map; + +/** + * 评价信息表 评价信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-06 + */ +public interface EvaluateInfoService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-02-06 + */ + PageData page(Map params); + + PageData infoPage(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-02-06 + */ + List list(Map params); + + List listExport(Map params); + + /** + * 单条查询 + * + * @param id + * @return EvaluateInfoDTO + * @author generator + * @date 2020-02-06 + */ + EvaluateInfoDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-02-06 + */ + void save(EvaluateInfoDTO dto); + /** + * 评价提交 + * + * @param formDto + * @return Result + * @author generator + * @date 2020-02-06 + */ + Result evaluateSubmit(EvaluateSubmitFormDTO formDto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-02-06 + */ + void update(EvaluateInfoDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-02-06 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/service/EvaluateOfficerService.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/service/EvaluateOfficerService.java new file mode 100644 index 000000000..1b8e4d9f8 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/service/EvaluateOfficerService.java @@ -0,0 +1,124 @@ +/** + * 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.modules.evaluate.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.evaluate.form.EvaluateOfficerAppFormDTO; +import com.elink.esua.epdc.dto.evaluate.result.EvaluateOfficerAppResultDTO; +import com.elink.esua.epdc.dto.evaluate.result.EvaluateOfficerCountResultDTO; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.evaluate.EvaluateOfficerDTO; +import com.elink.esua.epdc.modules.evaluate.entity.EvaluateOfficerEntity; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; +import java.util.Map; + +/** + * 干部信息表 干部信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +public interface EvaluateOfficerService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-02-05 + */ + PageData page(Map params); + + PageData getEvaluateOfficerCountPage(Map params); + List countExport(Map params); + + /** + * 获取街道干部列表 + * @param formDto + * @return + */ + List getDeptOfficer(EvaluateOfficerAppFormDTO formDto); + + /** + * 分页条件查询 + * @param params + * @return + */ + PageData getOfficerPage(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-02-05 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return EvaluateOfficerDTO + * @author generator + * @date 2020-02-05 + */ + EvaluateOfficerDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-02-05 + */ + void save(EvaluateOfficerDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-02-05 + */ + void update(EvaluateOfficerDTO dto); + + void updateCount(String id, String type); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-02-05 + */ + void delete(String[] ids); + + /*** + * 导入分类表格 + */ + Result insertPartyList(MultipartFile file, String deptId); +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/service/EvaluateOptionService.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/service/EvaluateOptionService.java new file mode 100644 index 000000000..1cf705db3 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/service/EvaluateOptionService.java @@ -0,0 +1,120 @@ +/** + * 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.modules.evaluate.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.evaluate.EvaluateOptionDTO; +import com.elink.esua.epdc.dto.evaluate.form.EvaluateOptionAppFormDTO; +import com.elink.esua.epdc.dto.evaluate.result.EvaluateOptionAppResultDTO; +import com.elink.esua.epdc.dto.evaluate.result.RoleDictDTO; +import com.elink.esua.epdc.modules.evaluate.entity.EvaluateOptionEntity; + +import java.util.List; +import java.util.Map; + +/** + * 评价选项表 评价选项表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +public interface EvaluateOptionService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-02-05 + */ + PageData page(Map params); + + /** + * 分页条件查询 + * @param params + * @return + */ + PageData getOptionPage(Map params); + + /** + * 获取评价选项列表 + * @param formDto + * @return + */ + List getOptionList(EvaluateOptionAppFormDTO formDto); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-02-05 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return EvaluateOptionDTO + * @author generator + * @date 2020-02-05 + */ + EvaluateOptionDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-02-05 + */ + void save(EvaluateOptionDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-02-05 + */ + void update(EvaluateOptionDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-02-05 + */ + void delete(String[] ids); + + List optionShowList(); + + /*** + * role表查询评价类别 + */ + Result> listSimpleDictInfo(); +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/service/EvaluateRoleService.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/service/EvaluateRoleService.java new file mode 100644 index 000000000..81f7e8744 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/service/EvaluateRoleService.java @@ -0,0 +1,115 @@ +/** + * 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.modules.evaluate.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.evaluate.EvaluateRoleDTO; +import com.elink.esua.epdc.dto.evaluate.form.EvaluateRoleFormDTO; +import com.elink.esua.epdc.modules.evaluate.entity.EvaluateRoleEntity; + +import java.util.List; +import java.util.Map; + +/** + * 评价权限表 评价权限表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +public interface EvaluateRoleService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-02-05 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-02-05 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return EvaluateRoleDTO + * @author generator + * @date 2020-02-05 + */ + EvaluateRoleDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-02-05 + */ + void save(EvaluateRoleDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-02-05 + */ + void update(EvaluateRoleDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-02-05 + */ + void delete(String[] ids); + + /** + * 获取可用标记 + * + * @return void + * @author generator + * @date 2020-02-05 + */ + EvaluateRoleDTO getAvailable(); + + /** + * 全部更新 + * + * @param dto + * @return void + * @author wanggongfeng + * @date 2020-02-07 + */ + void updateAll(EvaluateRoleFormDTO dto); +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/service/impl/EvaluateDeptServiceImpl.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/service/impl/EvaluateDeptServiceImpl.java new file mode 100644 index 000000000..dfeb171d5 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/service/impl/EvaluateDeptServiceImpl.java @@ -0,0 +1,129 @@ +/** + * 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.modules.evaluate.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.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.dto.evaluate.EvaluateDeptDTO; +import com.elink.esua.epdc.dto.evaluate.result.EvaluateDeptCountResultDTO; +import com.elink.esua.epdc.modules.evaluate.dao.EvaluateDeptDao; +import com.elink.esua.epdc.modules.evaluate.entity.EvaluateDeptEntity; +import com.elink.esua.epdc.modules.evaluate.redis.EvaluateDeptRedis; +import com.elink.esua.epdc.modules.evaluate.service.EvaluateDeptService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 评价部门表 评价部门表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@Service +public class EvaluateDeptServiceImpl extends BaseServiceImpl implements EvaluateDeptService { + + @Autowired + private EvaluateDeptRedis evaluateDeptRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, EvaluateDeptDTO.class); + } + @Override + public PageData getEvaluateDeptCountPage(Map params) { + IPage page = getPage(params); + List list = baseDao.getEvaluateDeptCount(params); + return new PageData<>(list, page.getTotal()); + } + @Override + public List countExport(Map params) { + List list = baseDao.getEvaluateDeptCount(params); + return list; + } + + + /** + * 条件查询 + * @param params + * @return + */ + @Override + public PageData getDeptPage(Map params) { + IPage page = getPage(params); + List list = baseDao.getDeptPage(params); + return new PageData<>(list, page.getTotal()); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, EvaluateDeptDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public EvaluateDeptDTO get(String id) { + EvaluateDeptEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, EvaluateDeptDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(EvaluateDeptDTO dto) { + EvaluateDeptEntity entity = ConvertUtils.sourceToTarget(dto, EvaluateDeptEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(EvaluateDeptDTO dto) { + EvaluateDeptEntity entity = ConvertUtils.sourceToTarget(dto, EvaluateDeptEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/service/impl/EvaluateDetailServiceImpl.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/service/impl/EvaluateDetailServiceImpl.java new file mode 100644 index 000000000..8c00eb792 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/service/impl/EvaluateDetailServiceImpl.java @@ -0,0 +1,104 @@ +/** + * 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.modules.evaluate.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.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.dto.evaluate.EvaluateDetailDTO; +import com.elink.esua.epdc.modules.evaluate.dao.EvaluateDetailDao; +import com.elink.esua.epdc.modules.evaluate.entity.EvaluateDetailEntity; +import com.elink.esua.epdc.modules.evaluate.redis.EvaluateDetailRedis; +import com.elink.esua.epdc.modules.evaluate.service.EvaluateDetailService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 评价详情表 评价详情表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-06 + */ +@Service +public class EvaluateDetailServiceImpl extends BaseServiceImpl implements EvaluateDetailService { + + @Autowired + private EvaluateDetailRedis evaluateDetailRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, EvaluateDetailDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, EvaluateDetailDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public EvaluateDetailDTO get(String id) { + EvaluateDetailEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, EvaluateDetailDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(EvaluateDetailDTO dto) { + EvaluateDetailEntity entity = ConvertUtils.sourceToTarget(dto, EvaluateDetailEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(EvaluateDetailDTO dto) { + EvaluateDetailEntity entity = ConvertUtils.sourceToTarget(dto, EvaluateDetailEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/service/impl/EvaluateInfoServiceImpl.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/service/impl/EvaluateInfoServiceImpl.java new file mode 100644 index 000000000..4ab649770 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/service/impl/EvaluateInfoServiceImpl.java @@ -0,0 +1,174 @@ +/** + * 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.modules.evaluate.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.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; + +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.evaluate.EvaluateDetailDTO; +import com.elink.esua.epdc.dto.evaluate.EvaluateInfoDTO; +import com.elink.esua.epdc.dto.evaluate.EvaluateOfficerDTO; +import com.elink.esua.epdc.dto.evaluate.EvaluateSelectOption; +import com.elink.esua.epdc.dto.evaluate.form.EvaluateSubmitFormDTO; +import com.elink.esua.epdc.dto.evaluate.result.EvaluateDeptCountResultDTO; +import com.elink.esua.epdc.dto.evaluate.result.EvaluateInfoResultDTO; +import com.elink.esua.epdc.modules.evaluate.dao.EvaluateInfoDao; +import com.elink.esua.epdc.modules.evaluate.entity.EvaluateInfoEntity; +import com.elink.esua.epdc.modules.evaluate.redis.EvaluateInfoRedis; +import com.elink.esua.epdc.modules.evaluate.service.EvaluateDetailService; +import com.elink.esua.epdc.modules.evaluate.service.EvaluateInfoService; +import com.elink.esua.epdc.modules.evaluate.service.EvaluateOfficerService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 评价信息表 评价信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-06 + */ +@Service +public class EvaluateInfoServiceImpl extends BaseServiceImpl implements EvaluateInfoService { + + @Autowired + private EvaluateInfoRedis evaluateInfoRedis; + + @Autowired + private EvaluateDetailService evaluateDetailService; + + @Autowired + private EvaluateOfficerService evaluateOfficerService; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, EvaluateInfoDTO.class); + } + @Override + public PageData infoPage(Map params) { + IPage page = getPage(params); + List list = baseDao.getInfoPage(params); + return new PageData<>(list, page.getTotal()); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, EvaluateInfoDTO.class); + } + + @Override + public List listExport(Map params) { + List list = baseDao.getInfoPage(params); + return list; + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public EvaluateInfoDTO get(String id) { + EvaluateInfoEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, EvaluateInfoDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(EvaluateInfoDTO dto) { + EvaluateInfoEntity entity = ConvertUtils.sourceToTarget(dto, EvaluateInfoEntity.class); + insert(entity); + } + @Override + @Transactional(rollbackFor = Exception.class) + public Result evaluateSubmit(EvaluateSubmitFormDTO formDto) { + try{ + EvaluateInfoDTO dto = new EvaluateInfoDTO(); + dto.setFullName(formDto.getFullName()); + dto.setMobile(formDto.getMobile()); + dto.setOfficerId(formDto.getOfficerId()); + dto.setContent(formDto.getContent()); + if (formDto.getRoleCode() != 1 + && formDto.getRoleCode() != 2) { + return new Result().error("评价选项错误。"); + } + int optionCount = 0; + //统计选项 + for (EvaluateSelectOption item : formDto.getOptionList()) { + if("1".equals(item.getSelectFlag())){ + optionCount++; + } + } + // 新增评价信息 + dto.setOptionCount(optionCount); + dto.setRoleCode(formDto.getRoleCode()); + EvaluateInfoEntity entity = ConvertUtils.sourceToTarget(dto, EvaluateInfoEntity.class); + insert(entity); + // 新增评价选项信息 + EvaluateDetailDTO detailDto = new EvaluateDetailDTO(); + for (EvaluateSelectOption item : formDto.getOptionList()) { + detailDto.setInfoId(entity.getId()); + detailDto.setOptionId(item.getOptionId()); + detailDto.setSelectFlag(item.getSelectFlag()); + detailDto.setRoleCode(formDto.getRoleCode()); + evaluateDetailService.save(detailDto); + } + evaluateOfficerService.updateCount(formDto.getOfficerId(),formDto.getRoleCode().toString()); + + }catch (Exception e){ + e.printStackTrace(); + } + + return new Result(); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(EvaluateInfoDTO dto) { + EvaluateInfoEntity entity = ConvertUtils.sourceToTarget(dto, EvaluateInfoEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/service/impl/EvaluateOfficerServiceImpl.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/service/impl/EvaluateOfficerServiceImpl.java new file mode 100644 index 000000000..0629931e5 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/service/impl/EvaluateOfficerServiceImpl.java @@ -0,0 +1,350 @@ +/** + * 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.modules.evaluate.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.constant.NumConstant; +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.utils.ConvertUtils; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.CompleteDeptDTO; +import com.elink.esua.epdc.dto.evaluate.EvaluateOfficerDTO; +import com.elink.esua.epdc.dto.evaluate.EvaluateRoleDTO; +import com.elink.esua.epdc.dto.evaluate.EvaluateUpdateDeptOfficerCountDTO; +import com.elink.esua.epdc.dto.evaluate.form.EvaluateOfficerAppFormDTO; +import com.elink.esua.epdc.dto.evaluate.result.EvaluateOfficerAppResultDTO; +import com.elink.esua.epdc.dto.evaluate.result.EvaluateOfficerCountResultDTO; +import com.elink.esua.epdc.modules.evaluate.dao.EvaluateOfficerDao; +import com.elink.esua.epdc.modules.evaluate.entity.EvaluateOfficerEntity; +import com.elink.esua.epdc.modules.evaluate.redis.EvaluateOfficerRedis; +import com.elink.esua.epdc.modules.evaluate.service.EvaluateOfficerService; +import com.elink.esua.epdc.modules.evaluate.service.EvaluateRoleService; +import com.elink.esua.epdc.modules.feign.SysFeignClient; +import org.apache.commons.lang3.StringUtils; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.Row; +import org.apache.poi.ss.usermodel.Sheet; +import org.apache.poi.ss.usermodel.Workbook; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.multipart.MultipartFile; + +import java.io.InputStream; +import java.text.SimpleDateFormat; +import java.util.*; + +/** + * 干部信息表 干部信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@Service +public class EvaluateOfficerServiceImpl extends BaseServiceImpl implements EvaluateOfficerService { + + private int totalRows = 0; // 总行数 + + private int totalCells = 0;// 总条数 + + public static int Guid = 100;//id自增值 + + @Autowired + private EvaluateOfficerRedis evaluateOfficerRedis; + @Autowired + private SysFeignClient sysFeignClient; + + @Autowired + private EvaluateRoleService evaluateRoleService; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, EvaluateOfficerDTO.class); + } + + @Override + public PageData getEvaluateOfficerCountPage(Map params) { + IPage page = getPage(params); + List list = baseDao.getEvaluateOfficerCount(params); + return new PageData<>(list, page.getTotal()); + } + + @Override + public List countExport(Map params) { + List list = baseDao.getEvaluateOfficerCount(params); + return list; + } + + @Override + public List getDeptOfficer(EvaluateOfficerAppFormDTO formDto) { + int pageIndex = (formDto.getPageIndex() - NumConstant.ONE) * formDto.getPageSize(); + formDto.setPageIndex(pageIndex); + Result completeDept = sysFeignClient.getCompleteDept(formDto.getGridId()); + if (!completeDept.success()) { + throw new RenException("获取街道失败"); + } + EvaluateRoleDTO data = evaluateRoleService.getAvailable(); + if (!"1".equals(data.getAvailable())) { + throw new RenException("评价功能停用"); + } + CompleteDeptDTO completeDeptDTO = completeDept.getData(); + formDto.setDeptId(completeDeptDTO.getStreetId()); + List list = baseDao.getDeptOfficer(formDto); + return list; + } + + /** + * 条件查询 + * + * @param params + * @return + */ + @Override + public PageData getOfficerPage(Map params) { + IPage page = getPage(params); + List list = baseDao.getOfficerPage(params); + return new PageData<>(list, page.getTotal()); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + return ConvertUtils.sourceToTarget(entityList, EvaluateOfficerDTO.class); + } + + private QueryWrapper getWrapper(Map params) { + String id = (String) params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public EvaluateOfficerDTO get(String id) { + EvaluateOfficerEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, EvaluateOfficerDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(EvaluateOfficerDTO dto) { + EvaluateOfficerEntity entity = ConvertUtils.sourceToTarget(dto, EvaluateOfficerEntity.class); + // 街道干部管理表干部人数加1 + String deptId = entity.getDeptId(); + insert(entity); + baseDao.officerCountAddOne(deptId); + + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(EvaluateOfficerDTO dto) { + EvaluateOfficerEntity entity = ConvertUtils.sourceToTarget(dto, EvaluateOfficerEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void updateCount(String id, String type) { + baseDao.updateCount(id, type); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + + // 街道干部管理表干部人数减少对应数量 + String id = ids[0]; + int num = ids.length; + EvaluateUpdateDeptOfficerCountDTO evaluateUpdateDeptOfficerCountDTO = new EvaluateUpdateDeptOfficerCountDTO(); + evaluateUpdateDeptOfficerCountDTO.setId(id); + evaluateUpdateDeptOfficerCountDTO.setOfficerCount(num); + baseDao.updateOfficerCount(evaluateUpdateDeptOfficerCountDTO); + + // 清空该人员相关评价数据 + baseDao.deleteEvaluateDetailById(ids); + baseDao.deleteEvaluateInfoById(ids); + + } + + @Override + public Result insertPartyList(MultipartFile file, String deptId) { + // 清空当前街道数据 + if (deptId != null && !"".equals(deptId)) { + baseDao.deleteByDeptId(deptId); + } + // 清空该人员相关评价数据 + baseDao.deleteEvaluateDetailByDeptId(deptId); + baseDao.deleteEvaluateInfoByDeptId(deptId); + + //获取excle版本 + String isExcel2003 = ExcelUtils.getExcelInfo(file); + Result result = new Result(); + //需存储的实体 + List list = new ArrayList(); + try { + Workbook wb = null; + InputStream is = file.getInputStream(); + if ("true".equals(isExcel2003)) { + // 当excel是2003时,创建excel2003 + wb = new HSSFWorkbook(is); + } else if ("false".equals(isExcel2003)) { + // 当excel是2007时,创建excel2007 + wb = new XSSFWorkbook(is); + } else { + result.setMsg("defeat"); + result.setCode(1); + result.setData("excle格式错误!"); + return result; + } + // 得到第一个shell + Sheet sheet = wb.getSheetAt(0); + // 得到Excel的行数 + this.totalRows = sheet.getPhysicalNumberOfRows(); + // 得到Excel的列数(前提是有行数) + if (totalRows > 1 && sheet.getRow(0) != null) { + this.totalCells = sheet.getRow(0).getPhysicalNumberOfCells(); + } + // 循环Excel行数(不要列名,从1开始) ;0是列名 + for (int r = 1; r < totalRows; r++) { + Row row = sheet.getRow(r); + if (row == null) { + continue; + } + EvaluateOfficerEntity evaluateOfficerEntity = new EvaluateOfficerEntity(); + // 循环Excel的列 + for (int c = 0; c < 6; c++) { + Cell cell = row.getCell(c); + if (null != cell) { + if (c == 0) { + // 干部姓名 + String value = ExcelUtils.getCellContent(cell); + evaluateOfficerEntity.setFullName(value); + + } else if (c == 1) { + // 性别 + String value = ExcelUtils.getCellContent(cell); + if ("女".equals(value)) { + value = "0"; + } else { + value = "1"; + } + evaluateOfficerEntity.setSex(value); + + } else if (c == 2) { + // 单位职务 + String value = ExcelUtils.getCellContent(cell); + evaluateOfficerEntity.setPosition(value); + + } else if (c == 3) { + // 点赞次数 + String value = ExcelUtils.getCellContent(cell); + evaluateOfficerEntity.setLikesCount(Integer.parseInt(value)); + + } else if (c == 4) { + // 被踩次数 + String value = ExcelUtils.getCellContent(cell); + evaluateOfficerEntity.setOpposeCount(Integer.parseInt(value)); + + } else if (c == 5) { + // 排序 + String value = ExcelUtils.getCellContent(cell); + evaluateOfficerEntity.setSort(Integer.parseInt(value)); + + } + + + } + } + evaluateOfficerEntity.setDeptId(deptId); + + String userId = SecurityUser.getUserId() == null ? "" : SecurityUser.getUserId().toString(); + evaluateOfficerEntity.setId(getLongRandom()); + evaluateOfficerEntity.setDelFlag("0");//删除标识 0:未删除 1:删除 + evaluateOfficerEntity.setRevision(0); + evaluateOfficerEntity.setCreatedBy(userId); + evaluateOfficerEntity.setUpdatedBy(userId); + evaluateOfficerEntity.setCreatedTime(new Date()); + evaluateOfficerEntity.setUpdatedTime(new Date()); + list.add(evaluateOfficerEntity); + } + if (list.size() > 0) { + EvaluateOfficerEntity[] evaluateOfficerEntities = new EvaluateOfficerEntity[list.size()]; + for (int k = 0; k < list.size(); k++) { + evaluateOfficerEntities[k] = list.get(k); + } + baseDao.insertList(evaluateOfficerEntities); + + // 导入操作时更新街道干部管理表干部人数 + int num = list.size(); + EvaluateUpdateDeptOfficerCountDTO evaluateUpdateDeptOfficerCountDTO = new EvaluateUpdateDeptOfficerCountDTO(); + evaluateUpdateDeptOfficerCountDTO.setDeptId(deptId); + evaluateUpdateDeptOfficerCountDTO.setOfficerCount(num); + baseDao.updateOfficerCountByDeptId(evaluateUpdateDeptOfficerCountDTO); + } + result.setMsg("success"); + result.setCode(0); + result.setData("数据导入成功!"); + return result; + } catch (Exception e) { + + } + result.setMsg("defeat"); + result.setCode(1); + result.setData("数据导入失败!"); + return result; + } + + /** + * 获取19位随机数 + * + * @return + */ + public String getLongRandom() { + Guid += 1; + long now = System.currentTimeMillis(); + SimpleDateFormat dateFormat = new SimpleDateFormat("MMdd"); + String time = dateFormat.format(now); + String currentTimeMillis = now + ""; + int ran = 0; + if (Guid > 999) { + Guid = 100; + } + ran = Guid; + String str = time + currentTimeMillis.substring(1, currentTimeMillis.length()) + ran; + return str; + } + + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/service/impl/EvaluateOptionServiceImpl.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/service/impl/EvaluateOptionServiceImpl.java new file mode 100644 index 000000000..7e4eef995 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/service/impl/EvaluateOptionServiceImpl.java @@ -0,0 +1,136 @@ +/** + * 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.modules.evaluate.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.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.evaluate.EvaluateOptionDTO; +import com.elink.esua.epdc.dto.evaluate.form.EvaluateOptionAppFormDTO; +import com.elink.esua.epdc.dto.evaluate.result.EvaluateOptionAppResultDTO; +import com.elink.esua.epdc.dto.evaluate.result.RoleDictDTO; +import com.elink.esua.epdc.modules.evaluate.dao.EvaluateOptionDao; +import com.elink.esua.epdc.modules.evaluate.entity.EvaluateOptionEntity; +import com.elink.esua.epdc.modules.evaluate.redis.EvaluateOptionRedis; +import com.elink.esua.epdc.modules.evaluate.service.EvaluateOptionService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 评价选项表 评价选项表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@Service +public class EvaluateOptionServiceImpl extends BaseServiceImpl implements EvaluateOptionService { + + @Autowired + private EvaluateOptionRedis evaluateOptionRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, EvaluateOptionDTO.class); + } + @Override + public List getOptionList(EvaluateOptionAppFormDTO formDto) { + List list = baseDao.getOptionList(formDto); + return list; + } + @Override + public List optionShowList() { + List list = baseDao.optionShowList(); + return list; + } + + /** + * 条件查询 + * @param params + * @return + */ + @Override + public PageData getOptionPage(Map params) { + IPage page = getPage(params); + List list = baseDao.getOptionPage(params); + return new PageData<>(list, page.getTotal()); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, EvaluateOptionDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public EvaluateOptionDTO get(String id) { + EvaluateOptionEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, EvaluateOptionDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(EvaluateOptionDTO dto) { + EvaluateOptionEntity entity = ConvertUtils.sourceToTarget(dto, EvaluateOptionEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(EvaluateOptionDTO dto) { + EvaluateOptionEntity entity = ConvertUtils.sourceToTarget(dto, EvaluateOptionEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public Result> listSimpleDictInfo() { + List result = baseDao.listSimpleDictInfo(); + return new Result>().ok(result); + } + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/service/impl/EvaluateRoleServiceImpl.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/service/impl/EvaluateRoleServiceImpl.java new file mode 100644 index 000000000..b00a5a3a5 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/service/impl/EvaluateRoleServiceImpl.java @@ -0,0 +1,118 @@ +/** + * 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.modules.evaluate.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.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.dto.evaluate.EvaluateRoleDTO; +import com.elink.esua.epdc.dto.evaluate.form.EvaluateRoleFormDTO; +import com.elink.esua.epdc.modules.evaluate.dao.EvaluateRoleDao; +import com.elink.esua.epdc.modules.evaluate.entity.EvaluateRoleEntity; +import com.elink.esua.epdc.modules.evaluate.redis.EvaluateRoleRedis; +import com.elink.esua.epdc.modules.evaluate.service.EvaluateRoleService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 评价权限表 评价权限表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-05 + */ +@Service +public class EvaluateRoleServiceImpl extends BaseServiceImpl implements EvaluateRoleService { + + @Autowired + private EvaluateRoleRedis evaluateRoleRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, EvaluateRoleDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, EvaluateRoleDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public EvaluateRoleDTO get(String id) { + EvaluateRoleEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, EvaluateRoleDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(EvaluateRoleDTO dto) { + EvaluateRoleEntity entity = ConvertUtils.sourceToTarget(dto, EvaluateRoleEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(EvaluateRoleDTO dto) { + EvaluateRoleEntity entity = ConvertUtils.sourceToTarget(dto, EvaluateRoleEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public EvaluateRoleDTO getAvailable() { + EvaluateRoleEntity entity = baseDao.getAvailable(); + return ConvertUtils.sourceToTarget(entity, EvaluateRoleDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void updateAll(EvaluateRoleFormDTO dto) { + EvaluateRoleEntity entity = ConvertUtils.sourceToTarget(dto, EvaluateRoleEntity.class); + baseDao.updateAll(entity); + } + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/feign/SysFeignClient.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/feign/SysFeignClient.java new file mode 100644 index 000000000..e7135d46e --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/feign/SysFeignClient.java @@ -0,0 +1,34 @@ +package com.elink.esua.epdc.modules.feign; + +import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.CompleteDeptDTO; +import com.elink.esua.epdc.dto.DeptGridPlatformDTO; +import com.elink.esua.epdc.dto.SysDeptDTO; +import com.elink.esua.epdc.modules.feign.fallback.SysFeignClientFallback; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; + +import java.util.List; + +/** + * @author lipf + * @email yujintao@elink-cn.com + * @date 2020/2/7 9:30 + */ +@FeignClient(name = ServiceConstant.EPDC_ADMIN_SERVER, fallback = SysFeignClientFallback.class) +public interface SysFeignClient { + + /** + * 根据网格ID获取所有上级机构名称和ID + * + * @param gridId + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author yujintao + * @date 2019/9/7 09:31 + */ + @GetMapping("sys/dept/getCompleteDept/{gridId}") + Result getCompleteDept(@PathVariable("gridId") Long gridId); +} diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/feign/fallback/SysFeignClientFallback.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/feign/fallback/SysFeignClientFallback.java new file mode 100644 index 000000000..7ac298d85 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/feign/fallback/SysFeignClientFallback.java @@ -0,0 +1,27 @@ +package com.elink.esua.epdc.modules.feign.fallback; + +import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; +import com.elink.esua.epdc.commons.tools.utils.ModuleUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.CompleteDeptDTO; +import com.elink.esua.epdc.dto.DeptGridPlatformDTO; +import com.elink.esua.epdc.dto.SysDeptDTO; +import com.elink.esua.epdc.modules.feign.SysFeignClient; +import org.springframework.stereotype.Component; +import org.springframework.web.bind.annotation.PathVariable; + +import java.util.List; + +/** + * @author lipf + * @email yujintao@elink-cn.com + * @date 2020/2/7 9:30 + */ +@Component +public class SysFeignClientFallback implements SysFeignClient { + + @Override + public Result getCompleteDept(Long gridId) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "getCompleteDept", gridId); + } +} diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/application.yml b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/application.yml index 0a0634ba2..c27e7a5c2 100644 --- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/application.yml +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/application.yml @@ -4,6 +4,8 @@ server: context-path: /custom spring: + main: + allow-bean-definition-overriding: true application: name: epdc-custom-server # 环境 dev|test|prod diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/evaluate/EvaluateDeptDao.xml b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/evaluate/EvaluateDeptDao.xml new file mode 100644 index 000000000..bc6d4b135 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/evaluate/EvaluateDeptDao.xml @@ -0,0 +1,198 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/evaluate/EvaluateDetailDao.xml b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/evaluate/EvaluateDetailDao.xml new file mode 100644 index 000000000..a5367b3cf --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/evaluate/EvaluateDetailDao.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/evaluate/EvaluateInfoDao.xml b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/evaluate/EvaluateInfoDao.xml new file mode 100644 index 000000000..5ec4fef8b --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/evaluate/EvaluateInfoDao.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/evaluate/EvaluateOfficerDao.xml b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/evaluate/EvaluateOfficerDao.xml new file mode 100644 index 000000000..6d8aeb995 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/evaluate/EvaluateOfficerDao.xml @@ -0,0 +1,297 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + insert into epdc_evaluate_officer + (id, + DEPT_ID, + FULL_NAME, + SEX, + POSITION, + LIKES_COUNT, + OPPOSE_COUNT, + SORT, + REVISION, + DEL_FLAG, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME) + values + + (#{item.id}, + #{item.deptId}, + #{item.fullName}, + #{item.sex}, + #{item.position}, + #{item.likesCount}, + #{item.opposeCount}, + #{item.sort}, + #{item.revision}, + #{item.delFlag}, + #{item.createdBy}, + #{item.createdTime}, + #{item.updatedBy}, + #{item.updatedTime}) + + + + update epdc_evaluate_officer set DEL_FLAG = '1' where DEPT_ID = #{deptId} + + + + UPDATE epdc_evaluate_officer SET + + LIKES_COUNT = LIKES_COUNT + 1 + + + OPPOSE_COUNT = OPPOSE_COUNT + 1 + + where ID = #{id} and DEL_FLAG = '0' + + + + update epdc_evaluate_dept set OFFICER_COUNT = OFFICER_COUNT+1 where DEPT_ID = #{deptId} + + + + update epdc_evaluate_dept set OFFICER_COUNT = OFFICER_COUNT- #{officerCount} where DEPT_ID = (select eeo.DEPT_ID from epdc_evaluate_officer eeo where eeo.id = #{id}) + + + + update epdc_evaluate_dept set OFFICER_COUNT = #{officerCount} where DEPT_ID = #{deptId} + + + + update epdc_evaluate_info set DEL_FLAG = '1' where OFFICER_ID in + + #{id} + + + + + update epdc_evaluate_detail set DEL_FLAG = '1' where INFO_ID in ( + select ID from epdc_evaluate_info where OFFICER_ID in + + #{id} + + ) + + + + update epdc_evaluate_info set DEL_FLAG = '1' where OFFICER_ID in ( + select ID from epdc_evaluate_officer where DEPT_ID = #{deptId} + ) + + + + update epdc_evaluate_detail set DEL_FLAG = '1' where INFO_ID in ( + select ID from epdc_evaluate_info where OFFICER_ID in ( + select ID from epdc_evaluate_officer where DEPT_ID = #{deptId} + ) + ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/evaluate/EvaluateOptionDao.xml b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/evaluate/EvaluateOptionDao.xml new file mode 100644 index 000000000..cee66469e --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/evaluate/EvaluateOptionDao.xml @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/evaluate/EvaluateRoleDao.xml b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/evaluate/EvaluateRoleDao.xml new file mode 100644 index 000000000..c081c24da --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/evaluate/EvaluateRoleDao.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + update epdc_evaluate_role set AVAILABLE = #{available} where DEL_FLAG = '0' + + + + \ No newline at end of file