Browse Source

Merge branch 'origin/feature/delay'

# Conflicts:
#	esua-epdc/kettle-Code/governanceRankingMonth/blow_whistle/同步到中间表/吹哨-项目-月-基础数据.ktr
feature/dangjian
wanggongfeng 4 years ago
parent
commit
8dce6884cb
  1. 104
      esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/ItemFusingDelayRecordDTO.java
  2. 5
      esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/ItemPendingHandleDTO.java
  3. 117
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/controller/ItemFusingDelayRecordController.java
  4. 46
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/dao/ItemFusingDelayRecordDao.java
  5. 71
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/entity/ItemFusingDelayRecordEntity.java
  6. 74
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/excel/ItemFusingDelayRecordExcel.java
  7. 47
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/redis/ItemFusingDelayRecordRedis.java
  8. 104
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/ItemFusingDelayRecordService.java
  9. 122
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemFusingDelayRecordServiceImpl.java
  10. 10
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml
  11. 75
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemFusingDelayRecordDao.xml
  12. 9
      esua-epdc/kettle-Code/governanceRankingMonth/blow_whistle/同步到中间表/吹哨-项目-月-基础数据.ktr

104
esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/ItemFusingDelayRecordDTO.java

@ -0,0 +1,104 @@
/**
* 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 2022-01-05
*/
@Data
public class ItemFusingDelayRecordDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 项目ID
*/
private String itemId;
/**
* 申请状态1-延期2-熔断
*/
private Integer state;
private String stateName;
/**
* 申请理由
*/
private String reason;
/**
* 审核状态1-审核通过2-驳回
*/
private Integer handleState;
private String handleStateName;
/**
* 审批理由
*/
private String handleReason;
/**
* 延期时间
*/
private Date delayTime;
private String delayTimeStr;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
/**
* 删除标记
*/
private String delFlag;
}

5
esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/ItemPendingHandleDTO.java

@ -65,4 +65,9 @@ public class ItemPendingHandleDTO implements Serializable {
*/
private String itemCode;
/**
* 是否已提交延期申请
*/
private String isDelay;
}

117
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/controller/ItemFusingDelayRecordController.java

@ -0,0 +1,117 @@
/**
* 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.modules.item.controller;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ExcelUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.AssertUtils;
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
import com.elink.esua.epdc.dto.ItemFusingDelayRecordDTO;
import com.elink.esua.epdc.dto.item.form.ItemFusingDelayInsertDTO;
import com.elink.esua.epdc.modules.item.excel.ItemFusingDelayRecordExcel;
import com.elink.esua.epdc.modules.item.service.ItemFusingDelayRecordService;
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 2022-01-05
*/
@RestController
@RequestMapping("itemfusingdelayrecord")
public class ItemFusingDelayRecordController {
@Autowired
private ItemFusingDelayRecordService itemFusingDelayRecordService;
@GetMapping("page")
public Result<PageData<ItemFusingDelayRecordDTO>> page(@RequestParam Map<String, Object> params){
PageData<ItemFusingDelayRecordDTO> page = itemFusingDelayRecordService.getPhrasePage(params);
return new Result<PageData<ItemFusingDelayRecordDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<ItemFusingDelayRecordDTO> get(@PathVariable("id") String id){
ItemFusingDelayRecordDTO data = itemFusingDelayRecordService.get(id);
return new Result<ItemFusingDelayRecordDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody ItemFusingDelayRecordDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
itemFusingDelayRecordService.save(dto);
return new Result();
}
@PostMapping("submitApply")
public Result submitApply(@RequestBody ItemFusingDelayRecordDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
itemFusingDelayRecordService.save(dto);
return new Result();
}
@PutMapping("checkApply")
public Result checkApply(@RequestBody ItemFusingDelayRecordDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
itemFusingDelayRecordService.update(dto);
return new Result();
}
@GetMapping("getPageList/{itemId}")
public Result<List<ItemFusingDelayRecordDTO>> getPageList(@PathVariable("itemId") String itemId){
List<ItemFusingDelayRecordDTO> list = itemFusingDelayRecordService.getPageList(itemId);
return new Result<List<ItemFusingDelayRecordDTO>>().ok(list);
}
@PutMapping
public Result update(@RequestBody ItemFusingDelayRecordDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
itemFusingDelayRecordService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
itemFusingDelayRecordService.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<ItemFusingDelayRecordDTO> list = itemFusingDelayRecordService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, ItemFusingDelayRecordExcel.class);
}
}

