Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
7c9ac516
由
张雷
编写于
2024-09-05 16:52:31 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
安环禅道问题修改
1 个父辈
d6ca71fe
显示空白字符变更
内嵌
并排
正在显示
20 个修改的文件
包含
208 行增加
和
92 行删除
sk-module-biz/src/main/java/com/skua/modules/emergency/entity/EmergencyPlanDatabase.java
sk-module-biz/src/main/java/com/skua/modules/flow/FlowBussinessDescManageServiceImpl.java
sk-module-biz/src/main/java/com/skua/modules/material/controller/MaterialInfoController.java
sk-module-biz/src/main/java/com/skua/modules/material/entity/MaterialInfo.java
sk-module-biz/src/main/java/com/skua/modules/material/mapper/MaterialInfoMapper.java
sk-module-biz/src/main/java/com/skua/modules/material/mapper/xml/MaterialInfoMapper.xml
sk-module-biz/src/main/java/com/skua/modules/material/service/IMaterialInfoService.java
sk-module-biz/src/main/java/com/skua/modules/material/service/impl/MaterialInfoServiceImpl.java
sk-module-biz/src/main/java/com/skua/modules/safe/controller/safetyProductionManagementController.java → sk-module-biz/src/main/java/com/skua/modules/safe/controller/SafetyProductionManagementController.java
sk-module-biz/src/main/java/com/skua/modules/safe/entity/safetyProductionManagement.java → sk-module-biz/src/main/java/com/skua/modules/safe/entity/SafetyProductionManagement.java
sk-module-biz/src/main/java/com/skua/modules/safe/mapper/safetyProductionManagementMapper.java → sk-module-biz/src/main/java/com/skua/modules/safe/mapper/SafetyProductionManagementMapper.java
sk-module-biz/src/main/java/com/skua/modules/safe/mapper/xml/safetyProductionManagementMapper.xml → sk-module-biz/src/main/java/com/skua/modules/safe/mapper/xml/SafetyProductionManagementMapper.xml
sk-module-biz/src/main/java/com/skua/modules/safe/service/IsafetyProductionManagementService.java → sk-module-biz/src/main/java/com/skua/modules/safe/service/ISafetyProductionManagementService.java
sk-module-biz/src/main/java/com/skua/modules/safe/service/impl/safetyProductionManagementServiceImpl.java → sk-module-biz/src/main/java/com/skua/modules/safe/service/impl/SafetyProductionManagementServiceImpl.java
sk-module-equipment/src/main/java/com/skua/modules/equipment/controller/EquipmentSparepartController.java
sk-module-equipment/src/main/java/com/skua/modules/equipment/entity/EquipmentSparepart.java
sk-module-system/src/main/java/com/skua/modules/system/mapper/SysDepartMapper.java
sk-module-system/src/main/java/com/skua/modules/system/mapper/xml/SysDepartMapper.xml
sk-module-system/src/main/java/com/skua/modules/system/service/ISysDepartService.java
sk-module-system/src/main/java/com/skua/modules/system/service/impl/SysDepartServiceImpl.java
sk-module-biz/src/main/java/com/skua/modules/emergency/entity/EmergencyPlanDatabase.java
查看文件 @
7c9ac51
...
...
@@ -33,6 +33,7 @@ public class EmergencyPlanDatabase{
/**厂站ID(河道-排水管网id)*/
@Excel
(
name
=
"厂站ID"
,
width
=
15
)
@ApiModelProperty
(
value
=
"厂站ID(河道-排水管网id)"
)
@Dict
(
dictTable
=
"sys_depart"
,
dicCode
=
"id"
,
dicText
=
"depart_name"
)
private
String
departId
;
/**编制单位*/
@Excel
(
name
=
"编制单位"
,
width
=
15
)
...
...
sk-module-biz/src/main/java/com/skua/modules/flow/FlowBussinessDescManageServiceImpl.java
查看文件 @
7c9ac51
...
...
@@ -32,7 +32,7 @@ public class FlowBussinessDescManageServiceImpl implements IFlowBusinessDescServ
String
ids
=
tableMap
.
get
(
tableName
).
substring
(
1
);
List
<
String
>
avgIndexCodeArray
=
Arrays
.
asList
(
ids
.
split
(
","
));
String
inSqlPart
=
avgIndexCodeArray
.
stream
().
map
(
s
->
"'"
+
s
.
trim
()+
"'"
).
collect
(
Collectors
.
joining
(
","
));
String
sql
=
"select id,create_by,'
的
镜检申请' as title from check_microscopic_manage where id in("
+
inSqlPart
+
")"
;
String
sql
=
"select id,create_by,'
-
镜检申请' as title from check_microscopic_manage where id in("
+
inSqlPart
+
")"
;
List
<
Map
<
String
,
Object
>>
dataList
=
masterDB
.
queryForList
(
sql
);
for
(
Map
<
String
,
Object
>
dataMap
:
dataList
)
{
resultMap
.
put
(
ConvertUtils
.
getString
(
dataMap
.
get
(
"id"
)),
ConvertUtils
.
getString
(
dataMap
.
get
(
"create_by"
))+
""
+
ConvertUtils
.
getString
(
dataMap
.
get
(
"title"
)));
...
...
@@ -43,13 +43,12 @@ public class FlowBussinessDescManageServiceImpl implements IFlowBusinessDescServ
List
<
String
>
avgIndexCodeArray
=
Arrays
.
asList
(
ids
.
split
(
","
));
String
inSqlPart
=
avgIndexCodeArray
.
stream
().
map
(
s
->
"'"
+
s
.
trim
()+
"'"
).
collect
(
Collectors
.
joining
(
","
));
String
sql
=
"SELECT a.id,"
+
" CONCAT(b.equipment_name,'
维修申请') as title "
+
"FROM
\r\n"
+
" equipment_repair a
\r\n"
+
"LEFT JOIN equipment_info b ON a.info_id = b.id
\r\n"
+
"WHERE
\r\n"
+
" CONCAT(b.equipment_name,'
-维修申请') as title "
+
"FROM
"
+
" equipment_repair a
"
+
"LEFT JOIN equipment_info b ON a.info_id = b.id
"
+
"WHERE
"
+
" a.id in ("
+
inSqlPart
+
")"
;
//String sql = "select id,create_by,'的镜检申请' as title from check_microscopic_manage where id in("+inSqlPart+")";
List
<
Map
<
String
,
Object
>>
dataList
=
masterDB
.
queryForList
(
sql
);
for
(
Map
<
String
,
Object
>
dataMap
:
dataList
)
{
resultMap
.
put
(
ConvertUtils
.
getString
(
dataMap
.
get
(
"id"
)),
ConvertUtils
.
getString
(
dataMap
.
get
(
"title"
)));
...
...
@@ -61,9 +60,9 @@ public class FlowBussinessDescManageServiceImpl implements IFlowBusinessDescServ
String
inSqlPart
=
avgIndexCodeArray
.
stream
().
map
(
s
->
"'"
+
s
.
trim
()
+
"'"
).
collect
(
Collectors
.
joining
(
","
));
String
sql
=
"SELECT a.id,"
+
" CONCAT(problem_name,'-问题上报') as title "
+
"FROM
\r\n
"
+
" problem_report_plan a
\r\n
"
+
"WHERE
\r\n
"
+
"FROM
"
+
" problem_report_plan a
"
+
"WHERE
"
+
" a.id in ("
+
inSqlPart
+
")"
;
List
<
Map
<
String
,
Object
>>
dataList
=
masterDB
.
queryForList
(
sql
);
for
(
Map
<
String
,
Object
>
dataMap
:
dataList
)
{
...
...
@@ -76,9 +75,9 @@ public class FlowBussinessDescManageServiceImpl implements IFlowBusinessDescServ
String
inSqlPart
=
avgIndexCodeArray
.
stream
().
map
(
s
->
"'"
+
s
.
trim
()
+
"'"
).
collect
(
Collectors
.
joining
(
","
));
String
sql
=
"SELECT a.id,"
+
" CONCAT(equipment_name,'-缺陷上报') as title "
+
"FROM
\r\n
"
+
" equipment_defect_management a
\r\n
"
+
"WHERE
\r\n
"
+
"FROM
"
+
" equipment_defect_management a
"
+
"WHERE
"
+
" a.id in ("
+
inSqlPart
+
")"
;
List
<
Map
<
String
,
Object
>>
dataList
=
masterDB
.
queryForList
(
sql
);
for
(
Map
<
String
,
Object
>
dataMap
:
dataList
)
{
...
...
@@ -90,11 +89,10 @@ public class FlowBussinessDescManageServiceImpl implements IFlowBusinessDescServ
List
<
String
>
avgIndexCodeArray
=
Arrays
.
asList
(
ids
.
split
(
","
));
String
inSqlPart
=
avgIndexCodeArray
.
stream
().
map
(
s
->
"'"
+
s
.
trim
()
+
"'"
).
collect
(
Collectors
.
joining
(
","
));
String
sql
=
"SELECT a.id,"
+
" CONCAT(a.risk_name,'-应急风险事件流程') as title "
+
"FROM\r\n"
+
" emergency_risk_event a\r\n"
+
"WHERE\r\n"
+
" CONCAT(a.risk_name,'-应急风险事件') as title "
+
"FROM "
+
" emergency_risk_event a "
+
"WHERE "
+
" a.id in ("
+
inSqlPart
+
")"
;
List
<
Map
<
String
,
Object
>>
dataList
=
masterDB
.
queryForList
(
sql
);
for
(
Map
<
String
,
Object
>
dataMap
:
dataList
)
{
...
...
@@ -108,10 +106,9 @@ public class FlowBussinessDescManageServiceImpl implements IFlowBusinessDescServ
String
inSqlPart
=
avgIndexCodeArray
.
stream
().
map
(
s
->
"'"
+
s
.
trim
()
+
"'"
).
collect
(
Collectors
.
joining
(
","
));
String
sql
=
"SELECT a.id,"
+
" CONCAT((select struct_name from sys_struct_dict where id = a.rec_ord_body),'-安全隐患流程') as title "
+
"FROM\r\n"
+
" ajh_rectification_info a\r\n"
+
"WHERE\r\n"
+
"FROM "
+
" ajh_rectification_info a "
+
"WHERE "
+
" a.id in ("
+
inSqlPart
+
")"
;
List
<
Map
<
String
,
Object
>>
dataList
=
masterDB
.
queryForList
(
sql
);
for
(
Map
<
String
,
Object
>
dataMap
:
dataList
)
{
...
...
@@ -124,9 +121,9 @@ public class FlowBussinessDescManageServiceImpl implements IFlowBusinessDescServ
String
inSqlPart
=
avgIndexCodeArray
.
stream
().
map
(
s
->
"'"
+
s
.
trim
()
+
"'"
).
collect
(
Collectors
.
joining
(
","
));
String
sql
=
"SELECT a.id,"
+
" CONCAT(alarm_param_name,'-报警申请') as title "
+
"FROM
\r\n
"
+
" alarm_record_history a
\r\n
"
+
"WHERE
\r\n
"
+
"FROM
"
+
" alarm_record_history a
"
+
"WHERE
"
+
" a.id in ("
+
inSqlPart
+
")"
;
List
<
Map
<
String
,
Object
>>
dataList
=
masterDB
.
queryForList
(
sql
);
for
(
Map
<
String
,
Object
>
dataMap
:
dataList
)
{
...
...
@@ -139,10 +136,24 @@ public class FlowBussinessDescManageServiceImpl implements IFlowBusinessDescServ
String
inSqlPart
=
avgIndexCodeArray
.
stream
().
map
(
s
->
"'"
+
s
.
trim
()
+
"'"
).
collect
(
Collectors
.
joining
(
","
));
String
sql
=
"SELECT a.id,"
+
" CONCAT(a.task_name,'-生产任务流程') as title "
+
"FROM\r\n"
+
" productive_task a\r\n"
+
"WHERE\r\n"
+
"FROM "
+
" productive_task a "
+
"WHERE "
+
" a.id in ("
+
inSqlPart
+
")"
;
List
<
Map
<
String
,
Object
>>
dataList
=
masterDB
.
queryForList
(
sql
);
for
(
Map
<
String
,
Object
>
dataMap
:
dataList
)
{
resultMap
.
put
(
ConvertUtils
.
getString
(
dataMap
.
get
(
"id"
)),
ConvertUtils
.
getString
(
dataMap
.
get
(
"title"
)));
}
}
else
if
(
tableName
.
equals
(
"data_assessment_socre_master"
))
{
//生产任务
String
ids
=
tableMap
.
get
(
tableName
).
substring
(
1
);
List
<
String
>
avgIndexCodeArray
=
Arrays
.
asList
(
ids
.
split
(
","
));
String
inSqlPart
=
avgIndexCodeArray
.
stream
().
map
(
s
->
"'"
+
s
.
trim
()
+
"'"
).
collect
(
Collectors
.
joining
(
","
));
String
sql
=
"SELECT a.id,"
+
" CONCAT(a.create_by,'-考核评价审批') as title "
+
"FROM "
+
" data_assessment_socre_master a "
+
"WHERE "
+
" a.id in ("
+
inSqlPart
+
")"
;
List
<
Map
<
String
,
Object
>>
dataList
=
masterDB
.
queryForList
(
sql
);
for
(
Map
<
String
,
Object
>
dataMap
:
dataList
)
{
...
...
sk-module-biz/src/main/java/com/skua/modules/material/controller/MaterialInfoController.java
查看文件 @
7c9ac51
...
...
@@ -14,6 +14,7 @@ import com.skua.modules.material.entity.MaterialInfoHandleRecord;
import
com.skua.modules.material.entity.MaterialInformation
;
import
com.skua.modules.material.service.IMaterialInfoHandleRecordService
;
import
com.skua.modules.material.service.IMaterialInfoService
;
import
com.skua.modules.system.service.ISysDepartService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
...
...
@@ -30,6 +31,7 @@ import org.springframework.web.multipart.MultipartFile;
import
org.springframework.web.multipart.MultipartHttpServletRequest
;
import
org.springframework.web.servlet.ModelAndView
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
...
...
@@ -55,6 +57,8 @@ public class MaterialInfoController {
private
IMaterialInfoService
materialInfoService
;
@Autowired
private
IMaterialInfoHandleRecordService
materialInfoHandleRecordService
;
@Resource
private
ISysDepartService
departService
;
/**
* 分页列表查询
...
...
@@ -72,13 +76,15 @@ public class MaterialInfoController {
@RequestParam
(
name
=
"pageNo"
,
defaultValue
=
"1"
)
Integer
pageNo
,
@RequestParam
(
name
=
"pageSize"
,
defaultValue
=
"10"
)
Integer
pageSize
,
HttpServletRequest
req
)
{
String
departIds
=
null
;
Result
<
IPage
<
MaterialInfo
>>
result
=
new
Result
<
IPage
<
MaterialInfo
>>();
QueryWrapper
<
MaterialInfo
>
queryWrapper
=
QueryGenerator
.
initQueryWrapper
(
materialInfo
,
req
.
getParameterMap
());
Page
<
MaterialInfo
>
page
=
new
Page
<
MaterialInfo
>(
pageNo
,
pageSize
);
if
(
StringUtils
.
isBlank
(
materialInfo
.
getDepartId
())&&
StringUtils
.
isNotBlank
(
BaseContextHandler
.
getDeparts
()))
{
queryWrapper
.
in
(
"depart_id"
,
BaseContextHandler
.
getDeparts
().
split
(
","
));
departIds
=
departService
.
getChildDepartId
(
BaseContextHandler
.
getDeparts
());
}
else
{
departIds
=
departService
.
getChildDepartId
(
materialInfo
.
getDepartId
());
}
IPage
<
MaterialInfo
>
pageList
=
materialInfoService
.
page
(
page
,
queryWrapper
);
IPage
<
MaterialInfo
>
pageList
=
materialInfoService
.
getList
(
page
,
materialInfo
,
departIds
);
result
.
setSuccess
(
true
);
result
.
setResult
(
pageList
);
return
result
;
...
...
@@ -292,16 +298,20 @@ public class MaterialInfoController {
/**
* 类型统计查询
*
* @param MaterialInfo
* @param materialInfo
* @return
*/
@AutoLog
(
value
=
"厂区资料管理-类型统计查询"
)
@ApiOperation
(
value
=
"厂区资料管理-类型统计查询"
,
notes
=
"厂区资料管理-类型统计查询"
)
@GetMapping
(
value
=
"/getAnalysis"
)
public
Result
<
List
<
Map
<
String
,
Object
>>>
getAnalysis
(
MaterialInfo
M
aterialInfo
)
{
public
Result
<
List
<
Map
<
String
,
Object
>>>
getAnalysis
(
MaterialInfo
m
aterialInfo
)
{
Result
<
List
<
Map
<
String
,
Object
>>>
result
=
new
Result
<>();
List
<
Map
<
String
,
Object
>>
pageList
=
materialInfoService
.
getAnalysis
(
MaterialInfo
);
if
(
StringUtils
.
isBlank
(
materialInfo
.
getDepartId
())&&
StringUtils
.
isNotBlank
(
BaseContextHandler
.
getDeparts
()))
{
materialInfo
.
setDepartId
(
departService
.
getChildDepartId
(
BaseContextHandler
.
getDeparts
()));
}
else
{
materialInfo
.
setDepartId
(
departService
.
getChildDepartId
(
materialInfo
.
getDepartId
()));
}
List
<
Map
<
String
,
Object
>>
pageList
=
materialInfoService
.
getAnalysis
(
materialInfo
);
result
.
setSuccess
(
true
);
result
.
setResult
(
pageList
);
return
result
;
...
...
@@ -312,8 +322,10 @@ public class MaterialInfoController {
@GetMapping
(
value
=
"/flowStatistics"
)
public
Result
<
List
<
Map
<
String
,
Object
>>>
flowStatistics
(
String
departId
,
String
startTime
,
String
endTime
)
{
Result
<
List
<
Map
<
String
,
Object
>>>
result
=
new
Result
<>();
if
(
StringUtils
.
isEmpty
(
departId
))
{
departId
=
BaseContextHandler
.
getDeparts
();
if
(
StringUtils
.
isBlank
(
departId
)&&
StringUtils
.
isNotBlank
(
BaseContextHandler
.
getDeparts
()))
{
departId
=
departService
.
getChildDepartId
(
BaseContextHandler
.
getDeparts
());
}
else
{
departId
=
departService
.
getChildDepartId
(
departId
);
}
List
<
Map
<
String
,
Object
>>
pageList
=
materialInfoService
.
flowStatistics
(
departId
,
startTime
,
endTime
);
result
.
setSuccess
(
true
);
...
...
sk-module-biz/src/main/java/com/skua/modules/material/entity/MaterialInfo.java
查看文件 @
7c9ac51
...
...
@@ -67,16 +67,42 @@ public class MaterialInfo {
@Excel
(
name
=
"附件地址"
,
width
=
15
)
@ApiModelProperty
(
value
=
"附件地址"
)
private
String
docuAddr
;
/**附件地址*/
@Excel
(
name
=
"厂区Id"
,
width
=
15
)
@ApiModelProperty
(
value
=
"厂区Id"
)
/**所属厂区*/
@Excel
(
name
=
"所属厂区"
,
width
=
15
)
@ApiModelProperty
(
value
=
"所属厂区"
)
@Dict
(
dictTable
=
"sys_depart"
,
dicCode
=
"id"
,
dicText
=
"depart_name"
)
private
String
departId
;
/**内容摘要*/
@ApiModelProperty
(
value
=
"内容摘要"
)
private
String
contentSummary
;
/**文件类型*/
@ApiModelProperty
(
value
=
"文件类型【doc/xls/pdf等等】"
)
private
String
fileType
;
/**文件大小*/
@ApiModelProperty
(
value
=
"文件大小"
)
private
String
fileSize
;
/**制度类型*/
@Dict
(
dicCode
=
"rules_type"
)
@ApiModelProperty
(
value
=
"制度类型"
)
private
String
rulesType
;
/**发布时间*/
@Excel
(
name
=
"发布时间"
,
width
=
15
)
@ApiModelProperty
(
value
=
"发布时间"
)
private
String
releaseTime
;
/**有效时间*/
@Excel
(
name
=
"有效时间"
,
width
=
15
)
@ApiModelProperty
(
value
=
"有效时间"
)
private
String
effectiveTime
;
/**版本号*/
@Excel
(
name
=
"版本号"
,
width
=
15
)
@ApiModelProperty
(
value
=
"版本号"
)
private
String
fileVersion
;
/**所属部门*/
@Excel
(
name
=
"所属部门"
,
width
=
15
)
@ApiModelProperty
(
value
=
"所属部门"
)
private
String
fileDepart
;
/**修订过程*/
@Excel
(
name
=
"修订过程"
,
width
=
15
)
@ApiModelProperty
(
value
=
"修订过程"
)
private
String
updateHistory
;
}
...
...
sk-module-biz/src/main/java/com/skua/modules/material/mapper/MaterialInfoMapper.java
查看文件 @
7c9ac51
...
...
@@ -28,4 +28,6 @@ public interface MaterialInfoMapper extends BaseMapper<MaterialInfo> {
* @Description: TODO(这里描述这个方法的需求变更情况)
*/
List
<
Map
<
String
,
Object
>>
flowStatistics
(
String
departId
,
String
startTime
,
String
endTime
);
List
<
MaterialInfo
>
getList
(
@Param
(
"materialInfo"
)
MaterialInfo
materialInfo
,
@Param
(
"departIds"
)
String
departIds
);
}
...
...
sk-module-biz/src/main/java/com/skua/modules/material/mapper/xml/MaterialInfoMapper.xml
查看文件 @
7c9ac51
...
...
@@ -53,5 +53,20 @@
GROUP BY
b.create_time,b.handle_type
</select>
<select
id=
"getList"
resultType=
"com.skua.modules.material.entity.MaterialInfo"
>
select * from material_info
where del_flag = 0
<if
test=
"departIds!=null and departIds!=''"
>
and depart_id in
<foreach
item=
"item"
index=
"index"
collection=
"departIds.split(',')"
open=
"("
separator=
","
close=
")"
>
'${item}'
</foreach>
</if>
<if
test=
"materialInfo.facInformationtype!=null and materialInfo.facInformationtype!=''"
>
and fac_informationtype = #{materialInfo.facInformationtype}
</if>
<if
test=
"materialInfo.facInformationName!=null and materialInfo.facInformationName!=''"
>
and fac_information_name like CONCAT(CONCAT('%', #{materialInfo.facInformationName}),'%')
</if>
</select>
</mapper>
...
...
sk-module-biz/src/main/java/com/skua/modules/material/service/IMaterialInfoService.java
查看文件 @
7c9ac51
package
com
.
skua
.
modules
.
material
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.skua.modules.material.entity.MaterialInfo
;
...
...
@@ -40,4 +42,6 @@ public interface IMaterialInfoService extends IService<MaterialInfo> {
* @Description: TODO(这里描述这个方法的需求变更情况)
*/
List
<
Map
<
String
,
Object
>>
flowStatistics
(
String
departId
,
String
startTime
,
String
endTime
);
IPage
<
MaterialInfo
>
getList
(
Page
<
MaterialInfo
>
page
,
MaterialInfo
materialInfo
,
String
departIds
);
}
...
...
sk-module-biz/src/main/java/com/skua/modules/material/service/impl/MaterialInfoServiceImpl.java
查看文件 @
7c9ac51
package
com
.
skua
.
modules
.
material
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.skua.core.util.ConvertUtils
;
import
com.skua.core.util.DateUtils
;
...
...
@@ -62,4 +64,11 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
}
return
resultList
;
}
@Override
public
IPage
<
MaterialInfo
>
getList
(
Page
<
MaterialInfo
>
page
,
MaterialInfo
materialInfo
,
String
departIds
)
{
List
<
MaterialInfo
>
list
=
baseMapper
.
getList
(
materialInfo
,
departIds
);
page
.
setRecords
(
list
);
return
page
;
}
}
...
...
sk-module-biz/src/main/java/com/skua/modules/safe/controller/
s
afetyProductionManagementController.java
→
sk-module-biz/src/main/java/com/skua/modules/safe/controller/
S
afetyProductionManagementController.java
查看文件 @
7c9ac51
...
...
@@ -13,9 +13,8 @@ import cn.hutool.core.util.StrUtil;
import
com.skua.core.api.vo.Result
;
import
com.skua.core.aspect.annotation.AutoLog
;
import
com.skua.core.query.QueryGenerator
;
import
com.skua.modules.safe.entity.safetyProductionManagement
;
import
com.skua.modules.safe.service.IsafetyProductionManagementService
;
import
java.util.Date
;
import
com.skua.modules.safe.entity.SafetyProductionManagement
;
import
com.skua.modules.safe.service.ISafetyProductionManagementService
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -43,9 +42,9 @@ import io.swagger.annotations.ApiOperation;
@Api
(
tags
=
"安全生产管理"
)
@RestController
@RequestMapping
(
"/safe/safetyProductionManagement"
)
public
class
s
afetyProductionManagementController
{
public
class
S
afetyProductionManagementController
{
@Autowired
private
I
s
afetyProductionManagementService
safetyProductionManagementService
;
private
I
S
afetyProductionManagementService
safetyProductionManagementService
;
/**
* 分页列表查询
...
...
@@ -58,14 +57,14 @@ public class safetyProductionManagementController {
@AutoLog
(
value
=
"安全生产管理-分页列表查询"
)
@ApiOperation
(
value
=
"安全生产管理-分页列表查询"
,
notes
=
"安全生产管理-分页列表查询"
)
@GetMapping
(
value
=
"/list"
)
public
Result
<
IPage
<
safetyProductionManagement
>>
queryPageList
(
s
afetyProductionManagement
safetyProductionManagement
,
public
Result
<
IPage
<
SafetyProductionManagement
>>
queryPageList
(
S
afetyProductionManagement
safetyProductionManagement
,
@RequestParam
(
name
=
"pageNo"
,
defaultValue
=
"1"
)
Integer
pageNo
,
@RequestParam
(
name
=
"pageSize"
,
defaultValue
=
"10"
)
Integer
pageSize
,
HttpServletRequest
req
)
{
Result
<
IPage
<
safetyProductionManagement
>>
result
=
new
Result
<
IPage
<
s
afetyProductionManagement
>>();
QueryWrapper
<
s
afetyProductionManagement
>
queryWrapper
=
QueryGenerator
.
initQueryWrapper
(
safetyProductionManagement
,
req
.
getParameterMap
());
Page
<
safetyProductionManagement
>
page
=
new
Page
<
s
afetyProductionManagement
>(
pageNo
,
pageSize
);
IPage
<
s
afetyProductionManagement
>
pageList
=
safetyProductionManagementService
.
page
(
page
,
queryWrapper
);
Result
<
IPage
<
SafetyProductionManagement
>>
result
=
new
Result
<
IPage
<
S
afetyProductionManagement
>>();
QueryWrapper
<
S
afetyProductionManagement
>
queryWrapper
=
QueryGenerator
.
initQueryWrapper
(
safetyProductionManagement
,
req
.
getParameterMap
());
Page
<
SafetyProductionManagement
>
page
=
new
Page
<
S
afetyProductionManagement
>(
pageNo
,
pageSize
);
IPage
<
S
afetyProductionManagement
>
pageList
=
safetyProductionManagementService
.
page
(
page
,
queryWrapper
);
result
.
setSuccess
(
true
);
result
.
setResult
(
pageList
);
return
result
;
...
...
@@ -79,8 +78,8 @@ public class safetyProductionManagementController {
@AutoLog
(
value
=
"安全生产管理-添加"
)
@ApiOperation
(
value
=
"安全生产管理-添加"
,
notes
=
"安全生产管理-添加"
)
@PostMapping
(
value
=
"/add"
)
public
Result
<
safetyProductionManagement
>
add
(
@RequestBody
s
afetyProductionManagement
safetyProductionManagement
)
{
Result
<
safetyProductionManagement
>
result
=
new
Result
<
s
afetyProductionManagement
>();
public
Result
<
SafetyProductionManagement
>
add
(
@RequestBody
S
afetyProductionManagement
safetyProductionManagement
)
{
Result
<
SafetyProductionManagement
>
result
=
new
Result
<
S
afetyProductionManagement
>();
try
{
safetyProductionManagementService
.
save
(
safetyProductionManagement
);
result
.
success
(
"添加成功!"
);
...
...
@@ -99,9 +98,9 @@ public class safetyProductionManagementController {
@AutoLog
(
value
=
"安全生产管理-编辑"
)
@ApiOperation
(
value
=
"安全生产管理-编辑"
,
notes
=
"安全生产管理-编辑"
)
@PutMapping
(
value
=
"/edit"
)
public
Result
<
safetyProductionManagement
>
edit
(
@RequestBody
s
afetyProductionManagement
safetyProductionManagement
)
{
Result
<
safetyProductionManagement
>
result
=
new
Result
<
s
afetyProductionManagement
>();
s
afetyProductionManagement
safetyProductionManagementEntity
=
safetyProductionManagementService
.
getById
(
safetyProductionManagement
.
getId
());
public
Result
<
SafetyProductionManagement
>
edit
(
@RequestBody
S
afetyProductionManagement
safetyProductionManagement
)
{
Result
<
SafetyProductionManagement
>
result
=
new
Result
<
S
afetyProductionManagement
>();
S
afetyProductionManagement
safetyProductionManagementEntity
=
safetyProductionManagementService
.
getById
(
safetyProductionManagement
.
getId
());
if
(
safetyProductionManagementEntity
==
null
)
{
result
.
error500
(
"未找到对应实体"
);
}
else
{
...
...
@@ -141,8 +140,8 @@ public class safetyProductionManagementController {
@AutoLog
(
value
=
"安全生产管理-批量删除"
)
@ApiOperation
(
value
=
"安全生产管理-批量删除"
,
notes
=
"安全生产管理-批量删除"
)
@DeleteMapping
(
value
=
"/deleteBatch"
)
public
Result
<
s
afetyProductionManagement
>
deleteBatch
(
@RequestParam
(
name
=
"ids"
,
required
=
true
)
String
ids
)
{
Result
<
safetyProductionManagement
>
result
=
new
Result
<
s
afetyProductionManagement
>();
public
Result
<
S
afetyProductionManagement
>
deleteBatch
(
@RequestParam
(
name
=
"ids"
,
required
=
true
)
String
ids
)
{
Result
<
SafetyProductionManagement
>
result
=
new
Result
<
S
afetyProductionManagement
>();
if
(
ids
==
null
||
""
.
equals
(
ids
.
trim
()))
{
result
.
error500
(
"参数不识别!"
);
}
else
{
...
...
@@ -160,9 +159,9 @@ public class safetyProductionManagementController {
@AutoLog
(
value
=
"安全生产管理-通过id查询"
)
@ApiOperation
(
value
=
"安全生产管理-通过id查询"
,
notes
=
"安全生产管理-通过id查询"
)
@GetMapping
(
value
=
"/queryById"
)
public
Result
<
s
afetyProductionManagement
>
queryById
(
@RequestParam
(
name
=
"id"
,
required
=
true
)
String
id
)
{
Result
<
safetyProductionManagement
>
result
=
new
Result
<
s
afetyProductionManagement
>();
s
afetyProductionManagement
safetyProductionManagement
=
safetyProductionManagementService
.
getById
(
id
);
public
Result
<
S
afetyProductionManagement
>
queryById
(
@RequestParam
(
name
=
"id"
,
required
=
true
)
String
id
)
{
Result
<
SafetyProductionManagement
>
result
=
new
Result
<
S
afetyProductionManagement
>();
S
afetyProductionManagement
safetyProductionManagement
=
safetyProductionManagementService
.
getById
(
id
);
if
(
safetyProductionManagement
==
null
)
{
result
.
error500
(
"未找到对应实体"
);
}
else
{
...
...
@@ -181,12 +180,12 @@ public class safetyProductionManagementController {
@RequestMapping
(
value
=
"/exportXls"
)
public
ModelAndView
exportXls
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
// Step.1 组装查询条件
QueryWrapper
<
s
afetyProductionManagement
>
queryWrapper
=
null
;
QueryWrapper
<
S
afetyProductionManagement
>
queryWrapper
=
null
;
try
{
String
paramsStr
=
request
.
getParameter
(
"paramsStr"
);
if
(
StrUtil
.
isNotEmpty
(
paramsStr
))
{
String
deString
=
URLDecoder
.
decode
(
paramsStr
,
"UTF-8"
);
safetyProductionManagement
safetyProductionManagement
=
JSON
.
parseObject
(
deString
,
s
afetyProductionManagement
.
class
);
SafetyProductionManagement
safetyProductionManagement
=
JSON
.
parseObject
(
deString
,
S
afetyProductionManagement
.
class
);
queryWrapper
=
QueryGenerator
.
initQueryWrapper
(
safetyProductionManagement
,
request
.
getParameterMap
());
}
}
catch
(
UnsupportedEncodingException
e
)
{
...
...
@@ -195,10 +194,10 @@ public class safetyProductionManagementController {
//Step.2 AutoPoi 导出Excel
ModelAndView
mv
=
new
ModelAndView
(
new
JeecgEntityExcelView
());
List
<
s
afetyProductionManagement
>
pageList
=
safetyProductionManagementService
.
list
(
queryWrapper
);
List
<
S
afetyProductionManagement
>
pageList
=
safetyProductionManagementService
.
list
(
queryWrapper
);
//导出文件名称
mv
.
addObject
(
NormalExcelConstants
.
FILE_NAME
,
"安全生产管理列表"
);
mv
.
addObject
(
NormalExcelConstants
.
CLASS
,
s
afetyProductionManagement
.
class
);
mv
.
addObject
(
NormalExcelConstants
.
CLASS
,
S
afetyProductionManagement
.
class
);
mv
.
addObject
(
NormalExcelConstants
.
PARAMS
,
new
ExportParams
(
"安全生产管理列表数据"
,
"导出人:Jeecg"
,
"导出信息"
));
mv
.
addObject
(
NormalExcelConstants
.
DATA_LIST
,
pageList
);
return
mv
;
...
...
@@ -222,7 +221,7 @@ public class safetyProductionManagementController {
params
.
setHeadRows
(
1
);
params
.
setNeedSave
(
true
);
try
{
List
<
safetyProductionManagement
>
listsafetyProductionManagements
=
ExcelImportUtil
.
importExcel
(
file
.
getInputStream
(),
s
afetyProductionManagement
.
class
,
params
);
List
<
SafetyProductionManagement
>
listsafetyProductionManagements
=
ExcelImportUtil
.
importExcel
(
file
.
getInputStream
(),
S
afetyProductionManagement
.
class
,
params
);
safetyProductionManagementService
.
saveBatch
(
listsafetyProductionManagements
);
return
Result
.
ok
(
"文件导入成功!数据行数:"
+
listsafetyProductionManagements
.
size
());
}
catch
(
Exception
e
)
{
...
...
sk-module-biz/src/main/java/com/skua/modules/safe/entity/
s
afetyProductionManagement.java
→
sk-module-biz/src/main/java/com/skua/modules/safe/entity/
S
afetyProductionManagement.java
查看文件 @
7c9ac51
...
...
@@ -25,7 +25,7 @@ import org.jeecgframework.poi.excel.annotation.Excel;
@EqualsAndHashCode
(
callSuper
=
false
)
@Accessors
(
chain
=
true
)
@ApiModel
(
value
=
"safety_production_management对象"
,
description
=
"安全生产管理"
)
public
class
s
afetyProductionManagement
{
public
class
S
afetyProductionManagement
{
/**id*/
@TableId
(
type
=
IdType
.
UUID
)
...
...
sk-module-biz/src/main/java/com/skua/modules/safe/mapper/
s
afetyProductionManagementMapper.java
→
sk-module-biz/src/main/java/com/skua/modules/safe/mapper/
S
afetyProductionManagementMapper.java
查看文件 @
7c9ac51
package
com
.
skua
.
modules
.
safe
.
mapper
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
import
com.skua.modules.safe.entity.safetyProductionManagement
;
import
com.skua.modules.safe.entity.SafetyProductionManagement
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* 安全生产管理
*/
public
interface
safetyProductionManagementMapper
extends
BaseMapper
<
s
afetyProductionManagement
>
{
public
interface
SafetyProductionManagementMapper
extends
BaseMapper
<
S
afetyProductionManagement
>
{
}
...
...
sk-module-biz/src/main/java/com/skua/modules/safe/mapper/xml/
s
afetyProductionManagementMapper.xml
→
sk-module-biz/src/main/java/com/skua/modules/safe/mapper/xml/
S
afetyProductionManagementMapper.xml
查看文件 @
7c9ac51
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.skua.modules.safe.mapper.
s
afetyProductionManagementMapper"
>
<mapper
namespace=
"com.skua.modules.safe.mapper.
S
afetyProductionManagementMapper"
>
</mapper>
...
...
sk-module-biz/src/main/java/com/skua/modules/safe/service/I
s
afetyProductionManagementService.java
→
sk-module-biz/src/main/java/com/skua/modules/safe/service/I
S
afetyProductionManagementService.java
查看文件 @
7c9ac51
package
com
.
skua
.
modules
.
safe
.
service
;
import
com.skua.modules.safe.entity.
s
afetyProductionManagement
;
import
com.skua.modules.safe.entity.
S
afetyProductionManagement
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* 安全生产管理
*/
public
interface
I
safetyProductionManagementService
extends
IService
<
s
afetyProductionManagement
>
{
public
interface
I
SafetyProductionManagementService
extends
IService
<
S
afetyProductionManagement
>
{
}
...
...
sk-module-biz/src/main/java/com/skua/modules/safe/service/impl/
s
afetyProductionManagementServiceImpl.java
→
sk-module-biz/src/main/java/com/skua/modules/safe/service/impl/
S
afetyProductionManagementServiceImpl.java
查看文件 @
7c9ac51
package
com
.
skua
.
modules
.
safe
.
service
.
impl
;
import
com.skua.modules.safe.entity.
s
afetyProductionManagement
;
import
com.skua.modules.safe.mapper.
s
afetyProductionManagementMapper
;
import
com.skua.modules.safe.service.I
s
afetyProductionManagementService
;
import
com.skua.modules.safe.entity.
S
afetyProductionManagement
;
import
com.skua.modules.safe.mapper.
S
afetyProductionManagementMapper
;
import
com.skua.modules.safe.service.I
S
afetyProductionManagementService
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
...
...
@@ -11,6 +11,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
* 安全生产管理
*/
@Service
public
class
safetyProductionManagementServiceImpl
extends
ServiceImpl
<
safetyProductionManagementMapper
,
safetyProductionManagement
>
implements
Is
afetyProductionManagementService
{
public
class
SafetyProductionManagementServiceImpl
extends
ServiceImpl
<
SafetyProductionManagementMapper
,
SafetyProductionManagement
>
implements
IS
afetyProductionManagementService
{
}
...
...
sk-module-equipment/src/main/java/com/skua/modules/equipment/controller/EquipmentSparepartController.java
查看文件 @
7c9ac51
...
...
@@ -220,8 +220,7 @@ public class EquipmentSparepartController {
@GetMapping
(
value
=
"/list"
)
public
Result
<
IPage
<
EquipmentSparepartVO
>>
queryPageList
(
EquipmentSparepartDTO
equipmentSparepartDTO
,
@RequestParam
(
name
=
"pageNo"
,
defaultValue
=
"1"
)
Integer
pageNo
,
@RequestParam
(
name
=
"pageSize"
,
defaultValue
=
"10"
)
Integer
pageSize
,
HttpServletRequest
req
)
throws
Exception
{
@RequestParam
(
name
=
"pageSize"
,
defaultValue
=
"10"
)
Integer
pageSize
)
throws
Exception
{
Result
<
IPage
<
EquipmentSparepartVO
>>
result
=
new
Result
<>();
Page
page
=
new
Page
(
pageNo
,
pageSize
);
Set
<
String
>
sparepartTypeSet
=
new
HashSet
<>();
...
...
@@ -253,15 +252,15 @@ public class EquipmentSparepartController {
.
like
(
StringUtils
.
isNotEmpty
(
equipmentSparepartDTO
.
getSparepartCode
()),
"equipment_sparepart_supplies.sparepart_code"
,
equipmentSparepartDTO
.
getSparepartCode
())
.
like
(
StringUtils
.
isNotEmpty
(
equipmentSparepartDTO
.
getSpecification
()),
"equipment_sparepart_supplies.specification"
,
equipmentSparepartDTO
.
getSpecification
())
.
like
(
StringUtils
.
isNotEmpty
(
equipmentSparepartDTO
.
getSparepartName
()),
"equipment_sparepart_supplies.sparepart_name"
,
equipmentSparepartDTO
.
getSparepartName
())
.
like
(
StringUtils
.
isNotEmpty
(
equipmentSparepartDTO
.
getIsEmergency
()),
"equipment_sparepart.is_emergency"
,
equipmentSparepartDTO
.
getIsEmergency
())
.
like
(
StringUtils
.
isNotEmpty
(
equipmentSparepartDTO
.
getIsDangerous
()),
"equipment_sparepart.is_dangerous"
,
equipmentSparepartDTO
.
getIsDangerous
())
.
in
(!
sparepartTypeSet
.
isEmpty
(),
"equipment_sparepart_supplies.sparepart_type"
,
sparepartTypeSet
)
.
like
(
StringUtils
.
isNotEmpty
(
equipmentSparepartDTO
.
getWarehouseName
()),
"warehouse_name"
,
equipmentSparepartDTO
.
getWarehouseName
())
.
like
(
StringUtils
.
isNotEmpty
(
equipmentSparepartDTO
.
getSuppliesWarehouseId
()),
"supplies_warehouse_id"
,
equipmentSparepartDTO
.
getSuppliesWarehouseId
())
.
between
(
StringUtils
.
isNotEmpty
(
equipmentSparepartDTO
.
getStartTime
())
&&
StringUtils
.
isNotEmpty
(
equipmentSparepartDTO
.
getEndTime
()),
"inventory_update_time"
,
equipmentSparepartDTO
.
getStartTime
(),
equipmentSparepartDTO
.
getEndTime
())
.
apply
(
"库存不足"
.
equals
(
equipmentSparepartDTO
.
getStorageWarn
()),
"equipment_sparepart_supplies.storage_num < equipment_sparepart_supplies.storage_min_num"
)
.
apply
(
"库存过量"
.
equals
(
equipmentSparepartDTO
.
getStorageWarn
()),
"equipment_sparepart.equipment_sparepart_supplies > equipment_sparepart_supplies.storage_max_num"
)
// .orderBy(true, false, "update_time")
.
orderBy
(
true
,
false
,
"equipment_sparepart.inventory_update_time"
).
queryForPage
(
page
);
//.selectMapsPage(page);
Map
<
String
,
String
>
equipmentSparepartTypeVal2KeyMap
=
key2ValueService
.
dictKey2Val
(
"equipmentSparepartType"
,
false
);
Map
<
String
,
String
>
suppliesWarehouseVal2KeyMap
=
key2ValueService
.
dictKey2Val
(
"suppliesWarehouse"
,
false
);
Map
<
String
,
String
>
departInfoVal2KeyMap
=
key2ValueService
.
dictKey2Val
(
"sysDepart"
,
false
);
...
...
@@ -269,10 +268,8 @@ public class EquipmentSparepartController {
JdbcTemplate
masterDB
=
(
JdbcTemplate
)
SpringContextUtils
.
getBean
(
"master"
);
//品牌厂商
//List<Map<String, Object>> purchaseSupplierMapList = masterDB.queryForList("select * from purchase_supplier");
List
<
Map
<
String
,
Object
>>
purchaseSupplierMapList
=
masterDB
.
queryForList
(
"select * from equipment_brand"
);
Map
<
String
,
String
>
manufacturerMap
=
purchaseSupplierMapList
.
stream
().
collect
(
Collectors
.
toMap
(
item
->
""
+
item
.
get
(
"id"
),
item
->
""
+
item
.
get
(
"brand_company"
)));
List
<
Map
<
String
,
Object
>>
convertMapList
=
WrapperFactory
.
result
()
.
addCallback
(
"EquipmentSparepartSupplies_sparepartType"
,
"sparepartType_dictText"
)
...
...
sk-module-equipment/src/main/java/com/skua/modules/equipment/entity/EquipmentSparepart.java
查看文件 @
7c9ac51
...
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.skua.core.aspect.annotation.Dict
;
import
com.skua.tool.annotation.BeanAnno
;
import
com.skua.tool.annotation.JoinSqlQueryAnno
;
import
com.skua.tool.enums.JoinSqlQueryEnum
;
...
...
@@ -223,11 +224,23 @@ public class EquipmentSparepart {
@ApiModelProperty
(
value
=
"仓库id"
)
private
String
suppliesWarehouseId
;
//
/**
// * 厂站id
//
*/
@Excel
(
name
=
"
厂站id
"
,
width
=
15
)
@ApiModelProperty
(
value
=
"
厂站id
"
)
/**
* 所属厂站
*/
@Excel
(
name
=
"
所属厂站
"
,
width
=
15
)
@ApiModelProperty
(
value
=
"
所属厂站
"
)
private
String
departId
;
/** 是否应急物资 */
@Excel
(
name
=
"是否应急物资"
,
width
=
15
)
@ApiModelProperty
(
value
=
"是否应急物资"
)
@Dict
(
dicCode
=
"yn"
)
private
String
isEmergency
;
/** 是否危化品 */
@Excel
(
name
=
"是否危化品"
,
width
=
15
)
@ApiModelProperty
(
value
=
"是否危化品"
)
@Dict
(
dicCode
=
"yn"
)
private
String
isDangerous
;
}
...
...
sk-module-system/src/main/java/com/skua/modules/system/mapper/SysDepartMapper.java
查看文件 @
7c9ac51
...
...
@@ -138,4 +138,6 @@ public interface SysDepartMapper extends BaseMapper<SysDepart> {
String
getDepartTreeByParentDepartId
(
@Param
(
"parentDepartId"
)
String
parentDepartId
);
List
<
DepartTree
>
getJimuDepartTree
(
@Param
(
"pid"
)
String
pid
);
String
getChildDepartId
(
@Param
(
"departIds"
)
String
departIds
);
}
...
...
sk-module-system/src/main/java/com/skua/modules/system/mapper/xml/SysDepartMapper.xml
查看文件 @
7c9ac51
...
...
@@ -111,6 +111,7 @@
<select
id=
"getCenterByJt"
resultType=
"com.skua.modules.system.entity.SysDepart"
>
select * from sys_depart where org_type = 3 and org_code like CONCAT(#{orgCode},'%') ORDER BY depart_order
</select>
<select
id=
"getCenterAllList"
parameterType=
"java.util.List"
resultType=
"com.skua.modules.system.entity.SysDepart"
>
SELECT
id,
...
...
@@ -202,4 +203,24 @@
where parent_id = #{pid}
ORDER BY depart_order
</select>
<select
id=
"getChildDepartId"
resultType=
"java.lang.String"
>
SELECT
GROUP_CONCAT( id SEPARATOR ',' ) AS depart_ids
FROM
sys_depart
WHERE
parent_id IN
<foreach
item=
"item"
index=
"index"
collection=
"departIds.split(',')"
open=
"("
separator=
","
close=
")"
>
'${item}'
</foreach>
OR id IN
<foreach
item=
"item"
index=
"index"
collection=
"departIds.split(',')"
open=
"("
separator=
","
close=
")"
>
'${item}'
</foreach>
OR parent_id IN ( SELECT id FROM sys_depart WHERE parent_id IN
<foreach
item=
"item"
index=
"index"
collection=
"departIds.split(',')"
open=
"("
separator=
","
close=
")"
>
'${item}'
</foreach>
)
</select>
</mapper>
...
...
sk-module-system/src/main/java/com/skua/modules/system/service/ISysDepartService.java
查看文件 @
7c9ac51
...
...
@@ -168,4 +168,6 @@ public interface ISysDepartService extends IService<SysDepart>{
String
getDepartTreeByParentDepartId
(
String
parentDepartId
);
List
<
DepartTree
>
getJimuDepartTree
(
String
pid
);
String
getChildDepartId
(
String
departIds
);
}
...
...
sk-module-system/src/main/java/com/skua/modules/system/service/impl/SysDepartServiceImpl.java
查看文件 @
7c9ac51
...
...
@@ -447,4 +447,9 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart
return
list
;
}
@Override
public
String
getChildDepartId
(
String
departIds
)
{
return
sysDepartMapper
.
getChildDepartId
(
departIds
);
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论