Browse Source

Merge remote-tracking branch 'origin/feature_help' into feature_help

feature/dangjian
wanggongfeng 4 years ago
parent
commit
13cce1f706
  1. 6
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/rocketmq/producer/OrganizationModifyProducer.java
  2. 33
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/SysDeptServiceImpl.java
  3. 2
      esua-epdc/epdc-cloud-gateway-shibei
  4. 1
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/IssueServiceImpl.java
  5. 1
      esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/enums/ItemHandleCategoryEnum.java
  6. 10
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/controller/ItemController.java
  7. 2
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/dao/ItemDao.java
  8. 2
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/ItemService.java
  9. 1
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/ItemTimeoutService.java
  10. 28
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java
  11. 1
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/rocketmq/consumer/OrganizationModifyConsumer.java
  12. 11
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/issue/IssueDao.xml
  13. 17
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml
  14. 1
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/pom.xml
  15. 3
      esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/feign/ItemFeignClient.java
  16. 4
      esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/feign/fallback/ItemFeignClientFallback.java
  17. 19
      esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/task/events/ItemTimeTask.java
  18. 26
      esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/task/events/ItemTimeTaskImpl.java
  19. 48
      esua-epdc/kettle-Code/esua_epdc_analysis_job/analysis_extracting/epdc_analysis_extracting.kjb
  20. 3
      esua-epdc/kettle-Code/esua_epdc_analysis_job/analysis_extracting/epdc_difficult_item_extracting.ktr
  21. 3
      esua-epdc/kettle-Code/esua_epdc_analysis_job/analysis_extracting/epdc_issue_item_statistics_item_extracting.ktr
  22. 14
      esua-epdc/kettle-Code/esua_epdc_analysis_job/analysis_synchronize/epdc_item.ktr
  23. 7
      esua-epdc/kettle-Code/esua_epdc_analysis_job/analysis_synchronize/epdc_user.ktr
  24. 423
      esua-epdc/kettle-Code/esua_epdc_analysis_job/analysis_synchronize/esua_analysis_synchronize.kjb
  25. 2
      esua-epdc/kettle-Code/governanceRankingMonth/blow_whistle/同步到中间表/吹哨-议题-月-基础数据.ktr
  26. 8
      esua-epdc/kettle-Code/governanceRankingMonth/blow_whistle/同步到中间表/吹哨-项目-月-基础数据.ktr
  27. 72
      esua-epdc/kettle-Code/governanceRankingMonth/organization/base_and_common/epdc_gr_community_month_new_TYPICAL_CASE.ktr
  28. 72
      esua-epdc/kettle-Code/governanceRankingMonth/organization/base_and_common/epdc_gr_grid_month_new_TYPICAL_CASE.ktr
  29. 61
      esua-epdc/kettle-Code/governanceRankingMonth/organization/base_and_common/epdc_gr_street_month_new_TYPICAL_CASE.ktr

6
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/rocketmq/producer/OrganizationModifyProducer.java