46
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/dao/ItemFusingDelayRecordDao.java

@ -0,0 +1,46 @@
/**
* 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.modules.item.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.dto.ItemFusingDelayRecordDTO;
import com.elink.esua.epdc.modules.item.entity.ItemFusingDelayRecordEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* 项目熔断/延期表
*
* @author elink elink@elink-cn.com
* @since v1.0.0 2022-01-05
*/
@Mapper
public interface ItemFusingDelayRecordDao extends BaseDao<ItemFusingDelayRecordEntity> {
/**
* 条件查询
* @param params
* @return
*/
List<ItemFusingDelayRecordDTO> getPhrasePage(Map<String, Object> params);
List<ItemFusingDelayRecordDTO> getPageList(@Param("itemId") String itemId);
}

71
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/entity/ItemFusingDelayRecordEntity.java

@ -0,0 +1,71 @@
/**
* 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.modules.item.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 2022-01-05
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("epdc_item_fusing_delay_record")
public class ItemFusingDelayRecordEntity extends BaseEpdcEntity {
private static final long serialVersionUID = 1L;
/**
* 项目ID
*/
private String itemId;
/**
* 申请状态1-延期2-熔断
*/
private Integer state;
/**
* 申请理由
*/
private String reason;
/**
* 审核状态1-审核通过2-驳回
*/
private Integer handleState;
/**
* 审批理由
*/
private String handleReason;
/**
* 延期时间
*/
private Date delayTime;
}

74
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/excel/ItemFusingDelayRecordExcel.java

@ -0,0 +1,74 @@
/**
* 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.modules.item.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 2022-01-05
*/
@Data
public class ItemFusingDelayRecordExcel {
@Excel(name = "主键")
private String id;
@Excel(name = "项目ID")
private String itemId;
@Excel(name = "申请状态:1-延期,2-熔断")
private Integer state;
@Excel(name = "申请理由")
private String reason;
@Excel(name = "审核状态:1-审核通过,2-驳回")
private Integer handleState;
@Excel(name = "审批理由")
private String handleReason;
@Excel(name = "延期时间")
private Date delayTime;
@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;
}

47
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/redis/ItemFusingDelayRecordRedis.java

@ -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.modules.item.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 2022-01-05
*/
@Component
public class ItemFusingDelayRecordRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

104
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/ItemFusingDelayRecordService.java

