Commit 4bf4eef9 authored by 姬鋆屾's avatar 姬鋆屾
parents 481aa828 2f2d556c
...@@ -133,15 +133,15 @@ public class AttendanceLeaveRecordEntity extends AttendanceLeaveRecordVo { ...@@ -133,15 +133,15 @@ public class AttendanceLeaveRecordEntity extends AttendanceLeaveRecordVo {
public void initAttrValue(){ public void initAttrValue(){
this.leavePersonId = 0L; this.leavePersonId = 0L;
this.leavePerson = ""; this.leavePerson = "";
this.deptId = 0L; this.deptId = null;
this.deptName = ""; this.deptName = "";
this.phoneNumber = ""; this.phoneNumber = "";
this.leaveType = 0; this.leaveType = null;
this.startTime = new Date(); this.startTime = new Date();
this.endTime = new Date(); this.endTime = new Date();
this.duration = 0; this.duration = 0;
this.reason = ""; this.reason = "";
this.approverId = 0L; this.approverId = null;
this.approver = ""; this.approver = "";
this.attachment = ""; this.attachment = "";
this.attachmentPath = ""; this.attachmentPath = "";
......
...@@ -6,6 +6,8 @@ import com.mortals.xhx.base.system.user.model.UserQuery; ...@@ -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.base.system.user.service.UserService;
import com.mortals.xhx.common.code.AppealResultEnum; import com.mortals.xhx.common.code.AppealResultEnum;
import com.mortals.xhx.common.code.ProcessStatusEnum; 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.model.AttendanceLeaveRecordEntity;
import com.mortals.xhx.module.attendance.service.AttendanceLeaveRecordService; import com.mortals.xhx.module.attendance.service.AttendanceLeaveRecordService;
import com.mortals.xhx.module.dept.model.DeptQuery; import com.mortals.xhx.module.dept.model.DeptQuery;
...@@ -16,6 +18,9 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -16,6 +18,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; 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.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -38,8 +43,10 @@ public class AttendanceLeaveRecordController extends BaseCRUDJsonBodyMappingCont ...@@ -38,8 +43,10 @@ public class AttendanceLeaveRecordController extends BaseCRUDJsonBodyMappingCont
private DeptService deptService; private DeptService deptService;
@Autowired @Autowired
private WorkmanService workmanService; private WorkmanService workmanService;
// @Autowired
// private UserService userService;
@Autowired @Autowired
private UserService userService; private IUserFeign iUserFeign;
public AttendanceLeaveRecordController(){ public AttendanceLeaveRecordController(){
super.setModuleDesc( "请假记录信息"); super.setModuleDesc( "请假记录信息");
...@@ -52,7 +59,20 @@ public class AttendanceLeaveRecordController extends BaseCRUDJsonBodyMappingCont ...@@ -52,7 +59,20 @@ public class AttendanceLeaveRecordController extends BaseCRUDJsonBodyMappingCont
this.addDict(model, "leaveType", paramService.getParamBySecondOrganize("AttendanceLeaveRecord","leaveType")); this.addDict(model, "leaveType", paramService.getParamBySecondOrganize("AttendanceLeaveRecord","leaveType"));
this.addDict(model, "auditResult", AppealResultEnum.getEnumMap()); this.addDict(model, "auditResult", AppealResultEnum.getEnumMap());
this.addDict(model, "processStatus", ProcessStatusEnum.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)));
//从门户获取登录用户信息
UserPdu userPdu = new UserPdu();
userPdu.setSize(-1);
List <UserPdu> userPduList = iUserFeign.list(userPdu).getData().getData();
Map<String, String> ans = new HashMap<>();
for(UserPdu str: userPduList) {
if(str != null) { //增加非空判断
ans.put(str.getId().toString(), str.getRealName());
}
}
this.addDict(model, "createUserId", ans);
super.init(model, context); super.init(model, context);
......
...@@ -181,6 +181,10 @@ public class UserPdu extends BaseEntityLong { ...@@ -181,6 +181,10 @@ public class UserPdu extends BaseEntityLong {
/** AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4) */ /** AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4) */
private List<UserPdu> andConditionList; private List<UserPdu> andConditionList;
private Integer page;
private Integer size;
public UserPdu(){} public UserPdu(){}
/** /**
* 获取 登录名 * 获取 登录名
...@@ -893,6 +897,27 @@ public class UserPdu extends BaseEntityLong { ...@@ -893,6 +897,27 @@ public class UserPdu extends BaseEntityLong {
public void setLastLoginAddressList(List<String> lastLoginAddressList){ public void setLastLoginAddressList(List<String> lastLoginAddressList){
this.lastLoginAddressList = lastLoginAddressList; this.lastLoginAddressList = lastLoginAddressList;
} }
@Override
public Integer getPage() {
return page;
}
@Override
public void setPage(Integer page) {
this.page = page;
}
@Override
public Integer getSize() {
return size;
}
@Override
public void setSize(Integer size) {
this.size = size;
}
/** /**
* 设置 用户ID,主键,自增长 * 设置 用户ID,主键,自增长
* @param id * @param id
......
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