@ -1,6 +1,7 @@
package com.elink.esua.epdc.rocketmq.producer;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.client.producer.DefaultMQProducer;
import org.apache.rocketmq.client.producer.SendResult;
import org.apache.rocketmq.common.message.Message;
import org.apache.rocketmq.spring.core.RocketMQTemplate;
@ -33,7 +34,10 @@ public class OrganizationModifyProducer {
public void sendMessage(String topic, String tag, String keys, String body) {
Message message = new Message(topic, tag, keys, body.getBytes());
try {
SendResult sendResult = rocketMQTemplate.getProducer().send(message);
DefaultMQProducer producer = rocketMQTemplate.getProducer();
producer.setSendMsgTimeout(15000);
SendResult sendResult = producer.send(message);
// SendResult sendResult = rocketMQTemplate.getProducer().send(message);
log.info("EPDC-ADMIN-SERVER发送消息结果:{sendStatus:{}, topic:{}, msgId:{}}", sendResult.getSendStatus(), topic, sendResult.getMsgId());
} catch (Exception e) {
log.error("EPDC-ADMIN-SERVER发送消息异常:{topic:{}, tag:{}, keys:{}, body:{}}", topic, tag, keys, body);

33
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/SysDeptServiceImpl.java

@ -164,8 +164,8 @@ public class SysDeptServiceImpl extends BaseServiceImpl<SysDeptDao, SysDeptEntit
entity.setPids(getPidList(entity.getPid()));
// 发送消息
sendMqMessage(dto);
updateById(entity);
sendMqMessage(dto);
}
@Override
@ -1092,20 +1092,23 @@ public class SysDeptServiceImpl extends BaseServiceImpl<SysDeptDao, SysDeptEntit
private void sendMqMessage(SysDeptDTO dto) {
// 获取旧信息
SysDeptEntity entity = baseDao.getById(dto.getId());
CompleteDeptDTO completeDept = this.baseDao.getParentAndAllDept(dto.getId());
OrganizationModifyDTO body = new OrganizationModifyDTO();
body.setDeptId(dto.getId());
body.setOldDeptName(entity.getName());
body.setNewDeptName(dto.getName());
body.setTypeKey(entity.getTypeKey());
body.setParentDeptIds(entity.getPids());
body.setAllDeptIds(entity.getPids() + "," + entity.getId());
String allDeptNames = (completeDept.getDistrictId() !=null ? completeDept.getDistrict() + "-":"") + (completeDept.getStreetId() !=null ? completeDept.getStreet() + "-":"") + (completeDept.getCommunityId() !=null ? completeDept.getCommunity() + "-":"") + (completeDept.getGridId() !=null ? completeDept.getGrid() :"");
String parentDeptNames = (completeDept.getDistrictId() !=null ? completeDept.getDistrict() + "-":"") + (completeDept.getStreetId() !=null ? completeDept.getStreet() + "-":"") + (completeDept.getCommunityId() !=null ? completeDept.getCommunity():"");
body.setAllDeptNames(allDeptNames);
body.setParentDeptNames(parentDeptNames);
organizationModifyProducer.sendMessage(RocketMqConstant.MQ_TOPIC_ORGANIZATION, RocketMqConstant.MQ_TAG_ORGANIZATION,
dto.getId().toString(), JSONObject.toJSONString(body));
if ("grid_party".equals(entity.getTypeKey()) || "community_party".equals(entity.getTypeKey())) {
CompleteDeptDTO completeDept = this.baseDao.getParentAndAllDept(dto.getId());
OrganizationModifyDTO body = new OrganizationModifyDTO();
body.setDeptId(dto.getId());
body.setOldDeptName(entity.getName());
body.setNewDeptName(dto.getName());
body.setTypeKey(entity.getTypeKey());
body.setParentDeptIds(entity.getPids());
body.setAllDeptIds(entity.getPids() + "," + entity.getId());
String allDeptNames = (completeDept.getDistrictId() !=null ? completeDept.getDistrict() + "-":"") + (completeDept.getStreetId() !=null ? completeDept.getStreet() + "-":"") + (completeDept.getCommunityId() !=null ? completeDept.getCommunity() + "-":"") + (completeDept.getGridId() !=null ? completeDept.getGrid() :"");
String parentDeptNames = (completeDept.getDistrictId() !=null ? completeDept.getDistrict() + "-":"") + (completeDept.getStreetId() !=null ? completeDept.getStreet() + "-":"") + (completeDept.getCommunityId() !=null ? completeDept.getCommunity():"");
body.setAllDeptNames(allDeptNames);
body.setParentDeptNames(parentDeptNames);
organizationModifyProducer.sendMessage(RocketMqConstant.MQ_TOPIC_ORGANIZATION, RocketMqConstant.MQ_TAG_ORGANIZATION,
dto.getId().toString(), JSONObject.toJSONString(body));
System.out.println("部门更新"+body.toString());
}
}
@Override

2
esua-epdc/epdc-cloud-gateway-shibei

@ -1 +1 @@
Subproject commit d9805b690901f7e64cc8cd820fd96ea6e4aa8b87
Subproject commit 5730988c7a03c0d257df352ba7100d7c3b2d8126

1
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/IssueServiceImpl.java

@ -65,6 +65,7 @@ public class IssueServiceImpl implements IssueService {
// 查询当前时间前10分钟内的数据
Result<IssueDetailResultDTO> r = issueFeignClient.getIssueMaxNew(userIdDto);
IssueDetailResultDTO d = r.getData();
System.out.println("内容:"+ d.toString());
if(d != null && !StringUtils.isBlank(d.getId())){
return new Result().error("十分钟之内不能多次发起议题");
}

1
esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/enums/ItemHandleCategoryEnum.java

@ -16,6 +16,7 @@ public enum ItemHandleCategoryEnum {
HANDLE_I_HANDLE(0, "回应"),
HANDLE_CIRCULATION_ASSISTANCE(1, "吹哨"),
HANDLE_CLOSE(5, "关闭"),
HANDLE_CANCEL_CASE(8, "作废"),
HANDLE_CLOSING_CASE(10, "结案"),
HANDLE_REPORT(15, "上报网格化平台");

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

@ -281,4 +281,14 @@ public class ItemController {
List<ItemTimeOutDTO> list= itemTimeoutService.itemOutExportList(params);
ExcelUtils.exportExcelToTarget(response, "已超时", list, ItemTimeoutNewExcel.class);
}
/**
* 项目管理 - 已超时 -导出
* @throws Exception
*/
@GetMapping("itemTimeOut")
public Result itemTimeOut() throws Exception {
itemService.itemTimeOut();
return new Result();
}
}

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

@ -73,6 +73,8 @@ public interface ItemDao extends BaseDao<ItemEntity> {
*/
List<ItemResultDTO> getQuestionList(ItemByQuestionFormDTO formDto, List<Long> deptIdList);
List<ItemEntity> itemTimeOut();
/**
* 移动端-我的项目列表
*

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

@ -452,4 +452,6 @@ public interface ItemService extends BaseService<ItemEntity> {
* @return list
*/
List<ItemPendingHandleDTO> unExportList(Map<String, Object> params);
void itemTimeOut();
}

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

@ -119,4 +119,5 @@ public interface ItemTimeoutService extends BaseService<ItemTimeoutEntity> {
* @return list
*/
List<ItemTimeOutDTO> itemOutExportList(Map<String, Object> params);
}

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

@ -556,6 +556,11 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem
itemHandleResultDTO.setProcessName(ItemHandleCategoryEnum.HANDLE_I_HANDLE.getName());
itemHandleResultDTO.setSelect(false);
itemHandleResultDTOS.add(itemHandleResultDTO);
ItemHandleResultDTO itemHandleResultDTO2 = new ItemHandleResultDTO();
itemHandleResultDTO2.setProcessResult(ItemHandleCategoryEnum.HANDLE_CANCEL_CASE.getValue());
itemHandleResultDTO2.setProcessName(ItemHandleCategoryEnum.HANDLE_CANCEL_CASE.getName());
itemHandleResultDTO2.setSelect(false);
itemHandleResultDTOS.add(itemHandleResultDTO2);
resultDTO.setHandleResultDTOS(itemHandleResultDTOS);
return resultDTO;
@ -679,6 +684,11 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem
itemHandleResultDTO2.setProcessName(ItemHandleCategoryEnum.HANDLE_REPORT.getName());
itemHandleResultDTO2.setSelect(false);
itemHandleResultDTOS.add(itemHandleResultDTO2);
ItemHandleResultDTO itemHandleResultDTO3 = new ItemHandleResultDTO();
itemHandleResultDTO3.setProcessResult(ItemHandleCategoryEnum.HANDLE_CANCEL_CASE.getValue());
itemHandleResultDTO3.setProcessName(ItemHandleCategoryEnum.HANDLE_CANCEL_CASE.getName());
itemHandleResultDTO3.setSelect(false);
itemHandleResultDTOS.add(itemHandleResultDTO3);
resultDTO.setHandleResultDTOS(itemHandleResultDTOS);
return resultDTO;
@ -1897,6 +1907,24 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem
return new Result();
}
@Override
public void itemTimeOut() {
List<ItemEntity> entities = baseDao.itemTimeOut();
for(ItemEntity item : entities){
ItemInformationEntity itemInfoDto = new ItemInformationEntity();
itemInfoDto.setType(ItemInformationConstant.INFORMATION_TYPE_ITEM);
itemInfoDto.setBusinessType(2);
itemInfoDto.setAssociatedBusinessId(item.getId());
itemInfoDto.setAssociatedBusinessContent(item.getItemContent());
itemInfoDto.setHandleDeptId(item.getGridId());
itemInfoDto.setHandleDept(item.getGrid());
itemInfoDto.setHandleAdvice("项目已超时,请尽快处理。");
itemInfoDto.setReadFlag(ItemInformationConstant.READ_FLAG_NO);
itemInfoDto.setDeptId(item.getGridId().toString());
itemInformationService.insert(itemInfoDto);
}
}
/**
*
* @param params

1
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/rocketmq/consumer/OrganizationModifyConsumer.java

@ -54,6 +54,7 @@ public class OrganizationModifyConsumer implements RocketMQListener<MessageExt>
@Override
public void onMessage(MessageExt messageExt) {
log.info("EPDC-EVENTS-SERVER消费消息START:{topic:{}, msgId:{}}", RocketMqConstant.MQ_TOPIC_ORGANIZATION, messageExt.getMsgId());
System.out.println("EPDC-EVENTS-SERVER消费消息START:{topic:{}, msgId:{}}"+messageExt.getBody());
try {
String charset = "UTF-8";
String body = new String(messageExt.getBody(), charset);

11
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/issue/IssueDao.xml

@ -338,13 +338,14 @@
<select id="getIssueMaxNew" resultType="com.elink.esua.epdc.dto.issue.result.IssueDetailResultDTO">
SELECT
issue.ID
event.ID
FROM
epdc_issue issue
epdc_events event
WHERE
issue.DEL_FLAG = '0'
and issue.CREATED_TIME &gt;= CURRENT_TIMESTAMP - INTERVAL 10 MINUTE
AND issue.USER_ID = #{userId}
event.DEL_FLAG = '0'
and event.CREATED_TIME &gt;= CURRENT_TIMESTAMP - INTERVAL 10 MINUTE
AND event.USER_ID = #{userId}
limit 1
</select>
<select id="selectListOfHandleProgress" resultType="com.elink.esua.epdc.dto.issue.result.IssueHandleProgressResultDTO">

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

@ -458,6 +458,23 @@
AND item.FIRST_CATEGORY_CODE = #{firstCategoryCode}
</select>
<select id="itemTimeOut" resultType="com.elink.esua.epdc.modules.item.entity.ItemEntity">
SELECT
mi.*
FROM
esua_epdc_events.epdc_item mi
LEFT JOIN esua_epdc_events.epdc_category c ON mi.CATEGORY_CODE = c.CATEGORY_CODE
LEFT JOIN esua_epdc_kpi.epdc_kpi_time_limit_item t ON c.id = t.CATEGORY_ID
WHERE
mi.DEL_FLAG = '0'
AND mi.event_id IS NOT NULL
and mi.ITEM_STATE = 0
and TIMESTAMPDIFF(
HOUR,
mi.CREATED_TIME,now()) > t.VALID_CLOSE_TIME
and mi.id not in (select ASSOCIATED_BUSINESS_ID from esua_epdc_events.epdc_item_information where BUSINESS_TYPE = 2)
</select>
<select id="selectListOfPendingHandleItems" resultType="com.elink.esua.epdc.dto.item.ItemPendingHandleDTO">
SELECT
item.ID,

1
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/pom.xml

@ -251,7 +251,6 @@
<spring.zipkin.base-url>http://localhost:9411</spring.zipkin.base-url>
<!--RocketMQ-->
<rocketmq.name.server>172.16.0.53:9876;172.16.0.51:9876</rocketmq.name.server>
<rocketmq.consumer.contentSecurity.group>contentSecurityGroup</rocketmq.consumer.contentSecurity.group>
</properties>
</profile>

3
esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/feign/ItemFeignClient.java

@ -28,4 +28,7 @@ public interface ItemFeignClient {
*/
@GetMapping(value = "events/platform/item/query", consumes = MediaType.APPLICATION_JSON_VALUE)
Result queryItemHandle();
@GetMapping(value = "events/item/itemTimeOut", consumes = MediaType.APPLICATION_JSON_VALUE)
Result itemTimeOut();
}

4
esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/feign/fallback/ItemFeignClientFallback.java

@ -17,4 +17,8 @@ public class ItemFeignClientFallback implements ItemFeignClient {
public Result queryItemHandle() {
return ModuleUtils.feignConError(ServiceConstant.EPDC_EVENTS_SERVER, "queryItemHandle", "");
}
@Override
public Result itemTimeOut() {
return ModuleUtils.feignConError(ServiceConstant.EPDC_EVENTS_SERVER, "itemTimeOut", "");
}
}

19
esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/task/events/ItemTimeTask.java

@ -0,0 +1,19 @@
package com.elink.esua.epdc.task.events;
/**
* @Authorliuchuang
* @Date2019/12/25 11:00
*/
public interface ItemTimeTask {
/**
*
*
*
* @params [params]
* @return void
* @author liuchuang
* @since 2019/12/25 11:02
*/
void run(String params);
}

26
esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/task/events/ItemTimeTaskImpl.java

@ -0,0 +1,26 @@
package com.elink.esua.epdc.task.events;
import com.elink.esua.epdc.feign.ItemFeignClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* @Authorliuchuang
* @Date2019/12/25 11:01
*/
@Component("ItemTimeTask")
public class ItemTimeTaskImpl implements ItemTimeTask {
private Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private ItemFeignClient itemFeignClient;
@Override
public void run(String params){
logger.debug("ItemTimeTask定时任务正在执行,参数为:{}", params);
itemFeignClient.itemTimeOut();
}
}

48
esua-epdc/kettle-Code/esua_epdc_analysis_job/analysis_extracting/epdc_analysis_extracting.kjb

@ -298,7 +298,7 @@
<schedulerType>0</schedulerType>
<intervalSeconds>0</intervalSeconds>
<intervalMinutes>60</intervalMinutes>
<hour>12</hour>
<hour>5</hour>
<minutes>0</minutes>
<weekDay>1</weekDay>
<DayOfMonth>1</DayOfMonth>
@ -684,6 +684,43 @@
<yloc>1248</yloc>
<attributes_kjc/>
</entry>
<entry>
<name>epdc_family_extracting</name>
<description/>
<type>JOB</type>
<attributes/>
<specification_method>filename</specification_method>
<job_object_id/>
<filename>${Internal.Entry.Current.Directory}/epdc_family_extracting.kjb</filename>
<jobname/>
<directory/>
<arg_from_previous>N</arg_from_previous>
<params_from_previous>N</params_from_previous>
<exec_per_row>N</exec_per_row>
<set_logfile>N</set_logfile>
<logfile/>
<logext/>
<add_date>N</add_date>
<add_time>N</add_time>
<loglevel>Nothing</loglevel>
<slave_server_name/>
<wait_until_finished>Y</wait_until_finished>
<follow_abort_remote>N</follow_abort_remote>
<expand_remote_job>N</expand_remote_job>
<create_parent_folder>N</create_parent_folder>
<pass_export>N</pass_export>
<run_configuration>Pentaho local</run_configuration>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
</parameters>
<set_append_logfile>N</set_append_logfile>
<parallel>N</parallel>
<draw>Y</draw>
<nr>1</nr>
<xloc>752</xloc>
<yloc>80</yloc>
<attributes_kjc/>
</entry>
</entries>
<hops>
<hop>
@ -776,6 +813,15 @@
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>Start</from>
<to>epdc_family_extracting</to>
<from_nr>0</from_nr>
<to_nr>1</to_nr>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
</hops>
<notepads>
</notepads>

3
esua-epdc/kettle-Code/esua_epdc_analysis_job/analysis_extracting/epdc_difficult_item_extracting.ktr

@ -629,7 +629,8 @@
FROM
meta_epdc_item ei
WHERE
ei.DEL_FLAG = '0' ;</sql>
ei.DEL_FLAG = '0'
and ei.EVENT_ID is not null</sql>
<limit>0</limit>
<lookup/>
<execute_each_row>N</execute_each_row>

3
esua-epdc/kettle-Code/esua_epdc_analysis_job/analysis_extracting/epdc_issue_item_statistics_item_extracting.ktr

@ -621,7 +621,8 @@
LEFT JOIN esua_epdc_events.epdc_item_handle_process handle ON maxitem.ITEM_ID = handle.ITEM_ID
AND maxitem.CREATED_TIME = handle.CREATED_TIME
WHERE
item.DEL_FLAG = '0') cc
item.DEL_FLAG = '0'
and item.EVENT_ID is not null) cc
GROUP BY
cc.GRID_ID)b
GROUP BY

