Commit 410b849e authored by 周亚武's avatar 周亚武

钉钉相关接口

parent d261530c
......@@ -133,15 +133,15 @@ public class AttendanceLeaveRecordEntity extends AttendanceLeaveRecordVo {
public void initAttrValue(){
this.leavePersonId = 0L;
this.leavePerson = "";
this.deptId = 0L;
this.deptId = null;
this.deptName = "";
this.phoneNumber = "";
this.leaveType = 0;
this.leaveType = null;
this.startTime = new Date();
this.endTime = new Date();
this.duration = 0;
this.reason = "";
this.approverId = 0L;
this.approverId = null;
this.approver = "";
this.attachment = "";
this.attachmentPath = "";
......
......@@ -6,6 +6,8 @@ import com.mortals.xhx.base.system.user.model.UserQuery;
import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.common.code.AppealResultEnum;
import com.mortals.xhx.common.code.ProcessStatusEnum;
import com.mortals.xhx.common.pdu.user.UserPdu;
import com.mortals.xhx.feign.user.IUserFeign;
import com.mortals.xhx.module.attendance.model.AttendanceLeaveRecordEntity;
import com.mortals.xhx.module.attendance.service.AttendanceLeaveRecordService;
import com.mortals.xhx.module.dept.model.DeptQuery;
......@@ -16,6 +18,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
......@@ -38,8 +43,10 @@ public class AttendanceLeaveRecordController extends BaseCRUDJsonBodyMappingCont
private DeptService deptService;
@Autowired
private WorkmanService workmanService;
// @Autowired
// private UserService userService;
@Autowired
private UserService userService;
private IUserFeign iUserFeign;
public AttendanceLeaveRecordController(){
super.setModuleDesc( "请假记录信息");
......@@ -52,7 +59,17 @@ public class AttendanceLeaveRecordController extends BaseCRUDJsonBodyMappingCont
this.addDict(model, "leaveType", paramService.getParamBySecondOrganize("AttendanceLeaveRecord","leaveType"));
this.addDict(model, "auditResult", AppealResultEnum.getEnumMap());
this.addDict(model, "processStatus", ProcessStatusEnum.getEnumMap());
this.addDict(model, "createUserId", userService.find(new UserQuery()).stream().collect(toMap(x -> x.getId().toString(), y -> y.getRealName(), (o, n) -> n)));
// this.addDict(model, "createUserId", userService.find(new UserQuery()).stream().collect(toMap(x -> x.getId().toString(), y -> y.getRealName(), (o, n) -> n)));
List <UserPdu> userPduList = iUserFeign.list(new UserPdu()).getData().getData();
Map<Long, String> ans = new HashMap<>();
for(UserPdu str: userPduList) {
if(str != null) { //增加非空判断
ans.put(str.getId(), str.getRealName());
}
}
this.addDict(model, "createUserId", ans);
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