Commit a8c72ec3 by huluobin

更新费用类型

parent ade55cbc
......@@ -64,7 +64,7 @@ public class SpecDepartmentCheckConfigController {
}
@ApiOperation("导出excel")
@PostMapping("/importExcel")
@PostMapping("/exportExcel")
public CostResult<Void> exportExcel(HttpServletResponse response,
@RequestBody SpecDepartmentCheckExportExcelReq req) throws IOException {
specDepartmentCheckConfigService.exportExcel(response, req);
......
package com.blt.other.module.cost.dto.request;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.Data;
/**
......@@ -14,7 +15,9 @@ import lombok.Data;
@Data
public class CheckCostListReq {
@ApiModelProperty("oa用户id")
Integer userid;
Integer pageNum;
Integer pageSize;
@ApiModelProperty("1-财务+最终审核 2-部门审核 3-人事审核")
......
......@@ -74,12 +74,10 @@ public class CostApiServiceImpl implements CostApiService {
costDomain.setCostReason(logisticsCostDto.getCostReason());
costDomain.setTypeNo("CTN1809180519188");
costDomain.setTypeName("销售费用/物流费");
costDomain.setKindNo("CTK1809181719182");
costDomain.setKindName("物流费");
costDomain.setSubjectCode("660104");
// costDomain.setKindNo("CTK1809181719182");
// costDomain.setKindName("物流费");
// costDomain.setSubjectCode("660104");
costDomain.setCompanyNo("COM1806191800013");
costDomain.setCompanyValue(2); //dy
costDomain.setCompanyName("香港百伦科技有限公司"); //dy
costDomain.setAmount(logisticsCostDto.getAmount());
costDomain.setDic(logisticsCostDto.getCurrency());
costDomain.setSourceFrom(logisticsCostDto.getSourceFrom());
......@@ -297,7 +295,7 @@ public class CostApiServiceImpl implements CostApiService {
costDomain.setTypeNo(costTypeKindDomain.getTypeNo());
costDomain.setTypeName(costTypeKindDomain.getTypeName());
costDomain.setSubjectCode(costTypeKindDomain.getSubjectCode());
// costDomain.setSubjectCode(costTypeKindDomain.getSubjectCode());
costDomain.setCompanyNo(costTypeKindDomain.getCompanyNo());
costDomain.setCompanyName(wageCostDto.getCompanyName()); //dy
costDomain.setCompanyValue(wageCostDto.getCompanyValue());
......@@ -308,8 +306,8 @@ public class CostApiServiceImpl implements CostApiService {
costDomain.setBankName(wageCostDto.getBankName());
costDomain.setKindNo(costTypeKindDomain.getKindNo());
costDomain.setKindName(costTypeKindDomain.getKindName());
// costDomain.setKindNo(costTypeKindDomain.getKindNo());
// costDomain.setKindName(costTypeKindDomain.getKindName());
costDomain.setAmount(wageCostDto.getAmount());
costDomain.setDic(wageCostDto.getCurrency());
......
......@@ -32,7 +32,10 @@ import com.blt.other.module.cost.vo.ApplyCallbackUrlDataDataVo;
import com.blt.other.module.cost.vo.ApplyCallbackUrlVo;
import com.blt.other.module.cost.vo.CashierCallbackUrlDataDataVo;
import com.blt.other.module.cost.vo.CashierCallbackUrlVo;
import com.blt.other.module.database.model.*;
import com.blt.other.module.database.model.CostApplycallbackDomain;
import com.blt.other.module.database.model.CostCashiercallbackDomain;
import com.blt.other.module.database.model.CostCompanyDomain;
import com.blt.other.module.database.model.UserDomain;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.google.common.collect.Lists;
......@@ -181,14 +184,15 @@ public abstract class AbstractCostService implements CostService {
if (null != costDomain.getCompanyNo()) {
costDomain.setCompanyName(costCompanyDao.selectByNo(costDomain.getCompanyNo()).getCompanyName());
}
if (null != costDomain.getKindNo() && !"".equals(costDomain.getKindNo())) {
CostTypeKindDomain costTypeKindDomain = costTypeKindDao.selectByKindNo(costDomain.getKindNo());
if (null != costTypeKindDomain) {
costDomain.setKindName(costTypeKindDomain.getKindName());
costDomain.setTypeName(costTypeKindDomain.getTypeName());
costDomain.setTypeNo(costTypeKindDomain.getTypeNo());
}
}
//todo
// if (null != costDomain.getKindNo() && !"".equals(costDomain.getKindNo())) {
// CostTypeKindDomain costTypeKindDomain = costTypeKindDao.selectByKindNo(costDomain.getKindNo());
// if (null != costTypeKindDomain) {
// costDomain.setKindName(costTypeKindDomain.getKindName());
// costDomain.setTypeName(costTypeKindDomain.getTypeName());
// costDomain.setTypeNo(costTypeKindDomain.getTypeNo());
// }
// }
if (ListUtil.isNotEmpty(costDomain.getAttach())) {
......@@ -219,8 +223,8 @@ public abstract class AbstractCostService implements CostService {
costDomain.setCostNo(costNo);
costDomain.setAmount(amount);
costDomain.setKindNo(costDetailDomains.get(0).getKindNo());
costDomain.setKindName(costDetailDomains.get(0).getKindName());
// costDomain.setKindNo(costDetailDomains.get(0).getKindNo());
// costDomain.setKindName(costDetailDomains.get(0).getKindName());
costDomain.setLastModifyDate(LocalDateTime.now());
costDao.update(costDomain, new LambdaQueryWrapper<CostDomain>()
.eq(CostDomain::getCostNo, costDomain.getCostNo()));
......
......@@ -9,7 +9,6 @@ import com.blt.other.module.cost.service.CostPlanService;
import com.blt.other.module.cost.utils.CostUtils;
import com.blt.other.module.database.model.CostPlanDomain;
import com.blt.other.module.database.model.CostPlanTempDomain;
import com.blt.other.module.database.model.CostTypeDomain;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -110,8 +109,8 @@ public class CostPlanNewPayServiceImpl extends AbstractCostPlanService implement
// CostTypeDomain costTypeDomain = costTypeDao.selectByTypeNo(typeNo);
// costDomain.setSubjectCode(costTypeDomain.getSubjectCode());
costDomain.setKindNo(costDetailDomains.get(0).getKindNo());
costDomain.setKindName(costDetailDomains.get(0).getKindName());
// costDomain.setKindNo(costDetailDomains.get(0).getKindNo());
// costDomain.setKindName(costDetailDomains.get(0).getKindName());
if (null == costDomain.getAmount()) {
costDomain.setAmount(new BigDecimal(0));
}
......
......@@ -54,6 +54,7 @@ public class CostPlanDomain implements Serializable {
private Integer createUserid;
@ApiModelProperty("创建人编号")
private String createUsercode;
@ApiModelProperty("创建人名称")
private String createUsername;
......
......@@ -464,7 +464,7 @@
<select id="departmentCheckCostList" resultType="com.blt.other.module.cost.model.CostDomain">
select t1.*
from cost t1
left join cost_current_reviewer t3 on t1.cost_no = t3.cost_no and t3.oa_user_id = #{req.oaUserId}
left join cost_current_reviewer t3 on t1.cost_no = t3.cost_no and t3.oa_user_id = #{req.userid}
where t1.cost_status = 6
and t3.id is not null
</select>
......@@ -473,13 +473,13 @@
<select id="departmentCheckAllCostList" resultType="com.blt.other.module.cost.model.CostDomain">
select t1.*
from cost t1
left join cost_log t2 on t1.cost_no = t2.cost_no and t2.type in (2, 3) and t2.update_userid = #{req.oaUserId}
left join cost_log t2 on t1.cost_no = t2.cost_no and t2.type in (2, 3) and t2.update_userid = #{req.userid}
where t1.cost_status not in (0, 3, 5)
and t2.id is not null
union
select t1.*
from cost t1
left join cost_current_reviewer t3 on t1.cost_no = t3.cost_no and t3.oa_user_id = #{req.oaUserId}
left join cost_current_reviewer t3 on t1.cost_no = t3.cost_no and t3.oa_user_id = #{req.userid}
where t1.cost_status = 6
and t3.id is not null
</select>
......@@ -488,8 +488,8 @@
<select id="departmentManualCheckLllCostList" resultType="com.blt.other.module.cost.model.CostDomain">
select t1.*
from cost t1
left join cost_log t2 on t1.cost_no = t2.cost_no and t2.type = 3 and t2.update_userid = #{req.oaUserId}
left join cost_current_reviewer t3 on t1.cost_no = t3.cost_no and t3.oa_user_id = #{req.oaUserId}
left join cost_log t2 on t1.cost_no = t2.cost_no and t2.type = 3 and t2.update_userid = #{req.userid}
left join cost_current_reviewer t3 on t1.cost_no = t3.cost_no and t3.oa_user_id = #{req.userid}
where t1.cost_status not in (0, 3, 5)
and t2.id is not null
</select>
......@@ -498,8 +498,8 @@
<select id="departmentAutoCheckLllCostList" resultType="com.blt.other.module.cost.model.CostDomain">
select t1.*
from cost t1
left join cost_log t2 on t1.cost_no = t2.cost_no and t2.type = 2 and t2.update_userid = #{req.oaUserId}
left join cost_current_reviewer t3 on t1.cost_no = t3.cost_no and t3.oa_user_id = #{req.oaUserId}
left join cost_log t2 on t1.cost_no = t2.cost_no and t2.type = 2 and t2.update_userid = #{userid.oaUserId}
left join cost_current_reviewer t3 on t1.cost_no = t3.cost_no and t3.oa_user_id = #{req.userid}
where t1.cost_status not in (0, 3, 5)
and t2.id is not null
</select>
......@@ -508,7 +508,7 @@
<select id="financialOrFinalCheckCostList" resultType="com.blt.other.module.cost.model.CostDomain">
select t1.*
from cost t1
left join cost_current_reviewer t3 on t1.cost_no = t3.cost_no and t3.oa_user_id = #{req.oaUserId}
left join cost_current_reviewer t3 on t1.cost_no = t3.cost_no and t3.oa_user_id = #{req.userid}
where t1.cost_status = 6
and t3.id is not null
</select>
......@@ -517,7 +517,7 @@
<select id="hrCheckCostList" resultType="com.blt.other.module.cost.model.CostDomain">
select t1.*
from cost t1
left join cost_current_reviewer t3 on t1.cost_no = t3.cost_no and t3.oa_user_id = #{req.oaUserId}
left join cost_current_reviewer t3 on t1.cost_no = t3.cost_no and t3.oa_user_id = #{req.userid}
where t1.cost_status = 9
and t3.id is not null
</select>
......
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