|
@@ -1,12 +1,16 @@
|
|
|
package org.jeecg.modules.archives.controller;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
+import javax.validation.Valid;
|
|
|
+
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.jeecg.common.api.vo.Result;
|
|
|
import org.jeecg.common.aspect.annotation.NotDuplicate;
|
|
|
+import org.jeecg.common.dto.archives.ExpensePriceReqDTO;
|
|
|
+import org.jeecg.common.dto.archives.ExpensePriceRespDTO;
|
|
|
import org.jeecg.common.dto.archives.ProArchivesAddReqDTO;
|
|
|
import org.jeecg.common.dto.archives.ProArchivesAddRespDTO;
|
|
|
import org.jeecg.common.system.query.QueryGenerator;
|
|
@@ -18,6 +22,9 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
import org.jeecg.modules.archives.service.ProjectManageArchivesAndBusinessService;
|
|
|
import org.jeecg.modules.archives.service.ProjectManageArchivesService;
|
|
|
import org.jeecg.modules.archives.service.ProjectManageBusinessOtherService;
|
|
|
+import org.jeecg.modules.expense.entity.ReExpenseSlip;
|
|
|
+import org.jeecg.modules.expense.service.IReExpenseSlipService;
|
|
|
+import org.jeecg.modules.payment.service.ManagerPaymentAndReceiptSlipService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.validation.BindingResult;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
@@ -38,6 +45,11 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
public class ProjectManageArchivesController {
|
|
|
@Autowired
|
|
|
private ProjectManageArchivesService projectManageArchivesService;
|
|
|
+ @Autowired
|
|
|
+ private IReExpenseSlipService reExpenseSlipService;
|
|
|
+ @Autowired
|
|
|
+ private ManagerPaymentAndReceiptSlipService managerPaymentAndReceiptSlipService;
|
|
|
+
|
|
|
|
|
|
@ApiOperation(value = "项目档案分页查询接口", notes = "项目档案分页查询")
|
|
|
@ApiImplicitParams({
|
|
@@ -251,4 +263,34 @@ public class ProjectManageArchivesController {
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation(value = "统计汇款单金额", notes = "统计汇款单金额")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name="proId", value="项目id",required=true, dataType="String"),
|
|
|
+ @ApiImplicitParam(name="type", value="1.收款单 2.付款单",required=true, dataType="String"),
|
|
|
+ @ApiImplicitParam(name="proArchivesId", value="项目档案里程碑id",required=true, dataType="String")
|
|
|
+ })
|
|
|
+ @GetMapping(value = "/getExpensePrice")
|
|
|
+ public Result<ExpensePriceRespDTO> getExpensePrice(@Valid ExpensePriceReqDTO reqDTO, BindingResult bindingResult) {
|
|
|
+ Result<ExpensePriceRespDTO> result = new Result<ExpensePriceRespDTO>();
|
|
|
+ try {
|
|
|
+ StringBuilder sb = new StringBuilder();
|
|
|
+ if (bindingResult.hasErrors()){
|
|
|
+
|
|
|
+ bindingResult.getAllErrors().stream().forEach(error -> sb.append(error.getDefaultMessage() + "<br/>"));
|
|
|
+ result.error500(sb.toString());
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ ExpensePriceRespDTO respDTO = managerPaymentAndReceiptSlipService.getExpensePrice(reqDTO);
|
|
|
+ result.setResult(respDTO);
|
|
|
+ result.setSuccess(true);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ log.info(e.getMessage());
|
|
|
+ result.error500("操作失败");
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|