Commit 3b5a86d4 by huluobin

update

parent be899fe0
...@@ -10,6 +10,7 @@ import io.swagger.annotations.ApiOperation; ...@@ -10,6 +10,7 @@ import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.io.IOException;
import java.util.List; import java.util.List;
@FeignClient(name = "bailuntec-cost-api", url = "http://api.fee.bailuntec.com/purchase/other/cost/api") @FeignClient(name = "bailuntec-cost-api", url = "http://api.fee.bailuntec.com/purchase/other/cost/api")
...@@ -18,15 +19,15 @@ public interface CostApi { ...@@ -18,15 +19,15 @@ public interface CostApi {
@ApiOperation("接受工资单,自动生成付款费用单到财务审核") @ApiOperation("接受工资单,自动生成付款费用单到财务审核")
@PostMapping("/pushWageCost") @PostMapping("/pushWageCost")
CostResult<Void> pushWageCost(@RequestBody WageCostDto wageCostDto); CostResult<Void> pushWageCost(@RequestBody WageCostDto wageCostDto) throws IOException;
@ApiOperation("接收物流单,自动生成付款费用单到财务审核") @ApiOperation("接收物流单,自动生成付款费用单到财务审核")
@PostMapping("/pushLogisticsCost") @PostMapping("/pushLogisticsCost")
CostResult<Void> pushLogisticsCost(@RequestBody LogisticsCostDto logisticsCostDto); CostResult<Void> pushLogisticsCost(@RequestBody LogisticsCostDto logisticsCostDto) throws Exception;
@ApiOperation("吴通接收物流单,自动生成收款费用单到财务审核") @ApiOperation("吴通接收物流单,自动生成收款费用单到财务审核")
@PostMapping("/pushLogisticsReceipt") @PostMapping("/pushLogisticsReceipt")
CostResult<Void> pushLogisticsReceipt(@RequestBody LogisticsCostDto logisticsCostDto); CostResult<Void> pushLogisticsReceipt(@RequestBody LogisticsCostDto logisticsCostDto) throws Exception;
@ApiOperation("获取所有费用单和采购单") @ApiOperation("获取所有费用单和采购单")
......
...@@ -14,8 +14,7 @@ public class CostPlanDto { ...@@ -14,8 +14,7 @@ public class CostPlanDto {
private String companyName; // 主体名称 private String companyName; // 主体名称
private String typeNo; // 类型编号 private String typeNo; // 类型编号
private String typeName; // 类型标题 private String typeName; // 类型标题
private String kindNo; // 种类编号
private String kindName; // 种类标题
private Integer createUserid; // 创建人 id private Integer createUserid; // 创建人 id
private String createUsercode; // 创建人编号 private String createUsercode; // 创建人编号
private String createUsername; // 创建人名称 private String createUsername; // 创建人名称
......
package com.blt.other.database.model;
import lombok.Data;
@Data
public class CostTypeKindDomain {
private Integer id;// 费用种类 id
private String kindNo;// 费用种类编号
private String kindName;// 费用种类标题
private String typeNo;// 费用类型编号
private String typeName;// 费用类型标题
private String companyNo;// 主体编号
private String companyName;// 公司主体名称
private Integer costTypeStatus;// 种类状态:0:不可用,1:可用,2:删除
private String bankName;
private String bankCard;
private Integer costForm; // 费用类型
private String subjectCode; // 科目编号
private Integer isLend; // 借支/借还
private String createUsername; // 创建人
private String createUsercode; // 创建人编号
}
...@@ -17,6 +17,7 @@ import org.slf4j.LoggerFactory; ...@@ -17,6 +17,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.io.IOException;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -35,46 +36,30 @@ public class CostApiController implements CostApi { ...@@ -35,46 +36,30 @@ public class CostApiController implements CostApi {
@Override @Override
@ApiOperation("接受工资单,自动生成付款费用单到财务审核") @ApiOperation("接受工资单,自动生成付款费用单到财务审核")
@PostMapping("/pushWageCost") @PostMapping("/pushWageCost")
public CostResult<Void> pushWageCost(@RequestBody WageCostDto wageCostDto) { public CostResult<Void> pushWageCost(@RequestBody WageCostDto wageCostDto) throws IOException {
logger.info("接收推送而来的工资单信息:" + wageCostDto); logger.info("接收推送而来的工资单信息:" + wageCostDto);
try { String costNo = costApiService.pushWageCost(wageCostDto);
String costNo = costApiService.pushWageCost(wageCostDto); return CostResult.successMsg(costNo);
return CostResult.successMsg(costNo);
} catch (Exception e) {
logger.error("s生成工资系统付款费用单发生错误:", e);
return CostResult.successMsg("生成工资系统付款费用单发生错误" + e.getMessage());
}
} }
@LoginIgnore @LoginIgnore
@ApiOperation("接收物流单,自动生成付款费用单到财务审核") @ApiOperation("接收物流单,自动生成付款费用单到财务审核")
@Override @Override
@PostMapping("/pushLogisticsCost") @PostMapping("/pushLogisticsCost")
public CostResult<Void> pushLogisticsCost(@RequestBody LogisticsCostDto logisticsCostDto) { public CostResult<Void> pushLogisticsCost(@RequestBody LogisticsCostDto logisticsCostDto) throws Exception {
logger.warn("接收推送而来的物流单信息:" + logisticsCostDto); logger.warn("接收推送而来的物流单信息:" + logisticsCostDto);
try { String costNo = costApiService.generateLogisticsCost(CostDomain.COST_FROM_1, logisticsCostDto);
String costNo = costApiService.generateLogisticsCost(1, logisticsCostDto); return CostResult.successMsg(costNo);
return CostResult.successMsg(costNo);
} catch (Exception e) {
logger.error("生成物流付款费用单发生错误:", e);
return CostResult.successMsg("生成物流付款费用单发生错误" + e.getMessage());
}
} }
@LoginIgnore @LoginIgnore
@ApiOperation("吴通接收物流单,自动生成收款费用单到财务审核") @ApiOperation("吴通接收物流单,自动生成收款费用单到财务审核")
@Override @Override
@PostMapping("/pushLogisticsReceipt") @PostMapping("/pushLogisticsReceipt")
public CostResult<Void> pushLogisticsReceipt(@RequestBody LogisticsCostDto logisticsCostDto) { public CostResult<Void> pushLogisticsReceipt(@RequestBody LogisticsCostDto logisticsCostDto) throws Exception {
logger.info("接收推送而来的物流单信息:" + logisticsCostDto); logger.info("接收推送而来的物流单信息:" + logisticsCostDto);
try { String costNo = costApiService.generateLogisticsCost(CostDomain.COST_FROM_2, logisticsCostDto);
String costNo = costApiService.generateLogisticsCost(2, logisticsCostDto); return CostResult.successMsg(costNo);
return CostResult.successMsg(costNo);
} catch (Exception e) {
logger.error("生成物流收款费用单发生错误:", e);
return CostResult.error("生成物流收款费用单发生错误" + e.getMessage());
}
} }
...@@ -143,6 +128,7 @@ public class CostApiController implements CostApi { ...@@ -143,6 +128,7 @@ public class CostApiController implements CostApi {
@RequestParam String endDate, @RequestParam String endDate,
@RequestParam Integer pageNum, @RequestParam Integer pageNum,
@RequestParam Integer pageSize) { @RequestParam Integer pageSize) {
logger.info("根据最后更新时间查询费用单");
List<CostDto> costDtoList = this.costApiService.getCostList(startDate, endDate, pageNum, pageSize); List<CostDto> costDtoList = this.costApiService.getCostList(startDate, endDate, pageNum, pageSize);
return CostResult.success(costDtoList); return CostResult.success(costDtoList);
} }
...@@ -186,12 +172,7 @@ public class CostApiController implements CostApi { ...@@ -186,12 +172,7 @@ public class CostApiController implements CostApi {
@GetMapping("/type/{costNo}") @GetMapping("/type/{costNo}")
public CostResult<String> getTypeName(@PathVariable("costNo") String costNo) { public CostResult<String> getTypeName(@PathVariable("costNo") String costNo) {
// 获取费用单详细信息 // 获取费用单详细信息
try { CostDomain costDomain = costApiService.getCostDetails(costNo);
CostDomain costDomain = costApiService.getCostDetails(costNo); return CostResult.success(costDomain.getTypeName());
return CostResult.success(costDomain.getTypeName());
} catch (Exception e) {
e.printStackTrace();
return CostResult.error();
}
} }
} }
package com.blt.other.module.cost.controller; package com.blt.other.module.cost.controller;
import com.blt.other.common.util.AxiosUtil; import com.blt.other.common.util.AxiosUtil;
import com.blt.other.common.util.PathUtil;
import com.blt.other.database.model.CostTypeKindDomain;
import com.blt.other.database.model.UserDomain; import com.blt.other.database.model.UserDomain;
import com.blt.other.module.cost.dto.request.ResetReq;
import com.blt.other.module.cost.dto.response.ResetResp;
import com.blt.other.module.cost.model.CostDetailDomain; import com.blt.other.module.cost.model.CostDetailDomain;
import com.blt.other.module.cost.service.CostDetailService; import com.blt.other.module.cost.service.CostDetailService;
import com.blt.other.module.cost.service.CostLogService; import com.blt.other.module.cost.service.CostLogService;
import com.blt.other.module.cost.service.CostService;
import com.blt.other.module.cost.service.CostTypeKindService;
import com.blt.other.module.cost.utils.CostFileUtil;
import com.blt.other.module.sys.service.UserService; import com.blt.other.module.sys.service.UserService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.FileSystemResource; import org.springframework.core.io.FileSystemResource;
import org.springframework.core.io.InputStreamResource; import org.springframework.core.io.InputStreamResource;
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.math.BigDecimal;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -37,11 +36,6 @@ public class CostDetailController { ...@@ -37,11 +36,6 @@ public class CostDetailController {
@Autowired @Autowired
private CostDetailService costDetailService; private CostDetailService costDetailService;
@Autowired @Autowired
private CostTypeKindService costTypeKindService;
@Autowired
private CostService costService;
@Autowired
private CostLogService costLogService; private CostLogService costLogService;
@Autowired @Autowired
private UserService userService; private UserService userService;
...@@ -142,71 +136,13 @@ public class CostDetailController { ...@@ -142,71 +136,13 @@ public class CostDetailController {
return result; return result;
} }
@PostMapping("/resetItem/noFile") @ApiOperation("更新费用详情")
public Map<String, Object> resetNoFile(HttpServletResponse response, HttpServletRequest request) { @PostMapping({"/resetItem/noFile", "/resetItem/file"})
AxiosUtil.setCors(response, request); public ResetResp reset(ResetReq req) {
CostDetailDomain domain = createDomain(request); return costDetailService.reset(req);
String delecteFile = request.getParameter("delecteFile");
boolean b = Boolean.parseBoolean(delecteFile);
if (b) {
costDetailService.deleteFilePath(domain.getDetailNo());
}
Map<String, Object> result = new HashMap<>();
result.put("success", true);
Integer update = costDetailService.update(domain);
if (null != update && update >= 1) {
// 更新费用单信息
costService.resetCost(domain.getCostNo());
}
result.put("detail", domain);
return result;
}
@PostMapping("/resetItem/file")
public Map<String, Object> resetFile(HttpServletResponse response,
HttpServletRequest request,
@RequestParam("fileSelect2") MultipartFile file) {
AxiosUtil.setCors(response, request);
CostDetailDomain domain = createDomain(request);
// 文件上传的路径
String filePath = PathUtil.getBasePath() + PathUtil.getPath("cost/" + domain.getDetailNo() + "/");
// 调用工具类执行保存,并返回 path
String path = CostFileUtil.upload(file, filePath);
domain.setFilePath(path);
Map<String, Object> result = new HashMap<>();
result.put("success", true);
Integer update = costDetailService.update(domain);
if (null != update && update >= 1) {
costService.resetCost(domain.getCostNo());
result.put("detail", domain);
}
return result;
} }
private CostDetailDomain createDomain(HttpServletRequest request) {
CostDetailDomain domain = new CostDetailDomain();
String costReason = request.getParameter("costReason");
String amount = request.getParameter("amount");
String kindNo = request.getParameter("kindNo");
String detailNo = request.getParameter("detailNo");
String costNo = request.getParameter("costNo");
domain.setCostReason(costReason);
domain.setAmount(new BigDecimal(amount));
domain.setCostNo(costNo);
domain.setDetailNo(detailNo);
CostTypeKindDomain kindByKindNo = costTypeKindService.getKindByKindNo(kindNo);
return domain;
}
@GetMapping("/getCostLogs") @GetMapping("/getCostLogs")
public Map<String, Object> getCostLogs(HttpServletResponse response, HttpServletRequest request) { public Map<String, Object> getCostLogs(HttpServletResponse response, HttpServletRequest request) {
AxiosUtil.setCors(response, request); AxiosUtil.setCors(response, request);
......
...@@ -18,6 +18,4 @@ public interface CostDetailDao extends BaseMapper<CostDetailDomain> { ...@@ -18,6 +18,4 @@ public interface CostDetailDao extends BaseMapper<CostDetailDomain> {
void deletedFilePath(String detailNo); void deletedFilePath(String detailNo);
CostDetailDomain selectListByCostNoAndKindNo(CostDetailDomain domain);
} }
...@@ -14,8 +14,6 @@ public interface CostPlanTempDao extends BaseMapper<CostPlanTempDomain> { ...@@ -14,8 +14,6 @@ public interface CostPlanTempDao extends BaseMapper<CostPlanTempDomain> {
CostPlanTempDomain selectByNo(String tempNo); CostPlanTempDomain selectByNo(String tempNo);
CostPlanTempDomain selectByPlanNoAndKindNo(@Param("costPlanNo") String costPlanNo, @Param("kindNo") String kindNo);
//获取费用计划子项 //获取费用计划子项
List<CostPlanTempDomain> selectListByPlanNo(String costPlanNo); List<CostPlanTempDomain> selectListByPlanNo(String costPlanNo);
......
package com.blt.other.module.cost.dao;
import com.blt.other.database.model.CostTypeKindDomain;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
@Mapper
@Repository
public interface CostTypeKindDao {
/**
* 获取所有费用种类
*
* @return
*/
List<CostTypeKindDomain> selectAll();
/**
* 根据 typeNo 获取费用种类
*
* @param typeNo
* @return
*/
List<CostTypeKindDomain> selectByTypeNo(String typeNo);
/**
* 根据 companyNo 获取费用种类
*
* @param companyNo
* @return
*/
List<CostTypeKindDomain> selectByCompanyNo(String companyNo);
/**
* 根据 typeNo 和 kindName 获取费用种类,用于添加费用种类时判断是否已经存在相同的费用种类
*
* @param costTypeKindDomain
* @return
*/
CostTypeKindDomain selectByTypeNoAndKindName(CostTypeKindDomain costTypeKindDomain);
/**
* 根据 costTypeKindNo 获取种类信息
*
* @param costTypeKindNo
* @return
*/
CostTypeKindDomain selectByKindNo(String costTypeKindNo);
// /**
// * 根据费用小类名称和公司名称获取种类信息
// *
// * @param kindName
// * @param companyName
// * @return
// */
// @Deprecated
// CostTypeKindDomain selectByKindNameAndCompanyName(String kindName, String companyName);
/**
* 根据费用小类名称和公司no获取种类信息
*
* @param kindName
* @param companyNo
* @return
*/
CostTypeKindDomain selectByKindNameAndCompanyNo(@Param("kindName") String kindName, @Param("companyNo") String companyNo);
/**
* 新增费用种类记录
*
* @param ctkd
* @return
*/
Integer insert(CostTypeKindDomain ctkd);
List<CostTypeKindDomain> selectByCompanyNoAndCostForm(CostTypeKindDomain costTypeKindDomain);
Integer update(CostTypeKindDomain costTypeKindDomain);
Integer delete(String kindNo);
}
package com.blt.other.module.cost.dto.request;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;
import java.math.BigDecimal;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2021/1/5 1:50 下午
*/
@Data
public class ResetReq {
@ApiModelProperty("费用详情编号")
private String detailNo;
@ApiModelProperty("费用单编号")
private String costNo;
@ApiModelProperty("类型编号")
private String typeNo;
@ApiModelProperty("类型标题")
private String typeName;
@ApiModelProperty("会计一级科目")
private String accountingSubjectNo;
@ApiModelProperty("会计一级科目")
private String accountingSubjectName;
@ApiModelProperty("创建人id")
private Integer createUserid;
@ApiModelProperty("创建人名称")
private String createUsername;
@ApiModelProperty("付款理由")
private String costReason;
@ApiModelProperty("费用详情金额")
private BigDecimal amount;
@ApiModelProperty("币种")
private String dic;
@ApiModelProperty("借支单-借支类型")
private String lendType;
@ApiModelProperty("文件地址")
private String filePath;
@ApiModelProperty("项目")
private String projectType;
@ApiModelProperty("客户编号")
private String customerNum;
private MultipartFile fileSelect2;
}
package com.blt.other.module.cost.dto.response;
import com.blt.other.module.cost.model.CostDetailDomain;
import lombok.Data;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2021/1/5 1:52 下午
*/
@Data
public class ResetResp {
private Boolean success;
private CostDetailDomain detail;
}
package com.blt.other.module.cost.service; package com.blt.other.module.cost.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.blt.other.module.cost.dto.request.ResetReq;
import com.blt.other.module.cost.dto.response.ResetResp;
import com.blt.other.module.cost.model.CostDetailDomain; import com.blt.other.module.cost.model.CostDetailDomain;
import java.util.List; import java.util.List;
public interface CostDetailService { public interface CostDetailService extends IService<CostDetailDomain> {
List<CostDetailDomain> getCostDetailListByCostNo(String costNo); List<CostDetailDomain> getCostDetailListByCostNo(String costNo);
...@@ -14,4 +17,5 @@ public interface CostDetailService { ...@@ -14,4 +17,5 @@ public interface CostDetailService {
Integer update(CostDetailDomain domain); Integer update(CostDetailDomain domain);
ResetResp reset(ResetReq req);
} }
package com.blt.other.module.cost.service; package com.blt.other.module.cost.service;
import com.blt.other.database.model.CostTypeKindDomain;
import com.blt.other.database.model.LogisticsSupplierBankDomain; import com.blt.other.database.model.LogisticsSupplierBankDomain;
public interface CostTypeKindService { public interface CostTypeKindService {
/**
* 根据 kindNo 获取费用种类详情
*
* @param kindNo
* @return
*/
CostTypeKindDomain getKindByKindNo(String kindNo);
LogisticsSupplierBankDomain getLogisticsBank(String subSupplierName); LogisticsSupplierBankDomain getLogisticsBank(String subSupplierName);
} }
...@@ -47,8 +47,6 @@ public class CostApiServiceImpl implements CostApiService { ...@@ -47,8 +47,6 @@ public class CostApiServiceImpl implements CostApiService {
@Resource @Resource
private CostDao costDao; private CostDao costDao;
@Resource @Resource
private CostTypeKindDao costTypeKindDao;
@Resource
private UserDao userDao; private UserDao userDao;
@Resource @Resource
private CostDetailDao costDetailDao; private CostDetailDao costDetailDao;
......
package com.blt.other.module.cost.service.impl; package com.blt.other.module.cost.service.impl;
import com.bailuntec.common.BeanUtils;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.blt.other.common.util.PathUtil;
import com.blt.other.module.cost.dao.CostDao; import com.blt.other.module.cost.dao.CostDao;
import com.blt.other.module.cost.dao.CostDetailDao; import com.blt.other.module.cost.dao.CostDetailDao;
import com.blt.other.module.cost.dto.request.ResetReq;
import com.blt.other.module.cost.dto.response.ResetResp;
import com.blt.other.module.cost.model.CostDetailDomain; import com.blt.other.module.cost.model.CostDetailDomain;
import com.blt.other.module.cost.service.CostDetailService; import com.blt.other.module.cost.service.CostDetailService;
import com.blt.other.module.cost.service.CostService;
import com.blt.other.module.cost.utils.CostFileUtil;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -12,12 +19,12 @@ import javax.annotation.Resource; ...@@ -12,12 +19,12 @@ import javax.annotation.Resource;
import java.util.List; import java.util.List;
@Service @Service
public class CostDetailServiceImpl implements CostDetailService { public class CostDetailServiceImpl extends ServiceImpl<CostDetailDao, CostDetailDomain> implements CostDetailService {
@Resource @Resource
private CostDetailDao costDetailDao; private CostDetailDao costDetailDao;
@Resource @Resource
CostDao costDao; CostService costService;
@Override @Override
public List<CostDetailDomain> getCostDetailListByCostNo(String costNo) { public List<CostDetailDomain> getCostDetailListByCostNo(String costNo) {
...@@ -42,4 +49,26 @@ public class CostDetailServiceImpl implements CostDetailService { ...@@ -42,4 +49,26 @@ public class CostDetailServiceImpl implements CostDetailService {
return costDetailDao.update(domain, new LambdaQueryWrapper<CostDetailDomain>() return costDetailDao.update(domain, new LambdaQueryWrapper<CostDetailDomain>()
.eq(CostDetailDomain::getDetailNo, domain.getDetailNo())); .eq(CostDetailDomain::getDetailNo, domain.getDetailNo()));
} }
@Override
public ResetResp reset(ResetReq req) {
CostDetailDomain costDetailDomain = this.getCostDetailByDetailNo(req.getDetailNo());
BeanUtils.copyProperties(req, costDetailDomain);
if (req.getFileSelect2() != null) {
// 文件上传的路径
String filePath = PathUtil.getBasePath() + PathUtil.getPath("cost/" + costDetailDomain.getDetailNo() + "/");
// 调用工具类执行保存,并返回 path
String path = CostFileUtil.upload(req.getFileSelect2(), filePath);
costDetailDomain.setFilePath(path);
}
baseMapper.updateById(costDetailDomain);
costService.resetCost(costDetailDomain.getCostNo());
ResetResp resetResp = new ResetResp();
resetResp.setDetail(costDetailDomain);
resetResp.setSuccess(true);
return resetResp;
}
} }
package com.blt.other.module.cost.service.impl; package com.blt.other.module.cost.service.impl;
import com.blt.other.module.cost.dao.CostTypeKindDao; import com.blt.other.database.model.LogisticsSupplierBankDomain;
import com.blt.other.module.cost.dao.LogisticsSupplierBankDao; import com.blt.other.module.cost.dao.LogisticsSupplierBankDao;
import com.blt.other.module.cost.service.CostTypeKindService; import com.blt.other.module.cost.service.CostTypeKindService;
import com.blt.other.database.model.CostTypeKindDomain;
import com.blt.other.database.model.LogisticsSupplierBankDomain;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@Service @Service
public class CostTypeKindServiceImpl implements CostTypeKindService { public class CostTypeKindServiceImpl implements CostTypeKindService {
@Autowired
private CostTypeKindDao costTypeKindDao;
@Autowired
private LogisticsSupplierBankDao logisticsSupplierBankDao;
@Override @Resource
public CostTypeKindDomain getKindByKindNo(String kindNo) { private LogisticsSupplierBankDao logisticsSupplierBankDao;
return costTypeKindDao.selectByKindNo(kindNo);
}
@Override @Override
public LogisticsSupplierBankDomain getLogisticsBank(String subSupplierName) { public LogisticsSupplierBankDomain getLogisticsBank(String subSupplierName) {
......
...@@ -75,8 +75,6 @@ public abstract class AbstractCostService implements CostService { ...@@ -75,8 +75,6 @@ public abstract class AbstractCostService implements CostService {
@Autowired @Autowired
CostCompanyDao costCompanyDao; CostCompanyDao costCompanyDao;
@Autowired @Autowired
CostTypeKindDao costTypeKindDao;
@Autowired
CostDetailDao costDetailDao; CostDetailDao costDetailDao;
@Autowired @Autowired
CostLogService costLogService; CostLogService costLogService;
......
...@@ -55,8 +55,6 @@ public abstract class AbstractCostPlanService implements CostPlanService { ...@@ -55,8 +55,6 @@ public abstract class AbstractCostPlanService implements CostPlanService {
@Autowired @Autowired
CostTypeDao costTypeDao; CostTypeDao costTypeDao;
@Autowired @Autowired
CostTypeKindDao costTypeKindDao;
@Autowired
CostPlanTempService costPlanTempService; CostPlanTempService costPlanTempService;
@Autowired @Autowired
ICostTemplateService costTemplateService; ICostTemplateService costTemplateService;
......
package com.blt.other.module.cost.vo; package com.blt.other.module.cost.vo;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date; import java.util.Date;
/**
* {"params":{"keys":{"companyNo":"COM1806191800016","costForm":"","createUsercode":"bl1170","kindNo":"","costStatus":"","isTax":0,"linkCost":""}}} @Data
*/
public class CostCheckSearchKeysVo { public class CostCheckSearchKeysVo {
private Params params; private Params params;
public class Params{ @Data
public static class Params {
private Keys keys; private Keys keys;
private Integer pageNum; private Integer pageNum;
private Integer pageSize; private Integer pageSize;
public class Keys{ @Data
public static class Keys {
private String authority; private String authority;
private Integer userId; private Integer userId;
private String companyNo; private String companyNo;
private Integer costForm; private Integer costForm;
private String createUsercode; private String createUsercode;
private String kindNo;
private Integer costStatus; private Integer costStatus;
private Integer lendStatus; private Integer lendStatus;
private Integer isTax; private Integer isTax;
private String linkCost; private String linkCost;
private Integer isLend; private Integer isLend;
@JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date beginPayTime; private Date beginPayTime;
@JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date endPayTime; private Date endPayTime;
private Integer logisticsSupplierId; // 一级物流供应商ID private Integer logisticsSupplierId; // 一级物流供应商ID
private Integer subLogisticsSupplierId; // 二级物流供应商ID private Integer subLogisticsSupplierId; // 二级物流供应商ID
public String getAuthority() {
return authority;
}
public void setAuthority(String authority) {
this.authority = authority;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public String getCompanyNo() {
return companyNo;
}
public void setCompanyNo(String companyNo) {
this.companyNo = companyNo;
}
public Integer getCostForm() {
return costForm;
}
public void setCostForm(Integer costForm) {
this.costForm = costForm;
}
public String getCreateUsercode() {
return createUsercode;
}
public void setCreateUsercode(String createUsercode) {
this.createUsercode = createUsercode;
}
public String getKindNo() {
return kindNo;
}
public void setKindNo(String kindNo) {
this.kindNo = kindNo;
}
public Integer getCostStatus() {
return costStatus;
}
public void setCostStatus(Integer costStatus) {
this.costStatus = costStatus;
}
public Integer getIsTax() {
return isTax;
}
public void setIsTax(Integer isTax) {
this.isTax = isTax;
}
public String getLinkCost() {
return linkCost;
}
public void setLinkCost(String linkCost) {
this.linkCost = linkCost;
}
public Integer getIsLend() {
return isLend;
}
public void setIsLend(Integer isLend) {
this.isLend = isLend;
}
public Integer getLendStatus() {
return lendStatus;
}
public void setLendStatus(Integer lendStatus) {
this.lendStatus = lendStatus;
}
public Date getBeginPayTime() {
return beginPayTime;
}
public void setBeginPayTime(Date beginPayTime) {
this.beginPayTime = beginPayTime;
}
public Date getEndPayTime() {
return endPayTime;
}
public void setEndPayTime(Date endPayTime) {
this.endPayTime = endPayTime;
}
public Integer getLogisticsSupplierId() {
return logisticsSupplierId;
}
public void setLogisticsSupplierId(Integer logisticsSupplierId) {
this.logisticsSupplierId = logisticsSupplierId;
}
public Integer getSubLogisticsSupplierId() {
return subLogisticsSupplierId;
}
public void setSubLogisticsSupplierId(Integer subLogisticsSupplierId) {
this.subLogisticsSupplierId = subLogisticsSupplierId;
}
@Override
public String toString() {
return "Keys{" +
"authority='" + authority + '\'' +
", userId=" + userId +
", companyNo='" + companyNo + '\'' +
", costForm=" + costForm +
", createUsercode='" + createUsercode + '\'' +
", kindNo='" + kindNo + '\'' +
", costStatus=" + costStatus +
", lendStatus=" + lendStatus +
", isTax=" + isTax +
", linkCost='" + linkCost + '\'' +
", isLend=" + isLend +
", beginPayTime=" + beginPayTime +
", endPayTime=" + endPayTime +
", logisticsSupplierId=" + logisticsSupplierId +
", subLogisticsSupplierId=" + subLogisticsSupplierId +
'}';
}
}
public Keys getKeys() {
return keys;
}
public void setKeys(Keys keys) {
this.keys = keys;
}
public Integer getPageNum() {
return pageNum;
}
public void setPageNum(Integer pageNum) {
this.pageNum = pageNum;
} }
public Integer getPageSize() {
return pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
@Override
public String toString() {
return "Params{" +
"keys=" + keys +
", pageNum=" + pageNum +
", pageSize=" + pageSize +
'}';
}
}
public Params getParams() {
return params;
}
public void setParams(Params params) {
this.params = params;
}
@Override
public String toString() {
return "CostCheckSearchKeysVo{" +
"params=" + params +
'}';
} }
} }
package com.blt.other.module.cost.vo; package com.blt.other.module.cost.vo;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
/** @Data
* 接收前端打印的费用单号列表
* {"params":{"exportNos":["F000042","F000041-2","SF000040","F000039","F000038","SF000037","F000036","F000035","SF000034","F000033"]}}
*/
public class CostExportVo { public class CostExportVo {
private ExportNos params; private ExportNos params;
public ExportNos getParams() { @Data
return params; public static class ExportNos {
}
public void setParams(ExportNos params) {
this.params = params;
}
@Override
public String toString() {
return "CostExportVo{" +
"params=" + params +
'}';
}
public class ExportNos {
private List<String> exportNos; private List<String> exportNos;
private Integer userid; private Integer userid;
private String key; private String key;
private Keys keys; private Keys keys;
public List<String> getExportNos() { @Data
return exportNos; public static class Keys {
}
public void setExportNos(List<String> exportNos) {
this.exportNos = exportNos;
}
public Integer getUserid() {
return userid;
}
public void setUserid(Integer userid) {
this.userid = userid;
}
public String getKey(){
return key;
}
public void setKey(String key){
this.key = key;
}
public void setKeys(Keys keys){
this.keys = keys;
}
public Keys getKeys(){
return keys;
}
@Override
public String toString() {
return "ExportNos{" +
"exportNos=" + exportNos +
", userid=" + userid +
", key=" + key +
", keys=" + keys +
'}';
}
public class Keys{
private String companyNo; private String companyNo;
private Integer costForm; private Integer costForm;
private String createUsercode; private String createUsercode;
private String kindNo;
private Integer costStatus; private Integer costStatus;
private Integer lendStatus; private Integer lendStatus;
private Integer isTax; private Integer isTax;
private Integer isLend; private Integer isLend;
@JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date beginTime; private Date beginTime;
@JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date endTime; private Date endTime;
@JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date beginPayTime; private Date beginPayTime;
@JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date endPayTime; private Date endPayTime;
private String linkCost; private String linkCost;
public String getCompanyNo() {
return companyNo;
}
public void setCompanyNo(String companyNo) {
this.companyNo = companyNo;
}
public Integer getCostForm() {
return costForm;
}
public void setCostForm(Integer costForm) {
this.costForm = costForm;
}
public String getCreateUsercode() {
return createUsercode;
}
public void setCreateUsercode(String createUsercode) {
this.createUsercode = createUsercode;
}
public String getKindNo() {
return kindNo;
}
public void setKindNo(String kindNo) {
this.kindNo = kindNo;
}
public Integer getCostStatus() {
return costStatus;
}
public void setCostStatus(Integer costStatus) {
this.costStatus = costStatus;
}
public Integer getIsTax() {
return isTax;
}
public void setIsTax(Integer isTax) {
this.isTax = isTax;
}
public Date getBeginTime() {
return beginTime;
}
public void setBeginTime(Date beginTime) {
this.beginTime = beginTime;
}
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
public Date getBeginPayTime() {
return beginPayTime;
}
public void setBeginPayTime(Date beginPayTime) {
this.beginPayTime = beginPayTime;
}
public Date getEndPayTime() {
return endPayTime;
}
public void setEndPayime(Date endPayTime) {
this.endPayTime = endPayTime;
}
public Integer getLendStatus() {
return lendStatus;
}
public void setLendStatus(Integer lendStatus) {
this.lendStatus = lendStatus;
}
public Integer getIsLend() {
return isLend;
}
public void setIsLend(Integer isLend) {
this.isLend = isLend;
}
public String getLinkCost() {
return linkCost;
}
public void setLinkCost(String linkCost) {
this.linkCost = linkCost;
}
@Override
public String toString() {
return "Keys{" +
"companyNo='" + companyNo + '\'' +
", costForm=" + costForm +
", createUsercode='" + createUsercode + '\'' +
", kindNo='" + kindNo + '\'' +
", costStatus=" + costStatus +
", lendStatus=" + lendStatus +
", isTax=" + isTax +
", isLend=" + isLend +
", beginTime=" + beginTime +
", endTime=" + endTime +
", beginPayTime=" + beginPayTime +
", endPayTime=" + endPayTime +
", linkCost='" + linkCost + '\'' +
'}';
}
} }
} }
} }
...@@ -7,11 +7,11 @@ import com.blt.other.common.config.property.CostUrlProperties; ...@@ -7,11 +7,11 @@ import com.blt.other.common.config.property.CostUrlProperties;
import com.blt.other.common.util.AxiosUtil; import com.blt.other.common.util.AxiosUtil;
import com.blt.other.common.util.IpUtil; import com.blt.other.common.util.IpUtil;
import com.blt.other.common.util.PathUtil; import com.blt.other.common.util.PathUtil;
import com.blt.other.database.model.*;
import com.blt.other.module.cost.dao.CostDao; import com.blt.other.module.cost.dao.CostDao;
import com.blt.other.module.cost.model.CostDomain; import com.blt.other.module.cost.model.CostDomain;
import com.blt.other.module.cost.service.CostService; import com.blt.other.module.cost.service.CostService;
import com.blt.other.module.cost.utils.CostFileUtil; import com.blt.other.module.cost.utils.CostFileUtil;
import com.blt.other.database.model.*;
import com.blt.other.module.entrepot.dto.InventoryLogDto; import com.blt.other.module.entrepot.dto.InventoryLogDto;
import com.blt.other.module.entrepot.dto.StorageDto; import com.blt.other.module.entrepot.dto.StorageDto;
import com.blt.other.module.entrepot.service.InventoryLogService; import com.blt.other.module.entrepot.service.InventoryLogService;
...@@ -23,10 +23,8 @@ import com.blt.other.module.purchasing.vo.ApplyCallbackUrlVo; ...@@ -23,10 +23,8 @@ import com.blt.other.module.purchasing.vo.ApplyCallbackUrlVo;
import com.blt.other.module.purchasing.vo.ApplyCallbackVo; import com.blt.other.module.purchasing.vo.ApplyCallbackVo;
import com.blt.other.module.purchasing.vo.ApplyMoneyDetail; import com.blt.other.module.purchasing.vo.ApplyMoneyDetail;
import com.blt.other.module.purchasing.vo.CashierCallbackUrlVo; import com.blt.other.module.purchasing.vo.CashierCallbackUrlVo;
import com.blt.other.module.sku.service.SysProductService;
import com.blt.other.module.supplier.service.SupplierService; import com.blt.other.module.supplier.service.SupplierService;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.extern.java.Log;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
...@@ -60,8 +58,6 @@ public class PurchasingListDetailController { ...@@ -60,8 +58,6 @@ public class PurchasingListDetailController {
@Autowired @Autowired
private BuyService buyService; private BuyService buyService;
@Autowired @Autowired
private SysProductService sysProductService;
@Autowired
private SupplierService supplierService; private SupplierService supplierService;
@Autowired @Autowired
private RestTemplate restTemplate; private RestTemplate restTemplate;
......
...@@ -53,7 +53,6 @@ ...@@ -53,7 +53,6 @@
<if test=" isLend!=null and isLend != ''">and t1.is_lend=#{isLend}</if> <if test=" isLend!=null and isLend != ''">and t1.is_lend=#{isLend}</if>
<if test=" companyName!=null and companyName != ''">and t1.company_name=#{companyName}</if> <if test=" companyName!=null and companyName != ''">and t1.company_name=#{companyName}</if>
<if test=" createUsername!=null and createUsername != ''">and t1.create_username=#{createUsername}</if> <if test=" createUsername!=null and createUsername != ''">and t1.create_username=#{createUsername}</if>
<if test=" kindNo!=null and kindNo != ''">and t1.kind_no=#{kindNo}</if>
<if test=" costStatus!=null and costStatus != ''">and t1.cost_status=#{costStatus}</if> <if test=" costStatus!=null and costStatus != ''">and t1.cost_status=#{costStatus}</if>
<if test=" lendStatus!=null and lendStatus != ''">and t1.lend_status=#{lendStatus}</if> <if test=" lendStatus!=null and lendStatus != ''">and t1.lend_status=#{lendStatus}</if>
group by t1.id group by t1.id
...@@ -88,6 +87,7 @@ ...@@ -88,6 +87,7 @@
ORDER BY id DESC ORDER BY id DESC
</select> </select>
<select id="getLogisticsCostList" resultType="com.bailuntec.cost.api.dto.ManageCostDto"> <select id="getLogisticsCostList" resultType="com.bailuntec.cost.api.dto.ManageCostDto">
SELECT c.cost_no no,c.bank_company receiveUnit,d.cost_reason reason,c.pay_time payTime,c.cost_form SELECT c.cost_no no,c.bank_company receiveUnit,d.cost_reason reason,c.pay_time payTime,c.cost_form
manageCostType,u.departmentname1 departmentName, manageCostType,u.departmentname1 departmentName,
......
...@@ -22,10 +22,4 @@ ...@@ -22,10 +22,4 @@
WHERE detail_no = #{detailNo} WHERE detail_no = #{detailNo}
</update> </update>
<select id="selectListByCostNoAndKindNo" resultType="com.blt.other.module.cost.model.CostDetailDomain">
SELECT *
FROM cost_detail
WHERE cost_no = #{costNo}
AND kind_no = #{kindNo}
</select>
</mapper> </mapper>
...@@ -8,12 +8,6 @@ ...@@ -8,12 +8,6 @@
WHERE temp_no = #{tempNo} WHERE temp_no = #{tempNo}
</select> </select>
<select id="selectByPlanNoAndKindNo" resultType="com.blt.other.database.model.CostPlanTempDomain">
SELECT *
FROM cost_plan_temp
WHERE cost_plan_no = #{costPlanNo}
AND kind_no = #{kindNo}
</select>
<select id="selectListByPlanNo" resultType="com.blt.other.database.model.CostPlanTempDomain"> <select id="selectListByPlanNo" resultType="com.blt.other.database.model.CostPlanTempDomain">
SELECT * SELECT *
......
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.blt.other.module.cost.dao.CostTypeKindDao">
<select id="selectAll" resultType="com.blt.other.database.model.CostTypeKindDomain">
SELECT
*
FROM
cost_type_kind
ORDER BY
id desc
</select>
<select id="selectByTypeNo" resultType="com.blt.other.database.model.CostTypeKindDomain">
SELECT
*
FROM
cost_type_kind
WHERE
type_no = #{typeNo}
</select>
<select id="selectByCompanyNo" resultType="com.blt.other.database.model.CostTypeKindDomain">
SELECT
*
FROM
cost_type_kind
WHERE
company_no = #{companyNo}
</select>
<select id="selectByTypeNoAndKindName" resultType="com.blt.other.database.model.CostTypeKindDomain">
SELECT
*
FROM
cost_type_kind
WHERE
type_no = #{typeNo}
AND
kind_name = #{kindName}
</select>
<select id="selectByKindNo" resultType="com.blt.other.database.model.CostTypeKindDomain">
SELECT
*
FROM
cost_type_kind
WHERE
kind_no = #{kindNo}
</select>
<select id="selectByKindNameAndCompanyName" resultType="com.blt.other.database.model.CostTypeKindDomain">
SELECT
*
FROM
cost_type_kind
WHERE
kind_name = #{kindName}
AND
company_name = #{companyName}
</select>
<insert id="insert" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
INSERT INTO
cost_type_kind(
kind_no,kind_name,type_no,type_name,company_no,company_name,cost_form,subject_code,is_lend,
create_username,create_usercode,cost_type_status
)
VALUE
(
#{kindNo},#{kindName},#{typeNo},#{typeName},#{companyNo},#{companyName},#{costForm},#{subjectCode},#{isLend},
#{createUsername},#{createUsercode},#{costTypeStatus}
)
</insert>
<select id="selectByCompanyNoAndCostForm" resultType="com.blt.other.database.model.CostTypeKindDomain">
SELECT
*
FROM
cost_type_kind
WHERE
company_no = #{companyNo}
AND
cost_form = #{costForm}
</select>
<select id="selectByKindNameAndCompanyNo" resultType="com.blt.other.database.model.CostTypeKindDomain">
SELECT
*
FROM
cost_type_kind
WHERE
kind_name = #{kindName}
AND
company_no = #{companyNo}
</select>
<update id="update" parameterType="com.blt.other.database.model.CostTypeKindDomain">
UPDATE
cost_type_kind
<set>
<if test=" kindNo!=null">kind_no=#{kindNo},</if>
<if test=" kindName!=null">kind_name=#{kindName},</if>
<if test=" typeNo!=null">type_no=#{typeNo},</if>
<if test=" typeName!=null">type_name=#{typeName},</if>
<if test=" companyNo!=null">company_no=#{companyNo},</if>
<if test=" companyName!=null">company_name=#{companyName},</if>
<if test=" costTypeStatus!=null">cost_type_status=#{costTypeStatus},</if>
<if test=" subjectCode!=null">subject_code=#{subjectCode},</if>
<if test=" isLend!=null">is_lend=#{isLend},</if>
<if test=" createUsername!=null">create_username=#{createUsername},</if>
<if test=" createUsercode!=null">create_usercode=#{createUsercode}</if>
</set>
WHERE
kind_no = #{kindNo}
</update>
<delete id="delete">
DELETE FROM
cost_type_kind
WHERE
kind_no = #{kindNo}
</delete>
</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