Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
P
precision-effect
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
耿迪迪
precision-effect
Commits
f6e51aac
Commit
f6e51aac
authored
Jul 07, 2023
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
通知公告-交易中心通知
parent
362f2d53
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
124 additions
and
10 deletions
+124
-10
SysNoticeController.java
...com/zehong/web/controller/system/SysNoticeController.java
+16
-0
TTradeProjectController.java
...g/web/controller/transaction/TTradeProjectController.java
+5
-1
SysNotice.java
...tem/src/main/java/com/zehong/system/domain/SysNotice.java
+34
-0
SysNoticeMapper.java
...c/main/java/com/zehong/system/mapper/SysNoticeMapper.java
+7
-0
ISysNoticeService.java
...ain/java/com/zehong/system/service/ISysNoticeService.java
+7
-0
SysNoticeServiceImpl.java
.../com/zehong/system/service/impl/SysNoticeServiceImpl.java
+10
-0
TPurchaseMapper.xml
...em/src/main/resources/mapper/business/TPurchaseMapper.xml
+1
-1
SysNoticeMapper.xml
...stem/src/main/resources/mapper/system/SysNoticeMapper.xml
+29
-1
notice.js
precision-effect-web/src/api/system/notice.js
+8
-0
OperatorButton.vue
...-effect-web/src/views/trade/components/OperatorButton.vue
+3
-4
index.vue
precision-effect-web/src/views/trade/index.vue
+4
-3
No files found.
precision-effect-admin/src/main/java/com/zehong/web/controller/system/SysNoticeController.java
View file @
f6e51aac
...
...
@@ -113,6 +113,7 @@ public class SysNoticeController extends BaseController
*/
@PostMapping
(
"/sendNotice"
)
public
AjaxResult
sendNotice
(
@RequestBody
SysNotice
notice
){
updateNoticeByRelationId
(
notice
);
notice
.
setCreateBy
(
SecurityUtils
.
getUsername
());
notice
.
setCreateTime
(
new
Date
());
if
(
StringUtils
.
isNotNull
(
notice
.
getUserId
())){
...
...
@@ -140,4 +141,19 @@ public class SysNoticeController extends BaseController
}
return
AjaxResult
.
success
(
"消息推送成功!"
);
}
@PostMapping
(
"/deleteNoticeByRelationId"
)
public
AjaxResult
deleteNoticeByRelationId
(
@RequestBody
SysNotice
notice
){
return
toAjax
(
updateNoticeByRelationId
(
notice
));
}
private
int
updateNoticeByRelationId
(
SysNotice
notice
){
if
(
StringUtils
.
isNotEmpty
(
String
.
valueOf
(
notice
.
getRelationId
()))
&&
!
notice
.
isStart
()){
SysNotice
deleteNotice
=
new
SysNotice
();
deleteNotice
.
setStatus
(
"1"
);
deleteNotice
.
setRelationId
(
notice
.
getRelationId
());
return
noticeService
.
updateNoticeByRelationId
(
deleteNotice
);
}
return
0
;
}
}
precision-effect-admin/src/main/java/com/zehong/web/controller/transaction/TTradeProjectController.java
View file @
f6e51aac
...
...
@@ -77,7 +77,11 @@ public class TTradeProjectController extends BaseController
@PostMapping
public
AjaxResult
add
(
@RequestBody
TTradeProject
tTradeProject
)
{
return
toAjax
(
tTradeProjectService
.
insertTTradeProject
(
tTradeProject
));
int
rows
=
tTradeProjectService
.
insertTTradeProject
(
tTradeProject
);
if
(
rows
>
0
){
return
AjaxResult
.
success
(
tTradeProject
);
}
return
AjaxResult
.
error
();
}
/**
...
...
precision-effect-system/src/main/java/com/zehong/system/domain/SysNotice.java
View file @
f6e51aac
...
...
@@ -48,6 +48,16 @@ public class SysNotice extends BaseEntity
*/
private
String
roles
;
/** 关联类型:1.项目交易中心 2. 物品采购 3.服务费用 4.借支 5.借贷 */
@Excel
(
name
=
"关联类型:1.项目交易中心 2. 物品采购 3.服务费用 4.借支 5.借贷"
)
private
String
relationType
;
/** 关联主键id */
@Excel
(
name
=
"关联主键id"
)
private
Long
relationId
;
private
boolean
isStart
;
public
void
setNoticeId
(
Integer
noticeId
)
{
this
.
noticeId
=
noticeId
;
...
...
@@ -119,6 +129,30 @@ public class SysNotice extends BaseEntity
this
.
roles
=
roles
;
}
public
String
getRelationType
()
{
return
relationType
;
}
public
void
setRelationType
(
String
relationType
)
{
this
.
relationType
=
relationType
;
}
public
Long
getRelationId
()
{
return
relationId
;
}
public
void
setRelationId
(
Long
relationId
)
{
this
.
relationId
=
relationId
;
}
public
boolean
isStart
()
{
return
isStart
;
}
public
void
setStart
(
boolean
start
)
{
isStart
=
start
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
...
...
precision-effect-system/src/main/java/com/zehong/system/mapper/SysNoticeMapper.java
View file @
f6e51aac
...
...
@@ -57,4 +57,11 @@ public interface SysNoticeMapper
* @return 结果
*/
public
int
deleteNoticeByIds
(
Long
[]
noticeIds
);
/**
* 更新公告
* @param notice 公告信息
* @return
*/
int
updateNoticeByRelationId
(
SysNotice
notice
);
}
precision-effect-system/src/main/java/com/zehong/system/service/ISysNoticeService.java
View file @
f6e51aac
...
...
@@ -57,4 +57,11 @@ public interface ISysNoticeService
* @return 结果
*/
public
int
deleteNoticeByIds
(
Long
[]
noticeIds
);
/**
* 更新公告
* @param notice 公告信息
* @return
*/
int
updateNoticeByRelationId
(
SysNotice
notice
);
}
precision-effect-system/src/main/java/com/zehong/system/service/impl/SysNoticeServiceImpl.java
View file @
f6e51aac
...
...
@@ -89,4 +89,14 @@ public class SysNoticeServiceImpl implements ISysNoticeService
{
return
noticeMapper
.
deleteNoticeByIds
(
noticeIds
);
}
/**
* 更新公告
* @param notice 公告信息
* @return
*/
@Override
public
int
updateNoticeByRelationId
(
SysNotice
notice
){
return
noticeMapper
.
updateNoticeByRelationId
(
notice
);
}
}
precision-effect-system/src/main/resources/mapper/business/TPurchaseMapper.xml
View file @
f6e51aac
...
...
@@ -58,7 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
(SELECT t1.nick_name FROM sys_user t1 WHERE t1.user_id = p.user_id) user_name,
(SELECT t1.nick_name FROM sys_user t1 WHERE t1.user_id = p.approved_user_id) approved_user_name,
(SELECT t1.nick_name FROM sys_user t1 WHERE t1.user_id = p.purchase_dept_manager_id) purchase_dept_manager_name,
(SELECT t1.nick_name FROM sys_user t1 WHERE t1.user_id =
t
.handled_by_user_id) handled_by_user_name
(SELECT t1.nick_name FROM sys_user t1 WHERE t1.user_id =
p
.handled_by_user_id) handled_by_user_name
FROM
t_purchase p
</sql>
...
...
precision-effect-system/src/main/resources/mapper/system/SysNoticeMapper.xml
View file @
f6e51aac
...
...
@@ -11,6 +11,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"noticeContent"
column=
"notice_content"
/>
<result
property=
"userId"
column=
"user_id"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"relationType"
column=
"relation_type"
/>
<result
property=
"relationId"
column=
"relation_id"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
...
...
@@ -19,7 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql
id=
"selectSysNoticeVo"
>
select notice_id, notice_title, notice_type, notice_content, user_id, status, create_by, create_time, update_by, update_time, remark from sys_notice
select notice_id, notice_title, notice_type, notice_content, user_id, status,
relation_type, relation_id,
create_by, create_time, update_by, update_time, remark from sys_notice
</sql>
<select
id=
"selectNoticeList"
parameterType=
"SysNotice"
resultMap=
"SysNoticeResult"
>
...
...
@@ -30,6 +32,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"noticeContent != null and noticeContent != ''"
>
and notice_content = #{noticeContent}
</if>
<if
test=
"userId != null "
>
and user_id = #{userId}
</if>
<if
test=
"status != null and status != ''"
>
and status = #{status}
</if>
<if
test=
"relationType != null and relationType != ''"
>
and relation_type = #{relationType}
</if>
<if
test=
"relationId != null "
>
and relation_id = #{relationId}
</if>
</where>
ORDER BY create_time DESC
</select>
...
...
@@ -47,6 +51,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"noticeContent != null"
>
notice_content,
</if>
<if
test=
"userId != null"
>
user_id,
</if>
<if
test=
"status != null"
>
status,
</if>
<if
test=
"relationType != null"
>
relation_type,
</if>
<if
test=
"relationId != null"
>
relation_id,
</if>
<if
test=
"createBy != null"
>
create_by,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateBy != null"
>
update_by,
</if>
...
...
@@ -59,6 +65,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"noticeContent != null"
>
#{noticeContent},
</if>
<if
test=
"userId != null"
>
#{userId},
</if>
<if
test=
"status != null"
>
#{status},
</if>
<if
test=
"relationType != null"
>
#{relationType},
</if>
<if
test=
"relationId != null"
>
#{relationId},
</if>
<if
test=
"createBy != null"
>
#{createBy},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"updateBy != null"
>
#{updateBy},
</if>
...
...
@@ -75,6 +83,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"noticeContent != null"
>
notice_content = #{noticeContent},
</if>
<if
test=
"userId != null"
>
user_id = #{userId},
</if>
<if
test=
"status != null"
>
status = #{status},
</if>
<if
test=
"relationType != null"
>
relation_type = #{relationType},
</if>
<if
test=
"relationId != null"
>
relation_id = #{relationId},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
...
...
@@ -94,4 +104,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{noticeId}
</foreach>
</delete>
<update
id=
"updateNoticeByRelationId"
parameterType=
"SysNotice"
>
update sys_notice
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"noticeTitle != null and noticeTitle != ''"
>
notice_title = #{noticeTitle},
</if>
<if
test=
"noticeType != null and noticeType != ''"
>
notice_type = #{noticeType},
</if>
<if
test=
"noticeContent != null"
>
notice_content = #{noticeContent},
</if>
<if
test=
"userId != null"
>
user_id = #{userId},
</if>
<if
test=
"status != null"
>
status = #{status},
</if>
<if
test=
"relationType != null"
>
relation_type = #{relationType},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
</trim>
where relation_id = #{relationId} AND status = '0'
</update>
</mapper>
\ No newline at end of file
precision-effect-web/src/api/system/notice.js
View file @
f6e51aac
...
...
@@ -51,3 +51,11 @@ export function sendNotice(data) {
data
:
data
})
}
export
function
deleteNoticeByRelationId
(
data
)
{
return
request
({
url
:
'/system/notice/deleteNoticeByRelationId'
,
method
:
'post'
,
data
:
data
})
}
precision-effect-web/src/views/trade/components/OperatorButton.vue
View file @
f6e51aac
...
...
@@ -66,7 +66,6 @@
this
.
toPay
();
return
;
}
console
.
log
(
"lalalalalalala----------"
)
this
.
getProjectInfo
();
},
//去支付
...
...
@@ -116,7 +115,7 @@
this
.
$emit
(
"getList"
);
this
.
$message
.
success
(
"复核成功!"
);
if
(
this
.
$refs
.
currentCom
.
submitSuggestion
().
tradeStatus
==
"4"
){
sendNotice
({
noticeTitle
:
"您有新交易项目被驳回"
,
noticeType
:
"1"
,
noticeContent
:
"您有新交易项目被驳回"
,
userId
:
this
.
tradeInfo
.
applyId
})
sendNotice
({
noticeTitle
:
"您有新交易项目被驳回"
,
noticeType
:
"1"
,
noticeContent
:
"您有新交易项目被驳回"
,
userId
:
this
.
tradeInfo
.
applyId
,
relationType
:
"1"
,
relationId
:
this
.
tradeInfo
.
tradeId
})
}
}
else
{
this
.
$message
.
error
(
"复核失败!"
);
...
...
@@ -132,12 +131,12 @@
that
.
$message
.
success
(
"提交成功!"
);
if
(
this
.
$refs
.
currentCom
.
submitSuggestion
().
tradeStatus
==
"1"
){
sendNotice
({
noticeTitle
:
"您有新交易项目待确认"
,
noticeType
:
"1"
,
noticeContent
:
"您有新交易项目待确认"
,
deptId
:
this
.
tradeInfo
.
tradeDeptId
,
roles
:
"deptLeader"
})
deptId
:
this
.
tradeInfo
.
tradeDeptId
,
roles
:
"deptLeader"
,
relationType
:
"1"
,
relationId
:
this
.
tradeInfo
.
tradeId
})
}
if
(
this
.
$refs
.
currentCom
.
submitSuggestion
().
tradeStatus
==
"2"
){
sendNotice
({
noticeTitle
:
"您有新交易项目待确认"
,
noticeType
:
"1"
,
noticeContent
:
"您有新交易项目待确认"
,
deptId
:
this
.
tradeInfo
.
applyDeptId
,
roles
:
"deptLeader"
})
deptId
:
this
.
tradeInfo
.
applyDeptId
,
roles
:
"deptLeader"
,
relationType
:
"1"
,
relationId
:
this
.
tradeInfo
.
tradeId
})
}
}
else
{
...
...
precision-effect-web/src/views/trade/index.vue
View file @
f6e51aac
...
...
@@ -356,7 +356,7 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import
FileUpload
from
"@/components/MultipleFileUpload"
;
import
uploadfile
from
"@/assets/uploadfile.png"
;
import
TableList
from
"./components/TableList"
;
import
{
sendNotice
}
from
"@/api/system/notice"
;
import
{
sendNotice
,
deleteNoticeByRelationId
}
from
"@/api/system/notice"
;
export
default
{
name
:
"Project"
,
components
:
{
...
...
@@ -577,11 +577,11 @@ export default {
this
.
getList
();
});
}
else
{
addProject
(
this
.
form
).
then
((
res
ponse
)
=>
{
addProject
(
this
.
form
).
then
((
res
)
=>
{
this
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
sendNotice
({
noticeTitle
:
"您有新交易项目待评价"
,
noticeType
:
"1"
,
noticeContent
:
"您有新交易项目待评价"
,
userId
:
this
.
form
.
tradeTransactor
})
sendNotice
({
noticeTitle
:
"您有新交易项目待评价"
,
noticeType
:
"1"
,
noticeContent
:
"您有新交易项目待评价"
,
userId
:
this
.
form
.
tradeTransactor
,
relationType
:
"1"
,
relationId
:
res
.
data
.
tradeId
,
isStart
:
true
})
});
}
}
...
...
@@ -600,6 +600,7 @@ export default {
}
)
.
then
(
function
()
{
deleteNoticeByRelationId
({
relationId
:
tradeIds
});
return
delProject
(
tradeIds
);
})
.
then
(()
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment