| | |
| | | import com.doumee.service.business.ERPSyncService; |
| | | import com.doumee.service.business.InterfaceLogService; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import lombok.Synchronized; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | */ |
| | | @Override |
| | | @Transactional |
| | | @Synchronized |
| | | public String syncCompany(OrgListRequest param){ |
| | | if(!StringUtils.equals(Constants.ONE+"", systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.ORG_USER_ORIGIN).getCode())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "对不起,当前不支持组织同步操作~"); |
| | |
| | | */ |
| | | @Override |
| | | @Transactional |
| | | @Synchronized |
| | | public String syncUsers(UserListRequest param){ |
| | | if(!StringUtils.equals(Constants.ONE+"", systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.ORG_USER_ORIGIN).getCode())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "对不起,当前不支持人员同步操作~"); |
| | |
| | | |
| | | private void dealUserChangeList(List<ErpUserListResponse> list, List<Member> addList, List<Member> updateList, List<Member> delList, List<Member> allList,UserListRequest param) { |
| | | Date date = new Date(); |
| | | int num =0; |
| | | for(ErpUserListResponse response : list){ |
| | | response.setPhone("1534569100"+num); |
| | | response.setFaceImg("20223402/DM1005.png"); |
| | | response.setIdNo("34112219880427200"+num); |
| | | num++; |
| | | Company company = new Company(); |
| | | if(StringUtils.isNotBlank(response.getOrgId())){ |
| | | company = companyMapper.selectOne(new QueryWrapper<Company>().lambda().eq(Company::getErpId,response.getOrgId()).last("limit 1")); |