Commit 7a7a55aa by liyanlin

fix

parent 1775ad02
...@@ -57,7 +57,10 @@ public class CostInputDto { ...@@ -57,7 +57,10 @@ public class CostInputDto {
@ApiModelProperty("客户编号") @ApiModelProperty("客户编号")
private String customerNum; private String customerNum;
@ApiModelProperty(value = "费用来源 1-默认 2-WMS 3-调拨系统 4-4k",required = true) @ApiModelProperty(value = "费用来源 1-默认 2-WMS 3-调拨系统 4-工资系统 5-4k",required = true)
private String sourceFrom; private String sourceFrom;
@ApiModelProperty(value = "作废,true/false")
private Boolean invalid;
} }
...@@ -219,7 +219,7 @@ public class CostDomain implements Serializable { ...@@ -219,7 +219,7 @@ public class CostDomain implements Serializable {
@ApiModelProperty("费用单-财务地址") @ApiModelProperty("费用单-财务地址")
private String cashierDownloadPath; private String cashierDownloadPath;
@ApiModelProperty("费用来源 1-默认 2-WMS 3-调拨系统") @ApiModelProperty("费用来源 1-默认 2-WMS 3-调拨系统 4-工资系统,5-4k DSP")
private String sourceFrom; private String sourceFrom;
@ApiModelProperty("项目") @ApiModelProperty("项目")
private String projectType; private String projectType;
......
...@@ -264,6 +264,14 @@ public class CostApiServiceImpl implements CostApiService { ...@@ -264,6 +264,14 @@ public class CostApiServiceImpl implements CostApiService {
costDomain.setAmountRmb(input.getAmount().multiply(toRmbRate).setScale(2, BigDecimal.ROUND_HALF_UP)); costDomain.setAmountRmb(input.getAmount().multiply(toRmbRate).setScale(2, BigDecimal.ROUND_HALF_UP));
} }
costDomain.setToRmbRate(toRmbRate); costDomain.setToRmbRate(toRmbRate);
if(input.getInvalid() != null && input.getInvalid()){
//作废
if(costDomain.getCostStatus() == CostDomain.STATUS_UN_SUBMIT || costDomain.getCostStatus() == CostDomain.STATUS_REJECT){
costDomain.setCostStatus(CostDomain.STATUS_DELETE);
}else {
throw new Exception("该状态下,无法作废费用单");
}
}
costDao.update(costDomain, new LambdaQueryWrapper<CostDomain>() costDao.update(costDomain, new LambdaQueryWrapper<CostDomain>()
.eq(CostDomain::getCostNo, costDomain.getCostNo())); .eq(CostDomain::getCostNo, costDomain.getCostNo()));
return "更新成功"; return "更新成功";
......
...@@ -9,7 +9,7 @@ import java.util.List; ...@@ -9,7 +9,7 @@ import java.util.List;
public interface UserService { public interface UserService {
/** /**
* @see com.blt.other.module.sys.service.UserService#findByUserid(int) * @see com.blt.other.module.sys.service.UserService#findByUserid(int)
* @param usercode * @param usercode
* @return * @return
*/ */
......
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