Commit 76ff50bc by huluobin

# 费用系统

parent 6861f3e4
...@@ -55,10 +55,6 @@ public interface CostDao extends BaseMapper<CostDomain> { ...@@ -55,10 +55,6 @@ public interface CostDao extends BaseMapper<CostDomain> {
@Param("createUserId") Integer createUserId, @Param("createUserId") Integer createUserId,
@Param("payUserId") Integer payUserId); @Param("payUserId") Integer payUserId);
//查询资产负债表相关费用单
List<CostDomain> selectBalanceSheetCost(@Param("startDate") Date startDate,
@Param("endDate") Date endDate);
// //
List<String> listCostNoAll(CostExportVo costExportVo); List<String> listCostNoAll(CostExportVo costExportVo);
......
...@@ -169,6 +169,7 @@ public class CostDomain implements Serializable { ...@@ -169,6 +169,7 @@ public class CostDomain implements Serializable {
@ApiModelProperty("转人民币汇率") @ApiModelProperty("转人民币汇率")
private BigDecimal toRmbRate; private BigDecimal toRmbRate;
@ApiModelProperty("费用单人民币总金额") @ApiModelProperty("费用单人民币总金额")
private BigDecimal amountRmb; private BigDecimal amountRmb;
......
...@@ -70,7 +70,7 @@ public abstract class AbstractCostService implements CostService { ...@@ -70,7 +70,7 @@ public abstract class AbstractCostService implements CostService {
CwApi cwApi; CwApi cwApi;
@Autowired @Autowired
CostTofinanceService costTofinanceService; CostTofinanceService costTofinanceService;
@Autowired @Resource
CostDao costDao; CostDao costDao;
@Autowired @Autowired
UserService userService; UserService userService;
...@@ -161,12 +161,25 @@ public abstract class AbstractCostService implements CostService { ...@@ -161,12 +161,25 @@ public abstract class AbstractCostService implements CostService {
return costDomain; return costDomain;
} }
@Resource
CostTemplateBaseColMapper costTemplateBaseColMapper;
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@Override @Override
public UpdateCostResp updateCost(CostDomain costDomain) { public UpdateCostResp updateCost(CostDomain costDomain) {
UpdateCostResp resp = new UpdateCostResp(); UpdateCostResp resp = new UpdateCostResp();
setCostDomain(costDomain); if (null != costDomain.getCompanyNo()) {
costDomain.setCompanyName(costCompanyDao.selectByNo(costDomain.getCompanyNo()).getCompanyName());
}
if (ListUtil.isNotEmpty(costDomain.getAttach())) {
costDomain.getAttach().forEach(costAttach -> {
CostTemplateBaseCol costTemplateBaseCol = costTemplateBaseColMapper.selectById(costAttach.getCostTemplateBaseColId());
BeanUtils.copyProperties(costTemplateBaseCol, costAttach, "id");
});
}
costDomain.setLastModifyDate(LocalDateTime.now()); costDomain.setLastModifyDate(LocalDateTime.now());
BigDecimal toRmbRate = CurUtils.getCur(costDomain.getDic(), "CNY"); BigDecimal toRmbRate = CurUtils.getCur(costDomain.getDic(), "CNY");
...@@ -184,20 +197,6 @@ public abstract class AbstractCostService implements CostService { ...@@ -184,20 +197,6 @@ public abstract class AbstractCostService implements CostService {
} }
@Resource
CostTemplateBaseColMapper costTemplateBaseColMapper;
private void setCostDomain(CostDomain costDomain) {
if (null != costDomain.getCompanyNo()) {
costDomain.setCompanyName(costCompanyDao.selectByNo(costDomain.getCompanyNo()).getCompanyName());
}
if (ListUtil.isNotEmpty(costDomain.getAttach())) {
costDomain.getAttach().forEach(costAttach -> {
CostTemplateBaseCol costTemplateBaseCol = costTemplateBaseColMapper.selectById(costAttach.getCostTemplateBaseColId());
BeanUtils.copyProperties(costTemplateBaseCol, costAttach, "id");
});
}
}
@Override @Override
public List<CostDto> getByCostPlanNo(String costPlanNo) { public List<CostDto> getByCostPlanNo(String costPlanNo) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment