Commit f5c906d4 by huluobin

# fee

parent 7a018b0c
......@@ -10,7 +10,6 @@ import java.util.Date;
@Data
public class ManageCostDto {
@JSONField(name = "detailname")
// 费用单号或采购单号
private String no;
......@@ -29,7 +28,6 @@ public class ManageCostDto {
@JSONField(name = "cashier_time", format = "yyyy-MM-dd HH:mm:ss")
// 付款时间
private Date payTime;
// 费用付款单同cost_form=1,费用借还单同cost_form=3,采购单为0
private Integer manageCostType;
// 部门
......@@ -42,15 +40,12 @@ public class ManageCostDto {
private String feeSuperType;
// 费用小类
private String feeSubType;
// 金额
private BigDecimal amount;
// 币种
private String currency;
// 人民币金额
private BigDecimal amountRmb;
//费用单Id
private Integer costId;
//费用单详情Id
......
......@@ -70,7 +70,6 @@ public class CostApiController implements CostApi {
@Override
@PostMapping("/manageCostList")
public CostResult<List<ManageCostDto>> manageCostList(@RequestBody ManageCostListReq req) {
//todo
List<ManageCostDto> manageCostDtoList = costApiService.manageCostList(req);
return CostResult.success(manageCostDtoList);
......
package com.blt.other.module.cost.dao;
import com.bailuntec.cost.api.request.ManageCostListReq;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
......@@ -75,4 +76,7 @@ public interface CostDao extends BaseMapper<CostDomain> {
//分页查询费用单
Page<CostDomain> queryPage(@Param("page") Page<Object> page,
@Param("req") CostQueryPageReq req);
//管理成本的费用单
List<CostDomain> manageCostList(ManageCostListReq req);
}
......@@ -263,6 +263,9 @@ public class CostDomain implements Serializable {
private static final String REGEX_CHINESE = "[\u4e00-\u9fa5]";// 中文正则
private final static List<String> picFilter = Lists.newArrayList("png", "jpg", "bmp,", "gif");
public PostApplyReq buildPostApplyReq() {
CostCompanyDao costCompanyDao = SpringContextUtil.getBean(CostCompanyDao.class);
......@@ -390,8 +393,6 @@ public class CostDomain implements Serializable {
return print;
}
private final static List<String> picFilter = Lists.newArrayList("png", "jpg", "bmp,", "gif");
public CostDto castToDto() {
......
......@@ -24,8 +24,6 @@ import com.blt.other.module.cost.service.impl.costcheck.CostContext;
import com.blt.other.module.cost.service.impl.costcheck.FinancialCheckState;
import com.blt.other.module.cost.utils.CostFileUtil;
import com.blt.other.module.cost.utils.CostUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -39,7 +37,7 @@ import java.util.stream.Collectors;
@Service
public class CostApiServiceImpl implements CostApiService {
private static Logger logger = LoggerFactory.getLogger(CostApiServiceImpl.class);
@Resource
private CostDao costDao;
......@@ -166,8 +164,6 @@ public class CostApiServiceImpl implements CostApiService {
@Resource
CostTypeDao costTypeDao;
@Resource
AccountingSubjectMapper accountingSubjectMapper;
@Resource
FinancialCheckState financialCheckState;
@Override
......@@ -278,6 +274,28 @@ public class CostApiServiceImpl implements CostApiService {
@Override
public List<ManageCostDto> manageCostList(ManageCostListReq req) {
return null;
List<CostDomain> manageCostList = costDao.manageCostList(req);
return manageCostList.stream()
.map(costDomain -> {
ManageCostDto manageCostDto = new ManageCostDto();
manageCostDto.setAmount(costDomain.getAmount());
manageCostDto.setAmountRmb(costDomain.getAmountRmb());
manageCostDto.setCompanyName(costDomain.getCompanyName());
manageCostDto.setCompanyValue(costDomain.getCompanyValue());
manageCostDto.setCostId(costDomain.getId());
manageCostDto.setCurrency(costDomain.getDic());
manageCostDto.setManageCostType(costDomain.getCostForm());
manageCostDto.setNo(costDomain.getCostNo());
manageCostDto.setReason(costDomain.getCostReason());
//银行卡四要素
manageCostDto.setReceiveBank(costDomain.getBankName());
manageCostDto.setReceiveCard(costDomain.getBankCard());
manageCostDto.setReceiveCardUser(costDomain.getBankCardUser());
manageCostDto.setReceiveUnit(costDomain.getBankCompany());
return manageCostDto;
})
.collect(Collectors.toList());
}
}
......@@ -85,4 +85,4 @@ cost:
server:
port: 8082
servlet:
context-path: /purchase/other
context-path: /purchase/other/v3.1
......@@ -83,4 +83,4 @@ cost:
server:
port: 8082
servlet:
context-path: /purchase/other
context-path: /purchase/other/v3.1
......@@ -82,4 +82,4 @@ cost:
server:
port: 8082
servlet:
context-path: /purchase/other
context-path: /purchase/other/v3.1
......@@ -344,5 +344,11 @@
ORDER BY
t1.id DESC
</select>
<select id="manageCostList" resultType="com.blt.other.module.cost.model.CostDomain">
select t1.*
from cost t1
left join cost_type ct on t1.type_id = ct.id
where ct.is_manage_cost = 1
</select>
</mapper>
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