14
esua-epdc/kettle-Code/esua_epdc_analysis_job/analysis_synchronize/epdc_item.ktr

@ -804,12 +804,20 @@
<connection>esua_epdc_events</connection>
<rowlimit>0</rowlimit>
<sql>SELECT * FROM epdc_item
WHERE (UPDATED_TIME > '2021-07-08 09:53:57'
AND UPDATED_TIME &lt;= '2021-07-09 00:00:29') or del_flag=1
WHERE (UPDATED_TIME > ?
AND UPDATED_TIME &lt;= ?) or del_flag=1
</sql>
<outer_join>N</outer_join>
<replace_vars>N</replace_vars>
<parameter>
<field>
<name>START_TIME</name>
<type>Date</type>
</field>
<field>
<name>END_TIME</name>
<type>Date</type>
</field>
</parameter>
<attributes/>
<cluster_schema/>
@ -839,7 +847,7 @@
<connection>esua_epdc_analysis</connection>
<sql>
SELECT
IFNULL('2021-07-08 09:53:57','2000-01-01 00:00:00') AS START_TIME,
IFNULL((SELECT UPDATED_TIME FROM meta_epdc_item ORDER BY UPDATED_TIME DESC LIMIT 1),'2000-01-01 00:00:00') AS START_TIME,
END_TIME
FROM epdc_kettle_job_record
ORDER BY CREATED_TIME

