修改了提交工时记录和查询我管理,我参与的接口
This commit is contained in:
parent
33baa12938
commit
89e9e2c975
@ -59,7 +59,6 @@ public class WorkHourRecordController {
|
|||||||
@GetMapping("/selectMemberWorkRecord")
|
@GetMapping("/selectMemberWorkRecord")
|
||||||
@PreAuthorize("hasAnyAuthority('auth_administor','auth_general_user')")
|
@PreAuthorize("hasAnyAuthority('auth_administor','auth_general_user')")
|
||||||
public String selectMemberWorkRecord(@RequestHeader(value="Authorization") String token){
|
public String selectMemberWorkRecord(@RequestHeader(value="Authorization") String token){
|
||||||
List list = new ArrayList();
|
|
||||||
// 获取区域信息
|
// 获取区域信息
|
||||||
Locale locale = LocaleContextHolder.getLocale();
|
Locale locale = LocaleContextHolder.getLocale();
|
||||||
// 验证token
|
// 验证token
|
||||||
@ -69,11 +68,10 @@ public class WorkHourRecordController {
|
|||||||
return outputEncapsulationObject(PromptMessageEnum.USER_LOGIN_ERROR,"您还没有注册登录,请先注册登录",locale);
|
return outputEncapsulationObject(PromptMessageEnum.USER_LOGIN_ERROR,"您还没有注册登录,请先注册登录",locale);
|
||||||
}
|
}
|
||||||
List<MemberWorkRecordVo> memberWorkRecordVos = workHourRecordService.selectMemberWorkRecord(sysUserEntity.getId());
|
List<MemberWorkRecordVo> memberWorkRecordVos = workHourRecordService.selectMemberWorkRecord(sysUserEntity.getId());
|
||||||
list.add(memberWorkRecordVos);
|
if(memberWorkRecordVos.size() == 0){
|
||||||
if(list.size() == 0){
|
|
||||||
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE,"暂时还没有任何数据",locale);
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE,"暂时还没有任何数据",locale);
|
||||||
}
|
}
|
||||||
return outputEncapsulationObject(PromptMessageEnum.SUCCESS,list,locale);
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS,memberWorkRecordVos,locale);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -210,14 +208,10 @@ public class WorkHourRecordController {
|
|||||||
@PreAuthorize("hasAnyAuthority('auth_administor','auth_general_user')")
|
@PreAuthorize("hasAnyAuthority('auth_administor','auth_general_user')")
|
||||||
public String selectProjectByGanttChart(@RequestParam("projectNumber") String projectNumber,@RequestHeader(value="Authorization") String token){
|
public String selectProjectByGanttChart(@RequestParam("projectNumber") String projectNumber,@RequestHeader(value="Authorization") String token){
|
||||||
Locale locale = LocaleContextHolder.getLocale();
|
Locale locale = LocaleContextHolder.getLocale();
|
||||||
List list = new ArrayList();
|
|
||||||
List<Map<String, Object>> maps = workHourRecordDao.selectWorkHourPar(projectNumber);
|
|
||||||
list.add(maps);
|
|
||||||
List<Map<String, Object>> maps1 = workHourRecordDao.selectWorkHourMember(projectNumber);
|
List<Map<String, Object>> maps1 = workHourRecordDao.selectWorkHourMember(projectNumber);
|
||||||
list.add(maps1);
|
if(maps1.size() == 0){
|
||||||
if(list.size() == 0){
|
|
||||||
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE,"暂时还没有任何数据",locale);
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE,"暂时还没有任何数据",locale);
|
||||||
}
|
}
|
||||||
return outputEncapsulationObject(PromptMessageEnum.SUCCESS,list,locale);
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS,maps1,locale);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,11 +24,14 @@ public class WorkRecordQo {
|
|||||||
@NotBlank(message = "{WorkHourRecord.projectNumber.null}",groups = {WorkRecordQoInsert.class, WorkRecordQoUpdate.class})
|
@NotBlank(message = "{WorkHourRecord.projectNumber.null}",groups = {WorkRecordQoInsert.class, WorkRecordQoUpdate.class})
|
||||||
private String projectNumber;
|
private String projectNumber;
|
||||||
|
|
||||||
public WorkRecordQo(String workContent, Integer workHour, String color, String projectNumber) {
|
private String submitTime;
|
||||||
|
|
||||||
|
public WorkRecordQo(String workContent, Integer workHour, String color, String projectNumber, String submitTime) {
|
||||||
this.workContent = workContent;
|
this.workContent = workContent;
|
||||||
this.workHour = workHour;
|
this.workHour = workHour;
|
||||||
this.color = color;
|
this.color = color;
|
||||||
this.projectNumber = projectNumber;
|
this.projectNumber = projectNumber;
|
||||||
|
this.submitTime = submitTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getWorkContent() {
|
public String getWorkContent() {
|
||||||
@ -62,4 +65,12 @@ public class WorkRecordQo {
|
|||||||
public void setProjectNumber(String projectNumber) {
|
public void setProjectNumber(String projectNumber) {
|
||||||
this.projectNumber = projectNumber;
|
this.projectNumber = projectNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getSubmitTime() {
|
||||||
|
return submitTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSubmitTime(String submitTime) {
|
||||||
|
this.submitTime = submitTime;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ public class WorkHourRecordServiceImpl implements WorkHourRecordService {
|
|||||||
workHourRecord.setColor(workRecordQo.getColor());
|
workHourRecord.setColor(workRecordQo.getColor());
|
||||||
workHourRecord.setUserId(sysUserEntity.getId());
|
workHourRecord.setUserId(sysUserEntity.getId());
|
||||||
workHourRecord.setProjectNumber(workRecordQo.getProjectNumber());
|
workHourRecord.setProjectNumber(workRecordQo.getProjectNumber());
|
||||||
workHourRecord.setSubmitTime(DateTimeUtil.dateTimeToString(LocalDateTime.now()));
|
workHourRecord.setSubmitTime(workRecordQo.getSubmitTime());
|
||||||
WorkHourRecord save = workHourRecordDao.save(workHourRecord);
|
WorkHourRecord save = workHourRecordDao.save(workHourRecord);
|
||||||
if(save != null){
|
if(save != null){
|
||||||
return outputEncapsulationObject(PromptMessageEnum.SUCCESS,"提交成功",locale);
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS,"提交成功",locale);
|
||||||
|
Loading…
Reference in New Issue
Block a user