Commit 796bebc1 authored by 赵啸非's avatar 赵啸非

文档字段修改

parent a11b1988
......@@ -5,6 +5,7 @@ import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.module.dept.model.DeptEntity;
import com.mortals.xhx.module.dept.model.DeptQuery;
import com.mortals.xhx.module.dept.model.DeptTreeSelect;
import com.mortals.xhx.module.dept.service.DeptService;
import com.mortals.xhx.module.workman.model.WorkmanEntity;
import com.mortals.xhx.module.workman.service.WorkmanService;
......@@ -12,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
......@@ -39,7 +41,10 @@ public class WorkmanController extends BaseCRUDJsonBodyMappingController<Workman
@Override
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "positionId",deptService .find(new DeptQuery()).stream().collect(Collectors.toMap(x->x.getId().toString(), y->y.getDeptName(),(o, n)->n)));
//this.addDict(model, "positionId",deptService .find(new DeptQuery()).stream().collect(Collectors.toMap(x->x.getId().toString(), y->y.getDeptName(),(o, n)->n)));
List<DeptEntity> list = deptService.find(new DeptQuery());
List<DeptTreeSelect> treeSelects = deptService.buildDeptTreeSelect(list);
this.addDict(model, "deptId",treeSelects);
super.init(model, 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