Commit 76ff50bc by huluobin

# 费用系统

parent 6861f3e4
......@@ -55,10 +55,6 @@ public interface CostDao extends BaseMapper<CostDomain> {
@Param("createUserId") Integer createUserId,
@Param("payUserId") Integer payUserId);
//查询资产负债表相关费用单
List<CostDomain> selectBalanceSheetCost(@Param("startDate") Date startDate,
@Param("endDate") Date endDate);
//
List<String> listCostNoAll(CostExportVo costExportVo);
......
......@@ -169,6 +169,7 @@ public class CostDomain implements Serializable {
@ApiModelProperty("转人民币汇率")
private BigDecimal toRmbRate;
@ApiModelProperty("费用单人民币总金额")
private BigDecimal amountRmb;
......
......@@ -70,7 +70,7 @@ public abstract class AbstractCostService implements CostService {
CwApi cwApi;
@Autowired
CostTofinanceService costTofinanceService;
@Autowired
@Resource
CostDao costDao;
@Autowired
UserService userService;
......@@ -161,12 +161,25 @@ public abstract class AbstractCostService implements CostService {
return costDomain;
}
@Resource
CostTemplateBaseColMapper costTemplateBaseColMapper;
@Transactional(rollbackFor = Exception.class)
@Override
public UpdateCostResp updateCost(CostDomain costDomain) {
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());
BigDecimal toRmbRate = CurUtils.getCur(costDomain.getDic(), "CNY");
......@@ -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
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