7
esua-epdc/kettle-Code/esua_epdc_analysis_job/analysis_synchronize/epdc_user.ktr

@ -845,6 +845,11 @@
<rename>DRIVER_FLAG</rename>
<update>Y</update>
</value>
<value>
<name>ACTIVE_POINTS</name>
<rename>ACTIVE_POINTS</rename>
<update>Y</update>
</value>
</lookup>
<attributes/>
<cluster_schema/>
@ -855,7 +860,7 @@
</output>
</remotesteps>
<GUI>
<xloc>608</xloc>
<xloc>592</xloc>
<yloc>240</yloc>
<draw>Y</draw>
</GUI>

423
esua-epdc/kettle-Code/esua_epdc_analysis_job/analysis_synchronize/esua_analysis_synchronize.kjb

@ -2323,6 +2323,348 @@
<yloc>6192</yloc>
<attributes_kjc/>
</entry>
<entry>
<name>epdc_family_group_relation</name>
<description/>
<type>TRANS</type>
<attributes/>
<specification_method>filename</specification_method>
<trans_object_id/>
<filename>${Internal.Entry.Current.Directory}/epdc_family_group_relation.ktr</filename>
<transname/>
<arg_from_previous>N</arg_from_previous>
<params_from_previous>N</params_from_previous>
<exec_per_row>N</exec_per_row>
<clear_rows>N</clear_rows>
<clear_files>N</clear_files>
<set_logfile>N</set_logfile>
<logfile/>
<logext/>
<add_date>N</add_date>
<add_time>N</add_time>
<loglevel>Basic</loglevel>
<cluster>N</cluster>
<slave_server_name/>
<set_append_logfile>N</set_append_logfile>
<wait_until_finished>Y</wait_until_finished>
<follow_abort_remote>N</follow_abort_remote>
<create_parent_folder>N</create_parent_folder>
<logging_remote_work>N</logging_remote_work>
<run_configuration>Pentaho local</run_configuration>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
</parameters>
<parallel>N</parallel>
<draw>Y</draw>
<nr>1</nr>
<xloc>768</xloc>
<yloc>6336</yloc>
<attributes_kjc/>
</entry>
<entry>
<name>epdc_family_info_acquisition</name>
<description/>
<type>TRANS</type>
<attributes/>
<specification_method>filename</specification_method>
<trans_object_id/>
<filename>${Internal.Entry.Current.Directory}/epdc_family_info_acquisition.ktr</filename>
<transname/>
<arg_from_previous>N</arg_from_previous>
<params_from_previous>N</params_from_previous>
<exec_per_row>N</exec_per_row>
<clear_rows>N</clear_rows>
<clear_files>N</clear_files>
<set_logfile>N</set_logfile>
<logfile/>
<logext/>
<add_date>N</add_date>
<add_time>N</add_time>
<loglevel>Basic</loglevel>
<cluster>N</cluster>
<slave_server_name/>
<set_append_logfile>N</set_append_logfile>
<wait_until_finished>Y</wait_until_finished>
<follow_abort_remote>N</follow_abort_remote>
<create_parent_folder>N</create_parent_folder>
<logging_remote_work>N</logging_remote_work>
<run_configuration>Pentaho local</run_configuration>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
</parameters>
<parallel>N</parallel>
<draw>Y</draw>
<nr>2</nr>
<xloc>768</xloc>
<yloc>6400</yloc>
<attributes_kjc/>
</entry>
<entry>
<name>epdc_famliy_member</name>
<description/>
<type>TRANS</type>
<attributes/>
<specification_method>filename</specification_method>
<trans_object_id/>
<filename>${Internal.Entry.Current.Directory}/epdc_famliy_member.ktr</filename>
<transname/>
<arg_from_previous>N</arg_from_previous>
<params_from_previous>N</params_from_previous>
<exec_per_row>N</exec_per_row>
<clear_rows>N</clear_rows>
<clear_files>N</clear_files>
<set_logfile>N</set_logfile>
<logfile/>
<logext/>
<add_date>N</add_date>
<add_time>N</add_time>
<loglevel>Basic</loglevel>
<cluster>N</cluster>
<slave_server_name/>
<set_append_logfile>N</set_append_logfile>
<wait_until_finished>Y</wait_until_finished>
<follow_abort_remote>N</follow_abort_remote>
<create_parent_folder>N</create_parent_folder>
<logging_remote_work>N</logging_remote_work>
<run_configuration>Pentaho local</run_configuration>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
</parameters>
<parallel>N</parallel>
<draw>Y</draw>
<nr>1</nr>
<xloc>464</xloc>
<yloc>6288</yloc>
<attributes_kjc/>
</entry>
<entry>
<name>epdc_group_cadre_relation</name>
<description/>
<type>TRANS</type>
<attributes/>
<specification_method>filename</specification_method>
<trans_object_id/>
<filename>${Internal.Entry.Current.Directory}/epdc_group_cadre_relation.ktr</filename>
<transname/>
<arg_from_previous>N</arg_from_previous>
<params_from_previous>N</params_from_previous>
<exec_per_row>N</exec_per_row>
<clear_rows>N</clear_rows>
<clear_files>N</clear_files>
<set_logfile>N</set_logfile>
<logfile/>
<logext/>
<add_date>N</add_date>
<add_time>N</add_time>
<loglevel>Basic</loglevel>
<cluster>N</cluster>
<slave_server_name/>
<set_append_logfile>N</set_append_logfile>
<wait_until_finished>Y</wait_until_finished>
<follow_abort_remote>N</follow_abort_remote>
<create_parent_folder>N</create_parent_folder>
<logging_remote_work>N</logging_remote_work>
<run_configuration>Pentaho local</run_configuration>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
</parameters>
<parallel>N</parallel>
<draw>Y</draw>
<nr>2</nr>
<xloc>464</xloc>
<yloc>5984</yloc>
<attributes_kjc/>
</entry>
<entry>
<name>epdc_help_group</name>
<description/>
<type>TRANS</type>
<attributes/>
<specification_method>filename</specification_method>
<trans_object_id/>
<filename>${Internal.Entry.Current.Directory}/epdc_help_group.ktr</filename>
<transname/>
<arg_from_previous>N</arg_from_previous>
<params_from_previous>N</params_from_previous>
<exec_per_row>N</exec_per_row>
<clear_rows>N</clear_rows>
<clear_files>N</clear_files>
<set_logfile>N</set_logfile>
<logfile/>
<logext/>
<add_date>N</add_date>
<add_time>N</add_time>
<loglevel>Basic</loglevel>
<cluster>N</cluster>
<slave_server_name/>
<set_append_logfile>N</set_append_logfile>
<wait_until_finished>Y</wait_until_finished>
<follow_abort_remote>N</follow_abort_remote>
<create_parent_folder>N</create_parent_folder>
<logging_remote_work>N</logging_remote_work>
<run_configuration>Pentaho local</run_configuration>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
</parameters>
<parallel>N</parallel>
<draw>Y</draw>
<nr>2</nr>
<xloc>448</xloc>
<yloc>6368</yloc>
<attributes_kjc/>
</entry>
<entry>
<name>epdc_help_log</name>
<description/>
<type>TRANS</type>
<attributes/>
<specification_method>filename</specification_method>
<trans_object_id/>
<filename>${Internal.Entry.Current.Directory}/epdc_help_log.ktr</filename>
<transname/>
<arg_from_previous>N</arg_from_previous>
<params_from_previous>N</params_from_previous>
<exec_per_row>N</exec_per_row>
<clear_rows>N</clear_rows>
<clear_files>N</clear_files>
<set_logfile>N</set_logfile>
<logfile/>
<logext/>
<add_date>N</add_date>
<add_time>N</add_time>
<loglevel>Basic</loglevel>
<cluster>N</cluster>
<slave_server_name/>
<set_append_logfile>N</set_append_logfile>
<wait_until_finished>Y</wait_until_finished>
<follow_abort_remote>N</follow_abort_remote>
<create_parent_folder>N</create_parent_folder>
<logging_remote_work>N</logging_remote_work>
<run_configuration>Pentaho local</run_configuration>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
</parameters>
<parallel>N</parallel>
<draw>Y</draw>
<nr>1</nr>
<xloc>464</xloc>
<yloc>6080</yloc>
<attributes_kjc/>
</entry>
<entry>
<name>epdc_help_log_img</name>
<description/>
<type>TRANS</type>
<attributes/>
<specification_method>filename</specification_method>
<trans_object_id/>
<filename>${Internal.Entry.Current.Directory}/epdc_help_log_img.ktr</filename>
<transname/>
<arg_from_previous>N</arg_from_previous>
<params_from_previous>N</params_from_previous>
<exec_per_row>N</exec_per_row>
<clear_rows>N</clear_rows>
<clear_files>N</clear_files>
<set_logfile>N</set_logfile>
<logfile/>
<logext/>
<add_date>N</add_date>
<add_time>N</add_time>
<loglevel>Basic</loglevel>
<cluster>N</cluster>
<slave_server_name/>
<set_append_logfile>N</set_append_logfile>
<wait_until_finished>Y</wait_until_finished>
<follow_abort_remote>N</follow_abort_remote>
<create_parent_folder>N</create_parent_folder>
<logging_remote_work>N</logging_remote_work>
<run_configuration>Pentaho local</run_configuration>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
</parameters>
<parallel>N</parallel>
<draw>Y</draw>
<nr>2</nr>
<xloc>464</xloc>
<yloc>6192</yloc>
<attributes_kjc/>
</entry>
<entry>
<name>epdc_question_collection_img</name>
<description/>
<type>TRANS</type>
<attributes/>
<specification_method>filename</specification_method>
<trans_object_id/>
<filename>${Internal.Entry.Current.Directory}/epdc_question_collection_img.ktr</filename>
<transname/>
<arg_from_previous>N</arg_from_previous>
<params_from_previous>N</params_from_previous>
<exec_per_row>N</exec_per_row>
<clear_rows>N</clear_rows>
<clear_files>N</clear_files>
<set_logfile>N</set_logfile>
<logfile/>
<logext/>
<add_date>N</add_date>
<add_time>N</add_time>
<loglevel>Basic</loglevel>
<cluster>N</cluster>
<slave_server_name/>
<set_append_logfile>N</set_append_logfile>
<wait_until_finished>Y</wait_until_finished>
<follow_abort_remote>N</follow_abort_remote>
<create_parent_folder>N</create_parent_folder>
<logging_remote_work>N</logging_remote_work>
<run_configuration>Pentaho local</run_configuration>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
</parameters>
<parallel>N</parallel>
<draw>Y</draw>
<nr>1</nr>
<xloc>432</xloc>
<yloc>6480</yloc>
<attributes_kjc/>
</entry>
<entry>
<name>epdc_question_collection_info</name>
<description/>
<type>TRANS</type>
<attributes/>
<specification_method>filename</specification_method>
<trans_object_id/>
<filename>${Internal.Entry.Current.Directory}/epdc_question_collection_info.ktr</filename>
<transname/>
<arg_from_previous>N</arg_from_previous>
<params_from_previous>N</params_from_previous>
<exec_per_row>N</exec_per_row>
<clear_rows>N</clear_rows>
<clear_files>N</clear_files>
<set_logfile>N</set_logfile>
<logfile/>
<logext/>
<add_date>N</add_date>
<add_time>N</add_time>
<loglevel>Basic</loglevel>
<cluster>N</cluster>
<slave_server_name/>
<set_append_logfile>N</set_append_logfile>
<wait_until_finished>Y</wait_until_finished>
<follow_abort_remote>N</follow_abort_remote>
<create_parent_folder>N</create_parent_folder>
<logging_remote_work>N</logging_remote_work>
<run_configuration>Pentaho local</run_configuration>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
</parameters>
<parallel>N</parallel>
<draw>Y</draw>
<nr>2</nr>
<xloc>432</xloc>
<yloc>6560</yloc>
<attributes_kjc/>
</entry>
</entries>
<hops>
<hop>
@ -2802,6 +3144,87 @@
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>Start</from>
<to>epdc_family_group_relation</to>
<from_nr>0</from_nr>
<to_nr>1</to_nr>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>Start</from>
<to>epdc_family_info_acquisition</to>
<from_nr>0</from_nr>
<to_nr>2</to_nr>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>Start</from>
<to>epdc_famliy_member</to>
<from_nr>0</from_nr>
<to_nr>1</to_nr>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>Start</from>
<to>epdc_group_cadre_relation</to>
<from_nr>0</from_nr>
<to_nr>2</to_nr>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>Start</from>
<to>epdc_help_group</to>
<from_nr>0</from_nr>
<to_nr>2</to_nr>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>Start</from>
<to>epdc_help_log</to>
<from_nr>0</from_nr>
<to_nr>1</to_nr>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>Start</from>
<to>epdc_help_log_img</to>
<from_nr>0</from_nr>
<to_nr>2</to_nr>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>Start</from>
<to>epdc_question_collection_img</to>
<from_nr>0</from_nr>
<to_nr>1</to_nr>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>Start</from>
<to>epdc_question_collection_info</to>
<from_nr>0</from_nr>
<to_nr>2</to_nr>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
</hops>
<notepads>
</notepads>

