Commit 6032f670 authored by 赵啸非's avatar 赵啸非

核查列表添加

parent 7f7a5252
package com.mortals.xhx.module.window.service.impl;
import com.mortals.xhx.module.dept.model.DeptEntity;
import com.mortals.xhx.module.dept.service.DeptService;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
......@@ -27,6 +29,8 @@ import lombok.extern.slf4j.Slf4j;
public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerDao, WindowOwnerEntity, Long> implements WindowOwnerService {
@Autowired
private WindowOwnerDetailService windowOwnerDetailService;
@Autowired
private DeptService deptService;
@Override
protected void saveAfter(WindowOwnerEntity entity, Context context) throws AppException {
......@@ -36,6 +40,10 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD
item.setCreateUserId(this.getContextUserId(context));
item.setCreateTime(new Date());
}).count();
DeptEntity deptEntity = deptService.get(entity.getId());
entity.setDeptName(deptEntity==null?"":deptEntity.getDeptName());
entity.setNumber(entity.getWindowOwnerDetailList().size()+"");
windowOwnerDetailService.save(entity.getWindowOwnerDetailList());
}
super.saveAfter(entity, context);
......@@ -53,6 +61,7 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD
item.setUpdateUserId(this.getContextUserId(context));
item.setUpdateTime(new Date());
}).count();
entity.setNumber(entity.getWindowOwnerDetailList().size()+"");
windowOwnerDetailService.save(entity.getWindowOwnerDetailList());
}
super.updateAfter(entity, context);
......
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