Commit 46cfa126 by huluobin

# 费用系统

parent c107a93d
...@@ -50,9 +50,6 @@ public class CostDto { ...@@ -50,9 +50,6 @@ public class CostDto {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime; private Date createTime;
// @ApiModelProperty("关联子单")puh
// @Deprecated
// private String sonCostNo;
@ApiModelProperty("关联父单") @ApiModelProperty("关联父单")
private String supCostNo; private String supCostNo;
...@@ -212,14 +209,14 @@ public class CostDto { ...@@ -212,14 +209,14 @@ public class CostDto {
private String payDicDto; // 支付币种 private String payDicDto; // 支付币种
private String isTaxStr; // 0 不抵扣个税 1 抵扣个税 private String isTaxStr; // 0 不抵扣个税 1 抵扣个税
private String lendType; private String lendType;
private Boolean isPic;
@TableField(exist = false) @TableField(exist = false)
private String costCurrentReviewer; private String costCurrentReviewer;
@ApiModelProperty("费用单对应的模版")
@TableField(exist = false) @TableField(exist = false)
private CostTemplateDto costTemplate; private CostTemplateDto costTemplate;
......
...@@ -3,6 +3,7 @@ package com.blt.other.module.cost.model; ...@@ -3,6 +3,7 @@ package com.blt.other.module.cost.model;
import com.bailuntec.api.bailuntec.cw.request.PostApplyReq; import com.bailuntec.api.bailuntec.cw.request.PostApplyReq;
import com.bailuntec.common.BeanUtils; import com.bailuntec.common.BeanUtils;
import com.bailuntec.common.SpringContextUtil; import com.bailuntec.common.SpringContextUtil;
import com.bailuntec.common.StringUtils;
import com.bailuntec.cost.api.dto.CostAttach; import com.bailuntec.cost.api.dto.CostAttach;
import com.bailuntec.cost.api.dto.CostDto; import com.bailuntec.cost.api.dto.CostDto;
import com.bailuntec.cost.api.dto.CostListPrintDto; import com.bailuntec.cost.api.dto.CostListPrintDto;
...@@ -19,6 +20,7 @@ import com.blt.other.database.model.UserDomain; ...@@ -19,6 +20,7 @@ import com.blt.other.database.model.UserDomain;
import com.blt.other.module.cost.dao.CostCompanyDao; import com.blt.other.module.cost.dao.CostCompanyDao;
import com.blt.other.module.sys.service.UserService; import com.blt.other.module.sys.service.UserService;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.google.common.collect.Lists;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
...@@ -380,6 +382,7 @@ public class CostDomain implements Serializable { ...@@ -380,6 +382,7 @@ public class CostDomain implements Serializable {
return print; return print;
} }
private final List<String> picFilter = Lists.newArrayList("png", "jpg,", "bmp,", "gif");
public CostDto castToDto() { public CostDto castToDto() {
...@@ -408,8 +411,8 @@ public class CostDomain implements Serializable { ...@@ -408,8 +411,8 @@ public class CostDomain implements Serializable {
Pattern pat = Pattern.compile(REGEX_CHINESE); Pattern pat = Pattern.compile(REGEX_CHINESE);
Matcher mat = pat.matcher(fileName); Matcher mat = pat.matcher(fileName);
costDto.setFileName(mat.replaceAll("")); costDto.setFileName(mat.replaceAll(""));
} }
// 抵个税 // 抵个税
if (1 == costDto.getCostForm()) { if (1 == costDto.getCostForm()) {
costDto.setIsTaxStr(statusMapper.getStatusValue("is_tax", costDto.getIsTax())); costDto.setIsTaxStr(statusMapper.getStatusValue("is_tax", costDto.getIsTax()));
...@@ -427,6 +430,15 @@ public class CostDomain implements Serializable { ...@@ -427,6 +430,15 @@ public class CostDomain implements Serializable {
String format = df.format(costDto.getPayPlanAmount()); String format = df.format(costDto.getPayPlanAmount());
costDto.setPayPlanAmountDto(format); costDto.setPayPlanAmountDto(format);
} }
if (StringUtils.isNotEmpty(filePath)) {
int i = filePath.lastIndexOf('.');
String extension = "";
if (i > 0) {
extension = filePath.substring(i + 1);
}
costDto.setIsPic(picFilter.contains(extension));
}
return costDto; return costDto;
} }
......
...@@ -94,8 +94,6 @@ public class CostTypeServiceImpl extends ServiceImpl<CostTypeDao, CostTypeDomain ...@@ -94,8 +94,6 @@ public class CostTypeServiceImpl extends ServiceImpl<CostTypeDao, CostTypeDomain
this.updateById(costTypeDomain); this.updateById(costTypeDomain);
} }
} }
@Override @Override
......
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