Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dc-cost-system
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
bltdc
dc-cost-system
Commits
e0249ef0
Commit
e0249ef0
authored
Dec 16, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
80032e4c
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
157 additions
and
33 deletions
+157
-33
CostCheckController.java
...blt/other/module/cost/controller/CostCheckController.java
+1
-1
CostController.java
.../com/blt/other/module/cost/controller/CostController.java
+1
-1
CostCurrentReviewerController.java
...module/cost/controller/CostCurrentReviewerController.java
+20
-0
CostDetailController.java
...lt/other/module/cost/controller/CostDetailController.java
+1
-1
CostPlanController.java
.../blt/other/module/cost/controller/CostPlanController.java
+1
-1
CostPlanNewController.java
...t/other/module/cost/controller/CostPlanNewController.java
+1
-1
CostPlanTempController.java
.../other/module/cost/controller/CostPlanTempController.java
+1
-1
CostTemplateBaseColController.java
...module/cost/controller/CostTemplateBaseColController.java
+1
-1
CostTemplateColController.java
...her/module/cost/controller/CostTemplateColController.java
+1
-1
CostTemplateController.java
.../other/module/cost/controller/CostTemplateController.java
+1
-1
MiniAppCostController.java
...t/other/module/cost/controller/MiniAppCostController.java
+1
-1
CostCurrentReviewerMapper.java
.../blt/other/module/cost/dao/CostCurrentReviewerMapper.java
+16
-0
CostCurrentReviewer.java
.../com/blt/other/module/cost/model/CostCurrentReviewer.java
+39
-0
ICostCurrentReviewerService.java
...ther/module/cost/service/ICostCurrentReviewerService.java
+25
-0
CostCurrentReviewerServiceImpl.java
...ule/cost/service/impl/CostCurrentReviewerServiceImpl.java
+33
-0
AbstractCostService.java
...er/module/cost/service/impl/cost/AbstractCostService.java
+4
-19
log4j2.xml
bailuntec-cost-core/src/main/resources/log4j2.xml
+1
-1
CostCurrentReviewerMapper.xml
...esources/mapper/module/cost/CostCurrentReviewerMapper.xml
+5
-0
CodeGenerator.java
...-cost-core/src/test/java/com/blt/other/CodeGenerator.java
+4
-3
No files found.
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/
cost/
CostCheckController.java
→
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/CostCheckController.java
View file @
e0249ef0
package
com
.
blt
.
other
.
module
.
cost
.
controller
.
cost
;
package
com
.
blt
.
other
.
module
.
cost
.
controller
;
import
com.bailuntec.cost.api.dto.CostDto
;
import
com.bailuntec.cost.api.response.CostResult
;
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/
cost/
CostController.java
→
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/CostController.java
View file @
e0249ef0
package
com
.
blt
.
other
.
module
.
cost
.
controller
.
cost
;
package
com
.
blt
.
other
.
module
.
cost
.
controller
;
import
com.bailuntec.common.JsonUtilByFsJson
;
import
com.bailuntec.cost.api.dto.CostDto
;
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/CostCurrentReviewerController.java
0 → 100644
View file @
e0249ef0
package
com
.
blt
.
other
.
module
.
cost
.
controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* <p>
* 费用单当前审核人 前端控制器
* </p>
*
* @author robbendev
* @since 2020-12-16
*/
@RestController
@RequestMapping
(
"//cost-current-reviewer"
)
public
class
CostCurrentReviewerController
{
}
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/
cost/
CostDetailController.java
→
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/CostDetailController.java
View file @
e0249ef0
package
com
.
blt
.
other
.
module
.
cost
.
controller
.
cost
;
package
com
.
blt
.
other
.
module
.
cost
.
controller
;
import
com.blt.other.common.util.AxiosUtil
;
import
com.blt.other.common.util.PathUtil
;
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/
costplan/
CostPlanController.java
→
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/CostPlanController.java
View file @
e0249ef0
package
com
.
blt
.
other
.
module
.
cost
.
controller
.
costplan
;
package
com
.
blt
.
other
.
module
.
cost
.
controller
;
import
com.bailuntec.cost.api.dto.CostPlanTempDto
;
import
com.blt.other.common.util.CurUtils
;
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/
costplan/
CostPlanNewController.java
→
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/CostPlanNewController.java
View file @
e0249ef0
package
com
.
blt
.
other
.
module
.
cost
.
controller
.
costplan
;
package
com
.
blt
.
other
.
module
.
cost
.
controller
;
import
com.blt.other.common.util.CurUtils
;
import
com.blt.other.module.cost.dto.response.RestResp
;
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/
costplan/
CostPlanTempController.java
→
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/CostPlanTempController.java
View file @
e0249ef0
package
com
.
blt
.
other
.
module
.
cost
.
controller
.
costplan
;
package
com
.
blt
.
other
.
module
.
cost
.
controller
;
import
com.blt.other.module.cost.dto.request.AddItemReq
;
import
com.blt.other.module.cost.dto.request.AddItemResp
;
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/
costtemplate/
CostTemplateBaseColController.java
→
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/CostTemplateBaseColController.java
View file @
e0249ef0
package
com
.
blt
.
other
.
module
.
cost
.
controller
.
costtemplate
;
package
com
.
blt
.
other
.
module
.
cost
.
controller
;
import
com.bailuntec.cost.api.response.CostResult
;
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/
costtemplate/
CostTemplateColController.java
→
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/CostTemplateColController.java
View file @
e0249ef0
package
com
.
blt
.
other
.
module
.
cost
.
controller
.
costtemplate
;
package
com
.
blt
.
other
.
module
.
cost
.
controller
;
import
com.bailuntec.cost.api.response.CostResult
;
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/
costtemplate/
CostTemplateController.java
→
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/CostTemplateController.java
View file @
e0249ef0
package
com
.
blt
.
other
.
module
.
cost
.
controller
.
costtemplate
;
package
com
.
blt
.
other
.
module
.
cost
.
controller
;
import
com.bailuntec.cost.api.response.CostResult
;
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/
cost/
MiniAppCostController.java
→
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/MiniAppCostController.java
View file @
e0249ef0
package
com
.
blt
.
other
.
module
.
cost
.
controller
.
cost
;
package
com
.
blt
.
other
.
module
.
cost
.
controller
;
import
com.bailuntec.cost.api.dto.CostDto
;
import
com.bailuntec.cost.api.response.CostResult
;
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/dao/CostCurrentReviewerMapper.java
0 → 100644
View file @
e0249ef0
package
com
.
blt
.
other
.
module
.
cost
.
dao
;
import
com.blt.other.module.cost.model.CostCurrentReviewer
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* <p>
* 费用单当前审核人 Mapper 接口
* </p>
*
* @author robbendev
* @since 2020-12-16
*/
public
interface
CostCurrentReviewerMapper
extends
BaseMapper
<
CostCurrentReviewer
>
{
}
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/model/CostCurrentReviewer.java
0 → 100644
View file @
e0249ef0
package
com
.
blt
.
other
.
module
.
cost
.
model
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
java.io.Serializable
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* <p>
* 费用单当前审核人
* </p>
*
* @author robbendev
* @since 2020-12-16
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@ApiModel
(
value
=
"CostCurrentReviewer对象"
,
description
=
"费用单当前审核人"
)
public
class
CostCurrentReviewer
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"费用单号"
)
private
String
costNo
;
@ApiModelProperty
(
value
=
"审核人id"
)
private
Integer
oaUserId
;
@ApiModelProperty
(
value
=
"审核人姓名"
)
private
String
username
;
}
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/ICostCurrentReviewerService.java
0 → 100644
View file @
e0249ef0
package
com
.
blt
.
other
.
module
.
cost
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.blt.other.module.cost.model.CostCurrentReviewer
;
/**
* <p>
* 费用单当前审核人 服务类
* </p>
*
* @author robbendev
* @since 2020-12-16
*/
public
interface
ICostCurrentReviewerService
extends
IService
<
CostCurrentReviewer
>
{
/**
* currentUserId 是否可以审核 costNo
*
* @param oaUserId 用户id
* @param costNo 费用单号
* @return canAudit
*/
Boolean
canAudit
(
Integer
oaUserId
,
String
costNo
);
}
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/impl/CostCurrentReviewerServiceImpl.java
0 → 100644
View file @
e0249ef0
package
com
.
blt
.
other
.
module
.
cost
.
service
.
impl
;
import
com.bailuntec.common.ListUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.blt.other.module.cost.dao.CostCurrentReviewerMapper
;
import
com.blt.other.module.cost.dao.CostDao
;
import
com.blt.other.module.cost.model.CostCurrentReviewer
;
import
com.blt.other.module.cost.service.ICostCurrentReviewerService
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* <p>
* 费用单当前审核人 服务实现类
* </p>
*
* @author robbendev
* @since 2020-12-16
*/
@Service
public
class
CostCurrentReviewerServiceImpl
extends
ServiceImpl
<
CostCurrentReviewerMapper
,
CostCurrentReviewer
>
implements
ICostCurrentReviewerService
{
@Override
public
Boolean
canAudit
(
Integer
oaUserId
,
String
costNo
)
{
List
<
CostCurrentReviewer
>
costCurrentReviewerList
=
baseMapper
.
selectList
(
new
LambdaQueryWrapper
<
CostCurrentReviewer
>()
.
eq
(
CostCurrentReviewer:
:
getCostNo
,
costNo
));
return
ListUtil
.
isNotEmpty
(
costCurrentReviewerList
)
&&
costCurrentReviewerList
.
stream
()
.
map
(
CostCurrentReviewer:
:
getOaUserId
).
anyMatch
(
id
->
id
.
equals
(
oaUserId
))
}
}
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/impl/cost/AbstractCostService.java
View file @
e0249ef0
...
...
@@ -18,7 +18,6 @@ import com.blt.other.common.util.SessionUtils;
import
com.blt.other.module.auth.dao.CostReviewerMapper
;
import
com.blt.other.module.auth.dao.OaDepartmentMapper
;
import
com.blt.other.module.auth.dao.OaUserMapper
;
import
com.blt.other.module.auth.model.CostReviewer
;
import
com.blt.other.module.auth.model.OaDepartment
;
import
com.blt.other.module.auth.model.OaUser
;
import
com.blt.other.module.auth.service.UserService
;
...
...
@@ -141,31 +140,17 @@ public abstract class AbstractCostService implements CostService {
CostReviewerMapper
costReviewerMapper
;
@Resource
OaUserMapper
oaUserMapper
;
@Resource
ICostCurrentReviewerService
costCurrentReviewerService
;
@Override
public
CostDomain
getCostByCostNo
(
String
costNo
)
{
CostDomain
costDomain
=
costDao
.
selectByCostNo
(
costNo
);
costDomain
.
setCostTemplate
(
costTemplateService
.
queryDetail
(
costDomain
.
getCostTemplateId
()));
CostCompanyDomain
costCompany
=
costCompanyDao
.
selectByNo
(
costDomain
.
getCompanyNo
());
Integer
currentUserId
=
SessionUtils
.
getCurrentUserId
();
OaUser
costUser
=
oaUserMapper
.
selectByOaUserId
(
costDomain
.
getCreateUserid
());
if
(
currentUserId
==
null
)
{
costDomain
.
setCanAudit
(
false
);
}
else
if
(
costDomain
.
getCostStatus
().
equals
(
CostDomain
.
STATUS_DEPARTMENT_CHECK
))
{
costDomain
.
setCanAudit
(
costReviewerMapper
.
queryOne
(
costUser
.
getPrimaryDepartmentId
(),
CostReviewer
.
departmentReviewer
,
currentUserId
)
!=
null
);
}
else
if
(
costDomain
.
getCostStatus
().
equals
(
CostDomain
.
STATUS_FINANCIAL_CHECK
))
{
costDomain
.
setCanAudit
(
costReviewerMapper
.
queryOne
(
costCompany
.
getId
(),
CostReviewer
.
financialReviewer
,
currentUserId
)
!=
null
);
}
else
if
(
costDomain
.
getCostStatus
().
equals
(
CostDomain
.
STATUS_FINAL_CHECK
))
{
costDomain
.
setCanAudit
(
costReviewerMapper
.
queryOne
(
costCompany
.
getId
(),
CostReviewer
.
finalReviewer
,
currentUserId
)
!=
null
);
}
else
if
(
costDomain
.
getCostStatus
().
equals
(
CostDomain
.
STATUS_HR_CHECK
))
{
costDomain
.
setCanAudit
(
costReviewerMapper
.
queryOne
(
costCompany
.
getId
(),
CostReviewer
.
hrReviewer
,
currentUserId
)
!=
null
);
}
else
{
costDomain
.
setCanAudit
(
false
);
}
// //todo
// costDomain.setCanAudit(true);
costDomain
.
setCanAudit
(
costCurrentReviewerService
.
canAudit
(
currentUserId
,
costNo
));
return
costDomain
;
}
...
...
bailuntec-cost-core/src/main/resources/log4j2.xml
View file @
e0249ef0
...
...
@@ -32,7 +32,7 @@
<AsyncLogger
name=
"io.lettuce"
level=
"ERROR"
includeLocation=
"true"
/>
<AsyncRoot
level=
"INFO"
includeLocation=
"true"
>
<appender-ref
ref=
"FILE"
/>
<
!-- <appender-ref ref="CONSOLE"/>--
>
<
appender-ref
ref=
"CONSOLE"
/
>
</AsyncRoot>
</Loggers>
...
...
bailuntec-cost-core/src/main/resources/mapper/module/cost/CostCurrentReviewerMapper.xml
0 → 100644
View file @
e0249ef0
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.blt.other.module.cost.dao.CostCurrentReviewerMapper"
>
</mapper>
bailuntec-cost-core/src/test/java/com/blt/other/CodeGenerator.java
View file @
e0249ef0
...
...
@@ -53,18 +53,19 @@ public class CodeGenerator {
// 数据源配置
DataSourceConfig
dsc
=
new
DataSourceConfig
();
dsc
.
setUrl
(
"jdbc:mysql://106.55.55.253:3306/bailun_other?useUnicode=true&characterEncoding=utf-8&useSSL=false&&zeroDateTimeBehavior=convertToNull"
);
// dsc.setUrl("jdbc:mysql://106.55.55.253:3306/bailun_other?useUnicode=true&characterEncoding=utf-8&useSSL=false&&zeroDateTimeBehavior=convertToNull");
dsc
.
setUrl
(
"jdbc:mysql://cdb-aanqm573.gz.tencentcdb.com:10120/bailun_other?useUnicode=true&characterEncoding=utf-8&useSSL=false&&zeroDateTimeBehavior=convertToNull"
);
// dsc.setSchemaName("public");
dsc
.
setDriverName
(
"com.mysql.jdbc.Driver"
);
dsc
.
setUsername
(
"root"
);
dsc
.
setPassword
(
"
gogirl2020test.
"
);
dsc
.
setPassword
(
"
Aarob2020#
"
);
mpg
.
setDataSource
(
dsc
);
// 包配置
PackageConfig
pc
=
new
PackageConfig
();
String
s
=
scanner
(
"模块名"
);
String
ss
=
"."
+
s
;
pc
.
setParent
(
"com.blt.other
.module
"
+
ss
);
pc
.
setParent
(
"com.blt.other"
+
ss
);
pc
.
setEntity
(
"model"
);
pc
.
setService
(
"service"
);
pc
.
setServiceImpl
(
"service"
+
".impl"
);
...
...
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