2
esua-epdc/kettle-Code/governanceRankingMonth/blow_whistle/同步到中间表/吹哨-议题-月-基础数据.ktr

@ -619,7 +619,7 @@
COUNT(1) EVENT_NUM, -- 上报议题数量
SUM(total.respondIssueNumber) RESPOND_IN_TIME_NUM, -- 及时响应数量
SUM(total.timeoutIssueNumber) TIMEOUT_RESPOND_NUM, -- 超时响应数量
LEFT(NOW(),7) 'YEAR_MONTH',
LEFT(date_sub(NOW(), interval 1 MONTH),7) 'YEAR_MONTH',
0 as REVISION,
'admin' as CREATED_BY,
now() as CREATED_TIME,

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

@ -619,7 +619,7 @@
COUNT(1) ITEM_NUM,
SUM(a.respondItemNumber) FINISH_IN_TIME_NUM, -- 记录有几条及时转项目数
SUM(a.timeoutItemNumber) TIMEOUT_FINISH_NUM,
LEFT(NOW(),7) 'YEAR_MONTH',
LEFT(date_sub(NOW(), interval 1 MONTH),7) 'YEAR_MONTH',
0 as REVISION,
'admin' as CREATED_BY,
now() as CREATED_TIME,
@ -646,9 +646,11 @@ 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)
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)
OR LEFT(mhp2.CREATED_TIME, 7) = LEFT(date_sub(NOW(), interval 1 MONTH),7))
and mi.event_id is not null
)a
GROUP BY a.GRID_ID </sql>
<limit>0</limit>

