Commit 4fe7e741 authored by 廖旭伟's avatar 廖旭伟

新增窗口考核时写入窗口名称编号

parent 7c5b852a
......@@ -13,6 +13,7 @@ import com.mortals.xhx.module.staff.model.StaffEntity;
import com.mortals.xhx.module.staff.service.StaffService;
import com.mortals.xhx.module.window.model.*;
import com.mortals.xhx.module.window.model.vo.WindowPerformAllVo;
import com.mortals.xhx.module.window.service.WindowOwnerDetailService;
import com.mortals.xhx.module.window.service.WindowWorkmanPerformService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.BeanUtils;
......@@ -46,6 +47,8 @@ public class WindowPerformServiceImpl extends AbstractCRUDServiceImpl<WindowPerf
private WindowWorkmanPerformService windowWorkmanPerformService;
@Autowired
private StaffService staffService;
@Autowired
private WindowOwnerDetailService windowOwnerDetailService;
@Override
......@@ -58,6 +61,13 @@ public class WindowPerformServiceImpl extends AbstractCRUDServiceImpl<WindowPerf
entity.setSalaId(staff.getSalaId());
entity.setSalaName(staff.getSalaName());
}
if(entity.getWindowId()!=null) {
WindowOwnerDetailEntity windowOwnerDetailEntity = windowOwnerDetailService.selectOne(new WindowOwnerDetailQuery().windowId(entity.getWindowId()));
if(windowOwnerDetailEntity!=null){
entity.setWindowCode(windowOwnerDetailEntity.getWindowCode());
entity.setWindowName(windowOwnerDetailEntity.getWindowName());
}
}
deleteExistBill(entity, context);
}
......
......@@ -14,8 +14,8 @@ import com.mortals.xhx.module.check.service.CheckWindowPerformService;
import com.mortals.xhx.module.check.service.CheckWindowWorkmanPerformService;
import com.mortals.xhx.module.staff.model.StaffEntity;
import com.mortals.xhx.module.staff.service.StaffService;
import com.mortals.xhx.module.window.model.WindowWorkmanPerformDetailEntity;
import com.mortals.xhx.module.window.model.WindowWorkmanPerformDetailQuery;
import com.mortals.xhx.module.window.model.*;
import com.mortals.xhx.module.window.service.WindowOwnerDetailService;
import com.mortals.xhx.module.window.service.WindowWorkmanPerformDetailService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.BeanUtils;
......@@ -25,7 +25,6 @@ import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.xhx.module.window.dao.WindowWorkmanPerformDao;
import com.mortals.xhx.module.window.model.WindowWorkmanPerformEntity;
import com.mortals.xhx.module.window.service.WindowWorkmanPerformService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.util.ObjectUtils;
......@@ -51,7 +50,8 @@ public class WindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImpl<Win
private CheckWindowWorkmanPerformService checkWindowWorkmanPerformService;
@Autowired
private StaffService staffService;
@Autowired
private WindowOwnerDetailService windowOwnerDetailService;
@Autowired
private IWindowFeign windowFeign;
......@@ -67,6 +67,13 @@ public class WindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImpl<Win
entity.setSalaId(staff.getSalaId());
entity.setSalaName(staff.getSalaName());
}
if(entity.getWindowId()!=null) {
WindowOwnerDetailEntity windowOwnerDetailEntity = windowOwnerDetailService.selectOne(new WindowOwnerDetailQuery().windowId(entity.getWindowId()));
if(windowOwnerDetailEntity!=null){
entity.setWindowCode(windowOwnerDetailEntity.getWindowCode());
entity.setWindowName(windowOwnerDetailEntity.getWindowName());
}
}
super.saveBefore(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