Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
work_service
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
licc
work_service
Commits
a24bcc7e
Commit
a24bcc7e
authored
4 years ago
by
cq990612
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化代码结构
parent
604a7266
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
213 additions
and
47 deletions
+213
-47
BASE_RESP_CODE_ENUM.java
...wisenergy/common/utils/exception/BASE_RESP_CODE_ENUM.java
+4
-1
ProjectDto.java
...odel/src/main/java/cn/wisenergy/model/dto/ProjectDto.java
+8
-6
ProjectInfoDto.java
.../src/main/java/cn/wisenergy/model/dto/ProjectInfoDto.java
+32
-0
ProjectManagerDto.java
...c/main/java/cn/wisenergy/model/dto/ProjectManagerDto.java
+34
-0
ProjectsDto.java
...del/src/main/java/cn/wisenergy/model/dto/ProjectsDto.java
+18
-0
WorkTimeOrderService.java
.../main/java/cn/wisenergy/service/WorkTimeOrderService.java
+6
-2
WorkTimeOrderServiceImpl.java
...a/cn/wisenergy/service/impl/WorkTimeOrderServiceImpl.java
+101
-24
WorkCollectController.java
...nergy/web/admin/controller/app/WorkCollectController.java
+0
-3
WorkTimeOrderController.java
...rgy/web/admin/controller/app/WorkTimeOrderController.java
+10
-11
No files found.
wisenergy-common/src/main/java/cn/wisenergy/common/utils/exception/BASE_RESP_CODE_ENUM.java
View file @
a24bcc7e
...
@@ -54,7 +54,10 @@ public enum BASE_RESP_CODE_ENUM {
...
@@ -54,7 +54,10 @@ public enum BASE_RESP_CODE_ENUM {
MANAGER_NOT_PROJECT
(
"632"
,
"该管理没有可管理的项目"
),
MANAGER_NOT_PROJECT
(
"632"
,
"该管理没有可管理的项目"
),
DEPT_NOT_FOUND
(
"633"
,
"部门信息未找到"
),
DEPT_NOT_FOUND
(
"633"
,
"部门信息未找到"
),
DATE_IS_ERROR
(
"634"
,
"时间不匹配"
),
DATE_IS_ERROR
(
"634"
,
"时间不匹配"
),
CENTRE_NOT_FOUND
(
"635"
,
"中心信息未找到"
);
CENTRE_NOT_FOUND
(
"635"
,
"中心信息未找到"
),
TIME_NOT_IS_NULL
(
"636"
,
"工时不能为0"
)
;
/**
/**
* 错误编码
* 错误编码
*/
*/
...
...
This diff is collapsed.
Click to expand it.
wisenergy-model/src/main/java/cn/wisenergy/model/dto/ProjectDto.java
View file @
a24bcc7e
...
@@ -17,6 +17,8 @@ import lombok.experimental.Accessors;
...
@@ -17,6 +17,8 @@ import lombok.experimental.Accessors;
@EqualsAndHashCode
(
callSuper
=
false
)
@EqualsAndHashCode
(
callSuper
=
false
)
@ApiModel
(
value
=
"ProjectDto"
,
description
=
"项目id和项目名实体类"
)
@ApiModel
(
value
=
"ProjectDto"
,
description
=
"项目id和项目名实体类"
)
public
class
ProjectDto
{
public
class
ProjectDto
{
@ApiModelProperty
(
name
=
"id"
,
value
=
"主键id"
)
@ApiModelProperty
(
name
=
"id"
,
value
=
"主键id"
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
private
Integer
id
;
...
@@ -24,15 +26,15 @@ public class ProjectDto {
...
@@ -24,15 +26,15 @@ public class ProjectDto {
@ApiModelProperty
(
name
=
"projectName"
,
value
=
"项目名称"
)
@ApiModelProperty
(
name
=
"projectName"
,
value
=
"项目名称"
)
private
String
projectName
;
private
String
projectName
;
@ApiModelProperty
(
name
=
"type"
,
value
=
"1:项目,2:商机"
)
private
Integer
type
;
@ApiModelProperty
(
name
=
"managerId"
,
value
=
"项目经理id"
)
@ApiModelProperty
(
name
=
"managerId"
,
value
=
"项目经理id"
)
private
Integer
managerId
;
private
Integer
managerId
;
@ApiModelProperty
(
name
=
"managerName"
,
value
=
"项目经理"
)
@ApiModelProperty
(
name
=
"managerName"
,
value
=
"项目经理
姓名
"
)
private
String
managerName
;
private
String
managerName
;
@ApiModelProperty
private
String
deptManagerName
;
}
}
This diff is collapsed.
Click to expand it.
wisenergy-model/src/main/java/cn/wisenergy/model/dto/ProjectInfoDto.java
0 → 100644
View file @
a24bcc7e
package
cn
.
wisenergy
.
model
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
java.util.List
;
/**
* @Authotr:陈奇
* @QQ1799796883
*/
@Data
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
false
)
@ApiModel
(
value
=
"ProjectInfoDto"
,
description
=
"可填报的项目"
)
public
class
ProjectInfoDto
{
@ApiModelProperty
(
name
=
"type"
,
value
=
"1:项目,2:商机"
)
private
Integer
type
;
@ApiModelProperty
(
name
=
"typeName"
,
value
=
"类型名称"
)
private
String
typeName
;
@ApiModelProperty
(
name
=
"deptManagerName"
,
value
=
"部门经理姓名"
)
private
String
deptManagerName
;
private
List
<
ProjectDto
>
projectDto
;
}
This diff is collapsed.
Click to expand it.
wisenergy-model/src/main/java/cn/wisenergy/model/dto/ProjectManagerDto.java
0 → 100644
View file @
a24bcc7e
package
cn
.
wisenergy
.
model
.
dto
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
/**
* @Authotr:陈奇
* @QQ1799796883
*/
@Data
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
false
)
@ApiModel
(
value
=
"ProjectManagerDto"
,
description
=
"可审批的项目"
)
public
class
ProjectManagerDto
{
@ApiModelProperty
(
name
=
"id"
,
value
=
"主键id"
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
@ApiModelProperty
(
name
=
"projectName"
,
value
=
"项目名称"
)
private
String
projectName
;
@ApiModelProperty
(
name
=
"type"
,
value
=
"1:项目,2:商机"
)
private
Integer
type
;
@ApiModelProperty
(
name
=
"typeName"
,
value
=
"类型名称"
)
private
String
typeName
;
}
This diff is collapsed.
Click to expand it.
wisenergy-model/src/main/java/cn/wisenergy/model/dto/ProjectsDto.java
0 → 100644
View file @
a24bcc7e
package
cn
.
wisenergy
.
model
.
dto
;
import
lombok.Data
;
import
java.util.List
;
/**
* @Authotr:陈奇
* @QQ1799796883
*/
@Data
public
class
ProjectsDto
{
private
List
<
ProjectInfoDto
>
projectInfoDto
;
private
List
<
ProjectManagerDto
>
projectManagerDto
;
}
This diff is collapsed.
Click to expand it.
wisenergy-service/src/main/java/cn/wisenergy/service/WorkTimeOrderService.java
View file @
a24bcc7e
...
@@ -42,7 +42,7 @@ public interface WorkTimeOrderService {
...
@@ -42,7 +42,7 @@ public interface WorkTimeOrderService {
* @param workDay 工作日
* @param workDay 工作日
* @return dto
* @return dto
*/
*/
List
<
WorkTimeOrder
Dto
>
getByDayToDto
(
Integer
userId
,
Date
workDay
);
List
<
WorkTimeOrder
>
getByDayToDto
(
Integer
userId
,
Date
workDay
);
/**
/**
* 功能:工时填报
* 功能:工时填报
...
@@ -114,5 +114,9 @@ public interface WorkTimeOrderService {
...
@@ -114,5 +114,9 @@ public interface WorkTimeOrderService {
* @param userId
* @param userId
* @return
* @return
*/
*/
List
<
ProjectDto
>
getProjectDto
(
Integer
userId
);
ProjectsDto
getProjectDto
(
Integer
userId
);
List
<
WorkTimeOrderDto
>
wtoToWtod
(
List
<
WorkTimeOrder
>
workTimeOrders
);
}
}
This diff is collapsed.
Click to expand it.
wisenergy-service/src/main/java/cn/wisenergy/service/impl/WorkTimeOrderServiceImpl.java
View file @
a24bcc7e
This diff is collapsed.
Click to expand it.
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/WorkCollectController.java
View file @
a24bcc7e
...
@@ -56,7 +56,4 @@ public class WorkCollectController extends BaseController {
...
@@ -56,7 +56,4 @@ public class WorkCollectController extends BaseController {
}
}
}
}
This diff is collapsed.
Click to expand it.
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/WorkTimeOrderController.java
View file @
a24bcc7e
...
@@ -5,10 +5,7 @@ import cn.wisenergy.common.utils.exception.CustomException;
...
@@ -5,10 +5,7 @@ import cn.wisenergy.common.utils.exception.CustomException;
import
cn.wisenergy.common.utils.exception.RESP_CODE_ENUM
;
import
cn.wisenergy.common.utils.exception.RESP_CODE_ENUM
;
import
cn.wisenergy.common.utils.exception.Result
;
import
cn.wisenergy.common.utils.exception.Result
;
import
cn.wisenergy.model.app.WorkTimeOrder
;
import
cn.wisenergy.model.app.WorkTimeOrder
;
import
cn.wisenergy.model.dto.AppletsPendApprovalDto
;
import
cn.wisenergy.model.dto.*
;
import
cn.wisenergy.model.dto.CreateWorkOrderDto
;
import
cn.wisenergy.model.dto.ProjectDto
;
import
cn.wisenergy.model.dto.WorkTimeOrderDto
;
import
cn.wisenergy.service.*
;
import
cn.wisenergy.service.*
;
import
cn.wisenergy.web.admin.controller.common.BaseController
;
import
cn.wisenergy.web.admin.controller.common.BaseController
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
...
@@ -61,8 +58,8 @@ public class WorkTimeOrderController extends BaseController {
...
@@ -61,8 +58,8 @@ public class WorkTimeOrderController extends BaseController {
throw
new
CustomException
(
RESP_CODE_ENUM
.
INPUT_PARAM_IS_NULL
);
throw
new
CustomException
(
RESP_CODE_ENUM
.
INPUT_PARAM_IS_NULL
);
}
}
Date
date
=
DateUtil
.
convertStrToDate
(
workDay
,
"yyyy-MM-dd"
);
Date
date
=
DateUtil
.
convertStrToDate
(
workDay
,
"yyyy-MM-dd"
);
List
<
WorkTimeOrder
Dto
>
dtos
=
workTimeOrderService
.
getByDayToDto
(
userId
,
date
);
List
<
WorkTimeOrder
>
dtos
=
workTimeOrderService
.
getByDayToDto
(
userId
,
date
);
return
getResult
(
dtos
);
return
getResult
(
workTimeOrderService
.
wtoToWtod
(
dtos
)
);
}
}
@ApiOperation
(
value
=
"工时填报"
,
notes
=
"工时填报"
,
httpMethod
=
"POST"
)
@ApiOperation
(
value
=
"工时填报"
,
notes
=
"工时填报"
,
httpMethod
=
"POST"
)
...
@@ -125,16 +122,16 @@ public class WorkTimeOrderController extends BaseController {
...
@@ -125,16 +122,16 @@ public class WorkTimeOrderController extends BaseController {
}
}
@ApiOperation
(
value
=
"查询
用户的所有项目和部门经理"
,
notes
=
"查询用户的所有项目和部门经理
"
,
httpMethod
=
"GET"
)
@ApiOperation
(
value
=
"查询
当前用户可填报和可审批的项目"
,
notes
=
"查询当前用户可填报和可审批的项目
"
,
httpMethod
=
"GET"
)
@ApiImplicitParam
(
name
=
"userId"
,
value
=
"用户id"
,
dataType
=
"int"
,
required
=
true
)
@ApiImplicitParam
(
name
=
"userId"
,
value
=
"用户id"
,
dataType
=
"int"
,
required
=
true
)
@GetMapping
(
value
=
"/getProject"
)
@GetMapping
(
value
=
"/getProject"
)
public
Result
<
List
<
ProjectDto
>
>
getProjectByUserId
(
Integer
userId
)
{
public
Result
<
ProjectsDto
>
getProjectByUserId
(
Integer
userId
)
{
log
.
info
(
"WorkTimeOrderController[]getProjectByUserId[]input.param.userId:{}"
+
userId
);
log
.
info
(
"WorkTimeOrderController[]getProjectByUserId[]input.param.userId:{}"
+
userId
);
if
(
null
==
userId
)
{
if
(
null
==
userId
)
{
throw
new
CustomException
(
RESP_CODE_ENUM
.
INPUT_PARAM_IS_NULL
);
throw
new
CustomException
(
RESP_CODE_ENUM
.
INPUT_PARAM_IS_NULL
);
}
}
List
<
ProjectDto
>
list
=
workTimeOrderService
.
getProjectDto
(
userId
);
ProjectsDto
projectDto
=
workTimeOrderService
.
getProjectDto
(
userId
);
return
getResult
(
list
);
return
getResult
(
projectDto
);
}
}
@ApiOperation
(
value
=
"单个或批量审批"
,
notes
=
"单个或批量审批"
,
httpMethod
=
"GET"
)
@ApiOperation
(
value
=
"单个或批量审批"
,
notes
=
"单个或批量审批"
,
httpMethod
=
"GET"
)
...
@@ -154,7 +151,7 @@ public class WorkTimeOrderController extends BaseController {
...
@@ -154,7 +151,7 @@ public class WorkTimeOrderController extends BaseController {
System
.
out
.
println
(
lists
);
System
.
out
.
println
(
lists
);
Boolean
aBoolean
=
workTimeOrderService
.
examineByIds
(
reviewerId
,
lists
);
Boolean
aBoolean
=
workTimeOrderService
.
examineByIds
(
reviewerId
,
lists
);
return
getResult
(
aBoolean
);
return
getResult
(
aBoolean
);
// return null;
}
}
@ApiOperation
(
value
=
"工单驳回"
,
notes
=
"工单驳回"
,
httpMethod
=
"PUT"
)
@ApiOperation
(
value
=
"工单驳回"
,
notes
=
"工单驳回"
,
httpMethod
=
"PUT"
)
...
@@ -185,4 +182,6 @@ public class WorkTimeOrderController extends BaseController {
...
@@ -185,4 +182,6 @@ public class WorkTimeOrderController extends BaseController {
return
getResult
(
workTimeOrderDtos
);
return
getResult
(
workTimeOrderDtos
);
}
}
}
}
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment