Browse Source

【网格实体化运作打分】考核项配置管理-王公峰-2020-12-08

feature/dangjian
wanggongfeng 5 years ago
parent
commit
dfd2d0f8b8
  1. 4
      esua-epdc/epdc-module/epdc-kpi/epdc-kpi-client/src/main/java/com/elink/esua/epdc/dto/SubCheckDictionaryDTO.java
  2. 93
      esua-epdc/epdc-module/epdc-kpi/epdc-kpi-client/src/main/java/com/elink/esua/epdc/dto/result/CheckResourcesListResultDTO.java
  3. 13
      esua-epdc/epdc-module/epdc-kpi/epdc-kpi-server/src/main/java/com/elink/esua/epdc/controller/SubCheckDictionaryController.java
  4. 13
      esua-epdc/epdc-module/epdc-kpi/epdc-kpi-server/src/main/java/com/elink/esua/epdc/dao/SubCheckDictionaryDao.java
  5. 4
      esua-epdc/epdc-module/epdc-kpi/epdc-kpi-server/src/main/java/com/elink/esua/epdc/entity/SubCheckDictionaryEntity.java
  6. 13
      esua-epdc/epdc-module/epdc-kpi/epdc-kpi-server/src/main/java/com/elink/esua/epdc/service/SubCheckDictionaryService.java
  7. 14
      esua-epdc/epdc-module/epdc-kpi/epdc-kpi-server/src/main/java/com/elink/esua/epdc/service/impl/SubCheckDictionaryServiceImpl.java
  8. 34
      esua-epdc/epdc-module/epdc-kpi/epdc-kpi-server/src/main/resources/mapper/SubCheckDictionaryDao.xml

4
esua-epdc/epdc-module/epdc-kpi/epdc-kpi-client/src/main/java/com/elink/esua/epdc/dto/SubCheckDictionaryDTO.java

@ -23,7 +23,7 @@ import lombok.Data;
/**
* 阵地建设考核内容字典表
* 阵地建设考核内容字典表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-12-07
@ -103,4 +103,4 @@ public class SubCheckDictionaryDTO implements Serializable {
*/
private Date updatedTime;
}
}

93
esua-epdc/epdc-module/epdc-kpi/epdc-kpi-client/src/main/java/com/elink/esua/epdc/dto/result/CheckResourcesListResultDTO.java

@ -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.dto.result;
import com.elink.esua.epdc.commons.tools.utils.TreeNode;
import com.elink.esua.epdc.commons.tools.utils.TreeNodeNew;
import lombok.Data;
import java.io.Serializable;
/**
* 阵地建设考核内容提报字典表
*
* @author wgf
* @since v1.0.0 2020-12-07
*/
@Data
public class CheckResourcesListResultDTO extends TreeNodeNew implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 父资源ID
*/
private String pid;
/**
* 审核类型
*/
private String checkType;
/**
* 审核编码
*/
private String checkCode;
/**
* 审核标签
*/
private String checkLabel;
/**
* 显示标识0否1是
*/
private String showFlag;
/**
* 统计类型
*/
private String totalType;
/**
* 统计描述
*/
private String checkDescribe;
/**
* 排序
*/
private Integer sort;
/**
* 上级资源名称
*/
private String parentName;
/**
* 是否是父标签0否1是
*/
private String isFatherFlag;
}

13
esua-epdc/epdc-module/epdc-kpi/epdc-kpi-server/src/main/java/com/elink/esua/epdc/controller/SubCheckDictionaryController.java

@ -26,6 +26,7 @@ import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
import com.elink.esua.epdc.dto.SubCheckDictionaryDTO;
import com.elink.esua.epdc.dto.result.CheckResourcesListResultDTO;
import com.elink.esua.epdc.excel.SubCheckDictionaryExcel;
import com.elink.esua.epdc.service.SubCheckDictionaryService;
import org.springframework.beans.factory.annotation.Autowired;
@ -37,7 +38,7 @@ import java.util.Map;
/**
* 阵地建设考核内容字典表
* 阵地建设考核内容字典表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-12-07
@ -45,7 +46,7 @@ import java.util.Map;
@RestController
@RequestMapping("subcheckdictionary")
public class SubCheckDictionaryController {
@Autowired
private SubCheckDictionaryService subCheckDictionaryService;
@ -55,6 +56,12 @@ public class SubCheckDictionaryController {
return new Result<PageData<SubCheckDictionaryDTO>>().ok(page);
}
@GetMapping("list")
public Result<List<CheckResourcesListResultDTO>> getResourceList(){
List<CheckResourcesListResultDTO> list = subCheckDictionaryService.getResourceList();
return new Result<List<CheckResourcesListResultDTO>>().ok(list);
}
@GetMapping("{id}")
public Result<SubCheckDictionaryDTO> get(@PathVariable("id") String id){
SubCheckDictionaryDTO data = subCheckDictionaryService.get(id);
@ -91,4 +98,4 @@ public class SubCheckDictionaryController {
ExcelUtils.exportExcelToTarget(response, null, list, SubCheckDictionaryExcel.class);
}
}
}

13
esua-epdc/epdc-module/epdc-kpi/epdc-kpi-server/src/main/java/com/elink/esua/epdc/dao/SubCheckDictionaryDao.java

@ -18,16 +18,21 @@
package com.elink.esua.epdc.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.dto.result.CheckResourcesListResultDTO;
import com.elink.esua.epdc.entity.SubCheckDictionaryEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 阵地建设考核内容字典表
* 阵地建设考核内容字典表
*
* @author qu qu@elink-cn.com
* @author wgf
* @since v1.0.0 2020-12-07
*/
@Mapper
public interface SubCheckDictionaryDao extends BaseDao<SubCheckDictionaryEntity> {
}
List<CheckResourcesListResultDTO> getResourceList();
}

