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..822dfc32b --- /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,69 @@ +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.service.ActInfoService; +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 + */ + @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..e916742af --- /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,66 @@ +package com.elink.esua.epdc.feign; + +import com.elink.esua.epdc.activity.ActBannerDTO; +import com.elink.esua.epdc.activity.form.ActInfoAppFormDTO; +import com.elink.esua.epdc.activity.result.ActInfoAppResultDTO; +import com.elink.esua.epdc.activity.result.ActInfoDetailAppResultDTO; +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.feign.fallback.ActInfoFeignClientFallback; +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); + + + +} 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..7b8a646a5 --- /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,43 @@ +package com.elink.esua.epdc.feign.fallback; + +import com.elink.esua.epdc.activity.ActBannerDTO; +import com.elink.esua.epdc.activity.form.ActInfoAppFormDTO; +import com.elink.esua.epdc.activity.result.ActInfoAppResultDTO; +import com.elink.esua.epdc.activity.result.ActInfoDetailAppResultDTO; +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.feign.ActInfoFeignClient; +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); + } + +} 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..c6e1f7919 --- /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,52 @@ +package com.elink.esua.epdc.service; + +import com.elink.esua.epdc.activity.ActBannerDTO; +import com.elink.esua.epdc.activity.form.ActInfoAppFormDTO; +import com.elink.esua.epdc.activity.result.ActInfoAppResultDTO; +import com.elink.esua.epdc.activity.result.ActInfoDetailAppResultDTO; +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 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); + /** + * 评价提交 + * @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..1fc1ff9bb --- /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,43 @@ +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.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 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/EvaluateInfoDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/evaluate/EvaluateInfoDTO.java index 810be7a1e..3d0703301 100644 --- 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 @@ -93,4 +93,6 @@ public class EvaluateInfoDTO implements Serializable { */ 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/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..b46cb68b5 --- /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,18 @@ +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 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/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/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..015242ac0 --- /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,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.dto.evaluate.form; + +import lombok.Data; + +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; + +} \ 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/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/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-server/pom.xml b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/pom.xml index f10985631..dfe9576ea 100644 --- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/pom.xml +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/pom.xml @@ -63,6 +63,12 @@ orika-spring-boot-starter 1.8.0 + + com.esua.epdc + epdc-admin-client + 1.0.0 + compile + 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 index 849f3bf2f..1733b7f07 100644 --- 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 @@ -25,6 +25,7 @@ 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.EvaluateDeptExcel; import com.elink.esua.epdc.modules.evaluate.service.EvaluateDeptService; @@ -85,6 +86,18 @@ public class EvaluateDeptController { 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, EvaluateDeptExcel.class); + } @GetMapping("export") public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { 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..86ee95c78 --- /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,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.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.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.page(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.list(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 index 8fd6f06e7..5afb4d319 100644 --- 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 @@ -25,6 +25,9 @@ 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.EvaluateOfficerExcel; import com.elink.esua.epdc.modules.evaluate.service.EvaluateOfficerService; @@ -56,6 +59,23 @@ public class EvaluateOfficerController { 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, EvaluateOfficerExcel.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){ 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 index 8c63c8242..3c48c2a85 100644 --- 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 @@ -27,7 +27,9 @@ 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.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.modules.evaluate.excel.EvaluateOptionExcel; import com.elink.esua.epdc.modules.evaluate.service.EvaluateOptionService; import org.springframework.beans.factory.annotation.Autowired; @@ -93,6 +95,12 @@ public class EvaluateOptionController { 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); + } /** * 更新可用标记 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 index 667e0caf9..dda627b08 100644 --- 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 @@ -18,6 +18,7 @@ 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; @@ -39,4 +40,12 @@ public interface EvaluateDeptDao extends BaseDao { * @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..32c693736 --- /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,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.EvaluateInfoEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 评价信息表 评价信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-06 + */ +@Mapper +public interface EvaluateInfoDao 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/EvaluateOfficerDao.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/dao/EvaluateOfficerDao.java index b5585a7c1..8bf2d48cc 100644 --- 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 @@ -19,6 +19,8 @@ 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.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; @@ -52,4 +54,14 @@ public interface EvaluateOfficerDao extends BaseDao { * @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); + + List getDeptOfficer(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/EvaluateOptionDao.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/evaluate/dao/EvaluateOptionDao.java index b49fe4945..538c82433 100644 --- 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 @@ -18,6 +18,8 @@ package com.elink.esua.epdc.modules.evaluate.dao; import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.dto.evaluate.form.EvaluateOptionAppFormDTO; +import com.elink.esua.epdc.dto.evaluate.result.EvaluateOptionAppResultDTO; import com.elink.esua.epdc.modules.evaluate.entity.EvaluateOptionEntity; import com.elink.esua.epdc.dto.evaluate.EvaluateOptionDTO; import org.apache.ibatis.annotations.Mapper; @@ -39,4 +41,11 @@ public interface EvaluateOptionDao extends BaseDao { * @return */ List getOptionPage(Map params); + + /** + * 选项列表 + * @param formDto + * @return + */ + List getOptionList(EvaluateOptionAppFormDTO formDto); } \ 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/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/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/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 index 76429540c..b08cf1b24 100644 --- 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 @@ -19,6 +19,7 @@ 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; @@ -50,6 +51,8 @@ public interface EvaluateDeptService extends BaseService { */ PageData getDeptPage(Map params); + PageData getEvaluateDeptCountPage(Map params); + List countExport(Map params); /** * 默认查询 * 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..30ed9b623 --- /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,106 @@ +/** + * 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.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); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-02-06 + */ + List list(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 index 2d8bc8e7a..3465e5d8f 100644 --- 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 @@ -19,6 +19,9 @@ 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; @@ -45,6 +48,16 @@ public interface EvaluateOfficerService extends BaseService page(Map params); + PageData getEvaluateOfficerCountPage(Map params); + List countExport(Map params); + + /** + * 获取街道干部列表 + * @param formDto + * @return + */ + List getDeptOfficer(EvaluateOfficerAppFormDTO formDto); + /** * 分页条件查询 * @param params 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 index b3306ed1f..f3b014bd1 100644 --- 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 @@ -19,6 +19,10 @@ 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.form.EvaluateOptionAppFormDTO; +import com.elink.esua.epdc.dto.evaluate.result.EvaluateOfficerAppResultDTO; +import com.elink.esua.epdc.dto.evaluate.result.EvaluateOptionAppResultDTO; import com.elink.esua.epdc.modules.evaluate.entity.EvaluateOptionEntity; import com.elink.esua.epdc.dto.evaluate.EvaluateOptionDTO; @@ -50,6 +54,13 @@ public interface EvaluateOptionService extends BaseService */ PageData getOptionPage(Map params); + /** + * 获取评价选项列表 + * @param formDto + * @return + */ + List getOptionList(EvaluateOptionAppFormDTO formDto); + /** * 默认查询 * 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 index 6bed21586..dfeb171d5 100644 --- 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 @@ -24,6 +24,7 @@ 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; @@ -57,6 +58,18 @@ public class EvaluateDeptServiceImpl extends BaseServiceImpl 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; + } + /** * 条件查询 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..c5426a858 --- /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,153 @@ +/** + * 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.EvaluateSelectOption; +import com.elink.esua.epdc.dto.evaluate.form.EvaluateSubmitFormDTO; +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 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; + + @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 List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, EvaluateInfoDTO.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 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); + } + }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 index 8c2667869..25a6bef63 100644 --- 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 @@ -21,15 +21,22 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.exception.RenException; import com.elink.esua.epdc.commons.tools.page.PageData; import com.elink.esua.epdc.commons.tools.security.user.SecurityUser; import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; import com.elink.esua.epdc.commons.tools.utils.Result; +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.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.feign.SysFeignClient; import org.apache.commons.lang3.StringUtils; import org.apache.poi.hssf.usermodel.HSSFCell; import org.apache.poi.hssf.usermodel.HSSFWorkbook; @@ -43,6 +50,10 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import java.io.InputStream; import java.text.SimpleDateFormat; import java.util.*; @@ -64,6 +75,8 @@ public class EvaluateOfficerServiceImpl extends BaseServiceImpl page(Map params) { @@ -73,6 +86,29 @@ public class EvaluateOfficerServiceImpl extends BaseServiceImpl 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) { + Result completeDept = sysFeignClient.getCompleteDept(formDto.getGridId()); + if (!completeDept.success()) { + throw new RenException("获取街道失败"); + } + CompleteDeptDTO completeDeptDTO = completeDept.getData(); + Map params = new HashMap(); + params.put("deptId",completeDeptDTO.getStreetId()); + List list = baseDao.getDeptOfficer(params); + return list; + } /** * 条件查询 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 index 2586ac5ca..b02ed0501 100644 --- 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 @@ -23,6 +23,8 @@ 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.form.EvaluateOptionAppFormDTO; +import com.elink.esua.epdc.dto.evaluate.result.EvaluateOptionAppResultDTO; 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; @@ -57,6 +59,11 @@ public class EvaluateOptionServiceImpl extends BaseServiceImpl getOptionList(EvaluateOptionAppFormDTO formDto) { + List list = baseDao.getOptionList(formDto); + return list; + } /** * 条件查询 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 a2323c50c..4b4863764 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 index d7901e5e5..bc6d4b135 100644 --- 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 @@ -47,4 +47,152 @@ + + + + + + + + + + + \ 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..e6428cd8b --- /dev/null +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/evaluate/EvaluateInfoDao.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ 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 index 73bba2f4f..9d09a527e 100644 --- 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 @@ -91,4 +91,154 @@ delete 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 index fb1d261b5..28b355bac 100644 --- 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 @@ -44,5 +44,25 @@ order by sort, UPDATED_TIME desc + + + + + + + + \ No newline at end of file