Browse Source

screen_customer_agency新增parent_area_code;screen_customer_grid|dept新增area_code;

调整三个表的初始化任务(evaIndexScreenDimInitTask)接口路径:(eidim/init-all)
master
yinzuomei 5 years ago
parent
commit
6045a406d7
  1. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/org/CustomerAgencyEntity.java
  2. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/org/CustomerDepartmentEntity.java
  3. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerAgencyServiceImpl.java
  4. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerDeptServiceImpl.java
  5. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerGridServiceImpl.java
  6. 48
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerDepartmentDao.xml
  7. 3
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/StatsCustomerAgencyDao.xml

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/org/CustomerAgencyEntity.java

@ -94,4 +94,8 @@ public class CustomerAgencyEntity extends BaseEpmetEntity {
*/
private String district;
/**
* 当前组织的上级行政地区编码add0204;举例平阴县370124对应的是济南市3701
*/
private String parentAreaCode;
}

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/org/CustomerDepartmentEntity.java

@ -60,4 +60,8 @@ public class CustomerDepartmentEntity extends BaseEpmetEntity {
*/
private Integer totalUser;
/**
* 扩展属性V2升级必传参数当前部门所属行政地区编码,来源于部门所属组织的地区编码
*/
private String areaCode;
}

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerAgencyServiceImpl.java

@ -139,6 +139,7 @@ public class ScreenCustomerAgencyServiceImpl implements ScreenCustomerAgencyServ
exists.setIsDisplay(NumConstant.ONE_STR);
}
exists.setAllParentNames(e.getAllParentName());
exists.setParentAreaCode(e.getParentAreaCode());
updateAgency(exists);
}
}
@ -240,6 +241,7 @@ public class ScreenCustomerAgencyServiceImpl implements ScreenCustomerAgencyServ
cae.setPid(e.getPid());
cae.setPids(e.getPids());
cae.setSourceType(OrgSourceTypeConstant.INTERNAL);
cae.setParentAreaCode(e.getParentAreaCode());
screenCustomerAgencyDao.insert(cae);
}

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerDeptServiceImpl.java

@ -75,6 +75,7 @@ public class ScreenCustomerDeptServiceImpl extends BaseServiceImpl<ScreenCustome
e.setDeptName(dept.getDepartmentName());
e.setParentAgencyId(dept.getAgencyId());
e.setSourceType(OrgSourceTypeConstant.INTERNAL);
e.setAreaCode(dept.getAreaCode());
screenCustomerDeptDao.insert(e);
}
}
@ -87,6 +88,7 @@ public class ScreenCustomerDeptServiceImpl extends BaseServiceImpl<ScreenCustome
e.setDeptName(dept.getDepartmentName());
e.setDataEndTime(dateStr);
e.setCustomerId(dept.getCustomerId());
e.setAreaCode(dept.getAreaCode());
screenCustomerDeptDao.updateById(e);
}
}

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerGridServiceImpl.java

@ -77,6 +77,7 @@ public class ScreenCustomerGridServiceImpl extends BaseServiceImpl<ScreenCustome
insertOne.setGridName(grid.getGridName());
insertOne.setParentAgencyId(grid.getPid());
insertOne.setSourceType(OrgSourceTypeConstant.INTERNAL);
insertOne.setAreaCode(grid.getAreaCode());
screenCustomerGridDao.insert(insertOne);
}
}
@ -90,6 +91,7 @@ public class ScreenCustomerGridServiceImpl extends BaseServiceImpl<ScreenCustome
screenGrid.setCustomerId(grid.getCustomerId());
screenGrid.setDataEndTime(dateStr);
screenGrid.setGridName(grid.getGridName());
screenGrid.setAreaCode(grid.getAreaCode());
screenCustomerGridDao.updateById(screenGrid);
}
}

48
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerDepartmentDao.xml

@ -4,15 +4,20 @@
<mapper namespace="com.epmet.dao.org.CustomerDepartmentDao">
<select id="listDepartmentsByCreatedTime" resultType="com.epmet.entity.org.CustomerDepartmentEntity">
SELECT *
FROM customer_department
SELECT
ca.AREA_CODE,
dept.*
FROM
customer_department dept
LEFT JOIN customer_agency ca ON (
dept.AGENCY_ID = ca.id and ca.DEL_FLAG='0')
<where>
DEL_FLAG = 0
dept.DEL_FLAG = 0
<if test="createdTimeFrom != null">
AND CREATED_TIME >= #{createdTimeFrom}
AND dept.CREATED_TIME >= #{createdTimeFrom}
</if>
<if test="createdTimeTo != null">
AND CREATED_TIME &lt; #{createdTimeTo}
AND dept.CREATED_TIME &lt; #{createdTimeTo}
</if>
</where>
</select>
@ -20,20 +25,23 @@
<select id="listDepartmentsByUpdatedTime" resultType="com.epmet.entity.org.CustomerDepartmentEntity">
select
id,
customer_id,
agency_id,
department_name,
department_duty,
total_user,
del_flag,
revision,
created_by,
created_time,
updated_by,
updated_time
from customer_department
where UPDATED_TIME > #{startTime}
and UPDATED_TIME <![CDATA[<=]]> #{endTime}
cd.id,
cd.customer_id,
cd.agency_id,
cd.department_name,
cd.department_duty,
cd.total_user,
cd.del_flag,
cd.revision,
cd.created_by,
cd.created_time,
cd.updated_by,
cd.updated_time,
ca.area_code
from customer_department cd
LEFT JOIN customer_agency ca ON (
cd.AGENCY_ID = ca.id and ca.DEL_FLAG='0')
where cd.UPDATED_TIME > #{startTime}
and cd.UPDATED_TIME <![CDATA[<=]]> #{endTime}
</select>
</mapper>

3
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/StatsCustomerAgencyDao.xml

@ -94,7 +94,8 @@
total_user,
province,
city,
district
district,
PARENT_AREA_CODE as parentAreaCode
from customer_agency
where UPDATED_TIME >= #{startTime}
and UPDATED_TIME <![CDATA[<=]]> #{endTime}

Loading…
Cancel
Save