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
1b8ca4bc
Commit
1b8ca4bc
authored
Feb 20, 2021
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
# 更新
parent
ccbc5436
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
27 deletions
+31
-27
CostDto.java
...ces/src/main/java/com/bailuntec/cost/api/dto/CostDto.java
+3
-0
CostDomain.java
...main/java/com/blt/other/module/cost/model/CostDomain.java
+17
-0
CostApiServiceImpl.java
...lt/other/module/cost/service/impl/CostApiServiceImpl.java
+3
-15
AbstractCostService.java
...er/module/cost/service/impl/cost/AbstractCostService.java
+1
-6
AbstractCostPlanService.java
...e/cost/service/impl/costplan/AbstractCostPlanService.java
+3
-0
CostPlanNewPayServiceImpl.java
...cost/service/impl/costplan/CostPlanNewPayServiceImpl.java
+4
-6
No files found.
cost-interfaces/src/main/java/com/bailuntec/cost/api/dto/CostDto.java
View file @
1b8ca4bc
...
@@ -230,4 +230,7 @@ public class CostDto {
...
@@ -230,4 +230,7 @@ public class CostDto {
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
List
<
CostDetailDto
>
costDetailList
;
private
List
<
CostDetailDto
>
costDetailList
;
@TableField
(
exist
=
false
)
private
Boolean
isManageCost
;
}
}
cost-service/src/main/java/com/blt/other/module/cost/model/CostDomain.java
View file @
1b8ca4bc
...
@@ -17,7 +17,9 @@ import com.blt.other.common.util.CurUtils;
...
@@ -17,7 +17,9 @@ import com.blt.other.common.util.CurUtils;
import
com.blt.other.common.util.MoneyUtil
;
import
com.blt.other.common.util.MoneyUtil
;
import
com.blt.other.database.mapper.StatusMapper
;
import
com.blt.other.database.mapper.StatusMapper
;
import
com.blt.other.database.model.CostCompanyDomain
;
import
com.blt.other.database.model.CostCompanyDomain
;
import
com.blt.other.database.model.CostTypeDomain
;
import
com.blt.other.database.model.UserDomain
;
import
com.blt.other.database.model.UserDomain
;
import
com.blt.other.module.cost.dao.AccountingSubjectMapper
;
import
com.blt.other.module.cost.dao.CostCompanyDao
;
import
com.blt.other.module.cost.dao.CostCompanyDao
;
import
com.blt.other.module.sys.service.UserService
;
import
com.blt.other.module.sys.service.UserService
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
...
@@ -84,6 +86,8 @@ public class CostDomain implements Serializable {
...
@@ -84,6 +86,8 @@ public class CostDomain implements Serializable {
private
String
typeNo
;
private
String
typeNo
;
@ApiModelProperty
(
"类型标题"
)
@ApiModelProperty
(
"类型标题"
)
private
String
typeName
;
private
String
typeName
;
@ApiModelProperty
(
"是否管理成本"
)
private
Integer
isManageCost
;
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
@ApiModelProperty
(
"描述"
)
@ApiModelProperty
(
"描述"
)
...
@@ -259,6 +263,19 @@ public class CostDomain implements Serializable {
...
@@ -259,6 +263,19 @@ public class CostDomain implements Serializable {
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
List
<
CostDetailDomain
>
costDetailDomainList
;
private
List
<
CostDetailDomain
>
costDetailDomainList
;
public
void
setCostType
(
CostTypeDomain
costTypeDomain
)
{
this
.
setTypeId
(
costTypeDomain
.
getId
());
this
.
setTypeNo
(
costTypeDomain
.
getTypeNo
());
this
.
setTypeName
(
costTypeDomain
.
getTypeName
());
AccountingSubjectMapper
accountingSubjectMapper
=
SpringContextUtil
.
getBean
(
AccountingSubjectMapper
.
class
);
AccountingSubject
accountingSubject
=
accountingSubjectMapper
.
selectById
(
costTypeDomain
.
getAccountingSubjectId
());
this
.
setAccountingSubjectName
(
accountingSubject
.
getName
());
this
.
setAccountingSubjectNo
(
accountingSubject
.
getSubjectNo
());
}
private
static
final
String
REGEX_CHINESE
=
"[\u4e00-\u9fa5]"
;
// 中文正则
private
static
final
String
REGEX_CHINESE
=
"[\u4e00-\u9fa5]"
;
// 中文正则
public
PostApplyReq
buildPostApplyReq
()
{
public
PostApplyReq
buildPostApplyReq
()
{
...
...
cost-service/src/main/java/com/blt/other/module/cost/service/impl/CostApiServiceImpl.java
View file @
1b8ca4bc
...
@@ -71,13 +71,7 @@ public class CostApiServiceImpl implements CostApiService {
...
@@ -71,13 +71,7 @@ public class CostApiServiceImpl implements CostApiService {
costDomain
.
setCostReason
(
logisticsCostDto
.
getCostReason
());
costDomain
.
setCostReason
(
logisticsCostDto
.
getCostReason
());
CostTypeDomain
costTypeDomain
=
costTypeDao
.
selectByNameAndType
(
"物流费"
,
CostTypeDomain
.
feeType
);
CostTypeDomain
costTypeDomain
=
costTypeDao
.
selectByNameAndType
(
"物流费"
,
CostTypeDomain
.
feeType
);
costDomain
.
setTypeId
(
costTypeDomain
.
getId
());
costDomain
.
setCostType
(
costTypeDomain
);
costDomain
.
setTypeNo
(
costTypeDomain
.
getTypeNo
());
costDomain
.
setTypeName
(
costTypeDomain
.
getTypeName
());
AccountingSubject
accountingSubject
=
accountingSubjectMapper
.
selectById
(
costTypeDomain
.
getAccountingSubjectId
());
costDomain
.
setAccountingSubjectName
(
accountingSubject
.
getName
());
costDomain
.
setAccountingSubjectNo
(
accountingSubject
.
getSubjectNo
());
costDomain
.
setCompanyName
(
"香港百伦科技有限公司"
);
costDomain
.
setCompanyName
(
"香港百伦科技有限公司"
);
costDomain
.
setCompanyNo
(
"COM1806191800013"
);
costDomain
.
setCompanyNo
(
"COM1806191800013"
);
...
@@ -189,14 +183,8 @@ public class CostApiServiceImpl implements CostApiService {
...
@@ -189,14 +183,8 @@ public class CostApiServiceImpl implements CostApiService {
//类型信息
//类型信息
CostTypeDomain
costTypeDomain
=
costTypeDao
.
selectByNameAndType
(
"工资"
,
CostTypeDomain
.
feeType
);
CostTypeDomain
costTypeDomain
=
costTypeDao
.
selectByNameAndType
(
"工资"
,
CostTypeDomain
.
feeType
);
costDomain
.
setTypeId
(
costTypeDomain
.
getId
());
costDomain
.
setCostType
(
costTypeDomain
);
costDomain
.
setTypeNo
(
costTypeDomain
.
getTypeNo
());
costDomain
.
setTypeName
(
costTypeDomain
.
getTypeName
());
AccountingSubject
accountingSubject
=
accountingSubjectMapper
.
selectById
(
costTypeDomain
.
getAccountingSubjectId
());
costDomain
.
setAccountingSubjectId
(
costTypeDomain
.
getAccountingSubjectId
());
costDomain
.
setAccountingSubjectNo
(
accountingSubject
.
getSubjectNo
());
costDomain
.
setAccountingSubjectName
(
accountingSubject
.
getName
());
//公司
//公司
CostCompanyDomain
costCompany
=
costCompanyDao
.
selectByName
(
wageCostDto
.
getCompanyName
());
CostCompanyDomain
costCompany
=
costCompanyDao
.
selectByName
(
wageCostDto
.
getCompanyName
());
...
...
cost-service/src/main/java/com/blt/other/module/cost/service/impl/cost/AbstractCostService.java
View file @
1b8ca4bc
...
@@ -221,13 +221,8 @@ public abstract class AbstractCostService implements CostService {
...
@@ -221,13 +221,8 @@ public abstract class AbstractCostService implements CostService {
costDomain
.
setAmountRmb
(
costDomain
.
getAmount
().
multiply
(
toRmbRate
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
));
costDomain
.
setAmountRmb
(
costDomain
.
getAmount
().
multiply
(
toRmbRate
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
));
CostTypeDomain
costTypeDomain
=
costTypeDao
.
selectById
(
costDetailDomain
.
getTypeId
());
CostTypeDomain
costTypeDomain
=
costTypeDao
.
selectById
(
costDetailDomain
.
getTypeId
());
AccountingSubject
accountingSubject
=
accountingSubjectMapper
.
selectById
(
costTypeDomain
.
getAccountingSubjectId
()
);
costDomain
.
setCostType
(
costTypeDomain
);
costDomain
.
setTypeId
(
costTypeDomain
.
getId
());
costDomain
.
setTypeNo
(
costTypeDomain
.
getTypeNo
());
costDomain
.
setTypeName
(
costTypeDomain
.
getTypeName
());
costDomain
.
setAccountingSubjectNo
(
accountingSubject
.
getSubjectNo
());
costDomain
.
setAccountingSubjectName
(
accountingSubject
.
getName
());
costDomain
.
setLastModifyDate
(
LocalDateTime
.
now
());
costDomain
.
setLastModifyDate
(
LocalDateTime
.
now
());
costDao
.
updateById
(
costDomain
);
costDao
.
updateById
(
costDomain
);
...
...
cost-service/src/main/java/com/blt/other/module/cost/service/impl/costplan/AbstractCostPlanService.java
View file @
1b8ca4bc
...
@@ -201,6 +201,9 @@ public abstract class AbstractCostPlanService implements CostPlanService {
...
@@ -201,6 +201,9 @@ public abstract class AbstractCostPlanService implements CostPlanService {
CostPlanDomain
costPlanDomain
=
costPlanDao
.
selectByNo
(
costPlanNo
);
CostPlanDomain
costPlanDomain
=
costPlanDao
.
selectByNo
(
costPlanNo
);
BeanUtils
.
copyProperties
(
costPlanDomain
,
costDomain
);
BeanUtils
.
copyProperties
(
costPlanDomain
,
costDomain
);
CostTypeDomain
costTypeDomain
=
costTypeDao
.
selectById
(
costPlanDomain
.
getTypeId
());
costDomain
.
setCostType
(
costTypeDomain
);
costDomain
.
setCompanyValue
(
costCompanyDao
.
selectByNo
(
costPlanDomain
.
getCompanyNo
()).
getValue
());
costDomain
.
setCompanyValue
(
costCompanyDao
.
selectByNo
(
costPlanDomain
.
getCompanyNo
()).
getValue
());
costDomain
.
setAttach
(
costPlanDomain
.
getAttach
());
costDomain
.
setAttach
(
costPlanDomain
.
getAttach
());
return
costDomain
;
return
costDomain
;
...
...
cost-service/src/main/java/com/blt/other/module/cost/service/impl/costplan/CostPlanNewPayServiceImpl.java
View file @
1b8ca4bc
...
@@ -5,6 +5,7 @@ import com.blt.other.common.exception.BizRuntimeException;
...
@@ -5,6 +5,7 @@ import com.blt.other.common.exception.BizRuntimeException;
import
com.blt.other.common.util.CurUtils
;
import
com.blt.other.common.util.CurUtils
;
import
com.blt.other.database.model.CostPlanDomain
;
import
com.blt.other.database.model.CostPlanDomain
;
import
com.blt.other.database.model.CostPlanTempDomain
;
import
com.blt.other.database.model.CostPlanTempDomain
;
import
com.blt.other.database.model.CostTypeDomain
;
import
com.blt.other.module.cost.model.CostDetailDomain
;
import
com.blt.other.module.cost.model.CostDetailDomain
;
import
com.blt.other.module.cost.model.CostDomain
;
import
com.blt.other.module.cost.model.CostDomain
;
import
com.blt.other.module.cost.service.CostPlanService
;
import
com.blt.other.module.cost.service.CostPlanService
;
...
@@ -106,13 +107,10 @@ public class CostPlanNewPayServiceImpl extends AbstractCostPlanService implement
...
@@ -106,13 +107,10 @@ public class CostPlanNewPayServiceImpl extends AbstractCostPlanService implement
costByNo
=
costService
.
getCostByCostNo
(
costNo
);
costByNo
=
costService
.
getCostByCostNo
(
costNo
);
}
}
CostDetailDomain
costDetailItem
=
costDetailDomainList
.
get
(
0
);
costDomain
.
setCostNo
(
costNo
);
costDomain
.
setCostNo
(
costNo
);
costDomain
.
setTypeId
(
typeId
);
CostTypeDomain
costTypeDomain
=
costTypeDao
.
selectById
(
typeId
);
costDomain
.
setTypeNo
(
costDetailItem
.
getTypeNo
());
costDomain
.
setCostType
(
costTypeDomain
);
costDomain
.
setTypeName
(
costDetailItem
.
getTypeName
());
costDomain
.
setAccountingSubjectNo
(
costDetailItem
.
getAccountingSubjectNo
());
costDomain
.
setAccountingSubjectName
(
costDetailItem
.
getAccountingSubjectName
());
costDomain
.
setAmount
(
costDetailDomains
.
stream
().
map
(
CostDetailDomain:
:
getAmount
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
));
costDomain
.
setAmount
(
costDetailDomains
.
stream
().
map
(
CostDetailDomain:
:
getAmount
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
));
costDomain
.
setDic
(
costDetailDomains
.
get
(
0
).
getDic
());
costDomain
.
setDic
(
costDetailDomains
.
get
(
0
).
getDic
());
...
...
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