Commit 43dde8b5 authored by 廖旭伟's avatar 廖旭伟

事项申请列表返回值增加材料分组

parent 4fe75cfa
......@@ -17,6 +17,10 @@ import com.mortals.xhx.module.apply.model.vo.MatterApplyDatumGroupVO;
import com.mortals.xhx.module.apply.service.ApproverService;
import com.mortals.xhx.module.apply.service.MatterApplyDatumService;
import com.mortals.xhx.module.apply.service.MatterApplyService;
import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.module.matter.service.MatterService;
import com.mortals.xhx.module.single.model.SingleMatterEntity;
import com.mortals.xhx.module.single.service.SingleMatterService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.BeanUtils;
......@@ -46,9 +50,22 @@ public class MatterApplyServiceImpl extends AbstractCRUDServiceImpl<MatterApplyD
private ApproverService approverService;
@Autowired
private UserService userService;
@Autowired
private SingleMatterService singleMatterService;
@Override
protected void saveBefore(MatterApplyEntity entity, Context context) throws AppException {
if(entity.getSingleMatterId()==null){
throw new AppException("单事项ID不能为空");
}
if(entity.getMatterId()==null){
throw new AppException("基础事项ID不能为空");
}
SingleMatterEntity singleMatterEntity = singleMatterService.get(entity.getSingleMatterId());
if(singleMatterEntity!=null){
entity.setDeptCode(singleMatterEntity.getDeptCode());
entity.setMatterName(singleMatterEntity.getMatterName());
}
entity.setSiteId(1l);
entity.setApplyTime(entity.getCreateTime());
entity.setApplyState(0);
......
......@@ -16,4 +16,6 @@ public class SingleMatterVo extends BaseEntityLong {
private Integer hasApplyForm = 0;
/** 申请表下载地址 */
private String applyFormUrl;
/** 申请表文件名称 */
private String applyFormFileName;
}
\ No newline at end of file
......@@ -49,6 +49,7 @@ public class SingleMatterServiceImpl extends AbstractCRUDServiceImpl<SingleMatte
if(singleMatterFileEntity!=null){
item.setHasApplyForm(1);
item.setApplyFormUrl(singleMatterFileEntity.getFileUrl());
item.setApplyFormFileName(singleMatterFileEntity.getFilename());
}
}).count();
super.findAfter(params, context, list);
......@@ -67,6 +68,7 @@ public class SingleMatterServiceImpl extends AbstractCRUDServiceImpl<SingleMatte
if(singleMatterFileEntity!=null){
item.setHasApplyForm(1);
item.setApplyFormUrl(singleMatterFileEntity.getFileUrl());
item.setApplyFormFileName(singleMatterFileEntity.getFilename());
}
}).count();
super.findAfter(params, context, list);
......
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