4
esua-epdc/epdc-module/epdc-kpi/epdc-kpi-server/src/main/java/com/elink/esua/epdc/entity/SubCheckDictionaryEntity.java

@ -26,7 +26,7 @@ import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 阵地建设考核内容字典表
* 阵地建设考核内容字典表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-12-07
@ -73,4 +73,4 @@ public class SubCheckDictionaryEntity extends BaseEpdcEntity {
*/
private String sort;
}
}

13
esua-epdc/epdc-module/epdc-kpi/epdc-kpi-server/src/main/java/com/elink/esua/epdc/service/SubCheckDictionaryService.java

@ -26,7 +26,7 @@ import java.util.List;
import java.util.Map;
/**
* 阵地建设考核内容字典表
* 阵地建设考核内容字典表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-12-07
@ -42,6 +42,15 @@ public interface SubCheckDictionaryService extends BaseService<SubCheckDictionar
* @date 2020-12-07
*/
PageData<SubCheckDictionaryDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @return java.util.List<CheckResourcesListResultDTO>
* @author wgf
* @date 2020-12-07
*/
List getResourceList();
/**
* 默认查询
@ -92,4 +101,4 @@ public interface SubCheckDictionaryService extends BaseService<SubCheckDictionar
* @date 2020-12-07
*/
void delete(String[] ids);
}
}

14
esua-epdc/epdc-module/epdc-kpi/epdc-kpi-server/src/main/java/com/elink/esua/epdc/service/impl/SubCheckDictionaryServiceImpl.java

@ -23,8 +23,11 @@ import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
import com.elink.esua.epdc.commons.tools.utils.TreeUtils;
import com.elink.esua.epdc.commons.tools.utils.TreeUtilsNew;
import com.elink.esua.epdc.dao.SubCheckDictionaryDao;
import com.elink.esua.epdc.dto.SubCheckDictionaryDTO;
import com.elink.esua.epdc.dto.result.CheckResourcesListResultDTO;
import com.elink.esua.epdc.entity.SubCheckDictionaryEntity;
import com.elink.esua.epdc.redis.SubCheckDictionaryRedis;
import com.elink.esua.epdc.service.SubCheckDictionaryService;
@ -38,7 +41,7 @@ import java.util.List;
import java.util.Map;
/**
* 阵地建设考核内容字典表
* 阵地建设考核内容字典表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-12-07
@ -58,6 +61,13 @@ public class SubCheckDictionaryServiceImpl extends BaseServiceImpl<SubCheckDicti
return getPageData(page, SubCheckDictionaryDTO.class);
}
@Override
public List<CheckResourcesListResultDTO> getResourceList() {
List<CheckResourcesListResultDTO> list = baseDao.getResourceList();
return TreeUtilsNew.build(list);
}
@Override
public List<SubCheckDictionaryDTO> list(Map<String, Object> params) {
List<SubCheckDictionaryEntity> entityList = baseDao.selectList(getWrapper(params));
@ -101,4 +111,4 @@ public class SubCheckDictionaryServiceImpl extends BaseServiceImpl<SubCheckDicti
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}
}

34
esua-epdc/epdc-module/epdc-kpi/epdc-kpi-server/src/main/resources/mapper/SubCheckDictionaryDao.xml

@ -20,5 +20,37 @@
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<resultMap id="checkDictionaryMap" type="com.elink.esua.epdc.dto.result.CheckResourcesListResultDTO">
<result property="id" column="ID"/>
<result property="pid" column="PID"/>
<result property="checkType" column="CHECK_TYPE"/>
<result property="checkCode" column="CHECK_CODE"/>
<result property="checkLabel" column="CHECK_LABEL"/>
<result property="showFlag" column="SHOW_FLAG"/>
<result property="totalType" column="TOTAL_TYPE"/>
<result property="sort" column="SORT"/>
<result property="checkDescribe" column="CHECK_DESCRIBE"/>
</resultMap>
<select id="getResourceList" resultMap="checkDictionaryMap">
SELECT
erd.*,
IF( child_message.checkNum > 0, '1', '0' ) AS isFatherFlag
FROM
epdc_sub_check_dictionary erd
LEFT JOIN (
SELECT
rd1.ID,count(rd2.ID) as checkNum
FROM
epdc_sub_check_dictionary rd1
left join epdc_sub_check_dictionary rd2 on rd1.ID =rd2.PID and rd2.DEL_FLAG = '0'
where rd1.DEL_FLAG = '0'
GROUP BY rd1.ID
)child_message ON erd.ID = child_message.ID
WHERE
erd.DEL_FLAG = 0
order by erd.SORT
</select>
</mapper>
</mapper>

Loading…
Cancel
Save