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

添加消息任务表

parent 7eaecd6b
......@@ -31,6 +31,7 @@ public class WorkmanEntity extends WorkmanVo {
/**
* 部门名称
*/
@Excel(name = "部门名称")
private String deptName;
/**
* 窗口id号
......
......@@ -18,6 +18,7 @@ import com.mortals.xhx.base.system.upload.service.UploadService;
import com.mortals.xhx.common.code.OnlineEnum;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.module.dept.model.DeptEntity;
import com.mortals.xhx.module.dept.model.DeptQuery;
import com.mortals.xhx.module.dept.service.DeptService;
import com.mortals.xhx.module.site.model.SiteEntity;
import com.mortals.xhx.module.site.service.SiteService;
......@@ -218,6 +219,8 @@ public class WorkmanController extends BaseCRUDJsonBodyMappingController<Workman
if (!ObjectUtils.isEmpty(siteId)) {
siteEntity = siteService.get(Long.parseLong(siteId));
}
if (!ObjectUtils.isEmpty(deptId)) {
deptEntity = deptService.get(Long.parseLong(deptId));
}
......@@ -240,11 +243,21 @@ public class WorkmanController extends BaseCRUDJsonBodyMappingController<Workman
if (ObjectUtils.isEmpty(workmanEntity.getLoginPwd()) || "".equals(workmanEntity.getLoginPwd().trim())) {
workmanEntity.setLoginPwd("123");
}
if (!ObjectUtils.isEmpty(workmanEntity.getDeptName())) {
DeptEntity dept = deptService.selectOne(new DeptQuery().name(workmanEntity.getDeptName()));
if(!ObjectUtils.isEmpty(dept)){
workmanEntity.setDeptId(dept.getId());
workmanEntity.setDeptName(dept.getName());
}
}
if (!ObjectUtils.isEmpty(deptEntity)) {
workmanEntity.setDeptId(deptEntity.getId());
workmanEntity.setDeptName(deptEntity.getName());
}
if (!ObjectUtils.isEmpty(windowEntity)) {
workmanEntity.setWindowId(windowEntity.getId());
workmanEntity.setWindowName(windowEntity.getName());
......
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