|
@@ -2,8 +2,10 @@ package cn.com.ctop.okr.service.impl;
|
|
|
|
|
|
import cn.com.ctop.okr.entity.KrAlignInfo;
|
|
|
import cn.com.ctop.okr.entity.OkrKrInfo;
|
|
|
+import cn.com.ctop.okr.entity.QYWxUserInfo;
|
|
|
import cn.com.ctop.okr.mapper.KrAlignInfoMapper;
|
|
|
import cn.com.ctop.okr.service.IKrAlignInfoService;
|
|
|
+import cn.com.ctop.okr.service.IQYWxUserInfoService;
|
|
|
import cn.com.ctop.okr.utils.ResultMapUtils;
|
|
|
import cn.com.ctop.okr.utils.StatusCode;
|
|
|
import cn.com.ctop.okr.vo.Result;
|
|
@@ -22,6 +24,9 @@ import java.util.Map;
|
|
|
public class KrAlignInfoServiceImpl extends ServiceImpl<KrAlignInfoMapper, KrAlignInfo> implements IKrAlignInfoService {
|
|
|
@Autowired
|
|
|
private KrAlignInfoMapper krAlignInfoMapper;
|
|
|
+ @Autowired
|
|
|
+ private IQYWxUserInfoService qyWxUserInfoService;
|
|
|
+
|
|
|
@Override
|
|
|
public Map<String, Object> addAlign(Long originId, String alignIds) {
|
|
|
Map<String,Object>result = new HashMap<>();
|
|
@@ -68,7 +73,6 @@ public class KrAlignInfoServiceImpl extends ServiceImpl<KrAlignInfoMapper, KrAli
|
|
|
ResultMapUtils.setResultMap(result, StatusCode.COMMON_SUCCESS);
|
|
|
return result;
|
|
|
}
|
|
|
-
|
|
|
@Override
|
|
|
public Map<String, Object> alignListByParams(Long originId) {
|
|
|
Map<String,Object>result = new HashMap<>();
|
|
@@ -76,9 +80,27 @@ public class KrAlignInfoServiceImpl extends ServiceImpl<KrAlignInfoMapper, KrAli
|
|
|
ResultMapUtils.setResultMap(result,StatusCode.COMMON_PARAM_ERROR);
|
|
|
return result;
|
|
|
}
|
|
|
- List<OkrKrInfo> krInfoList = krAlignInfoMapper.selectByParams(originId);
|
|
|
+ List<OkrKrInfo> myAligns = krAlignInfoMapper.selectMyAlign(originId);
|
|
|
+ if(null!=myAligns&&!myAligns.isEmpty()){
|
|
|
+ myAligns.forEach(detail->{
|
|
|
+ QYWxUserInfo userInfo = qyWxUserInfoService.getByOpenId(detail.getUserId());
|
|
|
+ if(null!=userInfo){
|
|
|
+ detail.setUserName(userInfo.getName());
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ List<OkrKrInfo> otherAligneds = krAlignInfoMapper.selectOtherAligned(originId);
|
|
|
+ if(null!=otherAligneds&&!otherAligneds.isEmpty()){
|
|
|
+ otherAligneds.forEach(detail->{
|
|
|
+ QYWxUserInfo userInfo = qyWxUserInfoService.getByOpenId(detail.getUserId());
|
|
|
+ if(null!=userInfo){
|
|
|
+ detail.setUserName(userInfo.getName());
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
ResultMapUtils.setResultMap(result,StatusCode.COMMON_SUCCESS);
|
|
|
- result.put("data",krInfoList);
|
|
|
+ result.put("myAlign",myAligns);
|
|
|
+ result.put("otherAligned",otherAligneds);
|
|
|
return result;
|
|
|
}
|
|
|
}
|