Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
T
tasktime
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
任建彩
tasktime
Commits
54d39da3
提交
54d39da3
authored
9月 14, 2021
作者:
任建彩
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化
上级
1485bd37
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
27 行增加
和
9 行删除
+27
-9
ProjectController.java
.../com/zrqx/olive/project/controller/ProjectController.java
+2
-2
TeamDao.java
...ole/src/main/java/com/zrqx/olive/project/dao/TeamDao.java
+9
-0
StatisticsProject.java
.../java/com/zrqx/olive/project/model/StatisticsProject.java
+2
-0
StatisticsProjectServiceImpl.java
...ve/project/service/impl/StatisticsProjectServiceImpl.java
+10
-5
TeamServiceImpl.java
.../com/zrqx/olive/project/service/impl/TeamServiceImpl.java
+1
-1
ProjectListVo.java
...rc/main/java/com/zrqx/olive/project/vo/ProjectListVo.java
+2
-0
TaskDao.java
...nsole/src/main/java/com/zrqx/olive/ttask/dao/TaskDao.java
+1
-1
没有找到文件。
olive-console/src/main/java/com/zrqx/olive/project/controller/ProjectController.java
浏览文件 @
54d39da3
...
...
@@ -98,7 +98,7 @@ public class ProjectController {
QueryWrapper
<
StatisticsProject
>
qw
=
new
QueryWrapper
<
StatisticsProject
>();
if
(
id
!=
null
)
{
qw
.
ne
(
"id"
,
id
);
qw
.
ne
(
"project"
,
projectName
);
qw
.
eq
(
"project"
,
projectName
);
}
else
{
if
(
StringUtils
.
isNotEmpty
(
id
))
{
qw
.
eq
(
"id"
,
id
);
...
...
@@ -111,7 +111,7 @@ public class ProjectController {
if
(
list
.
size
()>
0
)
{
throw
new
BaseException
(
"项目名已被占用,请换一个"
);
}
return
CommonResult
.
success
(
"1"
);
return
CommonResult
.
success
();
}
...
...
olive-console/src/main/java/com/zrqx/olive/project/dao/TeamDao.java
浏览文件 @
54d39da3
package
com
.
zrqx
.
olive
.
project
.
dao
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
...
...
@@ -31,6 +32,14 @@ public interface TeamDao extends BaseMapper<Team> {
+
"</if>"
+
"</script>"
)
List
<
TeamVo
>
getProjectId
(
String
projectId
);
@Select
(
"<script>"
+
"SELECT sum(allocate_surplus) FROM t_team where 1=1 "
// 项目ID
+
"<if test = 'projectId!=\"\" and projectId!=null '> "
+
" AND project_id = #{projectId} "
+
"</if>"
+
"</script>"
)
BigDecimal
queryAllocateSurplus
(
String
projectId
);
...
...
olive-console/src/main/java/com/zrqx/olive/project/model/StatisticsProject.java
浏览文件 @
54d39da3
...
...
@@ -57,6 +57,8 @@ public class StatisticsProject {
private
BigDecimal
totalApplyTime
;
@ApiModelProperty
(
"待分配工时"
)
private
BigDecimal
toBeAllocated
;
@ApiModelProperty
(
"已分配剩余"
)
private
BigDecimal
allocateSurplus
;
@ApiModelProperty
(
value
=
"部门Id"
)
private
String
departmentId
;
}
olive-console/src/main/java/com/zrqx/olive/project/service/impl/StatisticsProjectServiceImpl.java
浏览文件 @
54d39da3
...
...
@@ -26,10 +26,12 @@ import com.zrqx.olive.project.dao.ProjectFileDao;
import
com.zrqx.olive.project.dao.ProjectRecordDao
;
import
com.zrqx.olive.project.dao.ProjectUserDao
;
import
com.zrqx.olive.project.dao.StatisticsProjectDao
;
import
com.zrqx.olive.project.dao.TeamDao
;
import
com.zrqx.olive.project.model.Customer
;
import
com.zrqx.olive.project.model.ProjectFile
;
import
com.zrqx.olive.project.model.ProjectUser
;
import
com.zrqx.olive.project.model.StatisticsProject
;
import
com.zrqx.olive.project.model.Team
;
import
com.zrqx.olive.project.request.QueryProjectRequest
;
import
com.zrqx.olive.project.request.SaveProjectRequest
;
import
com.zrqx.olive.project.request.StatisticsProjectRequest
;
...
...
@@ -60,6 +62,9 @@ public class StatisticsProjectServiceImpl extends ServiceImpl<StatisticsProjectD
private
TimeApplyChangeDao
timeApplyChangeMapper
;
@Autowired
private
TaskService
taskService
;
@Autowired
private
TeamDao
teamDao
;
@Override
public
PageInfo
<
ProjectListVo
>
page
(
QueryProjectRequest
form
,
PageParamRequest
pageParamRequest
)
{
//开启分页
...
...
@@ -80,11 +85,11 @@ public class StatisticsProjectServiceImpl extends ServiceImpl<StatisticsProjectD
}
//项目的剩余总工时
BigDecimal
querySurplus
=
taskService
.
querySurplus
(
projectListVo
.
getId
(),
null
,
null
);
if
(
querySurplus
!=
null
)
{
if
(
projectListVo
.
getTotal
()!=
null
)
{
projectListVo
.
setSurplus
(
projectListVo
.
getTotal
().
subtract
(
querySurplus
));
}
}
projectListVo
.
setSurplus
(
querySurplus
);
//已分配剩余工时
BigDecimal
allocateSurplus
=
teamDao
.
queryAllocateSurplus
(
projectListVo
.
getId
(
));
projectListVo
.
setAllocateSurplus
(
allocateSurplus
);
}
return
CommonPage
.
copyPageInfo
(
startPage
,
list
);
}
...
...
olive-console/src/main/java/com/zrqx/olive/project/service/impl/TeamServiceImpl.java
浏览文件 @
54d39da3
...
...
@@ -65,7 +65,7 @@ public class TeamServiceImpl extends ServiceImpl<TeamDao, Team> implements Team
}
BigDecimal
querySurplus
=
taskService
.
querySurplus
(
team
.
getProjectId
(),
null
,
team
.
getDepartmentId
());
if
(
querySurplus
!=
null
)
{
team
.
setSurplus
(
team
.
getTotal
().
subtract
(
querySurplus
)
);
team
.
setSurplus
(
querySurplus
);
}
TeamRequest
aqr
=
new
TeamRequest
();
BeanUtils
.
copyProperties
(
team
,
aqr
);
...
...
olive-console/src/main/java/com/zrqx/olive/project/vo/ProjectListVo.java
浏览文件 @
54d39da3
...
...
@@ -37,4 +37,6 @@ public class ProjectListVo {
private
BigDecimal
surplus
;
@ApiModelProperty
(
"待分配"
)
private
BigDecimal
toBeAllocated
;
@ApiModelProperty
(
"已分配剩余"
)
private
BigDecimal
allocateSurplus
;
}
olive-console/src/main/java/com/zrqx/olive/ttask/dao/TaskDao.java
浏览文件 @
54d39da3
...
...
@@ -194,7 +194,7 @@ public interface TaskDao extends BaseMapper<Task> {
BigDecimal
queryConsume
(
String
id
,
Integer
userId
,
Integer
departmentId
,
String
presale
);
@Select
(
"<script>"
+
" select sum(working_hours) FROM t_task a where 1=1 "
+
" and
(task_status=1 or task_status=2 or task_status=3)
"
+
" and
task_status=1
"
+
"<if test = 'id!=null and id!=\"\"'> "
+
" AND a.project_id = #{id} "
+
"</if>"
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论