72
esua-epdc/kettle-Code/governanceRankingMonth/organization/base_and_common/epdc_gr_community_month_new_TYPICAL_CASE.ktr

@ -546,6 +546,10 @@
<name>EXPERIENCE_EXCHANGE</name>
<rename>EXPERIENCE_EXCHANGE</rename>
</value>
<value>
<name>CONSULT_CASE</name>
<rename>CONSULT_CASE</rename>
</value>
</lookup>
<attributes/>
<cluster_schema/>
@ -577,35 +581,46 @@
dept.ID,
dept.NAME,
(select date_format(date_add(now(),interval -1 month ),'%Y-%m')) as MONTH_YEAR,
format(IF
(
sum( IF ( entity.BONUS_CATEGORY = '1', IFNULL( entity.BONUS, 0 ), 0 ) ) &lt; 5,
sum( IF ( entity.BONUS_CATEGORY = '1', IFNULL( entity.BONUS, 0 ), 0 ) ),
5
) +
IF
(
sum( IF ( entity.BONUS_CATEGORY = '2', IFNULL( entity.BONUS, 0 ), 0 ) ) &lt; 5,
sum( IF ( entity.BONUS_CATEGORY = '2', IFNULL( entity.BONUS, 0 ), 0 ) ),
5
),2) AS TYPICAL_CASE,
format(IF(
sum( IF ( entity.BONUS_CATEGORY = '1', IFNULL( entity.BONUS, 0 ), 0 ) ) &lt; 3,
sum( IF ( entity.BONUS_CATEGORY = '1', IFNULL( entity.BONUS, 0 ), 0 ) ),
3 ) +
IF(
sum( IF ( entity.BONUS_CATEGORY = '2', IFNULL( entity.BONUS, 0 ), 0 ) ) &lt; 4,
sum( IF ( entity.BONUS_CATEGORY = '2', IFNULL( entity.BONUS, 0 ), 0 ) ),
4
) +
IF(
sum( IF ( entity.BONUS_CATEGORY = '2', IFNULL( entity.BONUS, 0 ), 0 ) ) &lt; 3,
sum( IF ( entity.BONUS_CATEGORY = '2', IFNULL( entity.BONUS, 0 ), 0 ) ),
3
)
,2) AS TYPICAL_CASE,
format(
IF
(
sum( IF ( entity.BONUS_CATEGORY = '1', IFNULL( entity.BONUS, 0 ), 0 ) ) &lt; 5,
sum( IF ( entity.BONUS_CATEGORY = '1', IFNULL( entity.BONUS, 0 ), 0 ) ) &lt; 3,
sum( IF ( entity.BONUS_CATEGORY = '1', IFNULL( entity.BONUS, 0 ), 0 ) ),
5
3
)
,2) AS TYPICAL_GOOD_CASE,
format(
IF
(
sum( IF ( entity.BONUS_CATEGORY = '2', IFNULL( entity.BONUS, 0 ), 0 ) ) &lt; 5,
sum( IF ( entity.BONUS_CATEGORY = '2', IFNULL( entity.BONUS, 0 ), 0 ) ) &lt; 4,
sum( IF ( entity.BONUS_CATEGORY = '2', IFNULL( entity.BONUS, 0 ), 0 ) ),
5
4
)
,2) AS EXPERIENCE_EXCHANGE,
dept.ALL_DEPT_IDS
format(
IF
(
sum( IF ( entity.BONUS_CATEGORY = '3', IFNULL( entity.BONUS, 0 ), 0 ) ) &lt; 3,
sum( IF ( entity.BONUS_CATEGORY = '3', IFNULL( entity.BONUS, 0 ), 0 ) ),
3
)
,2) AS CONSULT_CASE,
dept.ALL_DEPT_IDS
FROM
meta_sys_dept dept
LEFT JOIN (
@ -787,6 +802,29 @@ GROUP BY
<date_format_timezone>Asia/Shanghai</date_format_timezone>
<lenient_string_to_number>N</lenient_string_to_number>
</value-meta>
<value-meta>
<type>String</type>
<storagetype>normal</storagetype>
<name>CONSULT_CASE</name>
<length>63</length>
<precision>-1</precision>
<origin>表输入</origin>
<comments>CONSULT_CASE</comments>
<conversion_Mask/>
<decimal_symbol>.</decimal_symbol>
<grouping_symbol>,</grouping_symbol>
<currency_symbol/>
<trim_type>none</trim_type>
<case_insensitive>N</case_insensitive>
<collator_disabled>Y</collator_disabled>
<collator_strength>0</collator_strength>
<sort_descending>N</sort_descending>
<output_padding>N</output_padding>
<date_format_lenient>N</date_format_lenient>
<date_format_locale>zh_CN</date_format_locale>
<date_format_timezone>Asia/Shanghai</date_format_timezone>
<lenient_string_to_number>N</lenient_string_to_number>
</value-meta>
<value-meta>
<type>String</type>
<storagetype>normal</storagetype>

72
esua-epdc/kettle-Code/governanceRankingMonth/organization/base_and_common/epdc_gr_grid_month_new_TYPICAL_CASE.ktr

@ -546,6 +546,10 @@
<name>EXPERIENCE_EXCHANGE</name>
<rename>EXPERIENCE_EXCHANGE</rename>
</value>
<value>
<name>CONSULT_CASE</name>
<rename>CONSULT_CASE</rename>
</value>
</lookup>
<attributes/>
<cluster_schema/>
@ -577,35 +581,46 @@
concat('%',dept.ID,'%') as DEPT_ID,
dept.NAME,
(select date_format(date_add(now(),interval -1 month ),'%Y-%m')) as MONTH_YEAR,
format(IF
(
sum( IF ( entity.BONUS_CATEGORY = '1', IFNULL( entity.BONUS, 0 ), 0 ) ) &lt; 5,
sum( IF ( entity.BONUS_CATEGORY = '1', IFNULL( entity.BONUS, 0 ), 0 ) ),
5
) +
IF
(
sum( IF ( entity.BONUS_CATEGORY = '2', IFNULL( entity.BONUS, 0 ), 0 ) ) &lt; 5,
sum( IF ( entity.BONUS_CATEGORY = '2', IFNULL( entity.BONUS, 0 ), 0 ) ),
5
),2) AS TYPICAL_CASE,
format(IF(
sum( IF ( entity.BONUS_CATEGORY = '1', IFNULL( entity.BONUS, 0 ), 0 ) ) &lt; 3,
sum( IF ( entity.BONUS_CATEGORY = '1', IFNULL( entity.BONUS, 0 ), 0 ) ),
3 ) +
IF(
sum( IF ( entity.BONUS_CATEGORY = '2', IFNULL( entity.BONUS, 0 ), 0 ) ) &lt; 4,
sum( IF ( entity.BONUS_CATEGORY = '2', IFNULL( entity.BONUS, 0 ), 0 ) ),
4
) +
IF(
sum( IF ( entity.BONUS_CATEGORY = '2', IFNULL( entity.BONUS, 0 ), 0 ) ) &lt; 3,
sum( IF ( entity.BONUS_CATEGORY = '2', IFNULL( entity.BONUS, 0 ), 0 ) ),
3
)
,2) AS TYPICAL_CASE,
format(
IF
(
sum( IF ( entity.BONUS_CATEGORY = '1', IFNULL( entity.BONUS, 0 ), 0 ) ) &lt; 5,
sum( IF ( entity.BONUS_CATEGORY = '1', IFNULL( entity.BONUS, 0 ), 0 ) ) &lt; 3,
sum( IF ( entity.BONUS_CATEGORY = '1', IFNULL( entity.BONUS, 0 ), 0 ) ),
5
3
)
,2) AS TYPICAL_GOOD_CASE,
format(
IF
(
sum( IF ( entity.BONUS_CATEGORY = '2', IFNULL( entity.BONUS, 0 ), 0 ) ) &lt; 5,
sum( IF ( entity.BONUS_CATEGORY = '2', IFNULL( entity.BONUS, 0 ), 0 ) ) &lt; 4,
sum( IF ( entity.BONUS_CATEGORY = '2', IFNULL( entity.BONUS, 0 ), 0 ) ),
5
4
)
,2) AS EXPERIENCE_EXCHANGE,
dept.ALL_DEPT_IDS
format(
IF
(
sum( IF ( entity.BONUS_CATEGORY = '3', IFNULL( entity.BONUS, 0 ), 0 ) ) &lt; 3,
sum( IF ( entity.BONUS_CATEGORY = '3', IFNULL( entity.BONUS, 0 ), 0 ) ),
3
)
,2) AS CONSULT_CASE,
dept.ALL_DEPT_IDS
FROM
meta_sys_dept dept
LEFT JOIN (
@ -787,6 +802,29 @@ GROUP BY
<date_format_timezone>Asia/Shanghai</date_format_timezone>
<lenient_string_to_number>N</lenient_string_to_number>
</value-meta>
<value-meta>
<type>String</type>
<storagetype>normal</storagetype>
<name>CONSULT_CASE</name>
<length>63</length>
<precision>-1</precision>
<origin>表输入</origin>
<comments>CONSULT_CASE</comments>
<conversion_Mask/>
<decimal_symbol>.</decimal_symbol>
<grouping_symbol>,</grouping_symbol>
<currency_symbol/>
<trim_type>none</trim_type>
<case_insensitive>N</case_insensitive>
<collator_disabled>Y</collator_disabled>
<collator_strength>0</collator_strength>
<sort_descending>N</sort_descending>
<output_padding>N</output_padding>
<date_format_lenient>N</date_format_lenient>
<date_format_locale>zh_CN</date_format_locale>
<date_format_timezone>Asia/Shanghai</date_format_timezone>
<lenient_string_to_number>N</lenient_string_to_number>
</value-meta>
<value-meta>
<type>String</type>
<storagetype>normal</storagetype>

61
esua-epdc/kettle-Code/governanceRankingMonth/organization/base_and_common/epdc_gr_street_month_new_TYPICAL_CASE.ktr

@ -546,6 +546,10 @@
<name>EXPERIENCE_EXCHANGE</name>
<rename>EXPERIENCE_EXCHANGE</rename>
</value>
<value>
<name>CONSULT_CASE</name>
<rename>CONSULT_CASE</rename>
</value>
</lookup>
<attributes/>
<cluster_schema/>
@ -578,30 +582,44 @@
dept.NAME,
( SELECT date_format( date_add( now( ), INTERVAL - 1 MONTH ), '%Y-%m' ) ) AS MONTH_YEAR,
format(IF(
sum( IF ( entity.BONUS_CATEGORY = '1', IFNULL( entity.BONUS, 0 ), 0 ) ) &lt; 5,
sum( IF ( entity.BONUS_CATEGORY = '1', IFNULL( entity.BONUS, 0 ), 0 ) ) &lt; 3,
sum( IF ( entity.BONUS_CATEGORY = '1', IFNULL( entity.BONUS, 0 ), 0 ) ),
5 ) +
3 ) +
IF(
sum( IF ( entity.BONUS_CATEGORY = '2', IFNULL( entity.BONUS, 0 ), 0 ) ) &lt; 5,
sum( IF ( entity.BONUS_CATEGORY = '2', IFNULL( entity.BONUS, 0 ), 0 ) ) &lt; 4,
sum( IF ( entity.BONUS_CATEGORY = '2', IFNULL( entity.BONUS, 0 ), 0 ) ),
5
),2) AS TYPICAL_CASE,
4
) +
IF(
sum( IF ( entity.BONUS_CATEGORY = '2', IFNULL( entity.BONUS, 0 ), 0 ) ) &lt; 3,
sum( IF ( entity.BONUS_CATEGORY = '2', IFNULL( entity.BONUS, 0 ), 0 ) ),
3
)
,2) AS TYPICAL_CASE,
format(
IF
(
sum( IF ( entity.BONUS_CATEGORY = '1', IFNULL( entity.BONUS, 0 ), 0 ) ) &lt; 5,
sum( IF ( entity.BONUS_CATEGORY = '1', IFNULL( entity.BONUS, 0 ), 0 ) ) &lt; 3,
sum( IF ( entity.BONUS_CATEGORY = '1', IFNULL( entity.BONUS, 0 ), 0 ) ),
5
3
)
,2) AS TYPICAL_GOOD_CASE,
format(
IF
(
sum( IF ( entity.BONUS_CATEGORY = '2', IFNULL( entity.BONUS, 0 ), 0 ) ) &lt; 5,
sum( IF ( entity.BONUS_CATEGORY = '2', IFNULL( entity.BONUS, 0 ), 0 ) ) &lt; 4,
sum( IF ( entity.BONUS_CATEGORY = '2', IFNULL( entity.BONUS, 0 ), 0 ) ),
5
4
)
,2) AS EXPERIENCE_EXCHANGE,
format(
IF
(
sum( IF ( entity.BONUS_CATEGORY = '3', IFNULL( entity.BONUS, 0 ), 0 ) ) &lt; 3,
sum( IF ( entity.BONUS_CATEGORY = '3', IFNULL( entity.BONUS, 0 ), 0 ) ),
3
)
,2) AS CONSULT_CASE,
dept.ALL_DEPT_IDS
FROM
meta_sys_dept dept
@ -624,6 +642,7 @@ FROM
meta_epdc_kpi_typical_culture
WHERE
DEL_FLAG = '0'
and date_format(CREATED_TIME, '%Y-%m') = date_format(now(), '%Y-%m' )
GROUP BY
DEPT_ID,
YEAR,
@ -637,6 +656,7 @@ WHERE
dept.TYPE_KEY = 'street_party'
AND dept.DEL_FLAG = 0
AND entity.YEAR = date_format( date_add( now( ), INTERVAL - 1 MONTH ), '%Y' )
GROUP BY
dept.id</sql>
<limit>0</limit>
@ -784,6 +804,29 @@ GROUP BY
<date_format_timezone>Asia/Shanghai</date_format_timezone>
<lenient_string_to_number>N</lenient_string_to_number>
</value-meta>
<value-meta>
<type>String</type>
<storagetype>normal</storagetype>
<name>CONSULT_CASE</name>
<length>63</length>
<precision>-1</precision>
<origin>表输入</origin>
<comments>CONSULT_CASE</comments>
<conversion_Mask/>
<decimal_symbol>.</decimal_symbol>
<grouping_symbol>,</grouping_symbol>
<currency_symbol/>
<trim_type>none</trim_type>
<case_insensitive>N</case_insensitive>
<collator_disabled>Y</collator_disabled>
<collator_strength>0</collator_strength>
<sort_descending>N</sort_descending>
<output_padding>N</output_padding>
<date_format_lenient>N</date_format_lenient>
<date_format_locale>zh_CN</date_format_locale>
<date_format_timezone>Asia/Shanghai</date_format_timezone>
<lenient_string_to_number>N</lenient_string_to_number>
</value-meta>
<value-meta>
<type>String</type>
<storagetype>normal</storagetype>

Loading…
Cancel
Save