@ -0,0 +1,104 @@
/**
* 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.modules.item.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.ItemFusingDelayRecordDTO;
import com.elink.esua.epdc.modules.item.entity.ItemFusingDelayRecordEntity;
import java.util.List;
import java.util.Map;
/**
* 项目熔断/延期表
*
* @author elink elink@elink-cn.com
* @since v1.0.0 2022-01-05
*/
public interface ItemFusingDelayRecordService extends BaseService<ItemFusingDelayRecordEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<ItemFusingDelayRecordDTO>
* @author generator
* @date 2022-01-05
*/
PageData<ItemFusingDelayRecordDTO> page(Map<String, Object> params);
/**
* 分页条件查询
* @param params
* @return
*/
PageData<ItemFusingDelayRecordDTO> getPhrasePage(Map<String, Object> params);
List<ItemFusingDelayRecordDTO> getPageList(String itemId);
/**
* 默认查询
*
* @param params
* @return java.util.List<ItemFusingDelayRecordDTO>
* @author generator
* @date 2022-01-05
*/
List<ItemFusingDelayRecordDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return ItemFusingDelayRecordDTO
* @author generator
* @date 2022-01-05
*/
ItemFusingDelayRecordDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2022-01-05
*/
void save(ItemFusingDelayRecordDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2022-01-05
*/
void update(ItemFusingDelayRecordDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2022-01-05
*/
void delete(String[] ids);
}

122
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemFusingDelayRecordServiceImpl.java

@ -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.modules.item.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
import com.elink.esua.epdc.dto.ItemFusingDelayRecordDTO;
import com.elink.esua.epdc.modules.item.dao.ItemFusingDelayRecordDao;
import com.elink.esua.epdc.modules.item.entity.ItemFusingDelayRecordEntity;
import com.elink.esua.epdc.modules.item.redis.ItemFusingDelayRecordRedis;
import com.elink.esua.epdc.modules.item.service.ItemFusingDelayRecordService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 项目熔断/延期表
*
* @author elink elink@elink-cn.com
* @since v1.0.0 2022-01-05
*/
@Service
public class ItemFusingDelayRecordServiceImpl extends BaseServiceImpl<ItemFusingDelayRecordDao, ItemFusingDelayRecordEntity> implements ItemFusingDelayRecordService {
@Autowired
private ItemFusingDelayRecordRedis itemFusingDelayRecordRedis;
@Override
public PageData<ItemFusingDelayRecordDTO> page(Map<String, Object> params) {
IPage<ItemFusingDelayRecordEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, ItemFusingDelayRecordDTO.class);
}
@Override
public List<ItemFusingDelayRecordDTO> list(Map<String, Object> params) {
List<ItemFusingDelayRecordEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, ItemFusingDelayRecordDTO.class);
}
/**
* 条件查询
* @param params
* @return
*/
@Override
public PageData<ItemFusingDelayRecordDTO> getPhrasePage(Map<String, Object> params) {
IPage<ItemFusingDelayRecordDTO> page = getPage(params);
List<ItemFusingDelayRecordDTO> list = baseDao.getPhrasePage(params);
return new PageData<>(list, page.getTotal());
}
@Override
public List<ItemFusingDelayRecordDTO> getPageList(String itemId) {
List<ItemFusingDelayRecordDTO> list = baseDao.getPageList(itemId);
return list;
}
private QueryWrapper<ItemFusingDelayRecordEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<ItemFusingDelayRecordEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public ItemFusingDelayRecordDTO get(String id) {
ItemFusingDelayRecordEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, ItemFusingDelayRecordDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(ItemFusingDelayRecordDTO dto) {
ItemFusingDelayRecordEntity entity = ConvertUtils.sourceToTarget(dto, ItemFusingDelayRecordEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(ItemFusingDelayRecordDTO dto) {
ItemFusingDelayRecordEntity entity = ConvertUtils.sourceToTarget(dto, ItemFusingDelayRecordEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}

10
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml

@ -493,11 +493,11 @@
eve.OPPOSE_NUM,
eve.COMMENT_NUM,
eve.BROWSE_NUM,
( eve.APPROVE_NUM + eve.OPPOSE_NUM + eve.COMMENT_NUM + eve.BROWSE_NUM ) AS participantsNum
FROM
epdc_item item
LEFT JOIN epdc_events eve ON item.EVENT_ID = eve.ID
AND eve.DEL_FLAG = '0'
( eve.APPROVE_NUM + eve.OPPOSE_NUM + eve.COMMENT_NUM + eve.BROWSE_NUM ) AS participantsNum,
(case when d.ID is not null then '1' else '0' end) as isDelay
FROM epdc_item item
LEFT JOIN epdc_events eve ON item.EVENT_ID = eve.ID AND eve.DEL_FLAG = '0'
left join epdc_item_fusing_delay_record d on d.ITEM_ID = item.ID and d.DEL_FLAG = '0'
WHERE
item.DEL_FLAG = '0'

75
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemFusingDelayRecordDao.xml

@ -0,0 +1,75 @@
<?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.modules.item.dao.ItemFusingDelayRecordDao">
<resultMap type="com.elink.esua.epdc.modules.item.entity.ItemFusingDelayRecordEntity" id="itemFusingDelayRecordMap">
<result property="id" column="ID"/>
<result property="itemId" column="ITEM_ID"/>
<result property="state" column="STATE"/>
<result property="reason" column="REASON"/>
<result property="handleState" column="HANDLE_STATE"/>
<result property="handleReason" column="HANDLE_REASON"/>
<result property="delayTime" column="DELAY_TIME"/>
<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="getPhrasePage" resultType="com.elink.esua.epdc.dto.ItemFusingDelayRecordDTO">
select
ID,
ITEM_ID,
STATE,
(case STATE when '1' then '延期' when '2' then '熔断' else '' end) stateName,
REASON,
HANDLE_STATE,
(case HANDLE_STATE when '1' then '通过' when '2' then '驳回' else '' end) handleStateName,
HANDLE_REASON,
DELAY_TIME,
DATE_FORMAT(DELAY_TIME,'%Y-%m-%d') delayTimeStr,
REVISION,
CREATED_BY,
CREATED_TIME,
UPDATED_BY,
UPDATED_TIME,
DEL_FLAG
from epdc_item_fusing_delay_record
where DEL_FLAG = '0'
<if test="state != null and state != ''">
and STATE = #{state}
</if>
order by UPDATED_TIME desc
</select>
<select id="getPageList" resultType="com.elink.esua.epdc.dto.ItemFusingDelayRecordDTO">
select
ID,
ITEM_ID,
STATE,
(case STATE when '1' then '延期' when '2' then '熔断' else '' end) stateName,
REASON,
HANDLE_STATE,
(case HANDLE_STATE when '1' then '通过' when '2' then '驳回' else '' end) handleStateName,
HANDLE_REASON,
DELAY_TIME,
DATE_FORMAT(DELAY_TIME,'%Y-%m-%d') delayTimeStr,
REVISION,
CREATED_BY,
CREATED_TIME,
UPDATED_BY,
UPDATED_TIME,
DEL_FLAG
from epdc_item_fusing_delay_record
where DEL_FLAG = '0'
<if test="itemId != null and itemId != ''">
and ITEM_ID = #{itemId}
</if>
order by UPDATED_TIME desc
</select>
</mapper>

9
esua-epdc/kettle-Code/governanceRankingMonth/blow_whistle/同步到中间表/吹哨-项目-月-基础数据.ktr

@ -631,7 +631,8 @@ SELECT
mi.GRID_ID,
CASE
-- 已结案的项目时间 减去 项目的创建时间 小于等于 有效时间
WHEN TIMESTAMPDIFF(HOUR, mi.CREATED_TIME, ifnull(mhp.CREATED_TIME,mhp2.CREATED_TIME)) &lt;= t.VALID_CLOSE_TIME -- 未超过有效结案时间(小时数)
WHEN ((TIMESTAMPDIFF(HOUR, mi.CREATED_TIME, ifnull(mhp.CREATED_TIME,mhp2.CREATED_TIME)) &lt;= t.VALID_CLOSE_TIME)
or (DATE_FORMAT(mhp.CREATED_TIME,'%Y-%m-%d') &lt;= DATE_FORMAT(d.DELAY_TIME,'%Y-%m-%d') and d.HANDLE_STATE = 1 )) -- 未超过有效结案时间(小时数)
THEN '1'
ELSE '0' -- 0 不做处理
END AS respondItemNumber, -- '及时转项目数'
@ -646,11 +647,13 @@ LEFT JOIN meta_epdc_item_handle_process mhp ON mi.id = mhp.ITEM_ID AND mhp.STATE
LEFT JOIN meta_epdc_item_handle_process mhp2 ON mi.id = mhp2.ITEM_ID AND mhp2.STATE = 10 AND mhp2.DEL_FLAG = 0
LEFT JOIN meta_epdc_category c ON mi.CATEGORY_CODE = c.CATEGORY_CODE AND mi.DEL_FLAG = '0'
LEFT JOIN meta_epdc_kpi_time_limit_item t ON c.id = t.CATEGORY_ID
WHERE (LEFT(mi.CREATED_TIME, 7) = LEFT(date_sub(NOW(), interval 1 MONTH),7)
left join esua_epdc_events.epdc_item_fusing_delay_record d on d.ITEM_ID = mi.ID and d.DEL_FLAG = '0'
WHERE ((LEFT(mi.CREATED_TIME, 7) = LEFT(date_sub(NOW(), interval 1 MONTH),7)
OR LEFT(mhp.CREATED_TIME, 7) = LEFT(date_sub(NOW(), interval 1 MONTH),7)
OR LEFT(mhp2.CREATED_TIME, 7) = LEFT(date_sub(NOW(), interval 1 MONTH),7))
and mi.event_id is not null
)
and (d.STATE = 1 or d.STATE is null)
) a
GROUP BY a.GRID_ID </sql>
<limit>0</limit>

Loading…
Cancel
Save