Browse Source

Merge branch 'master' into origin/feature/addVoice

feature/dangjian
YUJT 4 years ago
parent
commit
a865fa2a40
  1. 72
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/SysUserServiceImpl.java
  2. 2
      esua-epdc/kettle-Code/dcp_job/epmet_gov_issue/issue.ktr
  3. 77
      esua-epdc/kettle-Code/dcp_job/user/volunteer_info.ktr

72
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/SysUserServiceImpl.java

@ -172,6 +172,7 @@ public class SysUserServiceImpl extends BaseServiceImpl<SysUserDao, SysUserEntit
if (entity.getUserTagKey().equals("offers")) {
//插入customer_staff
CustomerStaffEntity customerStaffEntity = ConvertUtils.sourceToTarget(entity, CustomerStaffEntity.class);
customerStaffEntity.setId(entity.getId().toString());
customerStaffEntity.setCustomerId(sysDictEntity.getDictValue());
customerStaffEntity.setUserId(userEntity.getId());
customerStaffEntity.setHeadPhoto(entity.getHeadUrl());
@ -256,30 +257,65 @@ public class SysUserServiceImpl extends BaseServiceImpl<SysUserDao, SysUserEntit
QueryWrapper<CustomerStaffEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("USER_ID", dto.getId().toString());
CustomerStaffEntity customerStaffEntity = customerStaffDao.selectOne(queryWrapper);
customerStaffEntity.setRealName(dto.getRealName());
customerStaffEntity.setGender(dto.getGender());
customerStaffEntity.setEmail(dto.getEmail());
customerStaffEntity.setMobile(dto.getMobile());
if (StringUtils.isNotEmpty(dto.getPassword())) {
customerStaffEntity.setPassword(PasswordUtils.encode(dto.getPassword()));
if (customerStaffEntity == null) {
CustomerStaffEntity staffEntity = ConvertUtils.sourceToTarget(entity, CustomerStaffEntity.class);
staffEntity.setId(entity.getId().toString());
staffEntity.setCustomerId(sysDictEntity.getDictValue());
staffEntity.setUserId(entity.getId().toString());
staffEntity.setHeadPhoto(entity.getHeadUrl());
staffEntity.setWorkType("fulltime");
staffEntity.setActiveFlag("active");
staffEntity.setActiveTime(new Date());
staffEntity.setEnableFlag("enable");
if(StringUtils.isEmpty(entity.getPassword())){
staffEntity.setPassword(PasswordUtils.encode(sysUserEntity.getPassword()));
}else {
staffEntity.setPassword(PasswordUtils.encode(entity.getPassword()));
}
customerStaffDao.insert(staffEntity);
} else {
customerStaffEntity.setRealName(dto.getRealName());
customerStaffEntity.setGender(dto.getGender());
customerStaffEntity.setEmail(dto.getEmail());
customerStaffEntity.setMobile(dto.getMobile());
if (StringUtils.isNotEmpty(dto.getPassword())) {
customerStaffEntity.setPassword(PasswordUtils.encode(dto.getPassword()));
}
customerStaffEntity.setHeadPhoto(dto.getHeadUrl());
customerStaffDao.updateById(customerStaffEntity);
}
customerStaffEntity.setHeadPhoto(dto.getHeadUrl());
customerStaffDao.updateById(customerStaffEntity);
//同步更新staff_org_relation
QueryWrapper<StaffOrgRelationEntity> wrapper = new QueryWrapper<>();
wrapper.eq("STAFF_ID",dto.getId().toString());
wrapper.eq("STAFF_ID", dto.getId().toString());
StaffOrgRelationEntity staffOrgRelationEntity = staffOrgRelationDao.selectOne(wrapper);
String typeKey = deptEntity.getTypeKey();
staffOrgRelationEntity.setPids(StringUtils.join(StringUtils.split(deptEntity.getPids(), ","), ":"));
staffOrgRelationEntity.setOrgId(deptEntity.getId().toString());
if (OrganizationTypeConstant.ORG_TYPE_GRID_PARTY.equals(typeKey)) {
staffOrgRelationEntity.setOrgType("grid");
} else if (OrganizationTypeConstant.ORG_TYPE_DISTRICT_DEPT.equals(typeKey) || OrganizationTypeConstant.ORG_TYPE_STREET_DEPT.equals(typeKey)) {
staffOrgRelationEntity.setOrgType("dept");
} else {
staffOrgRelationEntity.setOrgType("agency");
if(staffOrgRelationEntity==null){
StaffOrgRelationEntity orgRelationEntity = new StaffOrgRelationEntity();
orgRelationEntity.setId(entity.getId().toString());
orgRelationEntity.setCustomerId(sysDictEntity.getDictValue());
orgRelationEntity.setStaffId(entity.getId().toString());
orgRelationEntity.setPids(StringUtils.join(StringUtils.split(deptEntity.getPids(), ","), ":"));
orgRelationEntity.setOrgId(deptEntity.getId().toString());
if (OrganizationTypeConstant.ORG_TYPE_GRID_PARTY.equals(typeKey)) {
orgRelationEntity.setOrgType("grid");
} else if (OrganizationTypeConstant.ORG_TYPE_DISTRICT_DEPT.equals(typeKey) || OrganizationTypeConstant.ORG_TYPE_STREET_DEPT.equals(typeKey)) {
orgRelationEntity.setOrgType("dept");
} else {
orgRelationEntity.setOrgType("agency");
}
staffOrgRelationDao.insert(orgRelationEntity);
}else {
staffOrgRelationEntity.setPids(StringUtils.join(StringUtils.split(deptEntity.getPids(), ","), ":"));
staffOrgRelationEntity.setOrgId(deptEntity.getId().toString());
if (OrganizationTypeConstant.ORG_TYPE_GRID_PARTY.equals(typeKey)) {
staffOrgRelationEntity.setOrgType("grid");
} else if (OrganizationTypeConstant.ORG_TYPE_DISTRICT_DEPT.equals(typeKey) || OrganizationTypeConstant.ORG_TYPE_STREET_DEPT.equals(typeKey)) {
staffOrgRelationEntity.setOrgType("dept");
} else {
staffOrgRelationEntity.setOrgType("agency");
}
staffOrgRelationDao.updateById(staffOrgRelationEntity);
}
staffOrgRelationDao.updateById(staffOrgRelationEntity);
}
if (!sysUserEntity.getDeptId().equals(entity.getDeptId())) {

2
esua-epdc/kettle-Code/dcp_job/epmet_gov_issue/issue.ktr

@ -760,7 +760,7 @@ issue.GRID_ID ,
REPLACE(issue.PARENT_DEPT_IDS,',',':') ORG_ID_PATH,
SUBSTRING_INDEX(issue.PARENT_DEPT_IDS,',',-1) ORG_ID,
issue.CREATED_TIME DECIDED_TIME,
(case when issue.ISSUE_STATE = 4 then item.CREATED_TIME else '' end) SHIFTED_TIME,
(case when issue.ISSUE_STATE = 4 then item.CREATED_TIME else null end) SHIFTED_TIME,
hdl.CREATED_TIME CLOSED_TIME,
issue.DEL_FLAG,
issue.REVISION,

77
esua-epdc/kettle-Code/dcp_job/user/volunteer_info.ktr

@ -577,77 +577,6 @@
</attribute>
</attributes>
</connection>
<connection>
<name>target-user</name>
<server>${db.mysql.epdc.target.host}</server>
<type>MYSQL</type>
<access>Native</access>
<database>${epmet.user.database}</database>
<port>${db.mysql.epdc.target.port}</port>
<username>${db.mysql.epdc.target.username}</username>
<password>${db.mysql.epdc.target.password}</password>
<servername/>
<data_tablespace/>
<index_tablespace/>
<attributes>
<attribute>
<code>EXTRA_OPTION_MYSQL.allowMultiQueries</code>
<attribute>true</attribute>
</attribute>
<attribute>
<code>EXTRA_OPTION_MYSQL.characterEncoding</code>
<attribute>UTF-8</attribute>
</attribute>
<attribute>
<code>EXTRA_OPTION_MYSQL.useSSL</code>
<attribute>false</attribute>
</attribute>
<attribute>
<code>EXTRA_OPTION_MYSQL.useUnicode</code>
<attribute>true</attribute>
</attribute>
<attribute>
<code>FORCE_IDENTIFIERS_TO_LOWERCASE</code>
<attribute>N</attribute>
</attribute>
<attribute>
<code>FORCE_IDENTIFIERS_TO_UPPERCASE</code>
<attribute>N</attribute>
</attribute>
<attribute>
<code>IS_CLUSTERED</code>
<attribute>N</attribute>
</attribute>
<attribute>
<code>PORT_NUMBER</code>
<attribute>${db.mysql.epdc.target.port}</attribute>
</attribute>
<attribute>
<code>PRESERVE_RESERVED_WORD_CASE</code>
<attribute>Y</attribute>
</attribute>
<attribute>
<code>QUOTE_ALL_FIELDS</code>
<attribute>N</attribute>
</attribute>
<attribute>
<code>STREAM_RESULTS</code>
<attribute>Y</attribute>
</attribute>
<attribute>
<code>SUPPORTS_BOOLEAN_DATA_TYPE</code>
<attribute>Y</attribute>
</attribute>
<attribute>
<code>SUPPORTS_TIMESTAMP_DATA_TYPE</code>
<attribute>Y</attribute>
</attribute>
<attribute>
<code>USE_POOLING</code>
<attribute>N</attribute>
</attribute>
</attributes>
</connection>
<order>
<hop>
<from>数据库连接 2</from>
@ -843,16 +772,14 @@ AND DATE_FORMAT(info.UPDATED_TIME, '%Y-%m-%d %H:%i:%s') >?;</sql>
<method>none</method>
<schema_name/>
</partitioning>
<connection>target-user</connection>
<connection>target-hert</connection>
<sql>SELECT
IFNULL(
(
SELECT
u.UPDATED_TIME
FROM
`user` u
WHERE
u.FROM_APP = 'resi'
`volunteer_info` u
ORDER BY
u.UPDATED_TIME DESC
LIMIT 1

Loading…
Cancel
Save