60 changed files with 5039 additions and 142 deletions
@ -0,0 +1,61 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.dto.epdc.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
|
|||
/** |
|||
* 获取导出模板 |
|||
* |
|||
* @author wanggongfeng |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
@Data |
|||
public class ExportKpiResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 部门id |
|||
*/ |
|||
private String deptId; |
|||
|
|||
/** |
|||
* 部门名称 |
|||
*/ |
|||
private String deptName; |
|||
|
|||
/** |
|||
* 部门类别 |
|||
*/ |
|||
private String deptTypeKey; |
|||
|
|||
/** |
|||
* 年月 |
|||
*/ |
|||
private String monthYear; |
|||
|
|||
/** |
|||
* 年 |
|||
*/ |
|||
private String year; |
|||
|
|||
} |
|||
@ -0,0 +1,127 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 群众评价打分表 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
@Data |
|||
public class KpiMassEvaluationDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 部门id |
|||
*/ |
|||
private String deptId; |
|||
|
|||
/** |
|||
* 部门名称 |
|||
*/ |
|||
private String deptName; |
|||
|
|||
/** |
|||
* 部门类别 |
|||
*/ |
|||
private String deptTypeKey; |
|||
|
|||
/** |
|||
* 年 |
|||
*/ |
|||
private String year; |
|||
|
|||
/** |
|||
* 满意 |
|||
*/ |
|||
private String satisfied; |
|||
|
|||
/** |
|||
* 基本满意 |
|||
*/ |
|||
private String basicSatisfaction; |
|||
|
|||
/** |
|||
* 不满意 |
|||
*/ |
|||
private String dissatisfied; |
|||
|
|||
/** |
|||
* 上级部门id |
|||
*/ |
|||
private String parentDeptIds; |
|||
|
|||
/** |
|||
* 上级部门名称 |
|||
*/ |
|||
private String parentDeptNames; |
|||
|
|||
/** |
|||
* 所有部门id |
|||
*/ |
|||
private String allDeptIds; |
|||
|
|||
/** |
|||
* 所有部门名称 |
|||
*/ |
|||
private String allDeptNames; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
/** |
|||
* 逻辑删除标识 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
} |
|||
@ -0,0 +1,122 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* 响应率打分表 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
@Data |
|||
public class KpiMattersResponseDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 部门id |
|||
*/ |
|||
private String deptId; |
|||
|
|||
/** |
|||
* 部门名称 |
|||
*/ |
|||
private String deptName; |
|||
|
|||
/** |
|||
* 部门类别 |
|||
*/ |
|||
private String deptTypeKey; |
|||
|
|||
/** |
|||
* 年月 |
|||
*/ |
|||
private String monthYear; |
|||
|
|||
/** |
|||
* 扣分类别 |
|||
*/ |
|||
private String deductionCategory; |
|||
|
|||
/** |
|||
* 扣分分值 |
|||
*/ |
|||
private BigDecimal deduction; |
|||
|
|||
/** |
|||
* 上级部门id |
|||
*/ |
|||
private String parentDeptIds; |
|||
|
|||
/** |
|||
* 上级部门名称 |
|||
*/ |
|||
private String parentDeptNames; |
|||
|
|||
/** |
|||
* 所有部门id |
|||
*/ |
|||
private String allDeptIds; |
|||
|
|||
/** |
|||
* 所有部门名称 |
|||
*/ |
|||
private String allDeptNames; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
/** |
|||
* 逻辑删除标识 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
} |
|||
@ -0,0 +1,126 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 舆论监督打分表 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
@Data |
|||
public class KpiPublicOpinionDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 部门id |
|||
*/ |
|||
private String deptId; |
|||
|
|||
/** |
|||
* 部门名称 |
|||
*/ |
|||
private String deptName; |
|||
|
|||
/** |
|||
* 部门类别 |
|||
*/ |
|||
private String deptTypeKey; |
|||
|
|||
/** |
|||
* 年月 |
|||
*/ |
|||
private String monthYear; |
|||
|
|||
/** |
|||
* 宣传基础 |
|||
*/ |
|||
private String publicityFoundation; |
|||
|
|||
/** |
|||
* 创新突破 |
|||
*/ |
|||
private String innovationBreakthrough; |
|||
|
|||
/** |
|||
* 舆情应对 |
|||
*/ |
|||
private String publicOpinionResponse; |
|||
|
|||
/** |
|||
* 上级部门id |
|||
*/ |
|||
private String parentDeptIds; |
|||
|
|||
/** |
|||
* 上级部门名称 |
|||
*/ |
|||
private String parentDeptNames; |
|||
|
|||
/** |
|||
* 所有部门id |
|||
*/ |
|||
private String allDeptIds; |
|||
|
|||
/** |
|||
* 所有部门名称 |
|||
*/ |
|||
private String allDeptNames; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
/** |
|||
* 逻辑删除标识 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
} |
|||
@ -0,0 +1,127 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 典型培树 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
@Data |
|||
public class KpiTypicalCultureDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 部门id |
|||
*/ |
|||
private String deptId; |
|||
|
|||
/** |
|||
* 部门名称 |
|||
*/ |
|||
private String deptName; |
|||
|
|||
/** |
|||
* 部门类别 |
|||
*/ |
|||
private String deptTypeKey; |
|||
|
|||
/** |
|||
* 年 |
|||
*/ |
|||
private String year; |
|||
|
|||
/** |
|||
* 加分类别 |
|||
*/ |
|||
private String bonusCategory; |
|||
|
|||
/** |
|||
* 加分分值 |
|||
*/ |
|||
private String bonus; |
|||
|
|||
/** |
|||
* 加分级别 |
|||
*/ |
|||
private String bonusLevel; |
|||
|
|||
/** |
|||
* 上级部门id |
|||
*/ |
|||
private String parentDeptIds; |
|||
|
|||
/** |
|||
* 上级部门名称 |
|||
*/ |
|||
private String parentDeptNames; |
|||
|
|||
/** |
|||
* 所有部门id |
|||
*/ |
|||
private String allDeptIds; |
|||
|
|||
/** |
|||
* 所有部门名称 |
|||
*/ |
|||
private String allDeptNames; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
/** |
|||
* 逻辑删除标识 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
} |
|||
@ -0,0 +1,26 @@ |
|||
package com.elink.esua.epdc.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description 查询某年份某部门是否已打分 |
|||
* @Author wanggongfeng |
|||
* @Date 2020/06/17 10:29 |
|||
*/ |
|||
@Data |
|||
public class CheckIsScoredByYearFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -8214790072156444793L; |
|||
|
|||
/** |
|||
* 主键集合 |
|||
*/ |
|||
private List<String> checkList; |
|||
|
|||
/** |
|||
* 年月 |
|||
*/ |
|||
private String year; |
|||
} |
|||
@ -0,0 +1,114 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.controller; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.page.PageData; |
|||
import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.commons.tools.validator.AssertUtils; |
|||
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; |
|||
import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; |
|||
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; |
|||
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; |
|||
import com.elink.esua.epdc.dto.KpiGridEntityDTO; |
|||
import com.elink.esua.epdc.excel.KpiGridEntityExcel; |
|||
import com.elink.esua.epdc.service.KpiGridEntityService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import org.springframework.web.multipart.MultipartFile; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 网格实体化运作打分 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("kpigridentity") |
|||
public class KpiGridEntityController { |
|||
|
|||
@Autowired |
|||
private KpiGridEntityService kpiGridEntityService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<KpiGridEntityDTO>> page(@RequestParam Map<String, Object> params){ |
|||
//PageData<KpiGridEntityDTO> page = kpiGridEntityService.page(params);
|
|||
PageData<KpiGridEntityDTO> page = kpiGridEntityService.getInfoPage(params); |
|||
return new Result<PageData<KpiGridEntityDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<KpiGridEntityDTO> get(@PathVariable("id") String id){ |
|||
KpiGridEntityDTO data = kpiGridEntityService.get(id); |
|||
return new Result<KpiGridEntityDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody KpiGridEntityDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
kpiGridEntityService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody KpiGridEntityDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
kpiGridEntityService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
kpiGridEntityService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<KpiGridEntityDTO> list = kpiGridEntityService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, KpiGridEntityExcel.class); |
|||
} |
|||
|
|||
@GetMapping("exportTemplate") |
|||
public void exportTemplate(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<KpiGridEntityDTO> list = kpiGridEntityService.exportTemplate(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, KpiGridEntityExcel.class); |
|||
} |
|||
|
|||
/** |
|||
* @Description: 导入治理排行管理-网格实体化运作 |
|||
* @Param: [file] |
|||
* @return: Result |
|||
* @Author: wanggongfeng |
|||
* @Date: 2020-06-16 |
|||
*/ |
|||
@PostMapping("importManualScoreExcel") |
|||
public Result importManualScoreExcel(@RequestParam("file") MultipartFile file) { |
|||
return kpiGridEntityService.importManualScoreExcel(file); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,114 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.controller; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.page.PageData; |
|||
import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.commons.tools.validator.AssertUtils; |
|||
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; |
|||
import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; |
|||
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; |
|||
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; |
|||
import com.elink.esua.epdc.dto.KpiMassEvaluationDTO; |
|||
import com.elink.esua.epdc.excel.KpiMassEvaluationExcel; |
|||
import com.elink.esua.epdc.service.KpiMassEvaluationService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import org.springframework.web.multipart.MultipartFile; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 群众评价打分表 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("kpimassevaluation") |
|||
public class KpiMassEvaluationController { |
|||
|
|||
@Autowired |
|||
private KpiMassEvaluationService kpiMassEvaluationService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<KpiMassEvaluationDTO>> page(@RequestParam Map<String, Object> params){ |
|||
//PageData<KpiMassEvaluationDTO> page = kpiMassEvaluationService.page(params);
|
|||
PageData<KpiMassEvaluationDTO> page = kpiMassEvaluationService.getInfoPage(params); |
|||
return new Result<PageData<KpiMassEvaluationDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<KpiMassEvaluationDTO> get(@PathVariable("id") String id){ |
|||
KpiMassEvaluationDTO data = kpiMassEvaluationService.get(id); |
|||
return new Result<KpiMassEvaluationDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody KpiMassEvaluationDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
kpiMassEvaluationService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody KpiMassEvaluationDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
kpiMassEvaluationService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
kpiMassEvaluationService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<KpiMassEvaluationDTO> list = kpiMassEvaluationService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, KpiMassEvaluationExcel.class); |
|||
} |
|||
|
|||
@GetMapping("exportTemplate") |
|||
public void exportTemplate(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<KpiMassEvaluationDTO> list = kpiMassEvaluationService.exportTemplate(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, KpiMassEvaluationExcel.class); |
|||
} |
|||
|
|||
/** |
|||
* @Description: 导入治理排行管理-群众评价打分 |
|||
* @Param: [file] |
|||
* @return: Result |
|||
* @Author: wanggongfeng |
|||
* @Date: 2020-06-17 |
|||
*/ |
|||
@PostMapping("importManualScoreExcel") |
|||
public Result importManualScoreExcel(@RequestParam("file") MultipartFile file) { |
|||
return kpiMassEvaluationService.importManualScoreExcel(file); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,95 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.controller; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.page.PageData; |
|||
import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.commons.tools.validator.AssertUtils; |
|||
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; |
|||
import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; |
|||
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; |
|||
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; |
|||
import com.elink.esua.epdc.dto.KpiMattersResponseDTO; |
|||
import com.elink.esua.epdc.excel.KpiMattersResponseExcel; |
|||
import com.elink.esua.epdc.service.KpiMattersResponseService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 响应率打分表 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("kpimattersresponse") |
|||
public class KpiMattersResponseController { |
|||
|
|||
@Autowired |
|||
private KpiMattersResponseService kpiMattersResponseService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<KpiMattersResponseDTO>> page(@RequestParam Map<String, Object> params){ |
|||
//PageData<KpiMattersResponseDTO> page = kpiMattersResponseService.page(params);
|
|||
PageData<KpiMattersResponseDTO> page = kpiMattersResponseService.getInfoPage(params); |
|||
return new Result<PageData<KpiMattersResponseDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<KpiMattersResponseDTO> get(@PathVariable("id") String id){ |
|||
KpiMattersResponseDTO data = kpiMattersResponseService.get(id); |
|||
return new Result<KpiMattersResponseDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody KpiMattersResponseDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
kpiMattersResponseService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody KpiMattersResponseDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
kpiMattersResponseService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
kpiMattersResponseService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<KpiMattersResponseDTO> list = kpiMattersResponseService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, KpiMattersResponseExcel.class); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,114 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.controller; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.page.PageData; |
|||
import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.commons.tools.validator.AssertUtils; |
|||
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; |
|||
import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; |
|||
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; |
|||
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; |
|||
import com.elink.esua.epdc.dto.KpiPublicOpinionDTO; |
|||
import com.elink.esua.epdc.excel.KpiPublicOpinionExcel; |
|||
import com.elink.esua.epdc.service.KpiPublicOpinionService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import org.springframework.web.multipart.MultipartFile; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 舆论监督打分表 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("kpipublicopinion") |
|||
public class KpiPublicOpinionController { |
|||
|
|||
@Autowired |
|||
private KpiPublicOpinionService kpiPublicOpinionService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<KpiPublicOpinionDTO>> page(@RequestParam Map<String, Object> params){ |
|||
//PageData<KpiPublicOpinionDTO> page = kpiPublicOpinionService.page(params);
|
|||
PageData<KpiPublicOpinionDTO> page = kpiPublicOpinionService.getInfoPage(params); |
|||
return new Result<PageData<KpiPublicOpinionDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<KpiPublicOpinionDTO> get(@PathVariable("id") String id){ |
|||
KpiPublicOpinionDTO data = kpiPublicOpinionService.get(id); |
|||
return new Result<KpiPublicOpinionDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody KpiPublicOpinionDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
kpiPublicOpinionService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody KpiPublicOpinionDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
kpiPublicOpinionService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
kpiPublicOpinionService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<KpiPublicOpinionDTO> list = kpiPublicOpinionService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, KpiPublicOpinionExcel.class); |
|||
} |
|||
|
|||
@GetMapping("exportTemplate") |
|||
public void exportTemplate(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<KpiPublicOpinionDTO> list = kpiPublicOpinionService.exportTemplate(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, KpiPublicOpinionExcel.class); |
|||
} |
|||
|
|||
/** |
|||
* @Description: 导入治理排行管理-舆论监督打分 |
|||
* @Param: [file] |
|||
* @return: Result |
|||
* @Author: wanggongfeng |
|||
* @Date: 2020-06-17 |
|||
*/ |
|||
@PostMapping("importManualScoreExcel") |
|||
public Result importManualScoreExcel(@RequestParam("file") MultipartFile file) { |
|||
return kpiPublicOpinionService.importManualScoreExcel(file); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,95 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.controller; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.page.PageData; |
|||
import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.commons.tools.validator.AssertUtils; |
|||
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; |
|||
import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; |
|||
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; |
|||
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; |
|||
import com.elink.esua.epdc.dto.KpiTypicalCultureDTO; |
|||
import com.elink.esua.epdc.excel.KpiTypicalCultureExcel; |
|||
import com.elink.esua.epdc.service.KpiTypicalCultureService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 典型培树 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("kpitypicalculture") |
|||
public class KpiTypicalCultureController { |
|||
|
|||
@Autowired |
|||
private KpiTypicalCultureService kpiTypicalCultureService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<KpiTypicalCultureDTO>> page(@RequestParam Map<String, Object> params){ |
|||
//PageData<KpiTypicalCultureDTO> page = kpiTypicalCultureService.page(params);
|
|||
PageData<KpiTypicalCultureDTO> page = kpiTypicalCultureService.getInfoPage(params); |
|||
return new Result<PageData<KpiTypicalCultureDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<KpiTypicalCultureDTO> get(@PathVariable("id") String id){ |
|||
KpiTypicalCultureDTO data = kpiTypicalCultureService.get(id); |
|||
return new Result<KpiTypicalCultureDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody KpiTypicalCultureDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
kpiTypicalCultureService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody KpiTypicalCultureDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
kpiTypicalCultureService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
kpiTypicalCultureService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<KpiTypicalCultureDTO> list = kpiTypicalCultureService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, KpiTypicalCultureExcel.class); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,50 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.dao; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; |
|||
import com.elink.esua.epdc.dto.KpiGridEntityDTO; |
|||
import com.elink.esua.epdc.dto.form.CheckIsScoredFormDTO; |
|||
import com.elink.esua.epdc.entity.KpiGridEntityEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 网格实体化运作打分 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
@Mapper |
|||
public interface KpiGridEntityDao extends BaseDao<KpiGridEntityEntity> { |
|||
/** |
|||
* 条件查询 |
|||
* @param params |
|||
* @return |
|||
*/ |
|||
List<KpiGridEntityDTO> getInfoPage(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 条件查询 |
|||
* @param checkIsScoredFormDTO |
|||
* @return |
|||
*/ |
|||
List<KpiGridEntityDTO> getDuplicateData(CheckIsScoredFormDTO checkIsScoredFormDTO); |
|||
} |
|||
@ -0,0 +1,50 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.dao; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; |
|||
import com.elink.esua.epdc.dto.KpiMassEvaluationDTO; |
|||
import com.elink.esua.epdc.dto.form.CheckIsScoredByYearFormDTO; |
|||
import com.elink.esua.epdc.entity.KpiMassEvaluationEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 群众评价打分表 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
@Mapper |
|||
public interface KpiMassEvaluationDao extends BaseDao<KpiMassEvaluationEntity> { |
|||
/** |
|||
* 条件查询 |
|||
* @param params |
|||
* @return |
|||
*/ |
|||
List<KpiMassEvaluationDTO> getInfoPage(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 条件查询 |
|||
* @param checkIsScoredByYearFormDTO |
|||
* @return |
|||
*/ |
|||
List<KpiMassEvaluationDTO> getDuplicateData(CheckIsScoredByYearFormDTO checkIsScoredByYearFormDTO); |
|||
} |
|||
@ -0,0 +1,42 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.dao; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; |
|||
import com.elink.esua.epdc.dto.KpiMattersResponseDTO; |
|||
import com.elink.esua.epdc.entity.KpiMattersResponseEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 响应率打分表 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
@Mapper |
|||
public interface KpiMattersResponseDao extends BaseDao<KpiMattersResponseEntity> { |
|||
/** |
|||
* 条件查询 |
|||
* @param params |
|||
* @return |
|||
*/ |
|||
List<KpiMattersResponseDTO> getInfoPage(Map<String, Object> params); |
|||
} |
|||
@ -0,0 +1,50 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.dao; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; |
|||
import com.elink.esua.epdc.dto.KpiPublicOpinionDTO; |
|||
import com.elink.esua.epdc.dto.form.CheckIsScoredFormDTO; |
|||
import com.elink.esua.epdc.entity.KpiPublicOpinionEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 舆论监督打分表 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
@Mapper |
|||
public interface KpiPublicOpinionDao extends BaseDao<KpiPublicOpinionEntity> { |
|||
/** |
|||
* 条件查询 |
|||
* @param params |
|||
* @return |
|||
*/ |
|||
List<KpiPublicOpinionDTO> getInfoPage(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 条件查询 |
|||
* @param checkIsScoredFormDTO |
|||
* @return |
|||
*/ |
|||
List<KpiPublicOpinionDTO> getDuplicateData(CheckIsScoredFormDTO checkIsScoredFormDTO); |
|||
} |
|||
@ -0,0 +1,42 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.dao; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; |
|||
import com.elink.esua.epdc.dto.KpiTypicalCultureDTO; |
|||
import com.elink.esua.epdc.entity.KpiTypicalCultureEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 典型培树 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
@Mapper |
|||
public interface KpiTypicalCultureDao extends BaseDao<KpiTypicalCultureEntity> { |
|||
/** |
|||
* 条件查询 |
|||
* @param params |
|||
* @return |
|||
*/ |
|||
List<KpiTypicalCultureDTO> getInfoPage(Map<String, Object> params); |
|||
} |
|||
@ -0,0 +1,93 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
/** |
|||
* 网格实体化运作打分 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("epdc_kpi_grid_entity") |
|||
public class KpiGridEntityEntity extends BaseEpdcEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 部门id |
|||
*/ |
|||
private String deptId; |
|||
|
|||
/** |
|||
* 部门名称 |
|||
*/ |
|||
private String deptName; |
|||
|
|||
/** |
|||
* 部门类别 |
|||
*/ |
|||
private String deptTypeKey; |
|||
|
|||
/** |
|||
* 年月 |
|||
*/ |
|||
private String monthYear; |
|||
|
|||
/** |
|||
* 建站达标 |
|||
*/ |
|||
private String stationEstablishment; |
|||
|
|||
/** |
|||
* 人员配备 |
|||
*/ |
|||
private String staffingPlacement; |
|||
|
|||
/** |
|||
* 网格运行 |
|||
*/ |
|||
private String gridOperation; |
|||
|
|||
/** |
|||
* 上级部门id |
|||
*/ |
|||
private String parentDeptIds; |
|||
|
|||
/** |
|||
* 上级部门名称 |
|||
*/ |
|||
private String parentDeptNames; |
|||
|
|||
/** |
|||
* 所有部门id |
|||
*/ |
|||
private String allDeptIds; |
|||
|
|||
/** |
|||
* 所有部门名称 |
|||
*/ |
|||
private String allDeptNames; |
|||
|
|||
} |
|||
@ -0,0 +1,96 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.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 elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("epdc_kpi_mass_evaluation") |
|||
public class KpiMassEvaluationEntity extends BaseEpdcEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 部门id |
|||
*/ |
|||
private String deptId; |
|||
|
|||
/** |
|||
* 部门名称 |
|||
*/ |
|||
private String deptName; |
|||
|
|||
/** |
|||
* 部门类别 |
|||
*/ |
|||
private String deptTypeKey; |
|||
|
|||
/** |
|||
* 年 |
|||
*/ |
|||
private String year; |
|||
|
|||
/** |
|||
* 满意 |
|||
*/ |
|||
private String satisfied; |
|||
|
|||
/** |
|||
* 基本满意 |
|||
*/ |
|||
private String basicSatisfaction; |
|||
|
|||
/** |
|||
* 不满意 |
|||
*/ |
|||
private String dissatisfied; |
|||
|
|||
/** |
|||
* 上级部门id |
|||
*/ |
|||
private String parentDeptIds; |
|||
|
|||
/** |
|||
* 上级部门名称 |
|||
*/ |
|||
private String parentDeptNames; |
|||
|
|||
/** |
|||
* 所有部门id |
|||
*/ |
|||
private String allDeptIds; |
|||
|
|||
/** |
|||
* 所有部门名称 |
|||
*/ |
|||
private String allDeptNames; |
|||
|
|||
} |
|||
@ -0,0 +1,92 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 响应率打分表 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("epdc_kpi_matters_response") |
|||
public class KpiMattersResponseEntity extends BaseEpdcEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 部门id |
|||
*/ |
|||
private String deptId; |
|||
|
|||
/** |
|||
* 部门名称 |
|||
*/ |
|||
private String deptName; |
|||
|
|||
/** |
|||
* 部门类别 |
|||
*/ |
|||
private String deptTypeKey; |
|||
|
|||
/** |
|||
* 年月 |
|||
*/ |
|||
private String monthYear; |
|||
|
|||
/** |
|||
* 扣分类别 |
|||
*/ |
|||
private String deductionCategory; |
|||
|
|||
/** |
|||
* 扣分分值 |
|||
*/ |
|||
private BigDecimal deduction; |
|||
|
|||
/** |
|||
* 上级部门id |
|||
*/ |
|||
private String parentDeptIds; |
|||
|
|||
/** |
|||
* 上级部门名称 |
|||
*/ |
|||
private String parentDeptNames; |
|||
|
|||
/** |
|||
* 所有部门id |
|||
*/ |
|||
private String allDeptIds; |
|||
|
|||
/** |
|||
* 所有部门名称 |
|||
*/ |
|||
private String allDeptNames; |
|||
|
|||
} |
|||
@ -0,0 +1,96 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.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 elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("epdc_kpi_public_opinion") |
|||
public class KpiPublicOpinionEntity extends BaseEpdcEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 部门id |
|||
*/ |
|||
private String deptId; |
|||
|
|||
/** |
|||
* 部门名称 |
|||
*/ |
|||
private String deptName; |
|||
|
|||
/** |
|||
* 部门类别 |
|||
*/ |
|||
private String deptTypeKey; |
|||
|
|||
/** |
|||
* 年月 |
|||
*/ |
|||
private String monthYear; |
|||
|
|||
/** |
|||
* 宣传基础 |
|||
*/ |
|||
private String publicityFoundation; |
|||
|
|||
/** |
|||
* 创新突破 |
|||
*/ |
|||
private String innovationBreakthrough; |
|||
|
|||
/** |
|||
* 舆情应对 |
|||
*/ |
|||
private String publicOpinionResponse; |
|||
|
|||
/** |
|||
* 上级部门id |
|||
*/ |
|||
private String parentDeptIds; |
|||
|
|||
/** |
|||
* 上级部门名称 |
|||
*/ |
|||
private String parentDeptNames; |
|||
|
|||
/** |
|||
* 所有部门id |
|||
*/ |
|||
private String allDeptIds; |
|||
|
|||
/** |
|||
* 所有部门名称 |
|||
*/ |
|||
private String allDeptNames; |
|||
|
|||
} |
|||
@ -0,0 +1,93 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
/** |
|||
* 典型培树 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("epdc_kpi_typical_culture") |
|||
public class KpiTypicalCultureEntity extends BaseEpdcEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 部门id |
|||
*/ |
|||
private String deptId; |
|||
|
|||
/** |
|||
* 部门名称 |
|||
*/ |
|||
private String deptName; |
|||
|
|||
/** |
|||
* 部门类别 |
|||
*/ |
|||
private String deptTypeKey; |
|||
|
|||
/** |
|||
* 年 |
|||
*/ |
|||
private String year; |
|||
|
|||
/** |
|||
* 加分类别 |
|||
*/ |
|||
private String bonusCategory; |
|||
|
|||
/** |
|||
* 加分分值 |
|||
*/ |
|||
private String bonus; |
|||
|
|||
/** |
|||
* 加分级别 |
|||
*/ |
|||
private String bonusLevel; |
|||
|
|||
/** |
|||
* 上级部门id |
|||
*/ |
|||
private String parentDeptIds; |
|||
|
|||
/** |
|||
* 上级部门名称 |
|||
*/ |
|||
private String parentDeptNames; |
|||
|
|||
/** |
|||
* 所有部门id |
|||
*/ |
|||
private String allDeptIds; |
|||
|
|||
/** |
|||
* 所有部门名称 |
|||
*/ |
|||
private String allDeptNames; |
|||
|
|||
} |
|||
@ -0,0 +1,87 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 网格实体化运作打分 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
@Data |
|||
public class KpiGridEntityExcel { |
|||
|
|||
// @Excel(name = "主键")
|
|||
// private String id;
|
|||
|
|||
@Excel(name = "部门id") |
|||
private String deptId; |
|||
|
|||
@Excel(name = "部门名称") |
|||
private String deptName; |
|||
|
|||
@Excel(name = "部门类别") |
|||
private String deptTypeKey; |
|||
|
|||
@Excel(name = "年月") |
|||
private String monthYear; |
|||
|
|||
@Excel(name = "建站达标分数") |
|||
private String stationEstablishment; |
|||
|
|||
@Excel(name = "人员配备分数") |
|||
private String staffingPlacement; |
|||
|
|||
@Excel(name = "网格运行分数") |
|||
private String gridOperation; |
|||
|
|||
// @Excel(name = "上级部门id")
|
|||
// private String parentDeptIds;
|
|||
//
|
|||
// @Excel(name = "上级部门名称")
|
|||
// private String parentDeptNames;
|
|||
//
|
|||
// @Excel(name = "所有部门id")
|
|||
// private String allDeptIds;
|
|||
//
|
|||
// @Excel(name = "所有部门名称")
|
|||
// private String allDeptNames;
|
|||
//
|
|||
// @Excel(name = "乐观锁")
|
|||
// private Integer revision;
|
|||
//
|
|||
// @Excel(name = "创建人")
|
|||
// private String createdBy;
|
|||
//
|
|||
// @Excel(name = "创建时间")
|
|||
// private Date createdTime;
|
|||
//
|
|||
// @Excel(name = "更新人")
|
|||
// private String updatedBy;
|
|||
//
|
|||
// @Excel(name = "更新时间")
|
|||
// private Date updatedTime;
|
|||
//
|
|||
// @Excel(name = "逻辑删除标识")
|
|||
// private String delFlag;
|
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,87 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 群众评价打分表 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
@Data |
|||
public class KpiMassEvaluationExcel { |
|||
|
|||
// @Excel(name = "主键")
|
|||
// private String id;
|
|||
|
|||
@Excel(name = "部门id") |
|||
private String deptId; |
|||
|
|||
@Excel(name = "部门名称") |
|||
private String deptName; |
|||
|
|||
@Excel(name = "部门类别") |
|||
private String deptTypeKey; |
|||
|
|||
@Excel(name = "年") |
|||
private String year; |
|||
|
|||
@Excel(name = "满意分数") |
|||
private String satisfied; |
|||
|
|||
@Excel(name = "基本满意分数") |
|||
private String basicSatisfaction; |
|||
|
|||
@Excel(name = "不满意分数") |
|||
private String dissatisfied; |
|||
|
|||
// @Excel(name = "上级部门id")
|
|||
// private String parentDeptIds;
|
|||
//
|
|||
// @Excel(name = "上级部门名称")
|
|||
// private String parentDeptNames;
|
|||
//
|
|||
// @Excel(name = "所有部门id")
|
|||
// private String allDeptIds;
|
|||
//
|
|||
// @Excel(name = "所有部门名称")
|
|||
// private String allDeptNames;
|
|||
//
|
|||
// @Excel(name = "乐观锁")
|
|||
// private Integer revision;
|
|||
//
|
|||
// @Excel(name = "创建人")
|
|||
// private String createdBy;
|
|||
//
|
|||
// @Excel(name = "创建时间")
|
|||
// private Date createdTime;
|
|||
//
|
|||
// @Excel(name = "更新人")
|
|||
// private String updatedBy;
|
|||
//
|
|||
// @Excel(name = "更新时间")
|
|||
// private Date updatedTime;
|
|||
//
|
|||
// @Excel(name = "逻辑删除标识")
|
|||
// private String delFlag;
|
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,87 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 响应率打分表 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
@Data |
|||
public class KpiMattersResponseExcel { |
|||
|
|||
@Excel(name = "主键") |
|||
private String id; |
|||
|
|||
@Excel(name = "部门id") |
|||
private String deptId; |
|||
|
|||
@Excel(name = "部门名称") |
|||
private String deptName; |
|||
|
|||
@Excel(name = "部门类别") |
|||
private String deptTypeKey; |
|||
|
|||
@Excel(name = "年月") |
|||
private String monthYear; |
|||
|
|||
@Excel(name = "扣分类别") |
|||
private String deductionCategory; |
|||
|
|||
@Excel(name = "扣分分值") |
|||
private BigDecimal deduction; |
|||
|
|||
@Excel(name = "上级部门id") |
|||
private String parentDeptIds; |
|||
|
|||
@Excel(name = "上级部门名称") |
|||
private String parentDeptNames; |
|||
|
|||
@Excel(name = "所有部门id") |
|||
private String allDeptIds; |
|||
|
|||
@Excel(name = "所有部门名称") |
|||
private String allDeptNames; |
|||
|
|||
@Excel(name = "乐观锁") |
|||
private Integer revision; |
|||
|
|||
@Excel(name = "创建人") |
|||
private String createdBy; |
|||
|
|||
@Excel(name = "创建时间") |
|||
private Date createdTime; |
|||
|
|||
@Excel(name = "更新人") |
|||
private String updatedBy; |
|||
|
|||
@Excel(name = "更新时间") |
|||
private Date updatedTime; |
|||
|
|||
@Excel(name = "逻辑删除标识") |
|||
private String delFlag; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,87 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 舆论监督打分表 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
@Data |
|||
public class KpiPublicOpinionExcel { |
|||
|
|||
// @Excel(name = "主键")
|
|||
// private String id;
|
|||
|
|||
@Excel(name = "部门id") |
|||
private String deptId; |
|||
|
|||
@Excel(name = "部门名称") |
|||
private String deptName; |
|||
|
|||
@Excel(name = "部门类别") |
|||
private String deptTypeKey; |
|||
|
|||
@Excel(name = "年月") |
|||
private String monthYear; |
|||
|
|||
@Excel(name = "宣传基础") |
|||
private String publicityFoundation; |
|||
|
|||
@Excel(name = "创新突破") |
|||
private String innovationBreakthrough; |
|||
|
|||
@Excel(name = "舆情应对") |
|||
private String publicOpinionResponse; |
|||
|
|||
// @Excel(name = "上级部门id")
|
|||
// private String parentDeptIds;
|
|||
//
|
|||
// @Excel(name = "上级部门名称")
|
|||
// private String parentDeptNames;
|
|||
//
|
|||
// @Excel(name = "所有部门id")
|
|||
// private String allDeptIds;
|
|||
//
|
|||
// @Excel(name = "所有部门名称")
|
|||
// private String allDeptNames;
|
|||
//
|
|||
// @Excel(name = "乐观锁")
|
|||
// private Integer revision;
|
|||
//
|
|||
// @Excel(name = "创建人")
|
|||
// private String createdBy;
|
|||
//
|
|||
// @Excel(name = "创建时间")
|
|||
// private Date createdTime;
|
|||
//
|
|||
// @Excel(name = "更新人")
|
|||
// private String updatedBy;
|
|||
//
|
|||
// @Excel(name = "更新时间")
|
|||
// private Date updatedTime;
|
|||
//
|
|||
// @Excel(name = "逻辑删除标识")
|
|||
// private String delFlag;
|
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,89 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 典型培树 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
@Data |
|||
public class KpiTypicalCultureExcel { |
|||
|
|||
@Excel(name = "主键") |
|||
private String id; |
|||
|
|||
@Excel(name = "部门id") |
|||
private String deptId; |
|||
|
|||
@Excel(name = "部门名称") |
|||
private String deptName; |
|||
|
|||
@Excel(name = "部门类别") |
|||
private String deptTypeKey; |
|||
|
|||
@Excel(name = "年") |
|||
private String year; |
|||
|
|||
@Excel(name = "加分类别") |
|||
private String bonusCategory; |
|||
|
|||
@Excel(name = "加分分值") |
|||
private String bonus; |
|||
|
|||
@Excel(name = "加分级别") |
|||
private String bonusLevel; |
|||
|
|||
@Excel(name = "上级部门id") |
|||
private String parentDeptIds; |
|||
|
|||
@Excel(name = "上级部门名称") |
|||
private String parentDeptNames; |
|||
|
|||
@Excel(name = "所有部门id") |
|||
private String allDeptIds; |
|||
|
|||
@Excel(name = "所有部门名称") |
|||
private String allDeptNames; |
|||
|
|||
@Excel(name = "乐观锁") |
|||
private Integer revision; |
|||
|
|||
@Excel(name = "创建人") |
|||
private String createdBy; |
|||
|
|||
@Excel(name = "创建时间") |
|||
private Date createdTime; |
|||
|
|||
@Excel(name = "更新人") |
|||
private String updatedBy; |
|||
|
|||
@Excel(name = "更新时间") |
|||
private Date updatedTime; |
|||
|
|||
@Excel(name = "逻辑删除标识") |
|||
private String delFlag; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,47 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.redis; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.redis.RedisUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 网格实体化运作打分 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
@Component |
|||
public class KpiGridEntityRedis { |
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
public void delete(Object[] ids) { |
|||
|
|||
} |
|||
|
|||
public void set(){ |
|||
|
|||
} |
|||
|
|||
public String get(String id){ |
|||
return null; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,47 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.redis; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.redis.RedisUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 群众评价打分表 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
@Component |
|||
public class KpiMassEvaluationRedis { |
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
public void delete(Object[] ids) { |
|||
|
|||
} |
|||
|
|||
public void set(){ |
|||
|
|||
} |
|||
|
|||
public String get(String id){ |
|||
return null; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,47 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.redis; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.redis.RedisUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 响应率打分表 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
@Component |
|||
public class KpiMattersResponseRedis { |
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
public void delete(Object[] ids) { |
|||
|
|||
} |
|||
|
|||
public void set(){ |
|||
|
|||
} |
|||
|
|||
public String get(String id){ |
|||
return null; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,47 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.redis; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.redis.RedisUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 舆论监督打分表 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
@Component |
|||
public class KpiPublicOpinionRedis { |
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
public void delete(Object[] ids) { |
|||
|
|||
} |
|||
|
|||
public void set(){ |
|||
|
|||
} |
|||
|
|||
public String get(String id){ |
|||
return null; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,47 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.redis; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.redis.RedisUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 典型培树 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
@Component |
|||
public class KpiTypicalCultureRedis { |
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
public void delete(Object[] ids) { |
|||
|
|||
} |
|||
|
|||
public void set(){ |
|||
|
|||
} |
|||
|
|||
public String get(String id){ |
|||
return null; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,124 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.service; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.service.BaseService; |
|||
import com.elink.esua.epdc.commons.tools.page.PageData; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.KpiGridEntityDTO; |
|||
import com.elink.esua.epdc.entity.KpiGridEntityEntity; |
|||
import org.springframework.web.multipart.MultipartFile; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 网格实体化运作打分 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
public interface KpiGridEntityService extends BaseService<KpiGridEntityEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<KpiGridEntityDTO> |
|||
* @author generator |
|||
* @date 2020-06-16 |
|||
*/ |
|||
PageData<KpiGridEntityDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 分页条件查询 |
|||
* @param params |
|||
* @return |
|||
*/ |
|||
PageData<KpiGridEntityDTO> getInfoPage(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<KpiGridEntityDTO> |
|||
* @author generator |
|||
* @date 2020-06-16 |
|||
*/ |
|||
List<KpiGridEntityDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return KpiGridEntityDTO |
|||
* @author generator |
|||
* @date 2020-06-16 |
|||
*/ |
|||
KpiGridEntityDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-06-16 |
|||
*/ |
|||
void save(KpiGridEntityDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-06-16 |
|||
*/ |
|||
void update(KpiGridEntityDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-06-16 |
|||
*/ |
|||
void delete(String[] ids); |
|||
|
|||
/** |
|||
* 导出模板 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<KpiGridEntityDTO> |
|||
* @author wanggongfeng |
|||
* @date 2020-06-16 |
|||
*/ |
|||
List<KpiGridEntityDTO> exportTemplate(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 网格实体化运作打分导入 |
|||
* |
|||
* @param file |
|||
* @return Result |
|||
* @author wanggongfeng |
|||
* @date 2020-06-16 |
|||
*/ |
|||
Result importManualScoreExcel(MultipartFile file); |
|||
} |
|||
@ -0,0 +1,124 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.service; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.service.BaseService; |
|||
import com.elink.esua.epdc.commons.tools.page.PageData; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.KpiMassEvaluationDTO; |
|||
import com.elink.esua.epdc.entity.KpiMassEvaluationEntity; |
|||
import org.springframework.web.multipart.MultipartFile; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 群众评价打分表 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
public interface KpiMassEvaluationService extends BaseService<KpiMassEvaluationEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<KpiMassEvaluationDTO> |
|||
* @author generator |
|||
* @date 2020-06-16 |
|||
*/ |
|||
PageData<KpiMassEvaluationDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 分页条件查询 |
|||
* @param params |
|||
* @return |
|||
*/ |
|||
PageData<KpiMassEvaluationDTO> getInfoPage(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<KpiMassEvaluationDTO> |
|||
* @author generator |
|||
* @date 2020-06-16 |
|||
*/ |
|||
List<KpiMassEvaluationDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return KpiMassEvaluationDTO |
|||
* @author generator |
|||
* @date 2020-06-16 |
|||
*/ |
|||
KpiMassEvaluationDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-06-16 |
|||
*/ |
|||
void save(KpiMassEvaluationDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-06-16 |
|||
*/ |
|||
void update(KpiMassEvaluationDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-06-16 |
|||
*/ |
|||
void delete(String[] ids); |
|||
|
|||
/** |
|||
* 导出模板 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<KpiCommunityBuildingDTO> |
|||
* @author wanggongfeng |
|||
* @date 2020-06-15 |
|||
*/ |
|||
List<KpiMassEvaluationDTO> exportTemplate(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 群众评价打分导入 |
|||
* |
|||
* @param file |
|||
* @return Result |
|||
* @author wanggongfeng |
|||
* @date 2020-06-17 |
|||
*/ |
|||
Result importManualScoreExcel(MultipartFile file); |
|||
} |
|||
@ -0,0 +1,103 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.service; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.service.BaseService; |
|||
import com.elink.esua.epdc.commons.tools.page.PageData; |
|||
import com.elink.esua.epdc.dto.KpiCommunityBuildingDTO; |
|||
import com.elink.esua.epdc.dto.KpiMattersResponseDTO; |
|||
import com.elink.esua.epdc.entity.KpiMattersResponseEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 响应率打分表 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
public interface KpiMattersResponseService extends BaseService<KpiMattersResponseEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<KpiMattersResponseDTO> |
|||
* @author generator |
|||
* @date 2020-06-16 |
|||
*/ |
|||
PageData<KpiMattersResponseDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 分页条件查询 |
|||
* @param params |
|||
* @return |
|||
*/ |
|||
PageData<KpiMattersResponseDTO> getInfoPage(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<KpiMattersResponseDTO> |
|||
* @author generator |
|||
* @date 2020-06-16 |
|||
*/ |
|||
List<KpiMattersResponseDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return KpiMattersResponseDTO |
|||
* @author generator |
|||
* @date 2020-06-16 |
|||
*/ |
|||
KpiMattersResponseDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-06-16 |
|||
*/ |
|||
void save(KpiMattersResponseDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-06-16 |
|||
*/ |
|||
void update(KpiMattersResponseDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-06-16 |
|||
*/ |
|||
void delete(String[] ids); |
|||
} |
|||
@ -0,0 +1,124 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.service; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.service.BaseService; |
|||
import com.elink.esua.epdc.commons.tools.page.PageData; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.KpiPublicOpinionDTO; |
|||
import com.elink.esua.epdc.entity.KpiPublicOpinionEntity; |
|||
import org.springframework.web.multipart.MultipartFile; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 舆论监督打分表 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
public interface KpiPublicOpinionService extends BaseService<KpiPublicOpinionEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<KpiPublicOpinionDTO> |
|||
* @author generator |
|||
* @date 2020-06-16 |
|||
*/ |
|||
PageData<KpiPublicOpinionDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 分页条件查询 |
|||
* @param params |
|||
* @return |
|||
*/ |
|||
PageData<KpiPublicOpinionDTO> getInfoPage(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<KpiPublicOpinionDTO> |
|||
* @author generator |
|||
* @date 2020-06-16 |
|||
*/ |
|||
List<KpiPublicOpinionDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return KpiPublicOpinionDTO |
|||
* @author generator |
|||
* @date 2020-06-16 |
|||
*/ |
|||
KpiPublicOpinionDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-06-16 |
|||
*/ |
|||
void save(KpiPublicOpinionDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-06-16 |
|||
*/ |
|||
void update(KpiPublicOpinionDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-06-16 |
|||
*/ |
|||
void delete(String[] ids); |
|||
|
|||
/** |
|||
* 导出模板 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<KpiCommunityBuildingDTO> |
|||
* @author wanggongfeng |
|||
* @date 2020-06-15 |
|||
*/ |
|||
List<KpiPublicOpinionDTO> exportTemplate(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 舆论监督打分导入 |
|||
* |
|||
* @param file |
|||
* @return Result |
|||
* @author wanggongfeng |
|||
* @date 2020-06-17 |
|||
*/ |
|||
Result importManualScoreExcel(MultipartFile file); |
|||
} |
|||
@ -0,0 +1,102 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.service; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.service.BaseService; |
|||
import com.elink.esua.epdc.commons.tools.page.PageData; |
|||
import com.elink.esua.epdc.dto.KpiTypicalCultureDTO; |
|||
import com.elink.esua.epdc.entity.KpiTypicalCultureEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 典型培树 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
public interface KpiTypicalCultureService extends BaseService<KpiTypicalCultureEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<KpiTypicalCultureDTO> |
|||
* @author generator |
|||
* @date 2020-06-16 |
|||
*/ |
|||
PageData<KpiTypicalCultureDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 分页条件查询 |
|||
* @param params |
|||
* @return |
|||
*/ |
|||
PageData<KpiTypicalCultureDTO> getInfoPage(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<KpiTypicalCultureDTO> |
|||
* @author generator |
|||
* @date 2020-06-16 |
|||
*/ |
|||
List<KpiTypicalCultureDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return KpiTypicalCultureDTO |
|||
* @author generator |
|||
* @date 2020-06-16 |
|||
*/ |
|||
KpiTypicalCultureDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-06-16 |
|||
*/ |
|||
void save(KpiTypicalCultureDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-06-16 |
|||
*/ |
|||
void update(KpiTypicalCultureDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-06-16 |
|||
*/ |
|||
void delete(String[] ids); |
|||
} |
|||
@ -0,0 +1,377 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.service.impl; |
|||
|
|||
import cn.afterturn.easypoi.excel.ExcelImportUtil; |
|||
import cn.afterturn.easypoi.excel.entity.ImportParams; |
|||
import cn.hutool.core.collection.CollUtil; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.elink.esua.epdc.commons.tools.constant.FieldConstant; |
|||
import com.elink.esua.epdc.commons.tools.constant.StrConstant; |
|||
import com.elink.esua.epdc.commons.tools.enums.YesOrNoEnum; |
|||
import com.elink.esua.epdc.commons.tools.exception.RenException; |
|||
import com.elink.esua.epdc.commons.tools.page.PageData; |
|||
import com.elink.esua.epdc.commons.tools.security.user.SecurityUser; |
|||
import com.elink.esua.epdc.commons.tools.security.user.UserDetail; |
|||
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.DateUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dao.KpiGridEntityDao; |
|||
import com.elink.esua.epdc.dto.DeptLevelAndLeaderDTO; |
|||
import com.elink.esua.epdc.dto.KpiGridEntityDTO; |
|||
import com.elink.esua.epdc.dto.SysDeptDTO; |
|||
import com.elink.esua.epdc.dto.epdc.form.ExportTemplateInfoFormDTO; |
|||
import com.elink.esua.epdc.dto.epdc.result.ExportKpiResultDTO; |
|||
import com.elink.esua.epdc.dto.form.CheckIsScoredFormDTO; |
|||
import com.elink.esua.epdc.entity.KpiGridEntityEntity; |
|||
import com.elink.esua.epdc.excel.KpiGridEntityExcel; |
|||
import com.elink.esua.epdc.feign.AdminFeignClient; |
|||
import com.elink.esua.epdc.redis.KpiGridEntityRedis; |
|||
import com.elink.esua.epdc.service.KpiGridEntityService; |
|||
import com.elink.esua.epdc.utils.DeptUtils; |
|||
import com.elink.esua.epdc.utils.StreamUtils; |
|||
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 org.springframework.web.multipart.MultipartFile; |
|||
|
|||
import java.io.File; |
|||
import java.util.ArrayList; |
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 网格实体化运作打分 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
@Service |
|||
public class KpiGridEntityServiceImpl extends BaseServiceImpl<KpiGridEntityDao, KpiGridEntityEntity> implements KpiGridEntityService { |
|||
|
|||
@Autowired |
|||
private KpiGridEntityRedis kpiGridEntityRedis; |
|||
|
|||
@Autowired |
|||
private AdminFeignClient adminFeignClient; |
|||
|
|||
@Autowired |
|||
private DeptUtils deptUtils; |
|||
|
|||
@Override |
|||
public PageData<KpiGridEntityDTO> page(Map<String, Object> params) { |
|||
IPage<KpiGridEntityEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, KpiGridEntityDTO.class); |
|||
} |
|||
|
|||
/** |
|||
* 条件查询 |
|||
* @param params |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public PageData<KpiGridEntityDTO> getInfoPage(Map<String, Object> params) { |
|||
IPage<KpiGridEntityDTO> page = getPage(params); |
|||
List<KpiGridEntityDTO> list = baseDao.getInfoPage(params); |
|||
return new PageData<>(list, page.getTotal()); |
|||
} |
|||
|
|||
@Override |
|||
public List<KpiGridEntityDTO> list(Map<String, Object> params) { |
|||
List<KpiGridEntityEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, KpiGridEntityDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<KpiGridEntityEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<KpiGridEntityEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public KpiGridEntityDTO get(String id) { |
|||
KpiGridEntityEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, KpiGridEntityDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(KpiGridEntityDTO dto) { |
|||
String deptId = dto.getDeptId(); |
|||
List<String> checkList = new ArrayList<String>(); |
|||
checkList.add(deptId); |
|||
// 判断录入月份是否为当前月或者前一个月
|
|||
if(!dto.getMonthYear().equals(DateUtils.getLastMonth()) && !dto.getMonthYear().equals(DateUtils.getCurrentMonth())){ |
|||
throw new RenException("只能对当前月份或者上个月份进行打分,请维护后重试!"); |
|||
} |
|||
// 检测excel中是否存在已打分部门
|
|||
StringBuffer deptErrorInfo = this.getDuplicateData(checkList,dto.getMonthYear()); |
|||
if (deptErrorInfo.length() > 0) { |
|||
throw new RenException(deptErrorInfo + " 已打分, 不可重复打分!"); |
|||
} |
|||
// 查询机构类型键值
|
|||
Result<SysDeptDTO> result = adminFeignClient.get(Long.valueOf(deptId)); |
|||
SysDeptDTO sysDeptDTO = result.getData(); |
|||
// 设置部门类别
|
|||
dto.setDeptTypeKey(sysDeptDTO.getTypeKey()); |
|||
KpiGridEntityEntity entity = ConvertUtils.sourceToTarget(dto, KpiGridEntityEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(KpiGridEntityDTO dto) { |
|||
KpiGridEntityEntity entity = ConvertUtils.sourceToTarget(dto, KpiGridEntityEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 拼接已打分部门提示信息 |
|||
* @param checkList |
|||
* @return |
|||
*/ |
|||
private StringBuffer getDuplicateData(List<String> checkList ,String monthYear){ |
|||
CheckIsScoredFormDTO checkIsScoredFormDTO = new CheckIsScoredFormDTO(); |
|||
checkIsScoredFormDTO.setCheckList(checkList); |
|||
checkIsScoredFormDTO.setMonthYear(monthYear); |
|||
StringBuffer deptErrorInfo = new StringBuffer(); |
|||
List<KpiGridEntityDTO> list = baseDao.getDuplicateData(checkIsScoredFormDTO); |
|||
for(int i = 0 ; i < list.size() ; i++){ |
|||
KpiGridEntityDTO kpiGridEntityDTO = list.get(i); |
|||
if(i == (list.size()-1)){ |
|||
deptErrorInfo.append(kpiGridEntityDTO.getDeptName()); |
|||
}else{ |
|||
deptErrorInfo.append(kpiGridEntityDTO.getDeptName()).append("、"); |
|||
} |
|||
} |
|||
return deptErrorInfo; |
|||
} |
|||
|
|||
/** |
|||
* 获取导出模板 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<KpiGridEntityDTO> |
|||
* @author wanggongfeng |
|||
* @date 2020-06-16 |
|||
*/ |
|||
@Override |
|||
public List<KpiGridEntityDTO> exportTemplate(Map<String, Object> params) { |
|||
List<Long> deptIdList = SecurityUser.getUser().getDeptIdList(); //获取用户权限
|
|||
ExportTemplateInfoFormDTO exportTemplateInfoFormDTO = new ExportTemplateInfoFormDTO(); |
|||
exportTemplateInfoFormDTO.setDeptIdList(deptIdList); |
|||
exportTemplateInfoFormDTO.setDeptId(params.get("deptId") == null ? "" : params.get("deptId").toString()); |
|||
exportTemplateInfoFormDTO.setDeptTypeKey(params.get("deptTypeKey") == null ? "" : params.get("deptTypeKey").toString()); |
|||
exportTemplateInfoFormDTO.setMonthYear(params.get("monthYear") == null ? "" : params.get("monthYear").toString()); |
|||
Result<List<ExportKpiResultDTO>> result = adminFeignClient.getExportTemplateInfo(exportTemplateInfoFormDTO); |
|||
List<ExportKpiResultDTO> resultList = result.getData(); |
|||
return ConvertUtils.sourceToTarget(resultList, KpiGridEntityDTO.class); |
|||
} |
|||
|
|||
/** |
|||
* @Description: 导入治理排行管理-网格实体化运作 |
|||
* @Param: [file] |
|||
* @return: Result |
|||
* @Author: wanggongfeng |
|||
* @Date: 2020-06-16 |
|||
*/ |
|||
@Override |
|||
public Result importManualScoreExcel(MultipartFile file) { |
|||
File f = StreamUtils.conversionFile(file); |
|||
try { |
|||
//判断上传文件类型
|
|||
String originalFilename = file.getOriginalFilename(); |
|||
if (!originalFilename.endsWith(StrConstant.EXCEL_SUFFIX_2003) && !originalFilename.endsWith(StrConstant.EXCEL_SUFFIX_2007)) { |
|||
return new Result().error("请选择.xls或者.xlsx格式文件"); |
|||
} |
|||
List<KpiGridEntityExcel> recordList = ExcelImportUtil.importExcel(f, KpiGridEntityExcel.class, new ImportParams()); |
|||
if (CollUtil.isEmpty(recordList)) { |
|||
return new Result().error("导入内容不能为空"); |
|||
} |
|||
// 存储检测excel是否存在重复ID使用
|
|||
List<String> checkList = new ArrayList<String>(); |
|||
StringBuffer checkInfo = new StringBuffer(); |
|||
String monthYear = ""; |
|||
for(int i = 0 ; i < recordList.size() ; i++){ |
|||
KpiGridEntityExcel kpiGridEntityExcel = recordList.get(i); |
|||
|
|||
// 校验是否存在空单元格
|
|||
if(checkNullCell(kpiGridEntityExcel)){ |
|||
return new Result().error("导入文件中存在空单元格,请完善后重试!"); |
|||
} |
|||
|
|||
// 校验是否存在分数范围不正确的打分
|
|||
if(checkScoreCell(kpiGridEntityExcel)){ |
|||
return new Result().error("存在不符合分值范围的分数!"); |
|||
} |
|||
|
|||
// 校验月份是否不一致
|
|||
if(i == 0){ |
|||
monthYear = kpiGridEntityExcel.getMonthYear(); |
|||
}else{ |
|||
if(!monthYear.equals(kpiGridEntityExcel.getMonthYear())){ |
|||
return new Result().error("导入文件中月份不一致,请修改一致后重试!"); |
|||
} |
|||
monthYear = kpiGridEntityExcel.getMonthYear(); |
|||
} |
|||
|
|||
// 校验ID是否存在重复
|
|||
if(checkList.contains(kpiGridEntityExcel.getDeptId())){ |
|||
return new Result().error(kpiGridEntityExcel.getDeptName() + "ID重复,请维护唯一ID后重试!"); |
|||
} |
|||
checkList.add(kpiGridEntityExcel.getDeptId()); |
|||
|
|||
// 拼接部门ID不在当前用户权限内的部门名称
|
|||
checkInfo.append(splicingErrorDeptName(i,kpiGridEntityExcel,recordList)); |
|||
} |
|||
// 判断导入月份是否为当前月或者前一个月
|
|||
if(!monthYear.equals(DateUtils.getLastMonth()) && !monthYear.equals(DateUtils.getCurrentMonth())){ |
|||
return new Result().error("只能对当前月份或者上个月份进行打分,请维护后重试!"); |
|||
} |
|||
// 校验部门ID是否存在当前用户权限内
|
|||
if (checkInfo.length() > 0) { |
|||
return new Result().error(checkInfo.append("部门ID错误,请维护后重试!").toString()); |
|||
} |
|||
// 检测excel中是否存在已打分部门
|
|||
StringBuffer deptErrorInfo = this.getDuplicateData(checkList,monthYear); |
|||
if (deptErrorInfo.length() > 0) { |
|||
return new Result().error(deptErrorInfo + " 已打分, 不可重复打分!"); |
|||
} |
|||
|
|||
// 插入网格建设打分数据(必要时可改为批量插入)
|
|||
for (KpiGridEntityExcel kpiGridEntityExcel : recordList) { |
|||
KpiGridEntityEntity entity = splicingEntity(kpiGridEntityExcel); |
|||
insert(entity); |
|||
} |
|||
} catch (Exception e) { |
|||
return new Result().error("数据异常,解析excel文件失败"); |
|||
} finally { |
|||
// 删除文件
|
|||
ExcelUtils.deleteAllFilesOfDir(f); |
|||
} |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* 校验是否存在空单元格 |
|||
* @param kpiGridEntityExcel |
|||
* @return |
|||
*/ |
|||
private Boolean checkNullCell(KpiGridEntityExcel kpiGridEntityExcel){ |
|||
if(StringUtils.isBlank(kpiGridEntityExcel.getDeptId()) || StringUtils.isBlank(kpiGridEntityExcel.getDeptName()) || StringUtils.isBlank(kpiGridEntityExcel.getMonthYear()) |
|||
|| StringUtils.isBlank(kpiGridEntityExcel.getStationEstablishment()) || StringUtils.isBlank(kpiGridEntityExcel.getDeptTypeKey()) |
|||
|| StringUtils.isBlank(kpiGridEntityExcel.getStaffingPlacement()) || StringUtils.isBlank(kpiGridEntityExcel.getGridOperation())){ |
|||
return true; |
|||
} |
|||
return false; |
|||
} |
|||
|
|||
/** |
|||
* 校验分数是否规范 |
|||
* @param kpiGridEntityExcel |
|||
* @return |
|||
*/ |
|||
private Boolean checkScoreCell(KpiGridEntityExcel kpiGridEntityExcel){ |
|||
// 建站达标分数(4分)
|
|||
String stationEstablishment = kpiGridEntityExcel.getStationEstablishment(); |
|||
if(ExcelUtils.checkNumber(stationEstablishment)){ |
|||
return true; |
|||
} |
|||
Double stationEstablishmentDouble = Double.parseDouble(stationEstablishment); |
|||
// 人员配备分数(3分)
|
|||
String staffingPlacement = kpiGridEntityExcel.getStaffingPlacement(); |
|||
if(ExcelUtils.checkNumber(staffingPlacement)){ |
|||
return true; |
|||
} |
|||
Double staffingPlacementDouble = Double.parseDouble(staffingPlacement); |
|||
// 网格运行分数(3分)
|
|||
String gridOperation = kpiGridEntityExcel.getGridOperation(); |
|||
if(ExcelUtils.checkNumber(gridOperation)){ |
|||
return true; |
|||
} |
|||
Double gridOperationDouble = Double.parseDouble(gridOperation); |
|||
if(stationEstablishmentDouble < 0 || stationEstablishmentDouble > 4 |
|||
|| staffingPlacementDouble < 0 || staffingPlacementDouble > 3 |
|||
|| gridOperationDouble < 0 || gridOperationDouble > 3){ |
|||
return true; |
|||
} |
|||
return false; |
|||
} |
|||
|
|||
/** |
|||
* 拼接部门ID不在当前用户权限内的部门名称 |
|||
* @param index |
|||
* @param kpiGridEntityExcel |
|||
* @param recordList |
|||
* @return |
|||
*/ |
|||
private String splicingErrorDeptName(int index, KpiGridEntityExcel kpiGridEntityExcel, List<KpiGridEntityExcel> recordList){ |
|||
UserDetail user = SecurityUser.getUser(); |
|||
List<Long> deptIdList = user.getDeptIdList(); |
|||
if(!deptIdList.contains(Long.valueOf(kpiGridEntityExcel.getDeptId()))){ |
|||
if(index == (recordList.size()-1)){ |
|||
return kpiGridEntityExcel.getDeptName(); |
|||
}else{ |
|||
return kpiGridEntityExcel.getDeptName() + "、"; |
|||
} |
|||
} |
|||
return ""; |
|||
} |
|||
|
|||
/** |
|||
* 拼接网格建设打分实体 |
|||
* @param kpiGridEntityExcel |
|||
* @return |
|||
*/ |
|||
private KpiGridEntityEntity splicingEntity(KpiGridEntityExcel kpiGridEntityExcel){ |
|||
KpiGridEntityEntity entity = ConvertUtils.sourceToTarget(kpiGridEntityExcel, KpiGridEntityEntity.class); |
|||
// 查询设置部门类别和部门名称
|
|||
String deptId = entity.getDeptId(); |
|||
Result<SysDeptDTO> result = adminFeignClient.get(Long.valueOf(deptId)); |
|||
SysDeptDTO sysDeptDTO = result.getData(); |
|||
entity.setDeptTypeKey(sysDeptDTO.getTypeKey()); |
|||
entity.setDeptName(sysDeptDTO.getName()); |
|||
// 查询设置上级部门信息
|
|||
DeptLevelAndLeaderDTO deptLevelInfo = deptUtils.getDeptLevelInfo(Long.valueOf(deptId), YesOrNoEnum.YES); |
|||
entity.setAllDeptIds(deptLevelInfo.getAllDeptIds()); |
|||
entity.setAllDeptNames(deptLevelInfo.getAllDeptNames()); |
|||
entity.setParentDeptIds(deptLevelInfo.getParentDeptIds()); |
|||
entity.setParentDeptNames(deptLevelInfo.getParentDeptNames()); |
|||
return entity; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,375 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.service.impl; |
|||
|
|||
import cn.afterturn.easypoi.excel.ExcelImportUtil; |
|||
import cn.afterturn.easypoi.excel.entity.ImportParams; |
|||
import cn.hutool.core.collection.CollUtil; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.elink.esua.epdc.commons.tools.constant.FieldConstant; |
|||
import com.elink.esua.epdc.commons.tools.constant.StrConstant; |
|||
import com.elink.esua.epdc.commons.tools.enums.YesOrNoEnum; |
|||
import com.elink.esua.epdc.commons.tools.exception.RenException; |
|||
import com.elink.esua.epdc.commons.tools.page.PageData; |
|||
import com.elink.esua.epdc.commons.tools.security.user.SecurityUser; |
|||
import com.elink.esua.epdc.commons.tools.security.user.UserDetail; |
|||
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.DateUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dao.KpiMassEvaluationDao; |
|||
import com.elink.esua.epdc.dto.DeptLevelAndLeaderDTO; |
|||
import com.elink.esua.epdc.dto.KpiMassEvaluationDTO; |
|||
import com.elink.esua.epdc.dto.SysDeptDTO; |
|||
import com.elink.esua.epdc.dto.epdc.form.ExportTemplateInfoFormDTO; |
|||
import com.elink.esua.epdc.dto.epdc.result.ExportKpiResultDTO; |
|||
import com.elink.esua.epdc.dto.form.CheckIsScoredByYearFormDTO; |
|||
import com.elink.esua.epdc.entity.KpiMassEvaluationEntity; |
|||
import com.elink.esua.epdc.excel.KpiMassEvaluationExcel; |
|||
import com.elink.esua.epdc.feign.AdminFeignClient; |
|||
import com.elink.esua.epdc.redis.KpiMassEvaluationRedis; |
|||
import com.elink.esua.epdc.service.KpiMassEvaluationService; |
|||
import com.elink.esua.epdc.utils.DeptUtils; |
|||
import com.elink.esua.epdc.utils.StreamUtils; |
|||
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 org.springframework.web.multipart.MultipartFile; |
|||
|
|||
import java.io.File; |
|||
import java.util.ArrayList; |
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 群众评价打分表 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
@Service |
|||
public class KpiMassEvaluationServiceImpl extends BaseServiceImpl<KpiMassEvaluationDao, KpiMassEvaluationEntity> implements KpiMassEvaluationService { |
|||
|
|||
@Autowired |
|||
private KpiMassEvaluationRedis kpiMassEvaluationRedis; |
|||
|
|||
@Autowired |
|||
private AdminFeignClient adminFeignClient; |
|||
|
|||
@Autowired |
|||
private DeptUtils deptUtils; |
|||
|
|||
@Override |
|||
public PageData<KpiMassEvaluationDTO> page(Map<String, Object> params) { |
|||
IPage<KpiMassEvaluationEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, KpiMassEvaluationDTO.class); |
|||
} |
|||
|
|||
/** |
|||
* 条件查询 |
|||
* @param params |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public PageData<KpiMassEvaluationDTO> getInfoPage(Map<String, Object> params) { |
|||
IPage<KpiMassEvaluationDTO> page = getPage(params); |
|||
List<KpiMassEvaluationDTO> list = baseDao.getInfoPage(params); |
|||
return new PageData<>(list, page.getTotal()); |
|||
} |
|||
|
|||
@Override |
|||
public List<KpiMassEvaluationDTO> list(Map<String, Object> params) { |
|||
List<KpiMassEvaluationEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, KpiMassEvaluationDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<KpiMassEvaluationEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<KpiMassEvaluationEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public KpiMassEvaluationDTO get(String id) { |
|||
KpiMassEvaluationEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, KpiMassEvaluationDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(KpiMassEvaluationDTO dto) { |
|||
String deptId = dto.getDeptId(); |
|||
List<String> checkList = new ArrayList<String>(); |
|||
checkList.add(deptId); |
|||
// 判断录入年份是否为当前年份
|
|||
if(!dto.getYear().equals(DateUtils.getCurrentYear())){ |
|||
throw new RenException("只能对当前年份进行打分,请维护后重试!"); |
|||
} |
|||
// 检测excel中是否存在已打分部门
|
|||
StringBuffer deptErrorInfo = this.getDuplicateData(checkList,dto.getYear()); |
|||
if (deptErrorInfo.length() > 0) { |
|||
throw new RenException(deptErrorInfo + " 已打分, 不可重复打分!"); |
|||
} |
|||
// 查询机构类型键值
|
|||
Result<SysDeptDTO> result = adminFeignClient.get(Long.valueOf(deptId)); |
|||
SysDeptDTO sysDeptDTO = result.getData(); |
|||
// 设置部门类别
|
|||
dto.setDeptTypeKey(sysDeptDTO.getTypeKey()); |
|||
KpiMassEvaluationEntity entity = ConvertUtils.sourceToTarget(dto, KpiMassEvaluationEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(KpiMassEvaluationDTO dto) { |
|||
KpiMassEvaluationEntity entity = ConvertUtils.sourceToTarget(dto, KpiMassEvaluationEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 拼接已打分部门提示信息 |
|||
* @param checkList |
|||
* @return |
|||
*/ |
|||
private StringBuffer getDuplicateData(List<String> checkList ,String year){ |
|||
CheckIsScoredByYearFormDTO checkIsScoredByYearFormDTO = new CheckIsScoredByYearFormDTO(); |
|||
checkIsScoredByYearFormDTO.setCheckList(checkList); |
|||
checkIsScoredByYearFormDTO.setYear(year); |
|||
StringBuffer deptErrorInfo = new StringBuffer(); |
|||
List<KpiMassEvaluationDTO> list = baseDao.getDuplicateData(checkIsScoredByYearFormDTO); |
|||
for(int i = 0 ; i < list.size() ; i++){ |
|||
KpiMassEvaluationDTO kpiMassEvaluationDTO = list.get(i); |
|||
if(i == (list.size()-1)){ |
|||
deptErrorInfo.append(kpiMassEvaluationDTO.getDeptName()); |
|||
}else{ |
|||
deptErrorInfo.append(kpiMassEvaluationDTO.getDeptName()).append("、"); |
|||
} |
|||
} |
|||
return deptErrorInfo; |
|||
} |
|||
|
|||
/** |
|||
* 获取导出模板 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<KpiCommunityBuildingDTO> |
|||
* @author wanggongfeng |
|||
* @date 2020-06-15 |
|||
*/ |
|||
@Override |
|||
public List<KpiMassEvaluationDTO> exportTemplate(Map<String, Object> params) { |
|||
List<Long> deptIdList = SecurityUser.getUser().getDeptIdList(); //获取用户权限
|
|||
ExportTemplateInfoFormDTO exportTemplateInfoFormDTO = new ExportTemplateInfoFormDTO(); |
|||
exportTemplateInfoFormDTO.setDeptIdList(deptIdList); |
|||
exportTemplateInfoFormDTO.setDeptId(params.get("deptId") == null ? "" : params.get("deptId").toString()); |
|||
exportTemplateInfoFormDTO.setDeptTypeKey(params.get("deptTypeKey") == null ? "" : params.get("deptTypeKey").toString()); |
|||
exportTemplateInfoFormDTO.setYear(params.get("year") == null ? "" : params.get("year").toString()); |
|||
Result<List<ExportKpiResultDTO>> result = adminFeignClient.getExportTemplateInfo(exportTemplateInfoFormDTO); |
|||
List<ExportKpiResultDTO> resultList = result.getData(); |
|||
return ConvertUtils.sourceToTarget(resultList, KpiMassEvaluationDTO.class); |
|||
} |
|||
|
|||
/** |
|||
* @Description: 导入治理排行管理-群众评价打分 |
|||
* @Param: [file] |
|||
* @return: Result |
|||
* @Author: wanggongfeng |
|||
* @Date: 2020-06-17 |
|||
*/ |
|||
@Override |
|||
public Result importManualScoreExcel(MultipartFile file) { |
|||
File f = StreamUtils.conversionFile(file); |
|||
try { |
|||
//判断上传文件类型
|
|||
String originalFilename = file.getOriginalFilename(); |
|||
if (!originalFilename.endsWith(StrConstant.EXCEL_SUFFIX_2003) && !originalFilename.endsWith(StrConstant.EXCEL_SUFFIX_2007)) { |
|||
return new Result().error("请选择.xls或者.xlsx格式文件"); |
|||
} |
|||
List<KpiMassEvaluationExcel> recordList = ExcelImportUtil.importExcel(f, KpiMassEvaluationExcel.class, new ImportParams()); |
|||
if (CollUtil.isEmpty(recordList)) { |
|||
return new Result().error("导入内容不能为空"); |
|||
} |
|||
// 存储检测excel是否存在重复ID使用
|
|||
List<String> checkList = new ArrayList<String>(); |
|||
StringBuffer checkInfo = new StringBuffer(); |
|||
String year = ""; |
|||
for(int i = 0 ; i < recordList.size() ; i++){ |
|||
KpiMassEvaluationExcel kpiMassEvaluationExcel = recordList.get(i); |
|||
|
|||
// 校验是否存在空单元格
|
|||
if(checkNullCell(kpiMassEvaluationExcel)){ |
|||
return new Result().error("导入文件中存在空单元格,请完善后重试!"); |
|||
} |
|||
|
|||
// 校验是否存在分数范围不正确的打分
|
|||
if(checkScoreCell(kpiMassEvaluationExcel)){ |
|||
return new Result().error("存在分值总和超过20分的部门,请维护后重试!"); |
|||
} |
|||
|
|||
// 校验月份是否不一致
|
|||
if(i == 0){ |
|||
year = kpiMassEvaluationExcel.getYear(); |
|||
}else{ |
|||
if(!year.equals(kpiMassEvaluationExcel.getYear())){ |
|||
return new Result().error("导入文件中年份不一致,请修改一致后重试!"); |
|||
} |
|||
year = kpiMassEvaluationExcel.getYear(); |
|||
} |
|||
|
|||
// 校验ID是否存在重复
|
|||
if(checkList.contains(kpiMassEvaluationExcel.getDeptId())){ |
|||
return new Result().error(kpiMassEvaluationExcel.getDeptName() + "ID重复,请维护唯一ID后重试!"); |
|||
} |
|||
checkList.add(kpiMassEvaluationExcel.getDeptId()); |
|||
|
|||
// 拼接部门ID不在当前用户权限内的部门名称
|
|||
checkInfo.append(splicingErrorDeptName(i,kpiMassEvaluationExcel,recordList)); |
|||
} |
|||
// 判断导入年份是否为当前年份
|
|||
if(!year.equals(DateUtils.getCurrentYear())){ |
|||
return new Result().error("只能对当前年份进行打分,请维护后重试!"); |
|||
} |
|||
// 校验部门ID是否存在当前用户权限内
|
|||
if (checkInfo.length() > 0) { |
|||
return new Result().error(checkInfo.append("部门ID错误,请维护后重试!").toString()); |
|||
} |
|||
// 检测excel中是否存在已打分部门
|
|||
StringBuffer deptErrorInfo = this.getDuplicateData(checkList,year); |
|||
if (deptErrorInfo.length() > 0) { |
|||
return new Result().error(deptErrorInfo + " 已打分, 不可重复打分!"); |
|||
} |
|||
|
|||
// 插入群众评价打分数据(必要时可改为批量插入)
|
|||
for (KpiMassEvaluationExcel kpiMassEvaluationExcel : recordList) { |
|||
KpiMassEvaluationEntity entity = splicingEntity(kpiMassEvaluationExcel); |
|||
insert(entity); |
|||
} |
|||
} catch (Exception e) { |
|||
return new Result().error("数据异常,解析excel文件失败"); |
|||
} finally { |
|||
// 删除文件
|
|||
ExcelUtils.deleteAllFilesOfDir(f); |
|||
} |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* 校验是否存在空单元格 |
|||
* @param kpiMassEvaluationExcel |
|||
* @return |
|||
*/ |
|||
private Boolean checkNullCell(KpiMassEvaluationExcel kpiMassEvaluationExcel){ |
|||
if(StringUtils.isBlank(kpiMassEvaluationExcel.getDeptId()) || StringUtils.isBlank(kpiMassEvaluationExcel.getDeptName()) || StringUtils.isBlank(kpiMassEvaluationExcel.getYear()) |
|||
|| StringUtils.isBlank(kpiMassEvaluationExcel.getSatisfied()) || StringUtils.isBlank(kpiMassEvaluationExcel.getDeptTypeKey()) |
|||
|| StringUtils.isBlank(kpiMassEvaluationExcel.getBasicSatisfaction()) || StringUtils.isBlank(kpiMassEvaluationExcel.getDissatisfied())){ |
|||
return true; |
|||
} |
|||
return false; |
|||
} |
|||
|
|||
/** |
|||
* 校验分数是否规范 |
|||
* @param kpiMassEvaluationExcel |
|||
* @return |
|||
*/ |
|||
private Boolean checkScoreCell(KpiMassEvaluationExcel kpiMassEvaluationExcel){ |
|||
// 满意分数
|
|||
String satisfied = kpiMassEvaluationExcel.getSatisfied(); |
|||
if(ExcelUtils.checkNumber(satisfied)){ |
|||
return true; |
|||
} |
|||
Double satisfiedDouble = Double.parseDouble(satisfied); |
|||
// 基本满意分数
|
|||
String basicSatisfaction = kpiMassEvaluationExcel.getBasicSatisfaction(); |
|||
if(ExcelUtils.checkNumber(basicSatisfaction)){ |
|||
return true; |
|||
} |
|||
Double basicSatisfactionDouble = Double.parseDouble(basicSatisfaction); |
|||
// 不满意分数
|
|||
String dissatisfied = kpiMassEvaluationExcel.getDissatisfied(); |
|||
if(ExcelUtils.checkNumber(dissatisfied)){ |
|||
return true; |
|||
} |
|||
Double dissatisfiedDouble = Double.parseDouble(dissatisfied); |
|||
if((satisfiedDouble + basicSatisfactionDouble + dissatisfiedDouble) > 20){ |
|||
return true; |
|||
} |
|||
return false; |
|||
} |
|||
|
|||
/** |
|||
* 拼接部门ID不在当前用户权限内的部门名称 |
|||
* @param index |
|||
* @param kpiMassEvaluationExcel |
|||
* @param recordList |
|||
* @return |
|||
*/ |
|||
private String splicingErrorDeptName(int index,KpiMassEvaluationExcel kpiMassEvaluationExcel,List<KpiMassEvaluationExcel> recordList){ |
|||
UserDetail user = SecurityUser.getUser(); |
|||
List<Long> deptIdList = user.getDeptIdList(); |
|||
if(!deptIdList.contains(Long.valueOf(kpiMassEvaluationExcel.getDeptId()))){ |
|||
if(index == (recordList.size()-1)){ |
|||
return kpiMassEvaluationExcel.getDeptName(); |
|||
}else{ |
|||
return kpiMassEvaluationExcel.getDeptName() + "、"; |
|||
} |
|||
} |
|||
return ""; |
|||
} |
|||
|
|||
/** |
|||
* 拼接网格建设打分实体 |
|||
* @param kpiMassEvaluationExcel |
|||
* @return |
|||
*/ |
|||
private KpiMassEvaluationEntity splicingEntity(KpiMassEvaluationExcel kpiMassEvaluationExcel){ |
|||
KpiMassEvaluationEntity entity = ConvertUtils.sourceToTarget(kpiMassEvaluationExcel, KpiMassEvaluationEntity.class); |
|||
// 查询设置部门类别和部门名称
|
|||
String deptId = entity.getDeptId(); |
|||
Result<SysDeptDTO> result = adminFeignClient.get(Long.valueOf(deptId)); |
|||
SysDeptDTO sysDeptDTO = result.getData(); |
|||
entity.setDeptTypeKey(sysDeptDTO.getTypeKey()); |
|||
entity.setDeptName(sysDeptDTO.getName()); |
|||
// 查询设置上级部门信息
|
|||
DeptLevelAndLeaderDTO deptLevelInfo = deptUtils.getDeptLevelInfo(Long.valueOf(deptId), YesOrNoEnum.YES); |
|||
entity.setAllDeptIds(deptLevelInfo.getAllDeptIds()); |
|||
entity.setAllDeptNames(deptLevelInfo.getAllDeptNames()); |
|||
entity.setParentDeptIds(deptLevelInfo.getParentDeptIds()); |
|||
entity.setParentDeptNames(deptLevelInfo.getParentDeptNames()); |
|||
return entity; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,137 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.elink.esua.epdc.commons.tools.constant.FieldConstant; |
|||
import com.elink.esua.epdc.commons.tools.exception.RenException; |
|||
import com.elink.esua.epdc.commons.tools.page.PageData; |
|||
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.DateUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dao.KpiMattersResponseDao; |
|||
import com.elink.esua.epdc.dto.KpiMattersResponseDTO; |
|||
import com.elink.esua.epdc.dto.SysDeptDTO; |
|||
import com.elink.esua.epdc.entity.KpiMattersResponseEntity; |
|||
import com.elink.esua.epdc.feign.AdminFeignClient; |
|||
import com.elink.esua.epdc.redis.KpiMattersResponseRedis; |
|||
import com.elink.esua.epdc.service.KpiMattersResponseService; |
|||
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.ArrayList; |
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 响应率打分表 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
@Service |
|||
public class KpiMattersResponseServiceImpl extends BaseServiceImpl<KpiMattersResponseDao, KpiMattersResponseEntity> implements KpiMattersResponseService { |
|||
|
|||
@Autowired |
|||
private KpiMattersResponseRedis kpiMattersResponseRedis; |
|||
|
|||
@Autowired |
|||
private AdminFeignClient adminFeignClient; |
|||
|
|||
@Override |
|||
public PageData<KpiMattersResponseDTO> page(Map<String, Object> params) { |
|||
IPage<KpiMattersResponseEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, KpiMattersResponseDTO.class); |
|||
} |
|||
|
|||
/** |
|||
* 条件查询 |
|||
* @param params |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public PageData<KpiMattersResponseDTO> getInfoPage(Map<String, Object> params) { |
|||
IPage<KpiMattersResponseDTO> page = getPage(params); |
|||
List<KpiMattersResponseDTO> list = baseDao.getInfoPage(params); |
|||
return new PageData<>(list, page.getTotal()); |
|||
} |
|||
|
|||
@Override |
|||
public List<KpiMattersResponseDTO> list(Map<String, Object> params) { |
|||
List<KpiMattersResponseEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, KpiMattersResponseDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<KpiMattersResponseEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<KpiMattersResponseEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public KpiMattersResponseDTO get(String id) { |
|||
KpiMattersResponseEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, KpiMattersResponseDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(KpiMattersResponseDTO dto) { |
|||
String deptId = dto.getDeptId(); |
|||
List<String> checkList = new ArrayList<String>(); |
|||
checkList.add(deptId); |
|||
// 判断录入月份是否为当前月或者前一个月
|
|||
if(!dto.getMonthYear().equals(DateUtils.getLastMonth()) && !dto.getMonthYear().equals(DateUtils.getCurrentMonth())){ |
|||
throw new RenException("只能对当前月份或者上个月份进行扣分,请维护后重试!"); |
|||
} |
|||
// 查询机构类型键值
|
|||
Result<SysDeptDTO> result = adminFeignClient.get(Long.valueOf(deptId)); |
|||
SysDeptDTO sysDeptDTO = result.getData(); |
|||
// 设置部门类别
|
|||
dto.setDeptTypeKey(sysDeptDTO.getTypeKey()); |
|||
KpiMattersResponseEntity entity = ConvertUtils.sourceToTarget(dto, KpiMattersResponseEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(KpiMattersResponseDTO dto) { |
|||
KpiMattersResponseEntity entity = ConvertUtils.sourceToTarget(dto, KpiMattersResponseEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,377 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.service.impl; |
|||
|
|||
import cn.afterturn.easypoi.excel.ExcelImportUtil; |
|||
import cn.afterturn.easypoi.excel.entity.ImportParams; |
|||
import cn.hutool.core.collection.CollUtil; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.elink.esua.epdc.commons.tools.constant.FieldConstant; |
|||
import com.elink.esua.epdc.commons.tools.constant.StrConstant; |
|||
import com.elink.esua.epdc.commons.tools.enums.YesOrNoEnum; |
|||
import com.elink.esua.epdc.commons.tools.exception.RenException; |
|||
import com.elink.esua.epdc.commons.tools.page.PageData; |
|||
import com.elink.esua.epdc.commons.tools.security.user.SecurityUser; |
|||
import com.elink.esua.epdc.commons.tools.security.user.UserDetail; |
|||
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.DateUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dao.KpiPublicOpinionDao; |
|||
import com.elink.esua.epdc.dto.DeptLevelAndLeaderDTO; |
|||
import com.elink.esua.epdc.dto.KpiPublicOpinionDTO; |
|||
import com.elink.esua.epdc.dto.SysDeptDTO; |
|||
import com.elink.esua.epdc.dto.epdc.form.ExportTemplateInfoFormDTO; |
|||
import com.elink.esua.epdc.dto.epdc.result.ExportKpiResultDTO; |
|||
import com.elink.esua.epdc.dto.form.CheckIsScoredFormDTO; |
|||
import com.elink.esua.epdc.entity.KpiPublicOpinionEntity; |
|||
import com.elink.esua.epdc.excel.KpiPublicOpinionExcel; |
|||
import com.elink.esua.epdc.feign.AdminFeignClient; |
|||
import com.elink.esua.epdc.redis.KpiPublicOpinionRedis; |
|||
import com.elink.esua.epdc.service.KpiPublicOpinionService; |
|||
import com.elink.esua.epdc.utils.DeptUtils; |
|||
import com.elink.esua.epdc.utils.StreamUtils; |
|||
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 org.springframework.web.multipart.MultipartFile; |
|||
|
|||
import java.io.File; |
|||
import java.util.ArrayList; |
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 舆论监督打分表 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
@Service |
|||
public class KpiPublicOpinionServiceImpl extends BaseServiceImpl<KpiPublicOpinionDao, KpiPublicOpinionEntity> implements KpiPublicOpinionService { |
|||
|
|||
@Autowired |
|||
private KpiPublicOpinionRedis kpiPublicOpinionRedis; |
|||
|
|||
@Autowired |
|||
private AdminFeignClient adminFeignClient; |
|||
|
|||
@Autowired |
|||
private DeptUtils deptUtils; |
|||
|
|||
@Override |
|||
public PageData<KpiPublicOpinionDTO> page(Map<String, Object> params) { |
|||
IPage<KpiPublicOpinionEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, KpiPublicOpinionDTO.class); |
|||
} |
|||
|
|||
/** |
|||
* 条件查询 |
|||
* @param params |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public PageData<KpiPublicOpinionDTO> getInfoPage(Map<String, Object> params) { |
|||
IPage<KpiPublicOpinionDTO> page = getPage(params); |
|||
List<KpiPublicOpinionDTO> list = baseDao.getInfoPage(params); |
|||
return new PageData<>(list, page.getTotal()); |
|||
} |
|||
|
|||
@Override |
|||
public List<KpiPublicOpinionDTO> list(Map<String, Object> params) { |
|||
List<KpiPublicOpinionEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, KpiPublicOpinionDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<KpiPublicOpinionEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<KpiPublicOpinionEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public KpiPublicOpinionDTO get(String id) { |
|||
KpiPublicOpinionEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, KpiPublicOpinionDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(KpiPublicOpinionDTO dto) { |
|||
String deptId = dto.getDeptId(); |
|||
List<String> checkList = new ArrayList<String>(); |
|||
checkList.add(deptId); |
|||
// 判断录入月份是否为当前月或者前一个月
|
|||
if(!dto.getMonthYear().equals(DateUtils.getLastMonth()) && !dto.getMonthYear().equals(DateUtils.getCurrentMonth())){ |
|||
throw new RenException("只能对当前月份或者上个月份进行打分,请维护后重试!"); |
|||
} |
|||
// 检测excel中是否存在已打分部门
|
|||
StringBuffer deptErrorInfo = this.getDuplicateData(checkList,dto.getMonthYear()); |
|||
if (deptErrorInfo.length() > 0) { |
|||
throw new RenException(deptErrorInfo + " 已打分, 不可重复打分!"); |
|||
} |
|||
// 查询机构类型键值
|
|||
Result<SysDeptDTO> result = adminFeignClient.get(Long.valueOf(deptId)); |
|||
SysDeptDTO sysDeptDTO = result.getData(); |
|||
// 设置部门类别
|
|||
dto.setDeptTypeKey(sysDeptDTO.getTypeKey()); |
|||
KpiPublicOpinionEntity entity = ConvertUtils.sourceToTarget(dto, KpiPublicOpinionEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(KpiPublicOpinionDTO dto) { |
|||
KpiPublicOpinionEntity entity = ConvertUtils.sourceToTarget(dto, KpiPublicOpinionEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 拼接已打分部门提示信息 |
|||
* @param checkList |
|||
* @return |
|||
*/ |
|||
private StringBuffer getDuplicateData(List<String> checkList ,String monthYear){ |
|||
CheckIsScoredFormDTO checkIsScoredFormDTO = new CheckIsScoredFormDTO(); |
|||
checkIsScoredFormDTO.setCheckList(checkList); |
|||
checkIsScoredFormDTO.setMonthYear(monthYear); |
|||
StringBuffer deptErrorInfo = new StringBuffer(); |
|||
List<KpiPublicOpinionDTO> list = baseDao.getDuplicateData(checkIsScoredFormDTO); |
|||
for(int i = 0 ; i < list.size() ; i++){ |
|||
KpiPublicOpinionDTO kpiPublicOpinionDTO = list.get(i); |
|||
if(i == (list.size()-1)){ |
|||
deptErrorInfo.append(kpiPublicOpinionDTO.getDeptName()); |
|||
}else{ |
|||
deptErrorInfo.append(kpiPublicOpinionDTO.getDeptName()).append("、"); |
|||
} |
|||
} |
|||
return deptErrorInfo; |
|||
} |
|||
|
|||
/** |
|||
* 获取导出模板 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<KpiPublicOpinionDTO> |
|||
* @author wanggongfeng |
|||
* @date 2020-06-15 |
|||
*/ |
|||
@Override |
|||
public List<KpiPublicOpinionDTO> exportTemplate(Map<String, Object> params) { |
|||
List<Long> deptIdList = SecurityUser.getUser().getDeptIdList(); //获取用户权限
|
|||
ExportTemplateInfoFormDTO exportTemplateInfoFormDTO = new ExportTemplateInfoFormDTO(); |
|||
exportTemplateInfoFormDTO.setDeptIdList(deptIdList); |
|||
exportTemplateInfoFormDTO.setDeptId(params.get("deptId") == null ? "" : params.get("deptId").toString()); |
|||
exportTemplateInfoFormDTO.setDeptTypeKey(params.get("deptTypeKey") == null ? "" : params.get("deptTypeKey").toString()); |
|||
exportTemplateInfoFormDTO.setMonthYear(params.get("monthYear") == null ? "" : params.get("monthYear").toString()); |
|||
Result<List<ExportKpiResultDTO>> result = adminFeignClient.getExportTemplateInfo(exportTemplateInfoFormDTO); |
|||
List<ExportKpiResultDTO> resultList = result.getData(); |
|||
return ConvertUtils.sourceToTarget(resultList, KpiPublicOpinionDTO.class); |
|||
} |
|||
|
|||
/** |
|||
* @Description: 导入治理排行管理-舆论监督打分 |
|||
* @Param: [file] |
|||
* @return: Result |
|||
* @Author: wanggongfeng |
|||
* @Date: 2020-06-17 |
|||
*/ |
|||
@Override |
|||
public Result importManualScoreExcel(MultipartFile file) { |
|||
File f = StreamUtils.conversionFile(file); |
|||
try { |
|||
//判断上传文件类型
|
|||
String originalFilename = file.getOriginalFilename(); |
|||
if (!originalFilename.endsWith(StrConstant.EXCEL_SUFFIX_2003) && !originalFilename.endsWith(StrConstant.EXCEL_SUFFIX_2007)) { |
|||
return new Result().error("请选择.xls或者.xlsx格式文件"); |
|||
} |
|||
List<KpiPublicOpinionExcel> recordList = ExcelImportUtil.importExcel(f, KpiPublicOpinionExcel.class, new ImportParams()); |
|||
if (CollUtil.isEmpty(recordList)) { |
|||
return new Result().error("导入内容不能为空"); |
|||
} |
|||
// 存储检测excel是否存在重复ID使用
|
|||
List<String> checkList = new ArrayList<String>(); |
|||
StringBuffer checkInfo = new StringBuffer(); |
|||
String monthYear = ""; |
|||
for(int i = 0 ; i < recordList.size() ; i++){ |
|||
KpiPublicOpinionExcel kpiPublicOpinionExcel = recordList.get(i); |
|||
|
|||
// 校验是否存在空单元格
|
|||
if(checkNullCell(kpiPublicOpinionExcel)){ |
|||
return new Result().error("导入文件中存在空单元格,请完善后重试!"); |
|||
} |
|||
|
|||
// 校验是否存在分数范围不正确的打分
|
|||
if(checkScoreCell(kpiPublicOpinionExcel)){ |
|||
return new Result().error("存在不符合分值范围的分数!"); |
|||
} |
|||
|
|||
// 校验月份是否不一致
|
|||
if(i == 0){ |
|||
monthYear = kpiPublicOpinionExcel.getMonthYear(); |
|||
}else{ |
|||
if(!monthYear.equals(kpiPublicOpinionExcel.getMonthYear())){ |
|||
return new Result().error("导入文件中月份不一致,请修改一致后重试!"); |
|||
} |
|||
monthYear = kpiPublicOpinionExcel.getMonthYear(); |
|||
} |
|||
|
|||
// 校验ID是否存在重复
|
|||
if(checkList.contains(kpiPublicOpinionExcel.getDeptId())){ |
|||
return new Result().error(kpiPublicOpinionExcel.getDeptName() + "ID重复,请维护唯一ID后重试!"); |
|||
} |
|||
checkList.add(kpiPublicOpinionExcel.getDeptId()); |
|||
|
|||
// 拼接部门ID不在当前用户权限内的部门名称
|
|||
checkInfo.append(splicingErrorDeptName(i,kpiPublicOpinionExcel,recordList)); |
|||
} |
|||
// 判断导入月份是否为当前月或者前一个月
|
|||
if(!monthYear.equals(DateUtils.getLastMonth()) && !monthYear.equals(DateUtils.getCurrentMonth())){ |
|||
return new Result().error("只能对当前月份或者上个月份进行打分,请维护后重试!"); |
|||
} |
|||
// 校验部门ID是否存在当前用户权限内
|
|||
if (checkInfo.length() > 0) { |
|||
return new Result().error(checkInfo.append("部门ID错误,请维护后重试!").toString()); |
|||
} |
|||
// 检测excel中是否存在已打分部门
|
|||
StringBuffer deptErrorInfo = this.getDuplicateData(checkList,monthYear); |
|||
if (deptErrorInfo.length() > 0) { |
|||
return new Result().error(deptErrorInfo + " 已打分, 不可重复打分!"); |
|||
} |
|||
|
|||
// 插入网格建设打分数据(必要时可改为批量插入)
|
|||
for (KpiPublicOpinionExcel kpiPublicOpinionExcel : recordList) { |
|||
KpiPublicOpinionEntity entity = splicingEntity(kpiPublicOpinionExcel); |
|||
insert(entity); |
|||
} |
|||
} catch (Exception e) { |
|||
return new Result().error("数据异常,解析excel文件失败"); |
|||
} finally { |
|||
// 删除文件
|
|||
ExcelUtils.deleteAllFilesOfDir(f); |
|||
} |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* 校验是否存在空单元格 |
|||
* @param kpiPublicOpinionExcel |
|||
* @return |
|||
*/ |
|||
private Boolean checkNullCell(KpiPublicOpinionExcel kpiPublicOpinionExcel){ |
|||
if(StringUtils.isBlank(kpiPublicOpinionExcel.getDeptId()) || StringUtils.isBlank(kpiPublicOpinionExcel.getDeptName()) || StringUtils.isBlank(kpiPublicOpinionExcel.getMonthYear()) |
|||
|| StringUtils.isBlank(kpiPublicOpinionExcel.getPublicityFoundation()) || StringUtils.isBlank(kpiPublicOpinionExcel.getDeptTypeKey()) |
|||
|| StringUtils.isBlank(kpiPublicOpinionExcel.getPublicOpinionResponse()) || StringUtils.isBlank(kpiPublicOpinionExcel.getInnovationBreakthrough())){ |
|||
return true; |
|||
} |
|||
return false; |
|||
} |
|||
|
|||
/** |
|||
* 校验分数是否规范 |
|||
* @param kpiPublicOpinionExcel |
|||
* @return |
|||
*/ |
|||
private Boolean checkScoreCell(KpiPublicOpinionExcel kpiPublicOpinionExcel){ |
|||
// 宣传基础分数(5分)
|
|||
String publicityFoundation = kpiPublicOpinionExcel.getPublicityFoundation(); |
|||
if(ExcelUtils.checkNumber(publicityFoundation)){ |
|||
return true; |
|||
} |
|||
Double publicityFoundationDouble = Double.parseDouble(publicityFoundation); |
|||
// 创新突破分数(3分)
|
|||
String innovationBreakthrough = kpiPublicOpinionExcel.getInnovationBreakthrough(); |
|||
if(ExcelUtils.checkNumber(innovationBreakthrough)){ |
|||
return true; |
|||
} |
|||
Double innovationBreakthroughDouble = Double.parseDouble(innovationBreakthrough); |
|||
// 舆情应对分数(2分)
|
|||
String publicOpinionResponse = kpiPublicOpinionExcel.getPublicOpinionResponse(); |
|||
if(ExcelUtils.checkNumber(publicOpinionResponse)){ |
|||
return true; |
|||
} |
|||
Double publicOpinionResponseDouble = Double.parseDouble(publicOpinionResponse); |
|||
if(publicityFoundationDouble < 0 || publicityFoundationDouble > 5 |
|||
|| innovationBreakthroughDouble < 0 || innovationBreakthroughDouble > 3 |
|||
|| publicOpinionResponseDouble < 0 || publicOpinionResponseDouble > 2){ |
|||
return true; |
|||
} |
|||
return false; |
|||
} |
|||
|
|||
/** |
|||
* 拼接部门ID不在当前用户权限内的部门名称 |
|||
* @param index |
|||
* @param kpiPublicOpinionExcel |
|||
* @param recordList |
|||
* @return |
|||
*/ |
|||
private String splicingErrorDeptName(int index,KpiPublicOpinionExcel kpiPublicOpinionExcel,List<KpiPublicOpinionExcel> recordList){ |
|||
UserDetail user = SecurityUser.getUser(); |
|||
List<Long> deptIdList = user.getDeptIdList(); |
|||
if(!deptIdList.contains(Long.valueOf(kpiPublicOpinionExcel.getDeptId()))){ |
|||
if(index == (recordList.size()-1)){ |
|||
return kpiPublicOpinionExcel.getDeptName(); |
|||
}else{ |
|||
return kpiPublicOpinionExcel.getDeptName() + "、"; |
|||
} |
|||
} |
|||
return ""; |
|||
} |
|||
|
|||
/** |
|||
* 拼接网格建设打分实体 |
|||
* @param kpiPublicOpinionExcel |
|||
* @return |
|||
*/ |
|||
private KpiPublicOpinionEntity splicingEntity(KpiPublicOpinionExcel kpiPublicOpinionExcel){ |
|||
KpiPublicOpinionEntity entity = ConvertUtils.sourceToTarget(kpiPublicOpinionExcel, KpiPublicOpinionEntity.class); |
|||
// 查询设置部门类别和部门名称
|
|||
String deptId = entity.getDeptId(); |
|||
Result<SysDeptDTO> result = adminFeignClient.get(Long.valueOf(deptId)); |
|||
SysDeptDTO sysDeptDTO = result.getData(); |
|||
entity.setDeptTypeKey(sysDeptDTO.getTypeKey()); |
|||
entity.setDeptName(sysDeptDTO.getName()); |
|||
// 查询设置上级部门信息
|
|||
DeptLevelAndLeaderDTO deptLevelInfo = deptUtils.getDeptLevelInfo(Long.valueOf(deptId), YesOrNoEnum.YES); |
|||
entity.setAllDeptIds(deptLevelInfo.getAllDeptIds()); |
|||
entity.setAllDeptNames(deptLevelInfo.getAllDeptNames()); |
|||
entity.setParentDeptIds(deptLevelInfo.getParentDeptIds()); |
|||
entity.setParentDeptNames(deptLevelInfo.getParentDeptNames()); |
|||
return entity; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,137 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.elink.esua.epdc.commons.tools.constant.FieldConstant; |
|||
import com.elink.esua.epdc.commons.tools.exception.RenException; |
|||
import com.elink.esua.epdc.commons.tools.page.PageData; |
|||
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.DateUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dao.KpiTypicalCultureDao; |
|||
import com.elink.esua.epdc.dto.KpiTypicalCultureDTO; |
|||
import com.elink.esua.epdc.dto.SysDeptDTO; |
|||
import com.elink.esua.epdc.entity.KpiTypicalCultureEntity; |
|||
import com.elink.esua.epdc.feign.AdminFeignClient; |
|||
import com.elink.esua.epdc.redis.KpiTypicalCultureRedis; |
|||
import com.elink.esua.epdc.service.KpiTypicalCultureService; |
|||
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.ArrayList; |
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 典型培树 |
|||
* |
|||
* @author elink elink@elink-cn.com |
|||
* @since v1.0.0 2020-06-16 |
|||
*/ |
|||
@Service |
|||
public class KpiTypicalCultureServiceImpl extends BaseServiceImpl<KpiTypicalCultureDao, KpiTypicalCultureEntity> implements KpiTypicalCultureService { |
|||
|
|||
@Autowired |
|||
private KpiTypicalCultureRedis kpiTypicalCultureRedis; |
|||
|
|||
@Autowired |
|||
private AdminFeignClient adminFeignClient; |
|||
|
|||
@Override |
|||
public PageData<KpiTypicalCultureDTO> page(Map<String, Object> params) { |
|||
IPage<KpiTypicalCultureEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, KpiTypicalCultureDTO.class); |
|||
} |
|||
|
|||
/** |
|||
* 条件查询 |
|||
* @param params |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public PageData<KpiTypicalCultureDTO> getInfoPage(Map<String, Object> params) { |
|||
IPage<KpiTypicalCultureDTO> page = getPage(params); |
|||
List<KpiTypicalCultureDTO> list = baseDao.getInfoPage(params); |
|||
return new PageData<>(list, page.getTotal()); |
|||
} |
|||
|
|||
@Override |
|||
public List<KpiTypicalCultureDTO> list(Map<String, Object> params) { |
|||
List<KpiTypicalCultureEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, KpiTypicalCultureDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<KpiTypicalCultureEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<KpiTypicalCultureEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public KpiTypicalCultureDTO get(String id) { |
|||
KpiTypicalCultureEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, KpiTypicalCultureDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(KpiTypicalCultureDTO dto) { |
|||
String deptId = dto.getDeptId(); |
|||
List<String> checkList = new ArrayList<String>(); |
|||
checkList.add(deptId); |
|||
// 判断录入年份是否为当前年份
|
|||
if(!dto.getYear().equals(DateUtils.getCurrentYear())){ |
|||
throw new RenException("只能对当前年份进行打分,请维护后重试!"); |
|||
} |
|||
// 查询机构类型键值
|
|||
Result<SysDeptDTO> result = adminFeignClient.get(Long.valueOf(deptId)); |
|||
SysDeptDTO sysDeptDTO = result.getData(); |
|||
// 设置部门类别
|
|||
dto.setDeptTypeKey(sysDeptDTO.getTypeKey()); |
|||
KpiTypicalCultureEntity entity = ConvertUtils.sourceToTarget(dto, KpiTypicalCultureEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(KpiTypicalCultureDTO dto) { |
|||
KpiTypicalCultureEntity entity = ConvertUtils.sourceToTarget(dto, KpiTypicalCultureEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,95 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.elink.esua.epdc.dao.KpiGridEntityDao"> |
|||
|
|||
<resultMap type="com.elink.esua.epdc.entity.KpiGridEntityEntity" id="kpiGridEntityMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="deptId" column="DEPT_ID"/> |
|||
<result property="deptName" column="DEPT_NAME"/> |
|||
<result property="deptTypeKey" column="DEPT_TYPE_KEY"/> |
|||
<result property="monthYear" column="MONTH_YEAR"/> |
|||
<result property="stationEstablishment" column="STATION_ESTABLISHMENT"/> |
|||
<result property="staffingPlacement" column="STAFFING_PLACEMENT"/> |
|||
<result property="gridOperation" column="GRID_OPERATION"/> |
|||
<result property="parentDeptIds" column="PARENT_DEPT_IDS"/> |
|||
<result property="parentDeptNames" column="PARENT_DEPT_NAMES"/> |
|||
<result property="allDeptIds" column="ALL_DEPT_IDS"/> |
|||
<result property="allDeptNames" column="ALL_DEPT_NAMES"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
</resultMap> |
|||
|
|||
<select id="getInfoPage" resultType="com.elink.esua.epdc.dto.KpiGridEntityDTO"> |
|||
select |
|||
ID, |
|||
DEPT_ID, |
|||
DEPT_NAME, |
|||
DEPT_TYPE_KEY, |
|||
MONTH_YEAR, |
|||
STATION_ESTABLISHMENT, |
|||
STAFFING_PLACEMENT, |
|||
GRID_OPERATION, |
|||
PARENT_DEPT_IDS, |
|||
PARENT_DEPT_NAMES, |
|||
ALL_DEPT_IDS, |
|||
ALL_DEPT_NAMES, |
|||
REVISION, |
|||
CREATED_BY, |
|||
CREATED_TIME, |
|||
UPDATED_BY, |
|||
UPDATED_TIME, |
|||
DEL_FLAG |
|||
from epdc_kpi_grid_entity |
|||
where DEL_FLAG = '0' |
|||
<if test="deptId != null and deptId != ''"> |
|||
and DEPT_ID = #{deptId} |
|||
</if> |
|||
<if test="monthYear != null and monthYear != ''"> |
|||
and MONTH_YEAR = #{monthYear} |
|||
</if> |
|||
<if test="deptTypeKey != null and deptTypeKey != ''"> |
|||
and DEPT_TYPE_KEY = #{deptTypeKey} |
|||
</if> |
|||
order by UPDATED_TIME desc |
|||
</select> |
|||
|
|||
<select id="getDuplicateData" resultType="com.elink.esua.epdc.dto.KpiCommunityBuildingDTO" parameterType="com.elink.esua.epdc.dto.form.CheckIsScoredFormDTO"> |
|||
select |
|||
ID, |
|||
DEPT_ID, |
|||
DEPT_NAME, |
|||
DEPT_TYPE_KEY, |
|||
MONTH_YEAR, |
|||
STATION_ESTABLISHMENT, |
|||
STAFFING_PLACEMENT, |
|||
GRID_OPERATION, |
|||
PARENT_DEPT_IDS, |
|||
PARENT_DEPT_NAMES, |
|||
ALL_DEPT_IDS, |
|||
ALL_DEPT_NAMES, |
|||
REVISION, |
|||
CREATED_BY, |
|||
CREATED_TIME, |
|||
UPDATED_BY, |
|||
UPDATED_TIME, |
|||
DEL_FLAG |
|||
from epdc_kpi_grid_entity |
|||
where DEL_FLAG = '0' |
|||
<if test="checkList != null and checkList.size() > 0"> |
|||
AND DEPT_ID IN |
|||
<foreach collection="checkList" item="deptId" index="index" open="(" close=")" separator=","> |
|||
#{deptId} |
|||
</foreach> |
|||
</if> |
|||
<if test="monthYear != null and monthYear != ''"> |
|||
and MONTH_YEAR = #{monthYear} |
|||
</if> |
|||
</select> |
|||
|
|||
|
|||
</mapper> |
|||
@ -0,0 +1,95 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.elink.esua.epdc.dao.KpiMassEvaluationDao"> |
|||
|
|||
<resultMap type="com.elink.esua.epdc.entity.KpiMassEvaluationEntity" id="kpiMassEvaluationMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="deptId" column="DEPT_ID"/> |
|||
<result property="deptName" column="DEPT_NAME"/> |
|||
<result property="deptTypeKey" column="DEPT_TYPE_KEY"/> |
|||
<result property="year" column="YEAR"/> |
|||
<result property="satisfied" column="SATISFIED"/> |
|||
<result property="basicSatisfaction" column="BASIC_SATISFACTION"/> |
|||
<result property="dissatisfied" column="DISSATISFIED"/> |
|||
<result property="parentDeptIds" column="PARENT_DEPT_IDS"/> |
|||
<result property="parentDeptNames" column="PARENT_DEPT_NAMES"/> |
|||
<result property="allDeptIds" column="ALL_DEPT_IDS"/> |
|||
<result property="allDeptNames" column="ALL_DEPT_NAMES"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
</resultMap> |
|||
|
|||
<select id="getInfoPage" resultType="com.elink.esua.epdc.dto.KpiMassEvaluationDTO"> |
|||
select |
|||
ID, |
|||
DEPT_ID, |
|||
DEPT_NAME, |
|||
DEPT_TYPE_KEY, |
|||
YEAR, |
|||
SATISFIED, |
|||
BASIC_SATISFACTION, |
|||
DISSATISFIED, |
|||
PARENT_DEPT_IDS, |
|||
PARENT_DEPT_NAMES, |
|||
ALL_DEPT_IDS, |
|||
ALL_DEPT_NAMES, |
|||
REVISION, |
|||
CREATED_BY, |
|||
CREATED_TIME, |
|||
UPDATED_BY, |
|||
UPDATED_TIME, |
|||
DEL_FLAG |
|||
from epdc_kpi_mass_evaluation |
|||
where DEL_FLAG = '0' |
|||
<if test="deptId != null and deptId != ''"> |
|||
and DEPT_ID = #{deptId} |
|||
</if> |
|||
<if test="year != null and year != ''"> |
|||
and YEAR = #{year} |
|||
</if> |
|||
<if test="deptTypeKey != null and deptTypeKey != ''"> |
|||
and DEPT_TYPE_KEY = #{deptTypeKey} |
|||
</if> |
|||
order by UPDATED_TIME desc |
|||
</select> |
|||
|
|||
<select id="getDuplicateData" resultType="com.elink.esua.epdc.dto.KpiMassEvaluationDTO" parameterType="com.elink.esua.epdc.dto.form.CheckIsScoredByYearFormDTO"> |
|||
select |
|||
ID, |
|||
DEPT_ID, |
|||
DEPT_NAME, |
|||
DEPT_TYPE_KEY, |
|||
YEAR, |
|||
SATISFIED, |
|||
BASIC_SATISFACTION, |
|||
DISSATISFIED, |
|||
PARENT_DEPT_IDS, |
|||
PARENT_DEPT_NAMES, |
|||
ALL_DEPT_IDS, |
|||
ALL_DEPT_NAMES, |
|||
REVISION, |
|||
CREATED_BY, |
|||
CREATED_TIME, |
|||
UPDATED_BY, |
|||
UPDATED_TIME, |
|||
DEL_FLAG |
|||
from epdc_kpi_mass_evaluation |
|||
where DEL_FLAG = '0' |
|||
<if test="checkList != null and checkList.size() > 0"> |
|||
AND DEPT_ID IN |
|||
<foreach collection="checkList" item="deptId" index="index" open="(" close=")" separator=","> |
|||
#{deptId} |
|||
</foreach> |
|||
</if> |
|||
<if test="year != null and year != ''"> |
|||
and YEAR = #{year} |
|||
</if> |
|||
</select> |
|||
|
|||
|
|||
</mapper> |
|||
@ -0,0 +1,63 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.elink.esua.epdc.dao.KpiMattersResponseDao"> |
|||
|
|||
<resultMap type="com.elink.esua.epdc.entity.KpiMattersResponseEntity" id="kpiMattersResponseMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="deptId" column="DEPT_ID"/> |
|||
<result property="deptName" column="DEPT_NAME"/> |
|||
<result property="deptTypeKey" column="DEPT_TYPE_KEY"/> |
|||
<result property="monthYear" column="MONTH_YEAR"/> |
|||
<result property="deductionCategory" column="DEDUCTION_CATEGORY"/> |
|||
<result property="deduction" column="DEDUCTION"/> |
|||
<result property="parentDeptIds" column="PARENT_DEPT_IDS"/> |
|||
<result property="parentDeptNames" column="PARENT_DEPT_NAMES"/> |
|||
<result property="allDeptIds" column="ALL_DEPT_IDS"/> |
|||
<result property="allDeptNames" column="ALL_DEPT_NAMES"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
</resultMap> |
|||
|
|||
<select id="getInfoPage" resultType="com.elink.esua.epdc.dto.KpiMattersResponseDTO"> |
|||
select |
|||
ID, |
|||
DEPT_ID, |
|||
DEPT_NAME, |
|||
DEPT_TYPE_KEY, |
|||
MONTH_YEAR, |
|||
DEDUCTION_CATEGORY, |
|||
DEDUCTION, |
|||
PARENT_DEPT_IDS, |
|||
PARENT_DEPT_NAMES, |
|||
ALL_DEPT_IDS, |
|||
ALL_DEPT_NAMES, |
|||
REVISION, |
|||
CREATED_BY, |
|||
CREATED_TIME, |
|||
UPDATED_BY, |
|||
UPDATED_TIME, |
|||
DEL_FLAG |
|||
from epdc_kpi_matters_response |
|||
where DEL_FLAG = '0' |
|||
<if test="deptId != null and deptId != ''"> |
|||
and DEPT_ID = #{deptId} |
|||
</if> |
|||
<if test="monthYear != null and monthYear != ''"> |
|||
and MONTH_YEAR = #{monthYear} |
|||
</if> |
|||
<if test="deptTypeKey != null and deptTypeKey != ''"> |
|||
and DEPT_TYPE_KEY = #{deptTypeKey} |
|||
</if> |
|||
<if test="deductionCategory != null and deductionCategory != ''"> |
|||
and DEDUCTION_CATEGORY = #{deductionCategory} |
|||
</if> |
|||
order by UPDATED_TIME desc |
|||
</select> |
|||
|
|||
|
|||
</mapper> |
|||
@ -0,0 +1,95 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.elink.esua.epdc.dao.KpiPublicOpinionDao"> |
|||
|
|||
<resultMap type="com.elink.esua.epdc.entity.KpiPublicOpinionEntity" id="kpiPublicOpinionMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="deptId" column="DEPT_ID"/> |
|||
<result property="deptName" column="DEPT_NAME"/> |
|||
<result property="deptTypeKey" column="DEPT_TYPE_KEY"/> |
|||
<result property="monthYear" column="MONTH_YEAR"/> |
|||
<result property="publicityFoundation" column="PUBLICITY_FOUNDATION"/> |
|||
<result property="innovationBreakthrough" column="INNOVATION_BREAKTHROUGH"/> |
|||
<result property="publicOpinionResponse" column="PUBLIC_OPINION_RESPONSE"/> |
|||
<result property="parentDeptIds" column="PARENT_DEPT_IDS"/> |
|||
<result property="parentDeptNames" column="PARENT_DEPT_NAMES"/> |
|||
<result property="allDeptIds" column="ALL_DEPT_IDS"/> |
|||
<result property="allDeptNames" column="ALL_DEPT_NAMES"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
</resultMap> |
|||
|
|||
<select id="getInfoPage" resultType="com.elink.esua.epdc.dto.KpiPublicOpinionDTO"> |
|||
select |
|||
sd.ID, |
|||
sd.DEPT_ID, |
|||
sd.DEPT_NAME, |
|||
sd.DEPT_TYPE_KEY, |
|||
sd.MONTH_YEAR, |
|||
sd.PUBLICITY_FOUNDATION, |
|||
sd.INNOVATION_BREAKTHROUGH, |
|||
sd.PUBLIC_OPINION_RESPONSE, |
|||
sd.PARENT_DEPT_IDS, |
|||
sd.PARENT_DEPT_NAMES, |
|||
sd.ALL_DEPT_IDS, |
|||
sd.ALL_DEPT_NAMES, |
|||
sd.REVISION, |
|||
sd.CREATED_BY, |
|||
sd.CREATED_TIME, |
|||
sd.UPDATED_BY, |
|||
sd.UPDATED_TIME, |
|||
sd.DEL_FLAG |
|||
from epdc_kpi_public_opinion sd |
|||
where sd.DEL_FLAG = '0' |
|||
<if test="deptId != null and deptId != ''"> |
|||
and sd.DEPT_ID = #{deptId} |
|||
</if> |
|||
<if test="monthYear != null and monthYear != ''"> |
|||
and sd.MONTH_YEAR = #{monthYear} |
|||
</if> |
|||
<if test="deptTypeKey != null and deptTypeKey != ''"> |
|||
and sd.DEPT_TYPE_KEY = #{deptTypeKey} |
|||
</if> |
|||
order by sd.UPDATED_TIME desc |
|||
</select> |
|||
|
|||
<select id="getDuplicateData" resultType="com.elink.esua.epdc.dto.KpiPublicOpinionDTO" parameterType="com.elink.esua.epdc.dto.form.CheckIsScoredFormDTO"> |
|||
select |
|||
ID, |
|||
DEPT_ID, |
|||
DEPT_NAME, |
|||
DEPT_TYPE_KEY, |
|||
MONTH_YEAR, |
|||
PUBLICITY_FOUNDATION, |
|||
INNOVATION_BREAKTHROUGH, |
|||
PUBLIC_OPINION_RESPONSE, |
|||
PARENT_DEPT_IDS, |
|||
PARENT_DEPT_NAMES, |
|||
ALL_DEPT_IDS, |
|||
ALL_DEPT_NAMES, |
|||
REVISION, |
|||
CREATED_BY, |
|||
CREATED_TIME, |
|||
UPDATED_BY, |
|||
UPDATED_TIME, |
|||
DEL_FLAG |
|||
from epdc_kpi_public_opinion |
|||
where DEL_FLAG = '0' |
|||
<if test="checkList != null and checkList.size() > 0"> |
|||
AND DEPT_ID IN |
|||
<foreach collection="checkList" item="deptId" index="index" open="(" close=")" separator=","> |
|||
#{deptId} |
|||
</foreach> |
|||
</if> |
|||
<if test="monthYear != null and monthYear != ''"> |
|||
and MONTH_YEAR = #{monthYear} |
|||
</if> |
|||
</select> |
|||
|
|||
|
|||
</mapper> |
|||
@ -0,0 +1,67 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.elink.esua.epdc.dao.KpiTypicalCultureDao"> |
|||
|
|||
<resultMap type="com.elink.esua.epdc.entity.KpiTypicalCultureEntity" id="kpiTypicalCultureMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="deptId" column="DEPT_ID"/> |
|||
<result property="deptName" column="DEPT_NAME"/> |
|||
<result property="deptTypeKey" column="DEPT_TYPE_KEY"/> |
|||
<result property="year" column="YEAR"/> |
|||
<result property="bonusCategory" column="BONUS_CATEGORY"/> |
|||
<result property="bonus" column="BONUS"/> |
|||
<result property="bonusLevel" column="BONUS_LEVEL"/> |
|||
<result property="parentDeptIds" column="PARENT_DEPT_IDS"/> |
|||
<result property="parentDeptNames" column="PARENT_DEPT_NAMES"/> |
|||
<result property="allDeptIds" column="ALL_DEPT_IDS"/> |
|||
<result property="allDeptNames" column="ALL_DEPT_NAMES"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
</resultMap> |
|||
|
|||
<select id="getInfoPage" resultType="com.elink.esua.epdc.dto.KpiTypicalCultureDTO"> |
|||
select |
|||
ID, |
|||
DEPT_ID, |
|||
DEPT_NAME, |
|||
DEPT_TYPE_KEY, |
|||
YEAR, |
|||
BONUS_CATEGORY, |
|||
BONUS, |
|||
BONUS_LEVEL, |
|||
PARENT_DEPT_IDS, |
|||
PARENT_DEPT_NAMES, |
|||
ALL_DEPT_IDS, |
|||
ALL_DEPT_NAMES, |
|||
REVISION, |
|||
CREATED_BY, |
|||
CREATED_TIME, |
|||
UPDATED_BY, |
|||
UPDATED_TIME, |
|||
DEL_FLAG |
|||
from epdc_kpi_typical_culture |
|||
where DEL_FLAG = '0' |
|||
<if test="deptId != null and deptId != ''"> |
|||
and DEPT_ID = #{deptId} |
|||
</if> |
|||
<if test="year != null and year != ''"> |
|||
and YEAR = #{year} |
|||
</if> |
|||
<if test="deptTypeKey != null and deptTypeKey != ''"> |
|||
and DEPT_TYPE_KEY = #{deptTypeKey} |
|||
</if> |
|||
<if test="bonusCategory != null and bonusCategory != ''"> |
|||
and BONUS_CATEGORY = #{bonusCategory} |
|||
</if> |
|||
<if test="bonusLevel != null and bonusLevel != ''"> |
|||
and BONUS_LEVEL = #{bonusLevel} |
|||
</if> |
|||
order by UPDATED_TIME desc |
|||
</select> |
|||
|
|||
</mapper> |
|||
Loading…
Reference in new issue