Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
f5a65866
由
康伟
编写于
2024-11-12 16:28:55 +0800
浏览文件
选项
浏览文件
标签
下载
差异文件
Merge remote-tracking branch 'origin/master'
2 个父辈
2031b9bd
6a8a31c0
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
53 行增加
和
26 行删除
sk-base-common/src/main/java/com/skua/modules/flow/service/impl/FlowForThirdBusinessServiceImpl.java
sk-module-datafill/src/main/java/com/skua/modules/report/controller/ReportElectricCostController.java
sk-module-datafill/src/main/java/com/skua/modules/report/controller/ReportTargetConfigController.java
sk-module-datafill/src/main/java/com/skua/modules/report/mapper/xml/ReportElectricCostMapper.xml
sk-base-common/src/main/java/com/skua/modules/flow/service/impl/FlowForThirdBusinessServiceImpl.java
查看文件 @
f5a6586
...
...
@@ -160,7 +160,7 @@ public class FlowForThirdBusinessServiceImpl implements FlowForThirdBusinessServ
flow
.
setProcessDefinitionKey
(
processDefinition
.
getKey
());
flow
.
setCategory
(
processDefinition
.
getCategory
());
}
flow
.
setCategoryName
(
FlowCache
.
getCategoryName
(
processDefinition
.
getCategory
())
);
flow
.
setCategoryName
(
"工作流程"
);
flow
.
setProcessInstanceId
(
historicProcessInstance
.
getId
());
// HistoricTaskInstance
HistoricTaskInstance
historicTaskInstance
=
historicTaskInstanceMap
.
get
(
historicProcessInstance
.
getId
());
...
...
@@ -259,7 +259,7 @@ public class FlowForThirdBusinessServiceImpl implements FlowForThirdBusinessServ
flow
.
setProcessDefinitionVersion
(
processDefinition
.
getVersion
());
flow
.
setCategory
(
processDefinition
.
getCategory
());
}
flow
.
setCategoryName
(
FlowCache
.
getCategoryName
(
processDefinition
.
getCategory
())
);
flow
.
setCategoryName
(
"工作流程"
);
flow
.
setProcessInstanceId
(
historicTaskInstance
.
getProcessInstanceId
());
flow
.
setHistoryProcessInstanceId
(
historicTaskInstance
.
getProcessInstanceId
());
HistoricProcessInstance
historicProcessInstance
=
historicProcessInstanceMap
.
get
(
historicTaskInstance
.
getProcessInstanceId
());
...
...
@@ -350,7 +350,7 @@ public class FlowForThirdBusinessServiceImpl implements FlowForThirdBusinessServ
ProcessDefinition
processDefinition
=
processDefinitionMap
.
get
(
task
.
getProcessDefinitionId
());
if
(
Func
.
isNotEmpty
(
processDefinition
))
{
flow
.
setCategory
(
processDefinition
.
getCategory
());
flow
.
setCategoryName
(
FlowCache
.
getCategoryName
(
processDefinition
.
getCategory
())
);
flow
.
setCategoryName
(
"工作流程"
);
flow
.
setProcessDefinitionId
(
processDefinition
.
getId
());
flow
.
setProcessDefinitionName
(
processDefinition
.
getName
());
flow
.
setProcessDefinitionKey
(
processDefinition
.
getKey
());
...
...
sk-module-datafill/src/main/java/com/skua/modules/report/controller/ReportElectricCostController.java
查看文件 @
f5a6586
...
...
@@ -18,13 +18,11 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
lombok.extern.slf4j.Slf4j
;
import
org.jeecgframework.poi.excel.ExcelImportUtil
;
import
org.jeecgframework.poi.excel.def.NormalExcelConstants
;
import
org.jeecgframework.poi.excel.entity.ExportParams
;
import
org.jeecgframework.poi.excel.entity.ImportParams
;
import
org.jeecgframework.poi.excel.view.JeecgEntityExcelView
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
...
...
@@ -92,8 +90,17 @@ public class ReportElectricCostController {
public
Result
<
ReportElectricCost
>
add
(
@RequestBody
ReportElectricCost
reportElectricCost
)
{
Result
<
ReportElectricCost
>
result
=
new
Result
<
ReportElectricCost
>();
try
{
//判断是否重复
QueryWrapper
<
ReportElectricCost
>
queryWrapper
=
new
QueryWrapper
<
ReportElectricCost
>();
queryWrapper
.
eq
(
"month"
,
reportElectricCost
.
getMonth
());
queryWrapper
.
eq
(
"depart_id"
,
reportElectricCost
.
getDepartId
());
List
<
ReportElectricCost
>
list
=
reportElectricCostService
.
list
(
queryWrapper
);
if
(
list
.
size
()>
0
){
result
.
error500
(
"已存在"
);
}
else
{
reportElectricCostService
.
save
(
reportElectricCost
);
result
.
success
(
"添加成功!"
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
result
.
error500
(
"操作失败"
);
...
...
@@ -114,17 +121,24 @@ public class ReportElectricCostController {
@PutMapping
(
value
=
"/edit"
)
public
Result
<
ReportElectricCost
>
edit
(
@RequestBody
ReportElectricCost
reportElectricCost
)
{
Result
<
ReportElectricCost
>
result
=
new
Result
<
ReportElectricCost
>();
ReportElectricCost
reportElectricCostEntity
=
reportElectricCostService
.
getById
(
reportElectricCost
.
getId
());
if
(
reportElectricCostEntity
==
null
)
{
result
.
error500
(
"未找到对应实体"
);
}
else
{
boolean
ok
=
reportElectricCostService
.
updateById
(
reportElectricCost
);
//TODO 返回false说明什么?
boolean
ok
=
false
;
String
id
=
reportElectricCost
.
getId
();
//判断是否重复
QueryWrapper
<
ReportElectricCost
>
queryWrapper
=
new
QueryWrapper
<
ReportElectricCost
>();
queryWrapper
.
eq
(
"month"
,
reportElectricCost
.
getMonth
());
queryWrapper
.
eq
(
"depart_id"
,
reportElectricCost
.
getDepartId
());
List
<
ReportElectricCost
>
list
=
reportElectricCostService
.
list
(
queryWrapper
);
if
(
list
.
size
()>
0
){
ReportElectricCost
cost
=
list
.
get
(
0
);
if
(
id
.
equals
(
cost
.
getId
())){
ok
=
reportElectricCostService
.
updateById
(
reportElectricCost
);
}
}
else
{
ok
=
reportElectricCostService
.
updateById
(
reportElectricCost
);
}
if
(
ok
)
{
result
.
success
(
"修改成功!"
);
}
}
return
result
;
}
/**
...
...
sk-module-datafill/src/main/java/com/skua/modules/report/controller/ReportTargetConfigController.java
查看文件 @
f5a6586
...
...
@@ -10,24 +10,19 @@ import javax.servlet.http.HttpServletRequest;
import
javax.servlet.http.HttpServletResponse
;
import
com.skua.core.api.vo.Result
;
import
com.skua.core.aspect.annotation.AutoLog
;
import
com.skua.core.context.BaseContextHandler
;
import
com.skua.core.query.QueryGenerator
;
import
com.skua.core.service.ISequenceService
;
import
com.skua.core.util.ConvertUtils
;
import
com.skua.modules.report.entity.ReportTargetConfig
;
import
com.skua.modules.report.service.IReportTargetConfigService
;
import
java.util.Date
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
lombok.extern.slf4j.Slf4j
;
import
org.jeecgframework.poi.excel.ExcelImportUtil
;
import
org.jeecgframework.poi.excel.def.NormalExcelConstants
;
import
org.jeecgframework.poi.excel.entity.ExportParams
;
import
org.jeecgframework.poi.excel.entity.ImportParams
;
import
org.jeecgframework.poi.excel.view.JeecgEntityExcelView
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
...
...
@@ -81,6 +76,7 @@ public class ReportTargetConfigController {
if
(
reportTargetConfig
.
getTargetYear
()!=
null
){
queryWrapper
.
like
(
"target_year"
,
reportTargetConfig
.
getTargetYear
());
}
queryWrapper
.
orderByDesc
(
"target_year"
);
IPage
<
ReportTargetConfig
>
pageList
=
reportTargetConfigService
.
page
(
page
,
queryWrapper
);
result
.
setSuccess
(
true
);
result
.
setResult
(
pageList
);
...
...
@@ -102,8 +98,17 @@ public class ReportTargetConfigController {
public
Result
<
ReportTargetConfig
>
add
(
@RequestBody
ReportTargetConfig
reportTargetConfig
)
{
Result
<
ReportTargetConfig
>
result
=
new
Result
<
ReportTargetConfig
>();
try
{
//判断是否重复
QueryWrapper
<
ReportTargetConfig
>
queryWrapper
=
new
QueryWrapper
<
ReportTargetConfig
>();
queryWrapper
.
eq
(
"target_year"
,
reportTargetConfig
.
getTargetYear
());
queryWrapper
.
eq
(
"depart_id"
,
reportTargetConfig
.
getDepartId
());
List
<
ReportTargetConfig
>
list
=
reportTargetConfigService
.
list
(
queryWrapper
);
if
(
list
.
size
()>
0
){
result
.
error500
(
"已存在"
);
}
else
{
reportTargetConfigService
.
save
(
reportTargetConfig
);
result
.
success
(
"添加成功!"
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
result
.
error500
(
"操作失败"
);
...
...
@@ -124,17 +129,24 @@ public class ReportTargetConfigController {
@PutMapping
(
value
=
"/edit"
)
public
Result
<
ReportTargetConfig
>
edit
(
@RequestBody
ReportTargetConfig
reportTargetConfig
)
{
Result
<
ReportTargetConfig
>
result
=
new
Result
<
ReportTargetConfig
>();
ReportTargetConfig
reportTargetConfigEntity
=
reportTargetConfigService
.
getById
(
reportTargetConfig
.
getId
());
if
(
reportTargetConfigEntity
==
null
)
{
result
.
error500
(
"未找到对应实体"
);
}
else
{
boolean
ok
=
reportTargetConfigService
.
updateById
(
reportTargetConfig
);
//TODO 返回false说明什么?
boolean
ok
=
false
;
String
id
=
reportTargetConfig
.
getId
();
//判断是否重复
QueryWrapper
<
ReportTargetConfig
>
queryWrapper
=
new
QueryWrapper
<
ReportTargetConfig
>();
queryWrapper
.
eq
(
"target_year"
,
reportTargetConfig
.
getTargetYear
());
queryWrapper
.
eq
(
"depart_id"
,
reportTargetConfig
.
getDepartId
());
List
<
ReportTargetConfig
>
list
=
reportTargetConfigService
.
list
(
queryWrapper
);
if
(
list
.
size
()>
0
){
ReportTargetConfig
cost
=
list
.
get
(
0
);
if
(
id
.
equals
(
cost
.
getId
())){
ok
=
reportTargetConfigService
.
updateById
(
reportTargetConfig
);
}
}
else
{
ok
=
reportTargetConfigService
.
updateById
(
reportTargetConfig
);
}
if
(
ok
)
{
result
.
success
(
"修改成功!"
);
}
}
return
result
;
}
/**
...
...
sk-module-datafill/src/main/java/com/skua/modules/report/mapper/xml/ReportElectricCostMapper.xml
查看文件 @
f5a6586
...
...
@@ -10,6 +10,7 @@
<if
test=
"reportElectricCost.month!=null and reportElectricCost.month!=''"
>
AND month like CONCAT(#{reportElectricCost.month},'%')
</if>
order by month desc
</select>
</mapper>
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论