Commit 0db0bd60 by liyanlin

fix

parent d3541485
...@@ -31,6 +31,10 @@ public interface CostApi { ...@@ -31,6 +31,10 @@ public interface CostApi {
@PostMapping("/pushCost") @PostMapping("/pushCost")
CostResult<Void> pushCost(@RequestBody CostInputDto input) throws Exception; CostResult<Void> pushCost(@RequestBody CostInputDto input) throws Exception;
@ApiOperation("提交费用单")
@PostMapping("submitAudit")
CostResult<Void> submitAudit(@RequestParam String costNo);
@ApiOperation("获取所有费用单和采购单") @ApiOperation("获取所有费用单和采购单")
@PostMapping("/cost/api/manageCostList") @PostMapping("/cost/api/manageCostList")
CostResult<List<ManageCostDto>> manageCostList(@RequestBody ManageCostListReq req); CostResult<List<ManageCostDto>> manageCostList(@RequestBody ManageCostListReq req);
......
...@@ -7,6 +7,10 @@ import com.bailuntec.cost.api.response.CostResult; ...@@ -7,6 +7,10 @@ import com.bailuntec.cost.api.response.CostResult;
import com.blt.other.common.annotation.LoginIgnore; import com.blt.other.common.annotation.LoginIgnore;
import com.blt.other.module.cost.model.CostDomain; import com.blt.other.module.cost.model.CostDomain;
import com.blt.other.module.cost.service.CostApiService; import com.blt.other.module.cost.service.CostApiService;
import com.blt.other.module.cost.service.CostService;
import com.blt.other.module.cost.service.impl.cost.CostServiceFactory;
import com.blt.other.module.cost.service.impl.costcheck.CostContext;
import com.blt.other.module.cost.service.impl.costcheck.UnSubmitState;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.SneakyThrows; import lombok.SneakyThrows;
...@@ -31,6 +35,11 @@ public class CostApiController implements CostApi { ...@@ -31,6 +35,11 @@ public class CostApiController implements CostApi {
private CostApiService costApiService; private CostApiService costApiService;
private static Logger logger = LoggerFactory.getLogger(CostApiController.class); private static Logger logger = LoggerFactory.getLogger(CostApiController.class);
@Resource
private CostService costService;
@Resource
private UnSubmitState unSubmitState;
@LoginIgnore @LoginIgnore
@Override @Override
@ApiOperation("接受工资单,自动生成付款费用单到财务审核") @ApiOperation("接受工资单,自动生成付款费用单到财务审核")
...@@ -70,6 +79,21 @@ public class CostApiController implements CostApi { ...@@ -70,6 +79,21 @@ public class CostApiController implements CostApi {
return CostResult.successMsg(costNo); return CostResult.successMsg(costNo);
} }
@LoginIgnore
@Override
@ApiOperation("提交费用单")
@PostMapping("submitAudit")
public CostResult<Void> submitAudit(@RequestParam String costNo) {
costService = CostServiceFactory.getCostService(costNo);
CostDomain costDomain = costService.getCostByCostNo(costNo);
CostContext costContext = new CostContext(costNo, costDomain.getCreateUserid());
costContext.setCostState(unSubmitState);
costContext.handle();
return CostResult.successMsg("success");
}
@LoginIgnore @LoginIgnore
@SneakyThrows @SneakyThrows
......
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