|
|
@ -1,5 +1,6 @@ |
|
|
|
package com.epmet.opendata.service.impl; |
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
@ -103,6 +104,7 @@ public class GridstaffInfoPingyinServiceImpl extends BaseServiceImpl<GridstaffIn |
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public void getStaffBaseInfo(StaffBaseInfoFormDTO formDTO) { |
|
|
|
log.info("网格工作人员信息同步,入参对象值: " + JSON.toJSONString(formDTO, true)); |
|
|
|
//1.查询工作人员网格信息和基础信息
|
|
|
|
com.epmet.dto.user.form.StaffBaseInfoFormDTO formDTO1 = ConvertUtils.sourceToTarget(formDTO, com.epmet.dto.user.form.StaffBaseInfoFormDTO.class); |
|
|
|
Result<List<GridUserInfoDTO>> result = dataStatisticalOpenFeignClient.getStaffBaseInfo(formDTO1); |
|
|
@ -122,6 +124,7 @@ public class GridstaffInfoPingyinServiceImpl extends BaseServiceImpl<GridstaffIn |
|
|
|
entity.setCardNum(r.getIdCard()); |
|
|
|
//按网格查询人员是否存在,存在更新否则新增
|
|
|
|
GridstaffInfoPingyinEntity gs = baseDao.selectByCodeAndStaffId(r.getCode(), r.getStaffId()); |
|
|
|
log.info(String.format("网格工作人员信息同步,当前操作人员信息,姓名:%s staffId:%s", entity.getNickName(), entity.getGridUserId())); |
|
|
|
if (null != gs) { |
|
|
|
baseDao.edit(entity); |
|
|
|
} else { |
|
|
|