Commit d387373e by huluobin

update

parent c709d5ec
......@@ -17,21 +17,28 @@ import java.math.BigDecimal;
@TableName("cost_plan_temp")
@Data
public class CostPlanTempDomain {
// 费用单表 id
// 费用单表 id
@TableId(type = IdType.AUTO)
private Integer id;
private String costPlanNo; // 费用计划编号
private String tempNo; // 计划缓存编号
private String filePath; // 文件地址
private BigDecimal amount; // 费用总金额
private String costReason; // 付款理由
private String dic; // 币种
private String typeNo; // 大类编号
// 费用计划编号
private String costPlanNo;
// 计划缓存编号
private String tempNo;
// 文件地址
private String filePath;
// 费用总金额
private BigDecimal amount;
// 付款理由
private String costReason;
// 币种
private String dic;
// 大类编号
private String typeNo;
// 会计一级科目
@ApiModelProperty("会计一级科目")
private String accountingSubjectNo;
//会计一级科目
@ApiModelProperty("会计一级科目")
private String accountingSubjectName;
......@@ -56,7 +63,6 @@ public class CostPlanTempDomain {
dto.setTypeNo(costTypeDomain.getTypeName());
}
dto.setFileName(PathUtil.getFileName(dto.getFilePath()));
return dto;
}
}
......
......@@ -56,7 +56,6 @@ public class CostController {
FinalCheckState finalCheckState;
@Resource
FinancialCheckState financialCheckState;
@Resource
HrCheckState hrCheckState;
......@@ -213,7 +212,9 @@ public class CostController {
public CostResult<Long> checkCostCount(CheckCostListReq req) {
costService = CostServiceFactory.getCostService();
Long count = costService.checkCostList(req).getTotal();
return CostResult.success(count);
req.setType(1);
Long count1 = costService.checkCostList(req).getTotal();
return CostResult.success(count + count1);
}
@ApiOperation("部门审核通过")
......
package com.blt.other.module.cost.service.impl.costcheck;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.blt.other.database.model.CostCompanyDomain;
import com.blt.other.module.cost.dao.CostCompanyDao;
import com.blt.other.module.cost.dao.CostDao;
import com.blt.other.module.cost.model.CostDomain;
import com.blt.other.module.cost.service.ICostCurrentReviewerService;
import com.blt.other.module.sys.dao.CostReviewerMapper;
import com.blt.other.module.sys.model.CostReviewer;
import com.google.common.collect.Lists;
import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.annotation.Rollback;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2021/1/8 6:02 下午
*/
@Transactional
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest
@ActiveProfiles("prod")
class FinancialCheckStateTest {
@Resource
CostDao costDao;
@Resource
CostCompanyDao costCompanyDao;
@Resource
CostReviewerMapper costReviewerMapper;
@Resource
ICostCurrentReviewerService costCurrentReviewerService;
@Test
@Rollback(value = false)
public void reSet() {
List<String> costs = Lists.newArrayList("F031366", "F031367", "F031370");
costs.forEach(this::reSet);
}
//F031366
//F031367
//F031370
private void reSet(String costNo) {
CostDomain costDomain = costDao.selectByCostNo(costNo);
CostCompanyDomain costCompanyDomain = costCompanyDao.selectByNo(costDomain.getCompanyNo());
List<CostReviewer> costReviewerList = costReviewerMapper.selectList(new LambdaQueryWrapper<CostReviewer>()
.eq(CostReviewer::getReferId, costCompanyDomain.getId())
.eq(CostReviewer::getType, CostReviewer.financialReviewer));
costCurrentReviewerService.updateByCostNoAndReviewer(costDomain.getCostNo(), costReviewerList);
}
}
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