Commit 500d064a authored by cq990612's avatar cq990612

优化代码结构

parent ebef7e6a
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<module>wisenergy-web-admin</module> <module>wisenergy-web-admin</module>
</modules> </modules>
<!-- POM属性变量 --> <!--POM属性变量-->
<properties> <properties>
<!-- 文件拷贝时的编码 --> <!-- 文件拷贝时的编码 -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
......
...@@ -58,8 +58,12 @@ public class WorkTimeOrderDto { ...@@ -58,8 +58,12 @@ public class WorkTimeOrderDto {
@ApiModelProperty(name = "typeName",value = "项目类型名") @ApiModelProperty(name = "typeName",value = "项目类型名")
private String typeName; private String typeName;
@ApiModelProperty(name = "isOvertime",value = "0:正常工时,1:加班") @ApiModelProperty(name = "isOvertime", value = "0:正常工时,1:加班")
private Integer isOvertime; private Integer isOvertime;
@JsonFormat(shape=JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd")
@ApiModelProperty(name = "modifyTime",value = "驳回时间")
private Date modifyTime;
} }
...@@ -243,7 +243,7 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService { ...@@ -243,7 +243,7 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService {
workTimeOrder.setDeptId(workUserDeptService.getDeptIdByUserId(dto.getUserId())); workTimeOrder.setDeptId(workUserDeptService.getDeptIdByUserId(dto.getUserId()));
BeanUtils.copyProperties(dto, workTimeOrder); BeanUtils.copyProperties(dto, workTimeOrder);
totalTime += dto.getWorkTime(); totalTime += dto.getWorkTime();
if (dto.getWorkId() != null) { if (null != dto.getWorkId()) {
WorkTimeOrder workTimeOrder1 = workTimeOrderMapper.selectById(dto.getWorkId()); WorkTimeOrder workTimeOrder1 = workTimeOrderMapper.selectById(dto.getWorkId());
if (2 == workTimeOrder1.getStatus() || 5 == workTimeOrder1.getStatus()) { if (2 == workTimeOrder1.getStatus() || 5 == workTimeOrder1.getStatus()) {
if (!dto.getStatus().equals(workTimeOrder1.getStatus())) { if (!dto.getStatus().equals(workTimeOrder1.getStatus())) {
...@@ -302,8 +302,6 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService { ...@@ -302,8 +302,6 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService {
} }
// 判断填写工时单是否重复 // 判断填写工时单是否重复
private void isRepeat(List<WorkTimeOrderDto> list) { private void isRepeat(List<WorkTimeOrderDto> list) {
if (CollectionUtils.isEmpty(list)) { if (CollectionUtils.isEmpty(list)) {
...@@ -338,7 +336,6 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService { ...@@ -338,7 +336,6 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService {
isManager(userId); isManager(userId);
WorkUser user = workUserService.getById(userId); WorkUser user = workUserService.getById(userId);
// PC端 // PC端
return pageExamine(user, projectId, type, page, size, status); return pageExamine(user, projectId, type, page, size, status);
} }
...@@ -632,7 +629,6 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService { ...@@ -632,7 +629,6 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService {
} }
// 判断工单是否合法 // 判断工单是否合法
private void isEmpty(WorkTimeOrderDto dto) { private void isEmpty(WorkTimeOrderDto dto) {
int size = 0; int size = 0;
......
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