Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
ea60ab98
由
康伟
编写于
2024-11-20 11:07:44 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
kangwei:
法律法规模块、标准规范模块修改-后端
1 个父辈
5700fca7
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
155 行增加
和
16 行删除
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-system/src/main/java/com/skua/config/mybatis/MybatisInterceptor.java
sk-module-biz/src/main/java/com/skua/modules/material/controller/MaterialInfoController.java
查看文件 @
ea60ab9
...
...
@@ -9,12 +9,15 @@ import com.skua.core.aspect.annotation.AutoLog;
import
com.skua.core.context.BaseContextHandler
;
import
com.skua.core.query.QueryGenerator
;
import
com.skua.core.util.DateUtils
;
import
com.skua.modules.erp.entity.ErpSettlement
;
import
com.skua.modules.erp.vo.PurchaseContractVO
;
import
com.skua.modules.material.entity.MaterialInfo
;
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
com.skua.tool.util.JSUtils
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
...
...
@@ -37,10 +40,7 @@ import javax.servlet.http.HttpServletResponse;
import
java.io.IOException
;
import
java.io.UnsupportedEncodingException
;
import
java.net.URLDecoder
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
/**
* <pre>
...
...
@@ -75,20 +75,118 @@ public class MaterialInfoController {
public
Result
<
IPage
<
MaterialInfo
>>
queryPageList
(
MaterialInfo
materialInfo
,
@RequestParam
(
name
=
"pageNo"
,
defaultValue
=
"1"
)
Integer
pageNo
,
@RequestParam
(
name
=
"pageSize"
,
defaultValue
=
"10"
)
Integer
pageSize
)
{
String
departIds
=
null
;
Result
<
IPage
<
MaterialInfo
>>
result
=
new
Result
<
IPage
<
MaterialInfo
>>();
Page
<
MaterialInfo
>
page
=
new
Page
<
MaterialInfo
>(
pageNo
,
pageSize
);
/* String departIds = null;
if (StringUtils.isBlank(materialInfo.getDepartId())&&StringUtils.isNotBlank(BaseContextHandler.getDeparts())) {
departIds = departService.getChildDepartId(BaseContextHandler.getDeparts());
}else{
departIds = departService.getChildDepartId(materialInfo.getDepartId());
}
IPage<MaterialInfo> pageList = materialInfoService.getList(page, materialInfo, departIds);
*/
Result
<
IPage
<
MaterialInfo
>>
result
=
new
Result
<
IPage
<
MaterialInfo
>>();
Page
<
MaterialInfo
>
page
=
new
Page
<
MaterialInfo
>(
pageNo
,
pageSize
);
QueryWrapper
<
MaterialInfo
>
queryWrapper
=
getMaterialInfoQueryWrapper
(
materialInfo
);
queryWrapper
.
eq
(
"status"
,
"3"
);
IPage
<
MaterialInfo
>
pageList
=
materialInfoService
.
page
(
page
,
queryWrapper
);
result
.
setSuccess
(
true
);
result
.
setResult
(
pageList
);
return
result
;
}
@AutoLog
(
value
=
"厂区资料管理-法律法规分页列表"
)
@ApiOperation
(
value
=
"厂区资料管理-法律法规分页列表"
,
notes
=
"厂区资料管理-法律法规分页列表"
)
@GetMapping
(
value
=
"/list"
)
public
Result
<
IPage
<
MaterialInfo
>>
queryFLFGPageList
(
MaterialInfo
materialInfo
,
@RequestParam
(
name
=
"pageNo"
,
defaultValue
=
"1"
)
Integer
pageNo
,
@RequestParam
(
name
=
"pageSize"
,
defaultValue
=
"10"
)
Integer
pageSize
)
{
Result
<
IPage
<
MaterialInfo
>>
result
=
new
Result
<
IPage
<
MaterialInfo
>>();
Page
<
MaterialInfo
>
page
=
new
Page
<
MaterialInfo
>(
pageNo
,
pageSize
);
QueryWrapper
<
MaterialInfo
>
queryWrapper
=
new
QueryWrapper
();
queryWrapper
.
eq
(
"del_flag"
,
"0"
);
if
(
StringUtils
.
isNotEmpty
(
materialInfo
.
getFacInformationName
())){
queryWrapper
.
like
(
"fac_information_name"
,
materialInfo
.
getFacInformationName
());
}
if
(
StringUtils
.
isNotEmpty
(
materialInfo
.
getRulesType
())){
queryWrapper
.
eq
(
"rules_type"
,
materialInfo
.
getRulesType
());
}
if
(
StringUtils
.
isNotEmpty
(
materialInfo
.
getLawsType
())){
queryWrapper
.
eq
(
"laws_type"
,
materialInfo
.
getLawsType
());
}
if
(
StringUtils
.
isNotEmpty
(
materialInfo
.
getStandardsType
())){
queryWrapper
.
eq
(
"standards_type"
,
materialInfo
.
getStandardsType
());
}
queryWrapper
.
eq
(
"status"
,
"3"
);
IPage
<
MaterialInfo
>
pageList
=
materialInfoService
.
page
(
page
,
queryWrapper
);
result
.
setSuccess
(
true
);
result
.
setResult
(
pageList
);
return
result
;
}
@AutoLog
(
value
=
"厂区资料管理-待审核列表"
)
@ApiOperation
(
value
=
"厂区资料管理-待审核列表"
,
notes
=
"厂区资料管理-待审核列表"
)
@GetMapping
(
value
=
"/unAuditList"
)
public
Result
<
IPage
<
MaterialInfo
>>
queryUnAuditPageList
(
MaterialInfo
materialInfo
,
@RequestParam
(
name
=
"pageNo"
,
defaultValue
=
"1"
)
Integer
pageNo
,
@RequestParam
(
name
=
"pageSize"
,
defaultValue
=
"10"
)
Integer
pageSize
)
{
Result
<
IPage
<
MaterialInfo
>>
result
=
new
Result
<
IPage
<
MaterialInfo
>>();
Page
<
MaterialInfo
>
page
=
new
Page
<
MaterialInfo
>(
pageNo
,
pageSize
);
QueryWrapper
<
MaterialInfo
>
queryWrapper
=
getMaterialInfoQueryWrapper
(
materialInfo
);
queryWrapper
.
in
(
"status"
,
"'1','2'"
);
IPage
<
MaterialInfo
>
pageList
=
materialInfoService
.
page
(
page
,
queryWrapper
);
result
.
setSuccess
(
true
);
result
.
setResult
(
pageList
);
return
result
;
}
@AutoLog
(
value
=
"厂区资料管理-我的"
)
@ApiOperation
(
value
=
"厂区资料管理-我的"
,
notes
=
"厂区资料管理-我的"
)
@GetMapping
(
value
=
"/myList"
)
public
Result
<
IPage
<
MaterialInfo
>>
queryMyPageList
(
MaterialInfo
materialInfo
,
@RequestParam
(
name
=
"pageNo"
,
defaultValue
=
"1"
)
Integer
pageNo
,
@RequestParam
(
name
=
"pageSize"
,
defaultValue
=
"10"
)
Integer
pageSize
)
{
Result
<
IPage
<
MaterialInfo
>>
result
=
new
Result
<
IPage
<
MaterialInfo
>>();
Page
<
MaterialInfo
>
page
=
new
Page
<
MaterialInfo
>(
pageNo
,
pageSize
);
QueryWrapper
<
MaterialInfo
>
queryWrapper
=
getMaterialInfoQueryWrapper
(
materialInfo
);
//queryWrapper.in("status","'1','2'");
IPage
<
MaterialInfo
>
pageList
=
materialInfoService
.
page
(
page
,
queryWrapper
);
result
.
setSuccess
(
true
);
result
.
setResult
(
pageList
);
return
result
;
}
private
QueryWrapper
<
MaterialInfo
>
getMaterialInfoQueryWrapper
(
MaterialInfo
materialInfo
){
QueryWrapper
<
MaterialInfo
>
queryWrapper
=
new
QueryWrapper
();
String
departIds
=
null
;
if
(
StringUtils
.
isBlank
(
materialInfo
.
getDepartId
())&&
StringUtils
.
isNotBlank
(
BaseContextHandler
.
getDeparts
()))
{
departIds
=
departService
.
getChildDepartId
(
BaseContextHandler
.
getDeparts
());
}
else
{
departIds
=
departService
.
getChildDepartId
(
materialInfo
.
getDepartId
());
}
// Page<MaterialInfo> page = new Page<ErpSettlement>(pageNo, pageSize);
queryWrapper
.
eq
(
"del_flag"
,
"0"
);
queryWrapper
.
in
(
"depart_id"
,
JSUtils
.
quoteEach
(
departIds
,
","
));
if
(
StringUtils
.
isNotEmpty
(
materialInfo
.
getFacInformationtype
())){
queryWrapper
.
eq
(
"fac_informationtype"
,
materialInfo
.
getFacInformationtype
());
}
//facInformationName
if
(
StringUtils
.
isNotEmpty
(
materialInfo
.
getFacInformationName
())){
queryWrapper
.
like
(
"fac_information_name"
,
materialInfo
.
getFacInformationName
());
}
if
(
StringUtils
.
isNotEmpty
(
materialInfo
.
getRulesType
())){
queryWrapper
.
eq
(
"rules_type"
,
materialInfo
.
getRulesType
());
}
if
(
StringUtils
.
isNotEmpty
(
materialInfo
.
getLawsType
())){
queryWrapper
.
eq
(
"laws_type"
,
materialInfo
.
getLawsType
());
}
if
(
StringUtils
.
isNotEmpty
(
materialInfo
.
getStandardsType
())){
queryWrapper
.
eq
(
"standards_type"
,
materialInfo
.
getStandardsType
());
}
return
queryWrapper
;
}
/**
* 添加
* @param materialInfo
...
...
@@ -137,6 +235,39 @@ public class MaterialInfoController {
return
result
;
}
@AutoLog
(
value
=
"厂区资料管理-送审"
)
@ApiOperation
(
value
=
"厂区资料管理-送审"
,
notes
=
"厂区资料管理-送审"
)
@GetMapping
(
value
=
"/sendAudit"
)
public
Result
<
MaterialInfo
>
sendAudit
(
@RequestParam
(
name
=
"id"
,
required
=
true
)
String
id
)
{
Result
<
MaterialInfo
>
result
=
new
Result
<>();
MaterialInfo
materialInfo
=
materialInfoService
.
getById
(
id
);
if
(
materialInfo
==
null
)
{
result
.
error500
(
"未找到对应实体"
);
}
else
{
materialInfo
.
setStatus
(
"1"
);
materialInfoService
.
updateById
(
materialInfo
);
result
.
setResult
(
materialInfo
);
result
.
setSuccess
(
true
);
}
return
result
;
}
@AutoLog
(
value
=
"厂区资料管理-审批"
)
@ApiOperation
(
value
=
"厂区资料管理-审批"
,
notes
=
"厂区资料管理-审批(status=3 审核通过,status=2 驳回)"
)
@PutMapping
(
value
=
"/audit"
)
public
Result
<
MaterialInfo
>
auditPurchasePlan
(
@RequestBody
MaterialInfo
materialInfo
)
{
Result
<
MaterialInfo
>
result
=
new
Result
<>();
//purchaseContract.setStatus("1");
//purchaseContract.setApplyUser(BaseContextHandler.getUserId());
//purchaseContract.setApplyTime(DateUtils.now());
materialInfo
.
setApproveUser
(
BaseContextHandler
.
getUserName
());
materialInfo
.
setUpdateTime
(
new
Date
());
materialInfoService
.
updateById
(
materialInfo
);
result
.
setResult
(
materialInfo
);
result
.
setSuccess
(
true
);
return
result
;
}
/**
* <pre>
* 更新浏览量/下载量
...
...
sk-module-biz/src/main/java/com/skua/modules/material/entity/MaterialInfo.java
查看文件 @
ea60ab9
...
...
@@ -30,21 +30,20 @@ public class MaterialInfo {
@ApiModelProperty
(
value
=
"id"
)
private
String
id
;
/**厂区资料文件名*/
@Excel
(
name
=
"厂区资料文件名"
,
width
=
15
)
@Excel
(
name
=
"厂区资料文件名"
,
width
=
15
,
orderNum
=
"3"
)
@ApiModelProperty
(
value
=
"厂区资料文件名"
)
private
String
facInformationName
;
/**厂区资料文件名类型*/
@Excel
(
name
=
"厂区资料文件名类型"
,
width
=
15
)
@Excel
(
name
=
"厂区资料文件名类型"
,
width
=
15
,
dicCode
=
"fac_information_type"
,
orderNum
=
"4"
)
@ApiModelProperty
(
value
=
"厂区资料文件名类型"
)
@Dict
(
dicCode
=
"fac_information_type"
)
private
String
facInformationtype
;
/**删除状态(0,正常,1已删除)*/
@Excel
(
name
=
"删除状态(0,正常,1已删除)"
,
width
=
15
)
@ApiModelProperty
(
value
=
"删除状态(0,正常,1已删除)"
)
private
String
delFlag
;
/**创建人*/
@Excel
(
name
=
"创建人"
,
width
=
15
)
@ApiModelProperty
(
value
=
"创建人"
)
@Excel
(
name
=
"创建人"
,
width
=
15
,
dictTable
=
"sys_user"
,
dicCode
=
"username"
,
dicText
=
"realname"
,
orderNum
=
"6"
)
@ApiModelProperty
(
value
=
"创建人"
)
@Dict
(
dictTable
=
"sys_user"
,
dicCode
=
"username"
,
dicText
=
"realname"
)
private
String
createBy
;
/**创建时间*/
...
...
@@ -54,25 +53,24 @@ public class MaterialInfo {
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createTime
;
/**更新人*/
@Excel
(
name
=
"更新人"
,
width
=
15
)
@ApiModelProperty
(
value
=
"更新人"
)
private
String
updateBy
;
/**更新时间*/
@Excel
(
name
=
"更新时间"
,
width
=
20
,
format
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"更新时间"
)
private
Date
updateTime
;
/**附件地址*/
@Excel
(
name
=
"附件地址"
,
width
=
15
)
@ApiModelProperty
(
value
=
"附件地址"
)
private
String
docuAddr
;
/**所属厂区*/
@Excel
(
name
=
"所属厂区"
,
width
=
15
)
@Excel
(
name
=
"所属厂区"
,
width
=
15
,
dictTable
=
"sys_depart"
,
dicCode
=
"id"
,
dicText
=
"depart_name"
,
orderNum
=
"1"
)
@ApiModelProperty
(
value
=
"所属厂区"
)
@Dict
(
dictTable
=
"sys_depart"
,
dicCode
=
"id"
,
dicText
=
"depart_name"
)
private
String
departId
;
/**内容摘要*/
@Excel
(
name
=
"内容摘要"
,
width
=
20
,
orderNum
=
"5"
)
@ApiModelProperty
(
value
=
"内容摘要"
)
private
String
contentSummary
;
/**文件类型*/
...
...
@@ -87,6 +85,7 @@ public class MaterialInfo {
private
String
rulesType
;
/**法律法规类型*/
@Dict
(
dicCode
=
"laws_type"
)
@Excel
(
name
=
"法律法规类型"
,
width
=
15
,
dicCode
=
"laws_type"
,
orderNum
=
"2"
)
@ApiModelProperty
(
value
=
"法律法规类型"
)
private
String
lawsType
;
/**法律法规归属*/
...
...
@@ -132,4 +131,10 @@ public class MaterialInfo {
@Dict
(
dicCode
=
"purchase_plan_status"
)
private
String
status
;
@ApiModelProperty
(
value
=
"审批人"
)
private
String
approveUser
;
/**审批人*/
@ApiModelProperty
(
value
=
"审批意见"
)
private
String
approveMessage
;
}
...
...
sk-module-system/src/main/java/com/skua/config/mybatis/MybatisInterceptor.java
查看文件 @
ea60ab9
...
...
@@ -96,6 +96,9 @@ public class MybatisInterceptor implements Interceptor {
add
(
"danger_level_manage_share"
);
// 库存表
add
(
"equipment_sparepart"
);
//material_info
add
(
"material_info"
);
}};
//过滤不需要走部门ID查询的URL
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论