Commit 0f44b3c5 by huluobin

# 费用系统 管理成本

parent ff1f42c0
......@@ -5,6 +5,7 @@ import com.bailuntec.cost.api.dto.CostDto;
import com.bailuntec.cost.api.dto.LogisticsCostDto;
import com.bailuntec.cost.api.dto.ManageCostDto;
import com.bailuntec.cost.api.dto.WageCostDto;
import com.bailuntec.cost.api.request.ManageCostListReq;
import com.bailuntec.cost.api.response.CostResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
......@@ -29,35 +30,9 @@ public interface CostApi {
@PostMapping("/pushLogisticsReceipt")
CostResult<Void> pushLogisticsReceipt(@RequestBody LogisticsCostDto logisticsCostDto) throws Exception;
@ApiOperation("获取所有费用单和采购单")
@GetMapping("/manageCostList")
CostResult<List<ManageCostDto>> manageCostList(@RequestParam(name = "startDate", required = false) String startDateStr,
@RequestParam(name = "endDate", required = false) String endDateStr,
@RequestParam(name = "feeSuperType", required = false) String feeSuperType,
@RequestParam(name = "feeSubType", required = false) String feeSubType,
@RequestParam(name = "companyValue", required = false) Integer companyValue,
@RequestParam(name = "companyName", required = false) String companyName,
@RequestParam(name = "departmentName", required = false) String departmentName,
@RequestParam(name = "createUserId", required = false) Integer createUserId,
@RequestParam(name = "payUserId", required = false) Integer payUserId);
@ApiOperation("查询所有的物流费用单和采购单")
@GetMapping("/logisticsCostList")
CostResult<List<ManageCostDto>> logisticsCostList(@RequestParam(name = "startDate", required = false) String startDateStr,
@RequestParam(name = "endDate", required = false) String endDateStr,
@RequestParam(name = "feeSuperType", required = false) String feeSuperType,
@RequestParam(name = "feeSubType", required = false) String feeSubType,
@RequestParam(name = "companyValue", required = false) Integer companyValue,
@RequestParam(name = "companyName", required = false) String companyName,
@RequestParam(name = "departmentName", required = false) String departmentName,
@RequestParam(name = "createUserId", required = false) Integer createUserId,
@RequestParam(name = "payUserId", required = false) Integer payUserId);
@ApiOperation("获取资产负债表相关费用单")
@GetMapping("/balanceSheetCost")
CostResult<List<CostDto>> balanceSheetCostList(@RequestParam(name = "startDate") String startDateStr,
@RequestParam(name = "endDate") String endDateStr);
@PostMapping("/manageCostList")
CostResult<List<ManageCostDto>> manageCostList(@RequestBody ManageCostListReq req);
@GetMapping("/noPayCost")
@ApiOperation("查询原来传输到数据中心时为待支付状态 变成 已支付状态后的费用单")
......
package com.bailuntec.cost.api.request;
import lombok.Data;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2021/1/15 11:38 上午
*/
@Data
public class ManageCostListReq {
private String startDateStr;
private String endDateStr;
private String feeSuperType;
private String feeSubType;
private Integer companyValue;
private String companyName;
private String departmentName;
private Integer createUserId;
private Integer payUserId;
}
......@@ -48,7 +48,7 @@
<dependency>
<groupId>com.bailuntec</groupId>
<artifactId>bailuntec-cost-api</artifactId>
<artifactId>cost-interfaces</artifactId>
</dependency>
......
......@@ -34,6 +34,8 @@ public class CostTypeDomain {
private String accountingSubjectNo;
private Boolean isManageCost;
/**
* 形如0b1001 四位二进制
* 高位到低位分别是 付款 收款 借支 借还
......
......@@ -5,6 +5,7 @@ import com.bailuntec.cost.api.dto.CostDto;
import com.bailuntec.cost.api.dto.LogisticsCostDto;
import com.bailuntec.cost.api.dto.ManageCostDto;
import com.bailuntec.cost.api.dto.WageCostDto;
import com.bailuntec.cost.api.request.ManageCostListReq;
import com.bailuntec.cost.api.response.CostResult;
import com.blt.other.common.annotation.LoginIgnore;
import com.blt.other.module.cost.model.CostDomain;
......@@ -67,58 +68,14 @@ public class CostApiController implements CostApi {
@SneakyThrows
@ApiOperation("查询管理成本的数据")
@Override
@GetMapping("/manageCostList")
public CostResult<List<ManageCostDto>> manageCostList(@RequestParam(name = "startDate", required = false) String startDateStr,
@RequestParam(name = "endDate", required = false) String endDateStr,
@RequestParam(name = "feeSuperType", required = false) String feeSuperType,
@RequestParam(name = "feeSubType", required = false) String feeSubType,
@RequestParam(name = "companyValue", required = false) Integer companyValue,
@RequestParam(name = "companyName", required = false) String companyName,
@RequestParam(name = "departmentName", required = false) String departmentName,
@RequestParam(name = "createUserId", required = false) Integer createUserId,
@RequestParam(name = "payUserId", required = false) Integer payUserId) {
// if (!StringUtils.isEmpty(departmentName)) {
// departmentName = departmentName.toLowerCase();
// }
// DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
//
// LocalDateTime startDate = LocalDateTime.parse(startDateStr, df);
// LocalDateTime endDate = LocalDateTime.parse(endDateStr, df);
//
// List<ManageCostDto> manageCostDtoList = costApiService.getMangeCostList(startDate, endDate, feeSuperType, feeSubType, companyValue, companyName, departmentName, createUserId, payUserId);
// //todo
return CostResult.success();
@PostMapping("/manageCostList")
public CostResult<List<ManageCostDto>> manageCostList(@RequestBody ManageCostListReq req) {
//todo
List<ManageCostDto> manageCostDtoList = costApiService.manageCostList(req);
return CostResult.success(manageCostDtoList);
}
@LoginIgnore
@SneakyThrows
@ApiOperation("查询所有的物流费用单和采购单")
@Override
@GetMapping("/logisticsCostList")
public CostResult<List<ManageCostDto>> logisticsCostList(@RequestParam(name = "startDate", required = false) String startDateStr,
@RequestParam(name = "endDate", required = false) String endDateStr,
@RequestParam(name = "feeSuperType", required = false) String feeSuperType,
@RequestParam(name = "feeSubType", required = false) String feeSubType,
@RequestParam(name = "companyValue", required = false) Integer companyValue,
@RequestParam(name = "companyName", required = false) String companyName,
@RequestParam(name = "departmentName", required = false) String departmentName,
@RequestParam(name = "createUserId", required = false) Integer createUserId,
@RequestParam(name = "payUserId", required = false) Integer payUserId) {
// if (!StringUtils.isEmpty(departmentName)) {
// departmentName = departmentName.toLowerCase();
// }
// DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
//
// LocalDateTime startDate = LocalDateTime.parse(startDateStr, df);
// LocalDateTime endDate = LocalDateTime.parse(endDateStr, df);
//
// List<ManageCostDto> manageCostDtoList = costApiService.getLogisticsCostList(startDate, endDate, feeSuperType, feeSubType, companyValue, companyName, departmentName, createUserId, payUserId);
// return CostResult.success(manageCostDtoList);
return CostResult.success();
}
@LoginIgnore
@ApiOperation("根据最后更新时间查询费用单")
......@@ -135,28 +92,6 @@ public class CostApiController implements CostApi {
@LoginIgnore
@ApiOperation("获取资产负债表相关费用单")
@Override
@GetMapping("/balanceSheetCost")
public CostResult<List<CostDto>> balanceSheetCostList(@RequestParam(name = "startDate") String startDateStr,
@RequestParam(name = "endDate") String endDateStr) {
// logger.warn("获取资产负债表相关费用单");
// try {
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
// Date startDate = sdf.parse(startDateStr);
// Date endDate = sdf.parse(endDateStr);
// List<CostDomain> balanceSheetCostList = costApiService.getBalanceSheetCost(startDate, endDate);
// return CostResult.success(balanceSheetCostList.stream().map(CostDomain::castToDto).collect(Collectors.toList()));
//
// } catch (ParseException e) {
// e.printStackTrace();
// return CostResult.error();
// }
return CostResult.success();
}
@LoginIgnore
@Override
@ApiOperation("查询原来传输到数据中心时为待支付状态 变成 已支付状态后的费用单")
@GetMapping("/noPayCost")
......
......@@ -2,7 +2,9 @@ package com.blt.other.module.cost.service;
import com.bailuntec.cost.api.dto.CostDto;
import com.bailuntec.cost.api.dto.LogisticsCostDto;
import com.bailuntec.cost.api.dto.ManageCostDto;
import com.bailuntec.cost.api.dto.WageCostDto;
import com.bailuntec.cost.api.request.ManageCostListReq;
import com.blt.other.module.cost.model.CostDomain;
import java.io.IOException;
......@@ -52,4 +54,12 @@ public interface CostApiService {
* @return 费用单list
*/
List<CostDto> getCostList(String startDate, String endDate, Integer pageNum, Integer pageSize);
/**
* 管理成本
*
* @param req req
* @return res
*/
List<ManageCostDto> manageCostList(ManageCostListReq req);
}
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