| | |
| | | import com.doumee.config.DataSyncConfig; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.haikang.model.HKConstants; |
| | | import com.doumee.core.haikang.model.param.BaseListPageResponse; |
| | | import com.doumee.core.haikang.model.param.BaseResponse; |
| | | import com.doumee.core.haikang.model.param.request.TimeRangeListRequest; |
| | | import com.doumee.core.haikang.model.param.respose.OrgInfoResponse; |
| | | import com.doumee.core.haikang.model.param.respose.UserInfoResponse; |
| | | import com.doumee.core.haikang.service.HKService; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.service.business.third.model.LoginUserInfo; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DESUtil; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.dao.business.MemberMapper; |
| | | import com.doumee.dao.business.dao.MemberMapper; |
| | | import com.doumee.dao.business.dao.CompanyMapper; |
| | | import com.doumee.dao.business.model.Company; |
| | | import com.doumee.dao.business.model.Member; |
| | |
| | | @Override |
| | | @Transactional |
| | | public void syncOrgData(LoginUserInfo user ){ |
| | | if(Constants.DEALING_HK_ORG){ |
| | | return ; |
| | | //初始化安防平台数据 |
| | | if(Constants.DEALING_HK_ORG || Constants.formatIntegerNum(dataSyncConfig.getOrgUserDataOrigin()) == DataSyncConfig.origin.hk){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "对不起,当前不支持组织同步操作~"); |
| | | } |
| | | Constants.DEALING_HK_ORG =true; |
| | | try { |
| | | if( Constants.formatIntegerNum(dataSyncConfig.getOrgUserDataOrigin()) != DataSyncConfig.origin.self){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "对不起,当前不支持组织同步操作~"); |
| | | } |
| | | TimeRangeListRequest param = null; |
| | | //获取ERP组织信息(全量同步) |
| | | boolean hasNext = true; |
| | |
| | | } |
| | | Constants.DEALING_HK_USER =true; |
| | | try { |
| | | if( Constants.formatIntegerNum(dataSyncConfig.getOrgUserDataOrigin()) != DataSyncConfig.origin.self){ |
| | | if( Constants.formatIntegerNum(dataSyncConfig.getOrgUserDataOrigin()) == DataSyncConfig.origin.hk){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "对不起,当前不支持组织同步操作~"); |
| | | } |
| | | List<Company> companies = companyMapper.selectList(new QueryWrapper<>()); |