Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bailuntec-cost
Overview
Overview
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
huluobin
bailuntec-cost
Commits
d9488476
Commit
d9488476
authored
Jan 16, 2021
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
# fee
parent
32712069
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
322 additions
and
170 deletions
+322
-170
CostController.java
.../com/blt/other/module/cost/controller/CostController.java
+17
-21
CostReportController.java
...lt/other/module/cost/controller/CostReportController.java
+1
-4
CostDao.java
.../src/main/java/com/blt/other/module/cost/dao/CostDao.java
+5
-0
CostQueryPageReq.java
...m/blt/other/module/cost/dto/request/CostQueryPageReq.java
+72
-0
CostTypeResult.java
...om/blt/other/module/cost/dto/response/CostTypeResult.java
+1
-1
CostDomain.java
...main/java/com/blt/other/module/cost/model/CostDomain.java
+135
-0
CostService.java
...n/java/com/blt/other/module/cost/service/CostService.java
+8
-2
AbstractCostService.java
...er/module/cost/service/impl/cost/AbstractCostService.java
+16
-136
Lend1CostServiceImpl.java
...r/module/cost/service/impl/cost/Lend1CostServiceImpl.java
+1
-1
Lend2PayCostServiceImpl.java
...odule/cost/service/impl/cost/Lend2PayCostServiceImpl.java
+3
-3
PayCostServiceImpl.java
...her/module/cost/service/impl/cost/PayCostServiceImpl.java
+1
-1
ReceiptCostServiceImpl.java
...module/cost/service/impl/cost/ReceiptCostServiceImpl.java
+1
-1
Cost.xml
cost-service/src/main/resources/mapper/Cost.xml
+61
-0
No files found.
cost-service/src/main/java/com/blt/other/module/cost/controller/CostController.java
View file @
d9488476
...
...
@@ -6,9 +6,11 @@ import com.bailuntec.cost.api.dto.CostListPrintDto;
import
com.bailuntec.cost.api.response.CostResult
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.IdWorker
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.blt.other.common.annotation.LoginIgnore
;
import
com.blt.other.module.cost.dao.CostDao
;
import
com.blt.other.module.cost.dto.request.CheckCostListReq
;
import
com.blt.other.module.cost.dto.request.CostQueryPageReq
;
import
com.blt.other.module.cost.dto.response.*
;
import
com.blt.other.module.cost.model.CostDomain
;
import
com.blt.other.module.cost.service.CostListSearchService
;
...
...
@@ -40,24 +42,25 @@ import java.util.stream.Collectors;
@RestController
@Api
(
tags
=
"费用单接口"
)
public
class
CostController
{
private
CostService
costService
;
@Resource
CostListSearchService
costListSearchService
;
private
CostService
costService
;
@Resource
private
CostListSearchService
costListSearchService
;
@Resource
CostLogService
costLogService
;
private
CostLogService
costLogService
;
@Resource
CostDao
costDao
;
private
CostDao
costDao
;
@Resource
UnSubmitState
unSubmitState
;
private
UnSubmitState
unSubmitState
;
@Resource
DepartmentCheckState
departmentCheckState
;
private
DepartmentCheckState
departmentCheckState
;
@Resource
FinalCheckState
finalCheckState
;
private
FinalCheckState
finalCheckState
;
@Resource
FinancialCheckState
financialCheckState
;
private
FinancialCheckState
financialCheckState
;
@Resource
HrCheckState
hrCheckState
;
private
HrCheckState
hrCheckState
;
@ApiOperation
(
"获取前端要打印的费用单列表"
)
@PostMapping
(
"/list/print/list"
)
...
...
@@ -104,18 +107,11 @@ public class CostController {
}
@ApiOperation
(
"获取所有费用单"
)
@GetMapping
(
"/list/getAllCost"
)
public
CostPageResult
getAllCost
(
@RequestParam
Integer
pageNum
,
@RequestParam
Integer
pageSize
,
@RequestParam
Integer
userId
,
@RequestParam
(
defaultValue
=
"0"
,
required
=
false
)
Integer
authType
,
@RequestParam
(
required
=
false
)
String
projectTypes
)
{
if
(
authType
!=
0
)
{
userId
=
null
;
}
costService
=
CostServiceFactory
.
getCostService
();
return
costService
.
getAllCost
(
pageNum
,
pageSize
,
userId
,
projectTypes
);
@ApiOperation
(
"分页查询费用单"
)
@PostMapping
(
"/queryPage"
)
public
CostResult
<
Page
<
CostDto
>>
queryPage
(
@RequestBody
CostQueryPageReq
req
)
{
Page
<
CostDomain
>
costDaoPage
=
costService
.
queryPage
(
req
);
return
CostResult
.
success
((
Page
<
CostDto
>)
costDaoPage
.
convert
(
CostDomain:
:
castToDto
));
}
@ApiOperation
(
"获取费用详情"
)
...
...
cost-service/src/main/java/com/blt/other/module/cost/controller/CostReportController.java
View file @
d9488476
...
...
@@ -4,13 +4,11 @@ import com.bailuntec.common.JsonUtilByFsJson;
import
com.blt.other.common.util.AxiosUtil
;
import
com.blt.other.common.util.MyMapperUtil
;
import
com.blt.other.common.util.PathUtil
;
import
com.blt.other.database.model.CostExpDomain
;
import
com.blt.other.module.cost.dao.CostDao
;
import
com.blt.other.module.cost.model.CostDomain
;
import
com.blt.other.module.cost.service.CostExportService
;
import
com.blt.other.module.cost.service.CostService
;
import
com.blt.other.module.cost.service.impl.cost.CostServiceFactory
;
import
com.blt.other.module.cost.vo.CostExportVo
;
import
com.blt.other.database.model.CostExpDomain
;
import
io.swagger.annotations.Api
;
import
org.springframework.core.io.FileSystemResource
;
import
org.springframework.core.io.InputStreamResource
;
...
...
@@ -61,7 +59,6 @@ public class CostReportController {
@PostMapping
(
"/cost/list/exportListAll"
)
public
String
exportListAll
(
HttpServletResponse
response
,
HttpServletRequest
request
)
{
CostService
costService
=
CostServiceFactory
.
getCostService
();
AxiosUtil
.
setCors
(
response
,
request
);
Enumeration
<
String
>
parameterNames
=
request
.
getParameterNames
();
...
...
cost-service/src/main/java/com/blt/other/module/cost/dao/CostDao.java
View file @
d9488476
...
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.blt.other.module.cost.dto.request.AppCheckCostListReq
;
import
com.blt.other.module.cost.dto.request.AppCostListReq
;
import
com.blt.other.module.cost.dto.request.CheckCostListReq
;
import
com.blt.other.module.cost.dto.request.CostQueryPageReq
;
import
com.blt.other.module.cost.model.CostDomain
;
import
com.blt.other.module.cost.vo.CostExportVo
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -70,4 +71,8 @@ public interface CostDao extends BaseMapper<CostDomain> {
//根据费用单状态获取费用单
List
<
CostDomain
>
selectByStatus
(
Integer
costStatus
);
//分页查询费用单
Page
<
CostDomain
>
queryPage
(
@Param
(
"page"
)
Page
<
Object
>
page
,
@Param
(
"req"
)
CostQueryPageReq
req
);
}
cost-service/src/main/java/com/blt/other/module/cost/dto/request/CostQueryPageReq.java
0 → 100644
View file @
d9488476
package
com
.
blt
.
other
.
module
.
cost
.
dto
.
request
;
import
com.bailuntec.common.base.BaseRequest
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
import
java.util.List
;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2021/1/16 9:44 上午
*/
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
public
class
CostQueryPageReq
extends
BaseRequest
{
@ApiModelProperty
(
"项目类型"
)
private
String
projectTypes
;
@ApiModelProperty
(
"主体编号"
)
private
String
companyNo
;
@ApiModelProperty
(
"1 付款费用 2 收款费用 3 借支/借还"
)
private
Integer
costForm
;
@ApiModelProperty
(
"创建人id"
)
private
Integer
createUserid
;
@ApiModelProperty
(
"费用单状态 0 待提交 1- 待财务审核 2待出纳付款 3被驳回 4已支付 5已作废 6-待部门审核 7-待财务审核 8-待最终审核人审核"
)
private
Integer
costStatus
;
@ApiModelProperty
(
"1 未还 2 部分还款 3 待补差额 4 结清"
)
private
Integer
lendStatus
;
@ApiModelProperty
(
"0 不抵扣个税 1 抵扣个税"
)
private
Integer
isTax
;
@ApiModelProperty
(
"1 借支 2 借还"
)
private
Integer
isLend
;
@ApiModelProperty
(
"费用单创建时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
beginTime
;
@ApiModelProperty
(
"费用单创建时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
endTime
;
@ApiModelProperty
(
"费用单支付时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
beginPayTime
;
@ApiModelProperty
(
"费用单支付时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
endPayTime
;
@ApiModelProperty
(
"关联费用单"
)
private
String
linkCost
;
@ApiModelProperty
(
"模糊搜索字段"
)
private
String
key
;
private
List
<
String
>
keys
;
}
cost-service/src/main/java/com/blt/other/module/cost/dto/response/CostTypeResult.java
View file @
d9488476
...
...
@@ -59,7 +59,7 @@ public class CostTypeResult {
private
LocalDateTime
lastUpdateTime
;
@ApiModelProperty
(
"是否管理成本"
)
private
Integer
isManageCost
;
private
Boolean
isManageCost
;
}
cost-service/src/main/java/com/blt/other/module/cost/model/CostDomain.java
View file @
d9488476
package
com
.
blt
.
other
.
module
.
cost
.
model
;
import
com.bailuntec.api.bailuntec.cw.request.PostApplyReq
;
import
com.bailuntec.common.BeanUtils
;
import
com.bailuntec.common.SpringContextUtil
;
import
com.bailuntec.cost.api.dto.CostAttach
;
import
com.bailuntec.cost.api.dto.CostDto
;
import
com.bailuntec.cost.api.dto.CostListPrintDto
;
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
com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler
;
import
com.blt.other.common.util.CurUtils
;
import
com.blt.other.common.util.MoneyUtil
;
import
com.blt.other.database.mapper.StatusMapper
;
import
com.blt.other.database.model.CostCompanyDomain
;
import
com.blt.other.database.model.UserDomain
;
import
com.blt.other.module.cost.dao.CostCompanyDao
;
import
com.blt.other.module.sys.service.UserService
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -246,6 +253,134 @@ public class CostDomain implements Serializable {
private
static
final
String
REGEX_CHINESE
=
"[\u4e00-\u9fa5]"
;
// 中文正则
public
PostApplyReq
buildPostApplyReq
()
{
CostCompanyDao
costCompanyDao
=
SpringContextUtil
.
getBean
(
CostCompanyDao
.
class
);
CostCompanyDomain
companyByCompanyNo
=
costCompanyDao
.
selectByNo
(
companyNo
);
PostApplyReq
req
=
new
PostApplyReq
();
// 公司主体(CompanyMainName)不可为空;
req
.
setCompanyMainName
(
companyName
);
req
.
setTitle
(
costNo
);
// 币种编号(UnitCode)不可为空;
req
.
setUnitCode
(
dic
);
// 币种名称(UnitName)不可为空;
req
.
setUnitName
(
dic
);
// 交易对象(TradeObjectID/TradeObjectName)不可为空;
req
.
setTradeObjectID
(
companyByCompanyNo
.
getValue
()
+
""
);
req
.
setTradeObjectName
(
this
.
getBankCompany
()
+
""
);
// 交易对象账户(BankNameto/BankCardto/BankCardUserto)资料不完整;
req
.
setBankCardto
(
this
.
getBankCard
());
req
.
setBankCardUserto
(
this
.
getBankCardUser
());
req
.
setBankNameto
(
this
.
getBankName
());
// newOtherPurchase申请来源(SourceCode/SourceTypeCode)不可为空;
req
.
setSourceCode
(
"newCost"
);
req
.
setSourceTypeCode
(
"newCostType"
);
// 账期 0 PayDay
req
.
setPayDay
(
0
);
// 预计付款时间 ExpectPayTime
req
.
setExpectPayTime
(
new
Date
());
// 申请人(UserAcctID/UserAcctName)不存在;
req
.
setUserAcctID
(
""
+
this
.
getCreateUserid
());
req
.
setUserAcctName
(
""
+
this
.
getCreateUsername
());
// 设置 detailKey
String
detailKey
=
this
.
getDetailKey
();
if
(
null
==
detailKey
||
!
detailKey
.
contains
(
"F"
))
{
detailKey
=
this
.
getCostNo
();
}
// 回调必要的key参数(DetailKey)不能为空;
req
.
setDetailKey
(
detailKey
);
req
.
setTypeName
(
this
.
getTypeName
());
return
req
;
}
public
CostListPrintDto
printDto
()
{
UserService
userService
=
SpringContextUtil
.
getBean
(
UserService
.
class
);
CostListPrintDto
print
=
new
CostListPrintDto
();
CostDto
cost
=
this
.
castToDto
();
UserDomain
user
=
userService
.
findByUserid
(
cost
.
getCreateUserid
());
if
(
user
==
null
)
{
print
.
setDepartment
(
""
);
print
.
setCreateUsername
(
cost
.
getCreateUsername
()
+
"【注销】"
);
}
else
{
print
.
setDepartment
(
user
.
getDepartmentname1
());
print
.
setCreateUsername
(
cost
.
getCreateUsername
());
}
print
.
setId
(
cost
.
getId
());
print
.
setCompanyName
(
cost
.
getCompanyName
());
print
.
setCostNo
(
costNo
);
print
.
setCreateTime
(
cost
.
getCreateTime
());
print
.
setBankCompany
(
cost
.
getBankCompany
());
print
.
setBankCardUser
(
cost
.
getBankCardUser
());
print
.
setBankCard
(
cost
.
getBankCard
());
print
.
setCostReason
(
cost
.
getCostReason
());
print
.
setDic
(
cost
.
getDicDto
());
print
.
setAmount
(
cost
.
getAmountDto
());
print
.
setTxtAmount
(
MoneyUtil
.
getCnNum
(
cost
.
getAmount
()));
if
(
1
==
cost
.
getCostForm
())
{
// 付款单
print
.
setCostFormStr
(
"付"
);
print
.
setBankCompanyStr
(
"收款单位"
);
print
.
setBankCardUserStr
(
"收款户名"
);
print
.
setFeeTypeStr
(
"付款方式"
);
print
.
setBankCardStr
(
"收款账户"
);
print
.
setCostReasonStr
(
"付款理由"
);
print
.
setCostReason
(
cost
.
getTypeName
()
+
"/"
+
cost
.
getAccountingSubjectName
()
+
"; "
+
cost
.
getCostRemark
());
// 差额单的付款理由需详细说明
if
(
null
!=
cost
.
getIsLend
()
&&
2
==
cost
.
getIsLend
())
{
print
.
setCostReason
(
"【差额单(关联借支单:"
+
cost
.
getSupCostNo
()
+
")】 "
+
cost
.
getTypeName
()
+
" "
+
cost
.
getCostRemark
());
}
print
.
setCostAmountStr
(
"付款金额"
);
}
if
(
2
==
cost
.
getCostForm
())
{
// 收款单
print
.
setCostFormStr
(
"收"
);
print
.
setBankCompanyStr
(
"付款单位"
);
print
.
setBankCardUserStr
(
"付款户名"
);
print
.
setFeeTypeStr
(
"收款方式"
);
print
.
setBankCardStr
(
"付款账户"
);
print
.
setCostReasonStr
(
"收款理由"
);
print
.
setCostAmountStr
(
"收款金额"
);
}
if
(
3
==
cost
.
getCostForm
()
&&
1
==
cost
.
getIsLend
())
{
// 借支单
print
.
setCostFormStr
(
"借支"
);
print
.
setBankCompanyStr
(
"收款单位"
);
print
.
setBankCardUserStr
(
"收款户名"
);
print
.
setFeeTypeStr
(
"付款方式"
);
print
.
setBankCardStr
(
"收款账户"
);
print
.
setCostReasonStr
(
"付款理由"
);
print
.
setCostAmountStr
(
"付款金额"
);
}
if
(
3
==
cost
.
getCostForm
()
&&
2
==
cost
.
getIsLend
())
{
// 借还单
print
.
setCostFormStr
(
"借还"
);
print
.
setBankCompanyStr
(
"付款单位"
);
print
.
setBankCardUserStr
(
"付款户名"
);
print
.
setFeeTypeStr
(
"收款方式"
);
print
.
setBankCardStr
(
"付款账户"
);
print
.
setCostReasonStr
(
"收款理由"
);
print
.
setCostAmountStr
(
"收款金额"
);
print
.
setDic
(
cost
.
getPayDicDto
());
print
.
setAmount
(
cost
.
getPayPlanAmountDto
());
print
.
setTxtAmount
(
MoneyUtil
.
getCnNum
(
cost
.
getPayPlanAmount
()));
}
return
print
;
}
public
CostDto
castToDto
()
{
StatusMapper
statusMapper
=
SpringContextUtil
.
getBean
(
StatusMapper
.
class
);
...
...
cost-service/src/main/java/com/blt/other/module/cost/service/CostService.java
View file @
d9488476
...
...
@@ -4,8 +4,8 @@ import com.bailuntec.cost.api.dto.CostDto;
import
com.bailuntec.cost.api.dto.CostListPrintDto
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.blt.other.module.cost.dto.request.AppCheckCostListReq
;
import
com.blt.other.module.cost.dto.request.CheckCostListReq
;
import
com.blt.other.module.cost.dto.request.CostQueryPageReq
;
import
com.blt.other.module.cost.dto.response.CostPageResult
;
import
com.blt.other.module.cost.dto.response.UpdateCostResp
;
import
com.blt.other.module.cost.model.CostDomain
;
...
...
@@ -17,7 +17,6 @@ import java.util.List;
public
interface
CostService
{
void
setPrimaryDepartment
(
List
<
CostDomain
>
costDomains
);
/**
...
...
@@ -137,4 +136,11 @@ public interface CostService {
*/
void
reject
(
String
costNo
);
/**
* 分页查询费用单
*
* @param req req
* @return res
*/
Page
<
CostDomain
>
queryPage
(
CostQueryPageReq
req
);
}
cost-service/src/main/java/com/blt/other/module/cost/service/impl/cost/AbstractCostService.java
View file @
d9488476
This diff is collapsed.
Click to expand it.
cost-service/src/main/java/com/blt/other/module/cost/service/impl/cost/Lend1CostServiceImpl.java
View file @
d9488476
...
...
@@ -32,7 +32,7 @@ public class Lend1CostServiceImpl extends AbstractCostService implements CostSer
@Override
public
void
toFinancial
(
CostDomain
cost
)
{
PostApplyReq
req
=
super
.
buildPostApplyReq
(
cost
);
PostApplyReq
req
=
cost
.
buildPostApplyReq
(
);
// 审核回调地址(ApplyCallbackUrl)不可为空;
req
.
setApplyCallbackUrl
(
costUrlProperties
.
costApplyCallbackUrlPost
);
// 出纳回调地址(CashierCallbackUrl)不可为空;
...
...
cost-service/src/main/java/com/blt/other/module/cost/service/impl/cost/Lend2PayCostServiceImpl.java
View file @
d9488476
...
...
@@ -8,11 +8,11 @@ import com.bailuntec.common.BeanUtils;
import
com.bailuntec.common.JsonUtilByJackson
;
import
com.blt.other.common.exception.RpcException
;
import
com.blt.other.common.util.CurUtils
;
import
com.blt.other.database.model.CostCashiercallbackDomain
;
import
com.blt.other.database.model.CostTofinanceDomain
;
import
com.blt.other.module.cost.model.CostDomain
;
import
com.blt.other.module.cost.service.CostService
;
import
com.blt.other.module.cost.vo.TofinanceVo
;
import
com.blt.other.database.model.CostCashiercallbackDomain
;
import
com.blt.other.database.model.CostTofinanceDomain
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -75,7 +75,7 @@ public class Lend2PayCostServiceImpl extends AbstractCostService implements Cost
return
;
}
PostApplyReq
req
=
super
.
buildPostApplyReq
(
cost
);
PostApplyReq
req
=
cost
.
buildPostApplyReq
(
);
// 审核回调地址(ApplyCallbackUrl)不可为空;
req
.
setApplyCallbackUrl
(
costUrlProperties
.
costApplyCallbackUrlPost
);
// 出纳回调地址(CashierCallbackUrl)不可为空;
...
...
cost-service/src/main/java/com/blt/other/module/cost/service/impl/cost/PayCostServiceImpl.java
View file @
d9488476
...
...
@@ -34,7 +34,7 @@ public class PayCostServiceImpl extends AbstractCostService implements CostServi
@Override
public
void
toFinancial
(
CostDomain
cost
)
{
PostApplyReq
req
=
buildPostApplyReq
(
cost
);
PostApplyReq
req
=
cost
.
buildPostApplyReq
(
);
// 审核回调地址(ApplyCallbackUrl)不可为空;
req
.
setApplyCallbackUrl
(
costUrlProperties
.
costApplyCallbackUrlPost
);
// 出纳回调地址(CashierCallbackUrl)不可为空;
...
...
cost-service/src/main/java/com/blt/other/module/cost/service/impl/cost/ReceiptCostServiceImpl.java
View file @
d9488476
...
...
@@ -42,7 +42,7 @@ public class ReceiptCostServiceImpl extends AbstractCostService implements CostS
public
void
toFinancial
(
CostDomain
cost
)
{
PostApplyReq
req
=
super
.
buildPostApplyReq
(
cost
);
PostApplyReq
req
=
cost
.
buildPostApplyReq
(
);
// 审核回调地址(ApplyCallbackUrl)不可为空;
req
.
setApplyCallbackUrl
(
costUrlProperties
.
costApplyCallbackUrlPost
);
// 出纳回调地址(CashierCallbackUrl)不可为空;
...
...
cost-service/src/main/resources/mapper/Cost.xml
View file @
d9488476
...
...
@@ -283,4 +283,65 @@
where cost_status = #{costStatus}
</select>
<!--分页查询-->
<select
id=
"queryPage"
resultType=
"com.blt.other.module.cost.model.CostDomain"
>
SELECT
t1.*,
group_concat(distinct t2.username) as cost_current_reviewer
from cost t1
left join cost_current_reviewer t2 on t1.cost_no = t2.cost_no
WHERE
t1.cost_status >= 1
<if
test=
" req.req.costForm!=null and req.costForm != ''"
>
and t1.cost_form= #{req.costForm}
</if>
<if
test=
" req.isLend!=null and req.isLend != ''"
>
and t1.is_lend=#{req.isLend}
</if>
<if
test=
" req.companyNo!=null and req.companyNo != ''"
>
and t1.company_no=#{req.companyNo}
</if>
<if
test=
" req.createUserid!=null "
>
and t1.create_userid=#{req.createUserid}
</if>
<if
test=
" req.costStatus!=null "
>
and t1.cost_status=#{req.costStatus}
</if>
<if
test=
" req.lendStatus!=null "
>
and t1.lend_status=#{req.lendStatus}
</if>
<if
test=
" req.isTax!=null "
>
and t1.is_tax=#{req.isTax}
</if>
<if
test=
" req.isLend!=null "
>
and t1.is_lend=#{req.isLend}
</if>
<if
test=
" req.beginTime != null"
>
AND t1.create_time
<![CDATA[>=]]>
#{req.beginTime}
</if>
<if
test=
" req.endTime != null"
>
AND t1.create_time
<![CDATA[<=]]>
#{req.endTime}
</if>
<if
test=
" req.beginPayTime != null"
>
AND t1.pay_time
<![CDATA[>=]]>
#{req.beginPayTime}
</if>
<if
test=
" req.endPayTime != null"
>
AND t1.pay_time
<![CDATA[<=]]>
#{req.endPayTime}
</if>
<if
test=
" req.linkCost!=null and req.linkCost != ''"
>
and (t1.sup_cost_no=#{req.linkCost} or t1.cost_no=#{req.linkCost})
</if>
<if
test=
" req.projectTypes!=null and req.projectTypes != ''"
>
and
find_in_set(t1.project_type,#{req.projectTypes})
</if>
and (false or
<foreach
collection=
"req.keys"
item=
"key"
index=
"index"
>
<if
test=
"key != null and key != '' "
>
or t1.cost_plan_no = #{key}
</if>
</foreach>
<foreach
collection=
"keys"
item=
"key"
index=
"index"
>
<if
test=
"key != null and key != '' "
>
or t1.cost_no LIKE CONCAT('%',#{key},'%')
</if>
</foreach>
<foreach
collection=
"keys"
item=
"key"
index=
"index"
>
<if
test=
"key != null and key != '' "
>
or t1.type_name LIKE CONCAT('%',#{key},'%')
</if>
</foreach>
<foreach
collection=
"keys"
item=
"key"
index=
"index"
>
<if
test=
"key != null and key != '' "
>
or t1.company_name LIKE CONCAT('%',#{key},'%')
</if>
</foreach>
<foreach
collection=
"keys"
item=
"key"
index=
"index"
>
<if
test=
"key != null and key != '' "
>
or t1.bank_card_user LIKE CONCAT('%',#{key},'%')
</if>
</foreach>
)
group by t1.id
group by t1.id
ORDER BY
t1.id DESC
</select>
</mapper>
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