Browse Source

数据同步部分参数赋值

dev
sunyuchao 3 years ago
parent
commit
041efbcbf6
  1. 10
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/user/result/GridUserInfoDTO.java
  2. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java
  3. 8
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java
  4. 10
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/GridStaffUploadResultDTO.java
  5. 4
      epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml

10
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/user/result/GridUserInfoDTO.java

@ -89,5 +89,15 @@ public class GridUserInfoDTO implements Serializable {
*/ */
private String idCard; private String idCard;
/**
* 是否离职格式为YN
*/
private String isLeave;
/**
* 离职时间格式为YYYY-MM-DD
*/
private Date leaveDate;
} }

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java

@ -124,6 +124,10 @@ public class DataReportingServiceImpl implements DataReportingService {
st.setUpdateTime(dto.getUpdatedTime()); st.setUpdateTime(dto.getUpdatedTime());
st.setIdCard(dto.getIdCard()); st.setIdCard(dto.getIdCard());
st.setStaffId(dto.getUserId()); st.setStaffId(dto.getUserId());
st.setIsLeave("fulltime".equals(dto.getWorkType()) ? "N" : "Y");
if ("Y".equals(st.getIsLeave())) {
st.setLeaveDate(DateUtils.integrate(dto.getUpdatedTime(), DateUtils.DATE_PATTERN));
}
} }
}); });

8
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java

@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.CustomerGridStaffListFormDTO; import com.epmet.dto.form.CustomerGridStaffListFormDTO;
import com.epmet.dto.form.GridStaffUploadtFormDTO; import com.epmet.dto.form.GridStaffUploadtFormDTO;
@ -82,7 +83,9 @@ public class GridstaffInfoPingyinServiceImpl extends BaseServiceImpl<GridstaffIn
entity.setGridCode(gs.getGridCode()); entity.setGridCode(gs.getGridCode());
entity.setGridName(gs.getGridName()); entity.setGridName(gs.getGridName());
entity.setSex("0".equals(us.getSex()) ? "9" : us.getSex()); entity.setSex("0".equals(us.getSex()) ? "9" : us.getSex());
entity.setIsLeave("N"); if ("Y".equals(entity.getIsLeave())) {
entity.setLeaveDate(us.getDate());
}
entityList.add(entity); entityList.add(entity);
} }
} }
@ -123,7 +126,8 @@ public class GridstaffInfoPingyinServiceImpl extends BaseServiceImpl<GridstaffIn
entity.setQxMc("平阴县"); entity.setQxMc("平阴县");
entity.setGridCode(r.getCode()); entity.setGridCode(r.getCode());
entity.setGridName(r.getGridName()); entity.setGridName(r.getGridName());
entity.setIsLeave("N"); entity.setIsLeave(r.getIsLeave());
entity.setLeaveDate(r.getLeaveDate());
entity.setGridUserId(r.getStaffId()); entity.setGridUserId(r.getStaffId());
entity.setCardNum(r.getIdCard()); entity.setCardNum(r.getIdCard());
//按网格查询人员是否存在,存在更新否则新增 //按网格查询人员是否存在,存在更新否则新增

10
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/GridStaffUploadResultDTO.java

@ -45,4 +45,14 @@ public class GridStaffUploadResultDTO {
*/ */
private Date updateTime; private Date updateTime;
/**
* 是否离职格式为YN
*/
private String isLeave;
/**
* 离职时间格式为YYYY-MM-DD
*/
private Date date;
} }

4
epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml

@ -464,7 +464,9 @@
gender sex, gender sex,
mobile phonenumber, mobile phonenumber,
IF(work_type = 'fulltime', '01', '02') userType, IF(work_type = 'fulltime', '01', '02') userType,
updated_time updateTime updated_time updateTime,
IF(work_type = 'fulltime', 'N', 'Y') isLeave,
DATE_FORMAT(updated_time,'%Y-%m-%d') AS date
FROM FROM
customer_staff customer_staff
WHERE WHERE

Loading…
Cancel
Save