Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
3cc2d625
由
康伟
编写于
2025-01-16 17:41:35 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
kangwei:
1 个父辈
4e3dfbf2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
54 行增加
和
21 行删除
sk-module-biz/src/main/java/com/skua/modules/ajh/controller/AjhPlanScheduleDataController.java
sk-module-biz/src/main/java/com/skua/modules/ajh/vo/AjhPlanScheduleDataVO.java
sk-module-biz/src/main/java/com/skua/modules/ajh/controller/AjhPlanScheduleDataController.java
查看文件 @
3cc2d62
package
com
.
skua
.
modules
.
ajh
.
controller
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.io.IOException
;
...
...
@@ -21,6 +22,7 @@ import com.skua.modules.ajh.vo.AjhPlanScheduleDataVO;
import
com.skua.modules.common.vo.TreeNodeVO
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.jeecgframework.poi.excel.ExcelImportUtil
;
import
org.jeecgframework.poi.excel.def.NormalExcelConstants
;
import
org.jeecgframework.poi.excel.entity.ExportParams
;
...
...
@@ -164,31 +166,61 @@ public class AjhPlanScheduleDataController {
QueryWrapper
<
AjhPlanScheduleData
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"sd.factory_id"
,
factoryId
);
queryWrapper
.
eq
(
"sd.date_time"
,
month
);
List
<
AjhPlanScheduleDataVO
>
data
List
=
ajhPlanScheduleDataService
.
queryByList
(
queryWrapper
);
List
<
AjhPlanScheduleDataVO
>
scheduleDataVO
List
=
ajhPlanScheduleDataService
.
queryByList
(
queryWrapper
);
AjhPlanScheduleDataVO
dataVO
=
null
;
if
(
dataList
!=
null
&&
!
dataList
.
isEmpty
()
){
}
else
{
List
<
TreeNodeVO
>
treeNodeVOList
=
ajhPlanScheduleConfigService
.
queryTreeList
(
factoryId
);
if
(
treeNodeVOList
!=
null
&&
!
treeNodeVOList
.
isEmpty
()){
for
(
TreeNodeVO
treeNodeVO
:
treeNodeVOList
){
if
(
treeNodeVO
.
getChildren
()
!=
null
&&
!
treeNodeVO
.
getChildren
().
isEmpty
()){
for
(
TreeNodeVO
childrenVO
:
treeNodeVO
.
getChildren
()){
//String factoryId,String workItermName, String workContent,String configLevel1, String completeTime1,String configLevel2, String responsibler1, String completeTime2, String responsibler2
dataList
.
add
(
new
AjhPlanScheduleDataVO
(
factoryId
,
treeNodeVO
.
getLabel
(),
childrenVO
.
getLabel
(),
treeNodeVO
.
getId
(),
treeNodeVO
.
getCompleteTime
(),
treeNodeVO
.
getResponsibler
(),
childrenVO
.
getId
(),
childrenVO
.
getCompleteTime
(),
childrenVO
.
getResponsibler
())
)
;
}
}
else
{
//String factoryId,String workItermName,String configLevel1, String completeTime1, String responsibler1
dataList
.
add
(
new
AjhPlanScheduleDataVO
(
factoryId
,
treeNodeVO
.
getLabel
(),
treeNodeVO
.
getId
(),
treeNodeVO
.
getCompleteTime
(),
treeNodeVO
.
getResponsibler
()))
;
}
}
}
}
List
<
AjhPlanScheduleDataVO
>
dataList
=
new
ArrayList
<>();
List
<
TreeNodeVO
>
treeNodeVOList
=
ajhPlanScheduleConfigService
.
queryTreeList
(
factoryId
);
if
(
treeNodeVOList
!=
null
&&
!
treeNodeVOList
.
isEmpty
()){
for
(
TreeNodeVO
treeNodeVO
:
treeNodeVOList
){
if
(
treeNodeVO
.
getChildren
()
!=
null
&&
!
treeNodeVO
.
getChildren
().
isEmpty
()){
for
(
TreeNodeVO
childrenVO
:
treeNodeVO
.
getChildren
()){
//String factoryId,String workItermName, String workContent,String configLevel1, String completeTime1,String configLevel2, String responsibler1, String completeTime2, String responsibler2
dataVO
=
queryAjhPlanScheduleDataVO
(
scheduleDataVOList
,
childrenVO
.
getParentId
(),
childrenVO
.
getId
());
if
(
dataVO
==
null
){
dataVO
=
new
AjhPlanScheduleDataVO
(
factoryId
,
month
,
treeNodeVO
.
getLabel
(),
childrenVO
.
getLabel
(),
treeNodeVO
.
getId
(),
treeNodeVO
.
getCompleteTime
(),
treeNodeVO
.
getResponsibler
(),
childrenVO
.
getId
(),
childrenVO
.
getCompleteTime
(),
childrenVO
.
getResponsibler
());
}
dataList
.
add
(
dataVO
);
}
}
else
{
dataVO
=
queryAjhPlanScheduleDataVO
(
scheduleDataVOList
,
treeNodeVO
.
getId
());
if
(
dataVO
==
null
){
dataVO
=
new
AjhPlanScheduleDataVO
(
factoryId
,
month
,
treeNodeVO
.
getLabel
(),
treeNodeVO
.
getId
(),
treeNodeVO
.
getCompleteTime
(),
treeNodeVO
.
getResponsibler
());
}
//String factoryId,String workItermName,String configLevel1, String completeTime1, String responsibler1
dataList
.
add
(
dataVO
);
}
}
}
result
.
setResult
(
dataList
);
result
.
setSuccess
(
true
);
return
result
;
}
private
AjhPlanScheduleDataVO
queryAjhPlanScheduleDataVO
(
List
<
AjhPlanScheduleDataVO
>
scheduleDataVOList
,
String
configLevel1
,
String
configLevel2
){
AjhPlanScheduleDataVO
scheduleDataVO
=
null
;
if
(
scheduleDataVOList
!=
null
&&
!
scheduleDataVOList
.
isEmpty
()
&&
StringUtils
.
isNotEmpty
(
configLevel1
)){
for
(
AjhPlanScheduleDataVO
dataVO:
scheduleDataVOList
){
if
(
configLevel1
.
equals
(
dataVO
.
getConfigLevel1
()
)
&&
configLevel2
.
equals
(
dataVO
.
getConfigLevel2
()
)){
scheduleDataVO
=
dataVO
;
break
;
}
}
}
return
scheduleDataVO
;
}
private
AjhPlanScheduleDataVO
queryAjhPlanScheduleDataVO
(
List
<
AjhPlanScheduleDataVO
>
scheduleDataVOList
,
String
configLevel1
){
AjhPlanScheduleDataVO
scheduleDataVO
=
null
;
if
(
scheduleDataVOList
!=
null
&&
!
scheduleDataVOList
.
isEmpty
()
&&
StringUtils
.
isNotEmpty
(
configLevel1
)){
for
(
AjhPlanScheduleDataVO
dataVO:
scheduleDataVOList
){
if
(
configLevel1
.
equals
(
dataVO
.
getConfigLevel1
()
)){
scheduleDataVO
=
dataVO
;
break
;
}
}
}
return
scheduleDataVO
;
}
/**
* <pre>
* 导出excel
...
...
sk-module-biz/src/main/java/com/skua/modules/ajh/vo/AjhPlanScheduleDataVO.java
查看文件 @
3cc2d62
...
...
@@ -99,8 +99,9 @@ public class AjhPlanScheduleDataVO {
public
AjhPlanScheduleDataVO
()
{
}
public
AjhPlanScheduleDataVO
(
String
factoryId
,
String
workItermName
,
String
workContent
,
String
configLevel1
,
String
completeTime1
,
String
responsibler1
,
String
configLevel2
,
String
completeTime2
,
String
responsibler2
)
{
public
AjhPlanScheduleDataVO
(
String
factoryId
,
String
dateTime
,
String
workItermName
,
String
workContent
,
String
configLevel1
,
String
completeTime1
,
String
responsibler1
,
String
configLevel2
,
String
completeTime2
,
String
responsibler2
)
{
this
.
factoryId
=
factoryId
;
this
.
dateTime
=
dateTime
;
this
.
workItermName
=
workItermName
;
this
.
workContent
=
workContent
;
...
...
@@ -113,7 +114,7 @@ public class AjhPlanScheduleDataVO {
this
.
responsibler2
=
responsibler2
;
}
public
AjhPlanScheduleDataVO
(
String
factoryId
,
String
workItermName
,
String
configLevel1
,
String
completeTime1
,
String
responsibler1
)
{
public
AjhPlanScheduleDataVO
(
String
factoryId
,
String
dateTime
,
String
workItermName
,
String
configLevel1
,
String
completeTime1
,
String
responsibler1
)
{
this
.
factoryId
=
factoryId
;
this
.
workItermName
=
workItermName
;
this
.
workContent
=
workContent
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论