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 81be82de
authored
Dec 15, 2023
by
HlQ
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[fix]修复工单查询不到当前指派人是自己的工单
[chg] 1.巡检列表按创建时间降序 2.发货记录列表按创建时间降序,并修改查询参数
1 parent
954001d7
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
33 additions
and
25 deletions
src/main/java/vion/controller/AccountController.java
src/main/java/vion/controller/ContractPaymentController.java
src/main/java/vion/controller/DictionaryController.java
src/main/java/vion/controller/InspectController.java
src/main/java/vion/controller/ProductController.java
src/main/java/vion/controller/StoreController.java
src/main/java/vion/controller/TaskController.java
src/main/java/vion/controller/TaskTempController.java
src/main/java/vion/controller/UserController.java
src/main/java/vion/model/DeliveryRecord.java
src/main/java/vion/model/FileInfo.java
src/main/java/vion/service/impl/ContractPaymentServiceImpl.java
src/main/java/vion/service/impl/DeliveryRecordServiceImpl.java
src/main/java/vion/service/impl/InspectServiceImpl.java
src/main/java/vion/service/impl/StoreServiceImpl.java
src/main/java/vion/service/impl/TaskServiceImpl.java
src/main/java/vion/controller/AccountController.java
View file @
81be82d
...
@@ -12,7 +12,7 @@ import vion.service.IAccountService;
...
@@ -12,7 +12,7 @@ import vion.service.IAccountService;
@RestController
@RestController
@RequestMapping
(
Global
.
BASE_URL
)
@RequestMapping
(
"/api"
)
@RequiredArgsConstructor
@RequiredArgsConstructor
@Slf4j
@Slf4j
public
class
AccountController
{
public
class
AccountController
{
...
...
src/main/java/vion/controller/ContractPaymentController.java
View file @
81be82d
...
@@ -7,6 +7,7 @@ import org.springframework.web.bind.annotation.*;
...
@@ -7,6 +7,7 @@ import org.springframework.web.bind.annotation.*;
import
vion.dto.ContractPaymentDTO
;
import
vion.dto.ContractPaymentDTO
;
import
vion.model.ContractPayment
;
import
vion.model.ContractPayment
;
import
vion.service.IContractPaymentService
;
import
vion.service.IContractPaymentService
;
import
vion.vo.ContractPaymentVO
;
import
java.util.List
;
import
java.util.List
;
...
@@ -23,8 +24,8 @@ public class ContractPaymentController {
...
@@ -23,8 +24,8 @@ public class ContractPaymentController {
@GetMapping
(
"/contractPayment/{id}"
)
@GetMapping
(
"/contractPayment/{id}"
)
@SaCheckPermission
(
value
=
"contractPayment:query"
,
orRole
=
"admin"
)
@SaCheckPermission
(
value
=
"contractPayment:query"
,
orRole
=
"admin"
)
public
List
<
ContractPayment
>
getPaymentById
(
@PathVariable
Long
id
)
{
public
List
<
ContractPayment
VO
>
getPaymentById
(
@PathVariable
Long
id
)
{
return
con
tractPaymentService
.
lambdaQuery
().
eq
(
ContractPayment:
:
getContractId
,
id
).
list
(
);
return
con
verter
.
convert
(
contractPaymentService
.
lambdaQuery
().
eq
(
ContractPayment:
:
getContractId
,
id
).
list
(),
ContractPaymentVO
.
class
);
}
}
@PostMapping
(
"/contractPayment"
)
@PostMapping
(
"/contractPayment"
)
...
...
src/main/java/vion/controller/DictionaryController.java
View file @
81be82d
...
@@ -15,7 +15,7 @@ import vion.service.IDictionaryService;
...
@@ -15,7 +15,7 @@ import vion.service.IDictionaryService;
import
vion.service.IDictionaryTypeService
;
import
vion.service.IDictionaryTypeService
;
@RestController
@RestController
@RequestMapping
(
Global
.
BASE_URL
)
@RequestMapping
(
"/api"
)
@RequiredArgsConstructor
@RequiredArgsConstructor
@Slf4j
@Slf4j
public
class
DictionaryController
{
public
class
DictionaryController
{
...
...
src/main/java/vion/controller/InspectController.java
View file @
81be82d
...
@@ -15,7 +15,7 @@ import vion.vo.InspectVO;
...
@@ -15,7 +15,7 @@ import vion.vo.InspectVO;
import
java.util.Date
;
import
java.util.Date
;
@RestController
@RestController
@RequestMapping
(
Global
.
BASE_URL
)
@RequestMapping
(
"/api"
)
@RequiredArgsConstructor
@RequiredArgsConstructor
@Slf4j
@Slf4j
public
class
InspectController
{
public
class
InspectController
{
...
...
src/main/java/vion/controller/ProductController.java
View file @
81be82d
...
@@ -13,7 +13,7 @@ import vion.service.IProductService;
...
@@ -13,7 +13,7 @@ import vion.service.IProductService;
import
vion.vo.ProductVO
;
import
vion.vo.ProductVO
;
@RestController
@RestController
@RequestMapping
(
Global
.
BASE_URL
)
@RequestMapping
(
"/api"
)
@RequiredArgsConstructor
@RequiredArgsConstructor
@Slf4j
@Slf4j
public
class
ProductController
{
public
class
ProductController
{
...
...
src/main/java/vion/controller/StoreController.java
View file @
81be82d
...
@@ -19,7 +19,7 @@ import vion.vo.UserVO;
...
@@ -19,7 +19,7 @@ import vion.vo.UserVO;
import
java.util.List
;
import
java.util.List
;
@RestController
@RestController
@RequestMapping
(
Global
.
BASE_URL
)
@RequestMapping
(
"/api"
)
@RequiredArgsConstructor
@RequiredArgsConstructor
@Slf4j
@Slf4j
public
class
StoreController
{
public
class
StoreController
{
...
@@ -81,7 +81,7 @@ public class StoreController {
...
@@ -81,7 +81,7 @@ public class StoreController {
@GetMapping
(
"/store/manualCal"
)
@GetMapping
(
"/store/manualCal"
)
@SaCheckPermission
(
value
=
"store:calMaintainStatus"
,
orRole
=
"admin"
)
@SaCheckPermission
(
value
=
"store:calMaintainStatus"
,
orRole
=
"admin"
)
// todo 权限未加
// todo 权限未加
,前端未调用该接口
public
String
manualCalMaintainStatus
()
{
public
String
manualCalMaintainStatus
()
{
return
storeService
.
calMaintainStatus
();
return
storeService
.
calMaintainStatus
();
}
}
...
...
src/main/java/vion/controller/TaskController.java
View file @
81be82d
...
@@ -16,7 +16,7 @@ import java.util.Date;
...
@@ -16,7 +16,7 @@ import java.util.Date;
import
java.util.List
;
import
java.util.List
;
@RestController
@RestController
@RequestMapping
(
Global
.
BASE_URL
)
@RequestMapping
(
"/api"
)
@RequiredArgsConstructor
@RequiredArgsConstructor
@Slf4j
@Slf4j
public
class
TaskController
{
public
class
TaskController
{
...
...
src/main/java/vion/controller/TaskTempController.java
View file @
81be82d
...
@@ -20,7 +20,7 @@ import java.io.IOException;
...
@@ -20,7 +20,7 @@ import java.io.IOException;
* 预工单
* 预工单
*/
*/
@RestController
@RestController
@RequestMapping
(
Global
.
BASE_URL
)
@RequestMapping
(
"/api"
)
@RequiredArgsConstructor
@RequiredArgsConstructor
@Slf4j
@Slf4j
public
class
TaskTempController
{
public
class
TaskTempController
{
...
...
src/main/java/vion/controller/UserController.java
View file @
81be82d
...
@@ -35,7 +35,7 @@ import java.util.stream.Collectors;
...
@@ -35,7 +35,7 @@ import java.util.stream.Collectors;
@RestController
@RestController
@RequestMapping
(
Global
.
BASE_URL
)
@RequestMapping
(
"/api"
)
@RequiredArgsConstructor
@RequiredArgsConstructor
@Slf4j
@Slf4j
public
class
UserController
{
public
class
UserController
{
...
...
src/main/java/vion/model/DeliveryRecord.java
View file @
81be82d
...
@@ -25,7 +25,7 @@ public class DeliveryRecord {
...
@@ -25,7 +25,7 @@ public class DeliveryRecord {
/**
/**
* 合同编号
* 合同编号
*/
*/
@TableField
(
value
=
"contract_no"
)
@TableField
(
value
=
"contract_no"
,
condition
=
SqlCondition
.
LIKE
)
private
String
contractNo
;
private
String
contractNo
;
/**
/**
...
@@ -35,12 +35,6 @@ public class DeliveryRecord {
...
@@ -35,12 +35,6 @@ public class DeliveryRecord {
private
Long
contractId
;
private
Long
contractId
;
/**
/**
* 客户名称
*/
@TableField
(
value
=
"customer_name"
)
private
String
customerName
;
/**
* 发货日期
* 发货日期
*/
*/
@TableField
(
value
=
"ship_date"
)
@TableField
(
value
=
"ship_date"
)
...
...
src/main/java/vion/model/FileInfo.java
View file @
81be82d
...
@@ -24,7 +24,11 @@ public class FileInfo {
...
@@ -24,7 +24,11 @@ public class FileInfo {
private
Long
storeId
;
private
Long
storeId
;
/** 文件扩展名 */
/** 文件扩展名 */
private
String
type
;
private
String
type
;
/** 文件来源(1项目、2工单预处理,3工单操作,4巡检,5合同,6发货记录) */
/**
* 文件来源
* 1项目、2工单预处理,3工单操作,4巡检,5合同,6发货记录,
* 7签订,8到货,9系统初验,10项目终验,11质保,12第一笔维保款,13第二笔维保款,14第三笔维保款
*/
private
Integer
sourceType
;
private
Integer
sourceType
;
/** 文件来源id */
/** 文件来源id */
private
Long
sourceId
;
private
Long
sourceId
;
...
...
src/main/java/vion/service/impl/ContractPaymentServiceImpl.java
View file @
81be82d
package
vion
.
service
.
impl
;
package
vion
.
service
.
impl
;
import
cn.hutool.core.util.NumberUtil
;
import
cn.hutool.core.util.NumberUtil
;
import
cn.hutool.core.util.ObjUtil
;
import
com.github.yulichang.base.MPJBaseServiceImpl
;
import
com.github.yulichang.base.MPJBaseServiceImpl
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -40,7 +41,7 @@ public class ContractPaymentServiceImpl extends MPJBaseServiceImpl<ContractPayme
...
@@ -40,7 +41,7 @@ public class ContractPaymentServiceImpl extends MPJBaseServiceImpl<ContractPayme
}
}
BigDecimal
totalAmount
=
existContract
.
getTotalAmount
();
BigDecimal
totalAmount
=
existContract
.
getTotalAmount
();
BigDecimal
curAmount
=
NumberUtil
.
mul
(
totalAmount
,
sumRatio
);
BigDecimal
curAmount
=
NumberUtil
.
mul
(
totalAmount
,
sumRatio
);
BigDecimal
paidAmount
=
dto
.
getPaidAmount
()
==
null
?
existContract
.
getPaidAmount
()
:
dto
.
getPaidAmount
();
BigDecimal
paidAmount
=
ObjUtil
.
isNull
(
dto
.
getPaidAmount
())
?
existContract
.
getPaidAmount
()
:
dto
.
getPaidAmount
();
BigDecimal
recAmount
=
NumberUtil
.
sub
(
curAmount
,
paidAmount
);
BigDecimal
recAmount
=
NumberUtil
.
sub
(
curAmount
,
paidAmount
);
BigDecimal
outsideAmount
=
NumberUtil
.
sub
(
totalAmount
,
paidAmount
);
BigDecimal
outsideAmount
=
NumberUtil
.
sub
(
totalAmount
,
paidAmount
);
dto
.
setReceivableAmount
(
recAmount
);
dto
.
setReceivableAmount
(
recAmount
);
...
...
src/main/java/vion/service/impl/DeliveryRecordServiceImpl.java
View file @
81be82d
...
@@ -50,9 +50,11 @@ public class DeliveryRecordServiceImpl extends MPJBaseServiceImpl<DeliveryRecord
...
@@ -50,9 +50,11 @@ public class DeliveryRecordServiceImpl extends MPJBaseServiceImpl<DeliveryRecord
MPJLambdaWrapper
<
DeliveryRecord
>
wrapper
=
new
MPJLambdaWrapper
<>(
converter
.
convert
(
dto
,
new
DeliveryRecord
()))
MPJLambdaWrapper
<
DeliveryRecord
>
wrapper
=
new
MPJLambdaWrapper
<>(
converter
.
convert
(
dto
,
new
DeliveryRecord
()))
.
selectAll
(
DeliveryRecord
.
class
)
.
selectAll
(
DeliveryRecord
.
class
)
.
selectAs
(
Contract:
:
getName
,
DeliveryRecordVO:
:
getContractName
)
.
selectAs
(
Contract:
:
getName
,
DeliveryRecordVO:
:
getContractName
)
.
selectAs
(
Contract:
:
getCustomerName
,
DeliveryRecordVO:
:
getCustomerName
)
.
leftJoin
(
Contract
.
class
,
Contract:
:
getContractNo
,
DeliveryRecord:
:
getContractNo
)
.
leftJoin
(
Contract
.
class
,
Contract:
:
getContractNo
,
DeliveryRecord:
:
getContractNo
)
.
like
(
StrUtil
.
isNotBlank
(
dto
.
getContractName
()),
Contract:
:
getName
,
dto
.
getContractName
())
.
like
(
StrUtil
.
isNotBlank
(
dto
.
getContractName
()),
Contract:
:
getName
,
dto
.
getContractName
())
.
orderByDesc
(
DeliveryRecord:
:
getShipDate
);
.
like
(
StrUtil
.
isNotBlank
(
dto
.
getCustomerName
()),
Contract:
:
getCustomerName
,
dto
.
getCustomerName
())
.
orderByDesc
(
DeliveryRecord:
:
getCreateTime
);
return
this
.
selectJoinListPage
(
Page
.
of
(
dto
.
getPageNum
(),
dto
.
getPageSize
()),
DeliveryRecordVO
.
class
,
wrapper
);
return
this
.
selectJoinListPage
(
Page
.
of
(
dto
.
getPageNum
(),
dto
.
getPageSize
()),
DeliveryRecordVO
.
class
,
wrapper
);
}
}
...
@@ -73,7 +75,7 @@ public class DeliveryRecordServiceImpl extends MPJBaseServiceImpl<DeliveryRecord
...
@@ -73,7 +75,7 @@ public class DeliveryRecordServiceImpl extends MPJBaseServiceImpl<DeliveryRecord
String
fileName
=
orgName
.
substring
(
0
,
orgName
.
lastIndexOf
(
"."
));
String
fileName
=
orgName
.
substring
(
0
,
orgName
.
lastIndexOf
(
"."
));
String
fileExt
=
orgName
.
substring
(
orgName
.
lastIndexOf
(
"."
));
String
fileExt
=
orgName
.
substring
(
orgName
.
lastIndexOf
(
"."
));
String
filename
=
fileName
+
"_"
+
DateUtil
.
format
(
new
Date
(),
"yyyyMMdd_HHmmss"
)
+
fileExt
;
String
filename
=
fileName
+
"_"
+
DateUtil
.
format
(
new
Date
(),
"yyyyMMdd_HHmmss"
)
+
fileExt
;
String
path
=
fileUrl
+
FileUtil
.
FILE_SEPARATOR
+
"
/
delivery"
+
FileUtil
.
FILE_SEPARATOR
+
dto
.
getContractId
()
+
FileUtil
.
FILE_SEPARATOR
+
record
.
getId
()
+
FileUtil
.
FILE_SEPARATOR
+
filename
;
String
path
=
fileUrl
+
FileUtil
.
FILE_SEPARATOR
+
"delivery"
+
FileUtil
.
FILE_SEPARATOR
+
dto
.
getContractId
()
+
FileUtil
.
FILE_SEPARATOR
+
record
.
getId
()
+
FileUtil
.
FILE_SEPARATOR
+
filename
;
File
file
=
FileUtil
.
touch
(
path
);
File
file
=
FileUtil
.
touch
(
path
);
try
{
try
{
infile
.
transferTo
(
file
);
infile
.
transferTo
(
file
);
...
@@ -114,7 +116,7 @@ public class DeliveryRecordServiceImpl extends MPJBaseServiceImpl<DeliveryRecord
...
@@ -114,7 +116,7 @@ public class DeliveryRecordServiceImpl extends MPJBaseServiceImpl<DeliveryRecord
String
fileName
=
orgName
.
substring
(
0
,
orgName
.
lastIndexOf
(
"."
));
String
fileName
=
orgName
.
substring
(
0
,
orgName
.
lastIndexOf
(
"."
));
String
fileExt
=
orgName
.
substring
(
orgName
.
lastIndexOf
(
"."
));
String
fileExt
=
orgName
.
substring
(
orgName
.
lastIndexOf
(
"."
));
String
filename
=
fileName
+
"_"
+
DateUtil
.
format
(
new
Date
(),
"yyyyMMdd_HHmmss"
)
+
fileExt
;
String
filename
=
fileName
+
"_"
+
DateUtil
.
format
(
new
Date
(),
"yyyyMMdd_HHmmss"
)
+
fileExt
;
String
path
=
fileUrl
+
FileUtil
.
FILE_SEPARATOR
+
"
/
delivery"
+
FileUtil
.
FILE_SEPARATOR
+
deliveryRecord
.
getContractId
()
+
FileUtil
.
FILE_SEPARATOR
+
record
.
getId
()
+
FileUtil
.
FILE_SEPARATOR
+
filename
;
String
path
=
fileUrl
+
FileUtil
.
FILE_SEPARATOR
+
"delivery"
+
FileUtil
.
FILE_SEPARATOR
+
deliveryRecord
.
getContractId
()
+
FileUtil
.
FILE_SEPARATOR
+
record
.
getId
()
+
FileUtil
.
FILE_SEPARATOR
+
filename
;
File
file
=
FileUtil
.
touch
(
path
);
File
file
=
FileUtil
.
touch
(
path
);
try
{
try
{
infile
.
transferTo
(
file
);
infile
.
transferTo
(
file
);
...
...
src/main/java/vion/service/impl/InspectServiceImpl.java
View file @
81be82d
...
@@ -39,7 +39,8 @@ public class InspectServiceImpl extends MPJBaseServiceImpl<InspectMapper, Inspec
...
@@ -39,7 +39,8 @@ public class InspectServiceImpl extends MPJBaseServiceImpl<InspectMapper, Inspec
.
selectAs
(
Store:
:
getName
,
InspectVO:
:
getStoreName
)
.
selectAs
(
Store:
:
getName
,
InspectVO:
:
getStoreName
)
.
leftJoin
(
Account
.
class
,
Account:
:
getId
,
Inspect:
:
getAccountId
)
.
leftJoin
(
Account
.
class
,
Account:
:
getId
,
Inspect:
:
getAccountId
)
.
leftJoin
(
Store
.
class
,
Store:
:
getId
,
Inspect:
:
getStoreId
)
.
leftJoin
(
Store
.
class
,
Store:
:
getId
,
Inspect:
:
getStoreId
)
.
between
(
data
.
getStartdate
()
!=
null
&&
data
.
getEnddate
()
!=
null
,
Inspect:
:
getInspectDate
,
data
.
getStartdate
(),
data
.
getEnddate
());
.
between
(
data
.
getStartdate
()
!=
null
&&
data
.
getEnddate
()
!=
null
,
Inspect:
:
getInspectDate
,
data
.
getStartdate
(),
data
.
getEnddate
())
.
orderByDesc
(
Inspect:
:
getCreateTime
);
Page
<
InspectVO
>
inspectVOPage
=
this
.
selectJoinListPage
(
Page
.
of
(
data
.
getPageNum
(),
data
.
getPageSize
()),
InspectVO
.
class
,
wrapper
);
Page
<
InspectVO
>
inspectVOPage
=
this
.
selectJoinListPage
(
Page
.
of
(
data
.
getPageNum
(),
data
.
getPageSize
()),
InspectVO
.
class
,
wrapper
);
...
...
src/main/java/vion/service/impl/StoreServiceImpl.java
View file @
81be82d
...
@@ -132,7 +132,7 @@ public class StoreServiceImpl extends MPJBaseServiceImpl<StoreMapper, Store> imp
...
@@ -132,7 +132,7 @@ public class StoreServiceImpl extends MPJBaseServiceImpl<StoreMapper, Store> imp
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
log
.
error
(
"保存文件出错"
,
e
);
log
.
error
(
"保存文件出错"
,
e
);
}
}
// storeId = sourceId
FileInfo
tempFileInfo
=
new
FileInfo
();
FileInfo
tempFileInfo
=
new
FileInfo
();
tempFileInfo
.
setStoreId
(
statusDTO
.
getStoreId
());
tempFileInfo
.
setStoreId
(
statusDTO
.
getStoreId
());
tempFileInfo
.
setSourceId
(
statusDTO
.
getSourceId
());
tempFileInfo
.
setSourceId
(
statusDTO
.
getSourceId
());
...
...
src/main/java/vion/service/impl/TaskServiceImpl.java
View file @
81be82d
...
@@ -78,6 +78,11 @@ public class TaskServiceImpl extends MPJBaseServiceImpl<TaskMapper, Task> implem
...
@@ -78,6 +78,11 @@ public class TaskServiceImpl extends MPJBaseServiceImpl<TaskMapper, Task> implem
log
.
setTaskId
(-
99L
);
log
.
setTaskId
(-
99L
);
logList
.
add
(
log
);
logList
.
add
(
log
);
}
}
// 当前处理人的工单也要加入筛选条件
Long
id
=
userVO
.
getId
();
Opt
.
ofEmptyAble
(
this
.
lambdaQuery
().
eq
(
Task:
:
getActiveUser
,
id
).
list
())
.
map
(
l
->
l
.
stream
().
map
(
Task:
:
getId
).
collect
(
Collectors
.
toList
()))
.
ifPresent
(
taskIdSet:
:
addAll
);
return
logList
;
return
logList
;
}
}
})
})
...
...
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