Commit b966764f authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents f8225c86 069a08dd
......@@ -20,4 +20,10 @@ public class MatterDatumVo extends BaseEntityLong {
private List <Long> idList;
/** 是否加入公共库 0否1是 */
private Integer isAddLibrary;
/**
* 部门编码
*/
private String deptCode;
/** 事项id列表 */
private List <Long> matterIdList;
}
\ No newline at end of file
......@@ -3,9 +3,12 @@ import com.mortals.framework.common.Rest;
import com.mortals.framework.model.PageInfo;
import com.mortals.xhx.base.system.upload.service.UploadService;
import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.common.utils.StringUtils;
import com.mortals.xhx.module.matter.model.*;
import com.mortals.xhx.module.matter.service.DatumLibraryService;
import com.mortals.xhx.module.matter.service.MatterApplyService;
import com.mortals.xhx.module.matter.service.MatterDatumFileService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
......@@ -13,7 +16,6 @@ import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.xhx.module.matter.dao.MatterDatumDao;
import com.mortals.xhx.module.matter.service.MatterDatumService;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
import java.util.ArrayList;
......@@ -38,6 +40,25 @@ public class MatterDatumServiceImpl extends AbstractCRUDServiceImpl<MatterDatumD
private UploadService uploadService;
@Autowired
private DatumLibraryService datumLibraryService;
@Autowired
private MatterApplyService matterApplyService;
@Override
protected MatterDatumEntity findBefore(MatterDatumEntity params, PageInfo pageInfo, Context context) throws AppException {
if(StringUtils.isNotEmpty(params.getDeptCode())){
List<MatterApplyEntity> list = matterApplyService.find(new MatterApplyQuery().deptCode(params.getDeptCode()));
List<Long> matterIdList = new ArrayList<>();
if(CollectionUtils.isNotEmpty(list)){
list.stream().forEach(item->{
matterIdList.add(item.getId());
});
}else {
matterIdList.add(-1l);
}
params.setMatterIdList(matterIdList);
}
return params;
}
@Override
protected void findAfter(MatterDatumEntity params, Context context, List<MatterDatumEntity> list) throws AppException {
......
package com.mortals.xhx.module.sst.service.impl;
import com.mortals.framework.common.Rest;
import com.mortals.framework.model.PageInfo;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.common.pdu.user.UserPdu;
import com.mortals.xhx.feign.user.IUserFeign;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
......@@ -6,6 +13,9 @@ import com.mortals.framework.model.Context;
import com.mortals.xhx.module.sst.dao.SstAgreementDao;
import com.mortals.xhx.module.sst.model.SstAgreementEntity;
import com.mortals.xhx.module.sst.service.SstAgreementService;
import java.util.List;
/**
* SstAgreementService
* 协议管理 service实现
......@@ -15,5 +25,21 @@ import com.mortals.xhx.module.sst.service.SstAgreementService;
*/
@Service("sstAgreementService")
public class SstAgreementServiceImpl extends AbstractCRUDServiceImpl<SstAgreementDao, SstAgreementEntity, Long> implements SstAgreementService {
@Autowired
private IUserFeign userFeign;
@Override
protected void findAfter(SstAgreementEntity params, PageInfo pageInfo, Context context, List<SstAgreementEntity> list) throws AppException {
if(CollectionUtils.isNotEmpty(list)){
list.stream().forEach(item->{
if(item.getUpdateUserId()!=null) {
Rest<UserPdu> resp = userFeign.info(item.getUpdateUserId());
if (resp.getCode() == YesNoEnum.YES.getValue()) {
item.setUpdateUserName(resp.getData().getRealName());
}
}
});
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment