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 ecbfc658
authored
Dec 12, 2023
by
HlQ
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[add] 合同管理添加合同不同阶段的收款时间字段
[chg] 钉钉消息体样式优化
1 parent
d22db446
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
93 additions
and
85 deletions
src/main/java/vion/cron/ContractRunner.java
src/main/java/vion/cron/TaskRunner.java
src/main/java/vion/dto/ContractDTO.java
src/main/java/vion/dto/ContractPaymentDTO.java
src/main/java/vion/model/Contract.java
src/main/java/vion/model/ContractPayment.java
src/main/java/vion/service/impl/ContractServiceImpl.java
src/main/java/vion/service/impl/TaskServiceImpl.java
src/main/java/vion/service/impl/TaskTempServiceImpl.java
src/main/java/vion/vo/ContractVO.java
src/main/java/vion/cron/ContractRunner.java
View file @
ecbfc65
This diff is collapsed.
Click to expand it.
src/main/java/vion/cron/TaskRunner.java
View file @
ecbfc65
...
...
@@ -50,8 +50,8 @@ public class TaskRunner {
JSONObject
msg
=
new
JSONObject
();
JSONObject
content
=
new
JSONObject
();
content
.
set
(
"title"
,
"请查看您未完成的工单~_~"
);
content
.
set
(
"markdown"
,
"请查看您未完成的工单"
+
" \n 发送时间:"
+
DateUtil
.
now
());
content
.
set
(
"markdown"
,
"
####
请查看您未完成的工单"
+
" \n
####
发送时间:"
+
DateUtil
.
now
());
content
.
set
(
"btn_orientation"
,
"1"
);
JSONArray
jsonArray
=
new
JSONArray
();
...
...
src/main/java/vion/dto/ContractDTO.java
View file @
ecbfc65
package
vion
.
dto
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Getter
;
import
lombok.Setter
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.math.BigDecimal
;
...
...
@@ -29,24 +29,6 @@ public class ContractDTO extends BaseDTO {
private
Integer
type
;
/**
* 合同签订日期
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
signDate
;
/**
* 合同维保开始日期
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
maintainSdate
;
/**
* 合同维保结束日期
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
maintainEdate
;
/**
* 合同进度:1-签订 2-发货 3-货到 4-安装 5-验收 6-质保
*/
private
Integer
status
;
...
...
@@ -92,36 +74,10 @@ public class ContractDTO extends BaseDTO {
*/
private
String
remark
;
/**
* 记录创建者
*/
private
Long
createUser
;
/**
* 记录最后一次修改者
*/
private
Long
modifyUser
;
/**
* 创建时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
createTime
;
/**
* 修改时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
modifyTime
;
private
MultipartFile
[]
files
;
/**
* 合同质保周期(月)
*/
private
Integer
warrantyPeriod
;
/**
* 终验日期
*/
private
Date
finalDate
;
...
...
@@ -131,4 +87,10 @@ public class ContractDTO extends BaseDTO {
*/
private
Long
storeId
;
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
signDateStart
;
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
signDateEnd
;
}
\ No newline at end of file
src/main/java/vion/dto/ContractPaymentDTO.java
View file @
ecbfc65
package
vion
.
dto
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Getter
;
import
lombok.Setter
;
import
java.math.BigDecimal
;
import
java.util.Date
;
@Getter
@Setter
...
...
@@ -27,25 +25,4 @@ public class ContractPaymentDTO {
*/
private
BigDecimal
paymentRatio
;
/**
* 创建者
*/
private
Integer
createUser
;
/**
* 记录最后一次修改者
*/
private
Integer
modifyUser
;
/**
* 创建时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
createTime
;
/**
* 修改时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
modifyTime
;
}
\ No newline at end of file
src/main/java/vion/model/Contract.java
View file @
ecbfc65
...
...
@@ -158,50 +158,104 @@ public class Contract {
private
BigDecimal
invoiceAmount
;
/**
* 录入时间
*/
@TableField
(
value
=
"entry_time"
)
private
Date
entryTime
;
/**
* 合同签订付款比例
*/
@TableField
(
exist
=
false
)
private
BigDecimal
signRatio
;
/**
* 合同签订付款日期
*/
@TableField
(
exist
=
false
)
private
Date
signDate1
;
/**
* 合同到货付款比例
*/
@TableField
(
exist
=
false
)
private
BigDecimal
arriveRatio
;
/**
* 合同到货付款日期
*/
@TableField
(
exist
=
false
)
private
Date
arriveDate
;
/**
* 合同系统验收付款比例
*/
@TableField
(
exist
=
false
)
private
BigDecimal
systemCheckRatio
;
/**
* 合同系统验收付款日期
*/
@TableField
(
exist
=
false
)
private
Date
systemCheckDate
;
/**
* 合同项目验收付款比例
*/
@TableField
(
exist
=
false
)
private
BigDecimal
projectCheckRatio
;
/**
* 合同项目验收付款日期
*/
@TableField
(
exist
=
false
)
private
Date
projectCheckDate
;
/**
* 合同质保付款比例
*/
@TableField
(
exist
=
false
)
private
BigDecimal
warrantyRatio
;
/**
* 合同质保付款日期
*/
@TableField
(
exist
=
false
)
private
Date
warrantyDate
;
/**
* 合同维保付款比例1
*/
@TableField
(
exist
=
false
)
private
BigDecimal
maintainRatio1
;
/**
* 合同维保付款日期1
*/
@TableField
(
exist
=
false
)
private
Date
maintainDate1
;
/**
* 合同维保付款比例2
*/
@TableField
(
exist
=
false
)
private
BigDecimal
maintainRatio2
;
/**
* 合同维保付款日期2
*/
@TableField
(
exist
=
false
)
private
Date
maintainDate2
;
/**
* 合同维保付款比例2
*/
@TableField
(
exist
=
false
)
private
BigDecimal
maintainRatio3
;
/**
* 合同维保付款日期2
*/
@TableField
(
exist
=
false
)
private
Date
maintainDate3
;
}
\ No newline at end of file
src/main/java/vion/model/ContractPayment.java
View file @
ecbfc65
...
...
@@ -30,7 +30,7 @@ public class ContractPayment {
private
Long
contractId
;
/**
* 付款方式:1-签订 2-
发货 3-货到 4-安装 5-验收 6-质保
* 付款方式:1-签订 2-
到货 3-系统验收 4-项目验收 5-质保 6-第一笔维保款 7-第二笔维保款 8-第三笔维保款
*/
@TableField
(
value
=
"payment_type"
)
private
Integer
paymentType
;
...
...
@@ -42,6 +42,12 @@ public class ContractPayment {
private
BigDecimal
paymentRatio
;
/**
* 收款日期
*/
@TableField
(
value
=
"payment_date"
)
private
Date
paymentDate
;
/**
* 创建者
*/
@TableField
(
value
=
"create_user"
)
...
...
src/main/java/vion/service/impl/ContractServiceImpl.java
View file @
ecbfc65
...
...
@@ -8,6 +8,7 @@ import cn.hutool.core.io.FileUtil;
import
cn.hutool.core.lang.Assert
;
import
cn.hutool.core.lang.Opt
;
import
cn.hutool.core.map.MapUtil
;
import
cn.hutool.core.util.ArrayUtil
;
import
cn.hutool.core.util.ObjUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.crypto.SecureUtil
;
...
...
@@ -59,7 +60,8 @@ public class ContractServiceImpl extends MPJBaseServiceImpl<ContractMapper, Cont
public
Page
<
ContractVO
>
list
(
ContractDTO
dto
)
{
Contract
contract
=
converter
.
convert
(
dto
,
new
Contract
());
Page
<
Contract
>
contractList
=
this
.
lambdaQuery
(
contract
)
.
orderByDesc
(
Contract:
:
getModifyTime
)
.
between
(
ArrayUtil
.
isAllNotNull
(
dto
.
getSignDateStart
(),
dto
.
getSignDateEnd
()),
Contract:
:
getSignDate
,
dto
.
getSignDateStart
(),
dto
.
getSignDateEnd
())
.
orderByDesc
(
Contract:
:
getEntryTime
)
.
page
(
Page
.
of
(
dto
.
getPageNum
(),
dto
.
getPageSize
()));
List
<
ContractVO
>
contractVOList
=
converter
.
convert
(
contractList
.
getRecords
(),
ContractVO
.
class
);
// 查出合同关联的项目名
...
...
@@ -77,9 +79,9 @@ public class ContractServiceImpl extends MPJBaseServiceImpl<ContractMapper, Cont
.
orElse
(
ListUtil
.
of
(
0L
));
Page
<
Contract
>
contractList
=
this
.
lambdaQuery
(
contract
)
.
select
(
Contract:
:
getId
,
Contract:
:
getName
,
Contract:
:
getContractNo
,
Contract:
:
getType
,
Contract:
:
getSignDate
,
Contract:
:
getWarrantyPeriod
,
Contract:
:
getFinalDate
,
Contract:
:
getStatus
,
Contract:
:
getSaleName
,
Contract:
:
getCustomerName
)
.
select
(
Contract:
:
getId
,
Contract:
:
getName
,
Contract:
:
getContractNo
,
Contract:
:
getType
,
Contract:
:
getSignDate
,
Contract:
:
getWarrantyPeriod
,
Contract:
:
getFinalDate
,
Contract:
:
getStatus
,
Contract:
:
getSaleName
,
Contract:
:
getCustomerName
,
Contract:
:
getMaintainSdate
,
Contract:
:
getMaintainEdate
)
.
in
(
CollUtil
.
isNotEmpty
(
ids
),
Contract:
:
getId
,
ids
)
.
orderByDesc
(
Contract:
:
get
Modif
yTime
)
.
orderByDesc
(
Contract:
:
get
Entr
yTime
)
.
page
(
Page
.
of
(
dto
.
getPageNum
(),
dto
.
getPageSize
()));
List
<
ContractVO
>
contractVOList
=
converter
.
convert
(
contractList
.
getRecords
(),
ContractVO
.
class
);
// 查出合同关联的项目名
...
...
src/main/java/vion/service/impl/TaskServiceImpl.java
View file @
ecbfc65
...
...
@@ -9,6 +9,7 @@ import cn.hutool.core.lang.Opt;
import
cn.hutool.core.map.MapUtil
;
import
cn.hutool.core.util.DesensitizedUtil
;
import
cn.hutool.core.util.IdUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.crypto.SecureUtil
;
import
cn.hutool.json.JSONArray
;
import
cn.hutool.json.JSONObject
;
...
...
@@ -92,6 +93,7 @@ public class TaskServiceImpl extends MPJBaseServiceImpl<TaskMapper, Task> implem
.
leftJoin
(
ServiceOrder
.
class
,
ServiceOrder:
:
getTaskId
,
Task:
:
getId
)
.
between
(
data
.
getStartdate
()
!=
null
&&
data
.
getEnddate
()
!=
null
,
Task:
:
getRepairTime
,
data
.
getStartdate
(),
data
.
getEnddate
())
.
lt
(
data
.
getCurDate
()
!=
null
,
Task:
:
getExpDate
,
data
.
getCurDate
());
// todo 优化
if
(
taskIdSet
.
size
()
==
1
&&
CollUtil
.
get
(
taskIdSet
,
0
).
equals
(-
99L
))
{
// 不是管理员,并且第一次处理工单,但当前处理人是他
}
else
if
(
taskIdSet
.
size
()
==
1
&&
CollUtil
.
get
(
taskIdSet
,
0
).
equals
(
0L
))
{
...
...
@@ -261,12 +263,14 @@ public class TaskServiceImpl extends MPJBaseServiceImpl<TaskMapper, Task> implem
JSONObject
msg
=
new
JSONObject
();
JSONObject
content
=
new
JSONObject
();
content
.
set
(
"title"
,
"您有一条新工单请及时处理哦~_~"
);
content
.
set
(
"markdown"
,
"门店信息: "
+
storeName
+
"[FullOfVitality]"
+
" \n 报修人:"
+
task
.
getRepairPeople
()
+
" \n 联系方式:"
+
task
.
getRepairPhone
()
+
" \n 当前工单状态:"
+
orderStatusMap
.
get
(
task
.
getStatus
())
+
" \n 故障描述:"
+
task
.
getFaultDescription
()
+
" \n 发送时间:"
+
DateUtil
.
now
());
String
markdown
=
StrUtil
.
format
(
"#### 门店信息: **{}** [FullOfVitality]"
+
" \n #### 报修人:{}"
+
" \n #### 联系方式:{}"
+
" \n #### 当前工单状态:{}"
+
" \n #### 故障描述:{}"
+
" \n #### 发送时间:{}"
,
storeName
,
task
.
getRepairPeople
(),
task
.
getRepairPhone
(),
orderStatusMap
.
get
(
task
.
getStatus
()),
task
.
getFaultDescription
(),
DateUtil
.
now
());
content
.
set
(
"markdown"
,
markdown
);
content
.
set
(
"btn_orientation"
,
"1"
);
JSONArray
jsonArray
=
new
JSONArray
();
...
...
src/main/java/vion/service/impl/TaskTempServiceImpl.java
View file @
ecbfc65
...
...
@@ -129,11 +129,13 @@ public class TaskTempServiceImpl extends MPJBaseServiceImpl<TaskTempMapper, Task
JSONObject
msg
=
new
JSONObject
();
JSONObject
content
=
new
JSONObject
();
content
.
set
(
"title"
,
"客户提交工单,请及时处理哦~_~"
);
content
.
set
(
"markdown"
,
"门店信息: "
+
taskTemp
.
getStoreName
()
+
" \n 客户姓名:"
+
taskTemp
.
getRepairPeople
()
+
" \n 联系方式:"
+
taskTemp
.
getRepairPhone
()
+
" \n 故障描述:"
+
taskTemp
.
getFaultDescription
()
+
" \n 发送时间:"
+
DateUtil
.
now
());
String
markdown
=
StrUtil
.
format
(
"#### 门店信息: **{}**"
+
" \n #### 客户姓名:{}"
+
" \n #### 联系方式:{}"
+
" \n #### 故障描述:{}"
+
" \n #### 发送时间:{}"
,
taskTemp
.
getStoreName
(),
taskTemp
.
getRepairPeople
(),
taskTemp
.
getRepairPhone
(),
taskTemp
.
getFaultDescription
(),
DateUtil
.
now
());
content
.
set
(
"markdown"
,
markdown
);
content
.
set
(
"btn_orientation"
,
"1"
);
JSONArray
jsonArray
=
new
JSONArray
();
...
...
src/main/java/vion/vo/ContractVO.java
View file @
ecbfc65
...
...
@@ -123,6 +123,7 @@ public class ContractVO {
/**
* 终验日期
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
finalDate
;
/**
...
...
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