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
45f46b5d
Commit
45f46b5d
authored
Dec 26, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
付款计划详情 一级科目
parent
b0543c49
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
33 deletions
+13
-33
CostPlanTempDto.java
...main/java/com/bailuntec/cost/api/dto/CostPlanTempDto.java
+6
-0
CostDetailController.java
...lt/other/module/cost/controller/CostDetailController.java
+2
-4
CostDetailServiceImpl.java
...other/module/cost/service/impl/CostDetailServiceImpl.java
+0
-20
AbstractCostPlanService.java
...e/cost/service/impl/costplan/AbstractCostPlanService.java
+5
-9
No files found.
bailuntec-cost-api/src/main/java/com/bailuntec/cost/api/dto/CostPlanTempDto.java
View file @
45f46b5d
package
com
.
bailuntec
.
cost
.
api
.
dto
;
package
com
.
bailuntec
.
cost
.
api
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
...
@@ -20,5 +21,10 @@ public class CostPlanTempDto {
...
@@ -20,5 +21,10 @@ public class CostPlanTempDto {
private
String
kindNameDto
;
// 小类标题
private
String
kindNameDto
;
// 小类标题
private
String
dic
;
// 币种
private
String
dic
;
// 币种
@ApiModelProperty
(
"会计一级科目"
)
private
String
accountingSubjectNo
;
@ApiModelProperty
(
"会计一级科目"
)
private
String
accountingSubjectName
;
}
}
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/CostDetailController.java
View file @
45f46b5d
...
@@ -61,9 +61,9 @@ public class CostDetailController {
...
@@ -61,9 +61,9 @@ public class CostDetailController {
//类型标题 大类
//类型标题 大类
String
typeName
=
detail
.
getTypeName
();
String
typeName
=
detail
.
getTypeName
();
//种类标题 小类
//种类标题 小类
String
kindName
=
detail
.
getKind
Name
();
String
accountingSubjectName
=
detail
.
getAccountingSubject
Name
();
if
((
typeName
.
contains
(
"工资"
)
||
if
((
typeName
.
contains
(
"工资"
)
||
kind
Name
.
contains
(
"工资"
))
&&
accountingSubject
Name
.
contains
(
"工资"
))
&&
!(
user
.
getUseraccount
().
equals
(
"程文爱"
)
!(
user
.
getUseraccount
().
equals
(
"程文爱"
)
||
user
.
getUseraccount
().
equals
(
"苏佩虹"
)
||
user
.
getUseraccount
().
equals
(
"苏佩虹"
)
||
user
.
getUseraccount
().
equals
(
"张晓雯"
)
||
user
.
getUseraccount
().
equals
(
"张晓雯"
)
...
@@ -200,12 +200,10 @@ public class CostDetailController {
...
@@ -200,12 +200,10 @@ public class CostDetailController {
domain
.
setCostReason
(
costReason
);
domain
.
setCostReason
(
costReason
);
domain
.
setAmount
(
new
BigDecimal
(
amount
));
domain
.
setAmount
(
new
BigDecimal
(
amount
));
domain
.
setKindNo
(
kindNo
);
domain
.
setCostNo
(
costNo
);
domain
.
setCostNo
(
costNo
);
domain
.
setDetailNo
(
detailNo
);
domain
.
setDetailNo
(
detailNo
);
CostTypeKindDomain
kindByKindNo
=
costTypeKindService
.
getKindByKindNo
(
kindNo
);
CostTypeKindDomain
kindByKindNo
=
costTypeKindService
.
getKindByKindNo
(
kindNo
);
domain
.
setKindName
(
kindByKindNo
.
getKindName
());
return
domain
;
return
domain
;
}
}
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/impl/CostDetailServiceImpl.java
View file @
45f46b5d
...
@@ -41,26 +41,6 @@ public class CostDetailServiceImpl implements CostDetailService {
...
@@ -41,26 +41,6 @@ public class CostDetailServiceImpl implements CostDetailService {
@Transactional
@Transactional
@Override
@Override
public
Integer
update
(
CostDetailDomain
domain
)
{
public
Integer
update
(
CostDetailDomain
domain
)
{
List
<
CostDetailDomain
>
costDetailDomainList
=
costDetailDao
.
selectListByCostNo
(
domain
.
getCostNo
());
CostDomain
costDomain
=
costDao
.
selectByCostNo
(
domain
.
getCostNo
());
// //费用单总金额重新计算
// if (costDetailDomainList.stream().collect(Collectors.groupingBy(CostDetailDomain::getDic)).keySet().size() > 1) {
// throw new RuntimeException("请统一货币单位");
// }
// BigDecimal totalAmount = costDetailDomainList.stream().map(CostDetailDomain::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
// BigDecimal toRmbRate = CurUtils.getCur(costDomain.getDic(), "CNY");
//
// costDomain.setToRmbRate(toRmbRate);
// costDomain.setAmount(totalAmount);
// costDomain.setAmountRmb(totalAmount.multiply(toRmbRate).setScale(2, BigDecimal.ROUND_HALF_UP));
// costDomain.setDic(domain.getDic())
//更新费用单
//更新费用单
return
costDetailDao
.
update
(
domain
);
return
costDetailDao
.
update
(
domain
);
}
}
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/impl/costplan/AbstractCostPlanService.java
View file @
45f46b5d
...
@@ -3,6 +3,7 @@ package com.blt.other.module.cost.service.impl.costplan;
...
@@ -3,6 +3,7 @@ package com.blt.other.module.cost.service.impl.costplan;
import
com.bailuntec.common.ListUtil
;
import
com.bailuntec.common.ListUtil
;
import
com.bailuntec.cost.api.dto.CostPlanDto
;
import
com.bailuntec.cost.api.dto.CostPlanDto
;
import
com.blt.other.common.exception.BizRuntimeException
;
import
com.blt.other.common.exception.BizRuntimeException
;
import
com.blt.other.database.model.*
;
import
com.blt.other.module.auth.dao.UserDao
;
import
com.blt.other.module.auth.dao.UserDao
;
import
com.blt.other.module.cost.dao.*
;
import
com.blt.other.module.cost.dao.*
;
import
com.blt.other.module.cost.dto.request.GetAllCostPlanReq
;
import
com.blt.other.module.cost.dto.request.GetAllCostPlanReq
;
...
@@ -13,7 +14,6 @@ import com.blt.other.module.cost.model.CostDomain;
...
@@ -13,7 +14,6 @@ import com.blt.other.module.cost.model.CostDomain;
import
com.blt.other.module.cost.model.CostTemplateBaseCol
;
import
com.blt.other.module.cost.model.CostTemplateBaseCol
;
import
com.blt.other.module.cost.service.*
;
import
com.blt.other.module.cost.service.*
;
import
com.blt.other.module.cost.utils.CostUtils
;
import
com.blt.other.module.cost.utils.CostUtils
;
import
com.blt.other.database.model.*
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
...
@@ -188,24 +188,20 @@ public abstract class AbstractCostPlanService implements CostPlanService {
...
@@ -188,24 +188,20 @@ public abstract class AbstractCostPlanService implements CostPlanService {
BeanUtils
.
copyProperties
(
costPlanDomain
,
costDomain
);
BeanUtils
.
copyProperties
(
costPlanDomain
,
costDomain
);
costDomain
.
setCompanyValue
(
costCompanyDao
.
selectByNo
(
costPlanDomain
.
getCompanyNo
()).
getValue
());
costDomain
.
setCompanyValue
(
costCompanyDao
.
selectByNo
(
costPlanDomain
.
getCompanyNo
()).
getValue
());
if
(
costDomain
.
getTypeNo
()
!=
null
)
{
// CostTypeDomain costTypeDomain = costTypeDao.selectByTypeNo(costDomain.getTypeNo());
// if (costTypeDomain != null) {
// costDomain.setSubjectCode(costTypeDomain.getSubjectCode());
// }
}
costDomain
.
setAttach
(
costPlanDomain
.
getAttach
());
costDomain
.
setAttach
(
costPlanDomain
.
getAttach
());
return
costDomain
;
return
costDomain
;
}
}
protected
CostDetailDomain
tempToDetail
(
CostPlanTempDomain
costPlanTempDomain
,
CostPlanDomain
costPlanDomain
,
Integer
index
)
{
protected
CostDetailDomain
tempToDetail
(
CostPlanTempDomain
costPlanTempDomain
,
CostPlanDomain
costPlanDomain
,
Integer
index
)
{
CostDetailDomain
costDetailDomain
=
new
CostDetailDomain
();
CostDetailDomain
costDetailDomain
=
new
CostDetailDomain
();
BeanUtils
.
copyProperties
(
costPlanDomain
,
costDetailDomain
);
BeanUtils
.
copyProperties
(
costPlanDomain
,
costDetailDomain
);
BeanUtils
.
copyProperties
(
costPlanTempDomain
,
costDetailDomain
);
BeanUtils
.
copyProperties
(
costPlanTempDomain
,
costDetailDomain
);
costDetailDomain
.
setDetailNo
(
costPlanDomain
.
getCostPlanNo
()
+
"-"
+
index
);
costDetailDomain
.
setDetailNo
(
costPlanDomain
.
getCostPlanNo
()
+
"-"
+
index
);
CostTypeKindDomain
costTypeKindDomain
=
costTypeKindDao
.
selectByKindNo
(
costPlanTempDomain
.
getKindNo
());
CostTypeKindDomain
costTypeKindDomain
=
costTypeKindDao
.
selectByKindNo
(
costPlanTempDomain
.
getKindNo
());
costDetailDomain
.
setKindName
(
costTypeKindDomain
.
getKindName
());
costDetailDomain
.
setTypeNo
(
costTypeKindDomain
.
getTypeNo
());
costDetailDomain
.
setTypeNo
(
costTypeKindDomain
.
getTypeNo
());
costDetailDomain
.
setTypeName
(
costTypeKindDomain
.
getTypeName
());
costDetailDomain
.
setTypeName
(
costTypeKindDomain
.
getTypeName
());
return
costDetailDomain
;
return
costDetailDomain
;
...
...
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