Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
李苗
/
Vion-DevOps
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 0bb04771
authored
Jan 04, 2024
by
HlQ
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[add]
1.添加查看合同绑定销售列表接口 2.项目日志添加字段 [chg] 项目绑定主合同接口逻辑修改,同时支持解绑主合同
1 parent
ef02825d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
46 additions
and
20 deletions
src/main/java/vion/controller/ContractController.java
src/main/java/vion/controller/StoreController.java
src/main/java/vion/model/RContractUser.java
src/main/java/vion/model/StoreLog.java
src/main/java/vion/service/IContractService.java
src/main/java/vion/service/impl/ContractServiceImpl.java
src/main/java/vion/controller/ContractController.java
View file @
0bb0477
...
...
@@ -131,6 +131,13 @@ public class ContractController {
return
contractService
.
dispatch
(
dto
);
}
@GetMapping
(
"/contract/sale"
)
@SaCheckPermission
(
value
=
"contract:sale:list"
,
orRole
=
"admin"
)
// todo 未分配权限
public
Page
<
RContractUser
>
getSaleList
(
RContractUser
dto
)
{
return
contractService
.
getSaleList
(
dto
);
}
@PostMapping
(
"/contract/assignSale"
)
@SaCheckPermission
(
value
=
"contract:assignSale"
,
orRole
=
"admin"
)
// todo 未分配权限
...
...
@@ -138,11 +145,11 @@ public class ContractController {
return
contractService
.
assignSale
(
dto
);
}
@
DeleteMapping
(
"/contract/unbindSale/{id}
"
)
@
PostMapping
(
"/contract/unbindSale
"
)
@SaCheckPermission
(
value
=
"contract:unbindSale"
,
orRole
=
"admin"
)
// todo 未分配权限
public
String
unbindSale
(
@
PathVariable
Long
id
)
{
return
contractService
.
unbindSale
(
id
);
public
String
unbindSale
(
@
RequestBody
RContractUser
dto
)
{
return
contractService
.
unbindSale
(
dto
);
}
@PostMapping
(
"/contractSync"
)
...
...
src/main/java/vion/controller/StoreController.java
View file @
0bb0477
...
...
@@ -87,7 +87,7 @@ public class StoreController {
@PostMapping
(
"/store/bindContract"
)
@SaCheckPermission
(
value
=
"store:bindContract"
,
orRole
=
"admin"
)
public
String
setMasterContract
(
@RequestBody
StoreDTO
dto
)
{
return
storeService
.
updateById
(
converter
.
convert
(
dto
,
Store
.
class
))
?
"绑定主合同成功"
:
"绑定主合同失败"
;
return
storeService
.
lambdaUpdate
().
eq
(
Store:
:
getId
,
dto
.
getId
()).
set
(
Store:
:
getMasterContract
,
dto
.
getMasterContract
()).
update
(
new
Store
(
))
?
"绑定主合同成功"
:
"绑定主合同失败"
;
}
@GetMapping
(
"/store/manualCal"
)
...
...
src/main/java/vion/model/RContractUser.java
View file @
0bb0477
package
vion
.
model
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
java.util.Date
;
import
com.baomidou.mybatisplus.annotation.*
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
vion.dto.BaseDTO
;
import
java.util.Date
;
/**
* @author HlQ
* @date 2023/12/28
*/
/**
* 合同与用户关联表(用户指的是销售)
*/
@Data
@TableName
(
value
=
"r_contract_user"
)
public
class
RContractUser
{
public
class
RContractUser
extends
BaseDTO
{
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Long
id
;
...
...
@@ -41,7 +38,7 @@ public class RContractUser {
/**
* 用户名
*/
@TableField
(
value
=
"username"
)
@TableField
(
value
=
"username"
,
condition
=
SqlCondition
.
LIKE
)
private
String
username
;
/**
...
...
@@ -54,8 +51,10 @@ public class RContractUser {
* 录入日期
*/
@TableField
(
value
=
"enter_date"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
enterDate
;
@TableField
(
value
=
"create_time"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
createTime
;
}
\ No newline at end of file
src/main/java/vion/model/StoreLog.java
View file @
0bb0477
...
...
@@ -22,10 +22,23 @@ public class StoreLog {
private
Long
storeId
;
/**
*
备注
*
日志日期
*/
@TableField
(
value
=
"remark"
)
private
String
remark
;
@TableField
(
value
=
"log_date"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
logDate
;
/**
* 记录人
*/
@TableField
(
value
=
"create_user"
)
private
Long
createUser
;
/**
* 内容
*/
@TableField
(
value
=
"content"
)
private
String
content
;
@TableField
(
value
=
"create_time"
,
fill
=
FieldFill
.
INSERT
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
...
...
src/main/java/vion/service/IContractService.java
View file @
0bb0477
...
...
@@ -33,8 +33,10 @@ public interface IContractService extends MPJBaseService<Contract>{
String
dispatch
(
@RequestBody
RContractTeamDTO
dto
);
Page
<
RContractUser
>
getSaleList
(
RContractUser
dto
);
String
assignSale
(
RContractUser
contractUser
);
String
unbindSale
(
Long
id
);
String
unbindSale
(
RContractUser
contractUser
);
}
\ No newline at end of file
src/main/java/vion/service/impl/ContractServiceImpl.java
View file @
0bb0477
...
...
@@ -445,13 +445,18 @@ public class ContractServiceImpl extends MPJBaseServiceImpl<ContractMapper, Cont
}
@Override
public
Page
<
RContractUser
>
getSaleList
(
RContractUser
dto
)
{
return
contractUserService
.
lambdaQuery
(
dto
).
orderByDesc
(
RContractUser:
:
getEnterDate
).
page
(
Page
.
of
(
dto
.
getPageNum
(),
dto
.
getPageSize
()));
}
@Override
public
String
assignSale
(
RContractUser
contractUser
)
{
return
contractUserService
.
save
(
contractUser
)
?
"分配成功"
:
"分配失败"
;
}
@Override
public
String
unbindSale
(
Long
id
)
{
return
contractUserService
.
remove
ById
(
id
)
?
"解绑成功"
:
"解绑失败"
;
public
String
unbindSale
(
RContractUser
contractUser
)
{
return
contractUserService
.
remove
(
Wrappers
.<
RContractUser
>
lambdaQuery
().
eq
(
RContractUser:
:
getContractId
,
contractUser
.
getContractId
()).
eq
(
RContractUser:
:
getUserId
,
contractUser
.
getUserId
())
)
?
"解绑成功"
:
"解绑失败"
;
}
JSONObject
buildMsg
(
String
userid
,
Contract
contract
,
String
applicantName
)
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment