Commit 1b1de23a by huluobin

update

parent 68776991
......@@ -4,6 +4,7 @@ import com.bailuntec.cost.api.dto.CostDto;
import com.bailuntec.cost.api.response.CostResult;
import com.blt.other.common.util.AxiosUtil;
import com.blt.other.module.cost.dto.CostApiDto;
import com.blt.other.module.cost.dto.UpdateCostResp;
import com.blt.other.module.cost.model.CostDomain;
import com.blt.other.module.cost.service.CostCashiercallbackService;
import com.blt.other.module.cost.service.CostLogService;
......@@ -51,7 +52,7 @@ public class CostCheckController {
* @param costStatus
* @return
*/
private CostApiDto.UpdateCostResp changeStatus(String costNo, Integer costStatus) {
private UpdateCostResp changeStatus(String costNo, Integer costStatus) {
CostDomain costDomain = costService.getCostByCostNo(costNo);
costDomain.setCostNo(costNo);
costDomain.setCostStatus(costStatus);
......@@ -70,7 +71,7 @@ public class CostCheckController {
// ================================== 结束费用 ======================================================
@PostMapping("finish")
public CostApiDto.UpdateCostResp finish(HttpServletRequest request, HttpServletResponse response) {
public UpdateCostResp finish(HttpServletRequest request, HttpServletResponse response) {
AxiosUtil.setCors(response, request);
String costNo = request.getParameter("costNo");
......@@ -120,14 +121,14 @@ public class CostCheckController {
*/
@ApiOperation("借支单结清")
@PostMapping("/finishLend")
public CostApiDto.UpdateCostResp finishLend(HttpServletResponse response, HttpServletRequest request) {
public UpdateCostResp finishLend(HttpServletResponse response, HttpServletRequest request) {
AxiosUtil.setCors(response, request);
String costNo = request.getParameter("costNo");
String updateuserid = request.getParameter("updateuserid");
CostDomain costDomain = new CostDomain();
costDomain.setCostNo(costNo);
costDomain.setLendStatus(4);
CostApiDto.UpdateCostResp resp = costService.updateCost(costDomain);
UpdateCostResp resp = costService.updateCost(costDomain);
resp.setMsg("已结清");
costLogService.save(costNo, Integer.parseInt(updateuserid), "操作结清");
return resp;
......
......@@ -10,8 +10,7 @@ import com.blt.other.common.util.AxiosUtil;
import com.blt.other.common.util.MyMapperUtil;
import com.blt.other.common.util.PathUtil;
import com.blt.other.module.cost.dao.CostDao;
import com.blt.other.module.cost.dto.CostApiDto;
import com.blt.other.module.cost.dto.CostPageResult;
import com.blt.other.module.cost.dto.*;
import com.blt.other.module.cost.model.CostDomain;
import com.blt.other.module.cost.service.CostExportService;
import com.blt.other.module.cost.service.CostListSearchService;
......@@ -68,11 +67,11 @@ public class CostController {
@ApiOperation("获取前端要打印的费用单列表")
@PostMapping("/list/print/list")
public CostApiDto.PrintListResp printList(@RequestBody CostListPrintVo costListPrintVo) {
public PrintListResp printList(@RequestBody CostListPrintVo costListPrintVo) {
costService = CostServiceFactory.getCostService();
List<CostListPrintDto> listPrintDtos = costService.printList(costListPrintVo.getPrintNos());
CostApiDto.PrintListResp resp = new CostApiDto.PrintListResp();
PrintListResp resp = new PrintListResp();
resp.setSuccess(true);
resp.setPrintList(listPrintDtos);
return resp;
......@@ -81,16 +80,16 @@ public class CostController {
@ApiOperation("搜索")
@PostMapping("/list/search/key")
public CostApiDto.GetByKeyResp getByKey(@RequestParam Integer pageNum,
@RequestParam Integer pageSize,
@RequestParam String key) {
public GetByKeyResp getByKey(@RequestParam Integer pageNum,
@RequestParam Integer pageSize,
@RequestParam String key) {
costService = CostServiceFactory.getCostService();
return costListSearchService.searchByKey(key, pageNum, pageSize);
}
@ApiOperation("搜索?")
@PostMapping("/list/search/keys")
public CostApiDto.GetByKeyResp getByKeys(@RequestBody CostListSearchKeysVo searchKeysVo) {
public GetByKeyResp getByKeys(@RequestBody CostListSearchKeysVo searchKeysVo) {
costService = CostServiceFactory.getCostService();
if (null != searchKeysVo.getParams().getKeys().getCostForm() && 3 == searchKeysVo.getParams().getKeys().getCostForm()) {
......@@ -136,7 +135,7 @@ public class CostController {
@ApiOperation("修改发票附件")
@PostMapping("list/reset/resetInvoice")
public CostApiDto.UpdateCostResp resetInvoice(@RequestParam String costNo,
public UpdateCostResp resetInvoice(@RequestParam String costNo,
@RequestParam String filePath) {
costService = CostServiceFactory.getCostService(costNo);
......@@ -145,7 +144,7 @@ public class CostController {
costDomain.setHasInvoice(1);
costDomain.setFilePath(filePath);
CostApiDto.UpdateCostResp resp = costService.updateCost(costDomain);
UpdateCostResp resp = costService.updateCost(costDomain);
costLogService.save(costNo, costDao.selectByCostNo(costNo).getCreateUserid(), "修改发票信息");
return resp;
}
......@@ -153,10 +152,10 @@ public class CostController {
@ApiOperation("修改费用单信息")
@PostMapping({"reset/resetFile", "reset/resetNoFile"})
public CostApiDto.UpdateCostResp resetFile(@RequestBody CostDomain costDomain) {
public UpdateCostResp resetFile(@RequestBody CostDomain costDomain) {
costService = CostServiceFactory.getCostService(costDomain);
CostApiDto.UpdateCostResp resp = costService.updateCost(costDomain);
UpdateCostResp resp = costService.updateCost(costDomain);
costLogService.save(costDomain.getCostNo(), costDao.selectByCostNo(costDomain.getCostNo()).getCreateUserid(), "修改费用单信息");
return resp;
}
......@@ -180,7 +179,7 @@ public class CostController {
@ApiOperation("提交费用单")
@PostMapping("submitAudit")
public CostApiDto.UpdateCostResp submitAudit(@RequestParam String costNo) {
public UpdateCostResp submitAudit(@RequestParam String costNo) {
costService = CostServiceFactory.getCostService(costNo);
CostDomain costDomain = costService.getCostByCostNo(costNo);
......@@ -190,7 +189,7 @@ public class CostController {
costContext.handle();
CostApiDto.UpdateCostResp resp = new CostApiDto.UpdateCostResp();
UpdateCostResp resp = new UpdateCostResp();
resp.setMsg("success");
resp.setResult(costDao.selectByCostNo(costDomain.getCostNo()));
resp.setUpdate(1);
......@@ -200,23 +199,23 @@ public class CostController {
@ApiOperation("获取借支单列表")
@GetMapping("/getAllLendCost")
public CostApiDto.GetAllLendCostResp getAllLendCost(@RequestParam Integer createuserid) {
public GetAllLendCostResp getAllLendCost(@RequestParam Integer createuserid) {
costService = CostServiceFactory.getCostService();
List<CostDto> costDtoList = costDao.selectLinkLendCost(createuserid).stream().map(CostDomain::castToDto).collect(Collectors.toList());
CostApiDto.GetAllLendCostResp resp = new CostApiDto.GetAllLendCostResp();
GetAllLendCostResp resp = new GetAllLendCostResp();
resp.setLends(costDtoList);
return resp;
}
@ApiOperation("根据费用计划查询")
@PostMapping("/getCostByCostPlanNo")
public CostApiDto.GetCostByCostPlanNo getCostByCostPlanNo(@RequestParam String costPlanNo) {
public GetCostByCostPlanNo getCostByCostPlanNo(@RequestParam String costPlanNo) {
costService = CostServiceFactory.getCostService();
List<CostDto> costDtoList = costService.getByCostPlanNo(costPlanNo);
CostApiDto.GetCostByCostPlanNo result = new CostApiDto.GetCostByCostPlanNo();
GetCostByCostPlanNo result = new GetCostByCostPlanNo();
result.setCosts(costDtoList);
return result;
}
......@@ -224,7 +223,7 @@ public class CostController {
@ApiOperation("审核费用单列表")
@GetMapping("/checkCostList")
public CostResult<IPage<CostDto>> checkCostList(CostApiDto.CheckCostListReq req) {
public CostResult<IPage<CostDto>> checkCostList(CheckCostListReq req) {
costService = CostServiceFactory.getCostService();
IPage<CostDto> page = costService.checkCostList(req);
return CostResult.success(page);
......@@ -232,7 +231,7 @@ public class CostController {
@ApiOperation("审核费用单列表")
@GetMapping("/checkCostCount")
public CostResult<Long> checkCostCount(CostApiDto.CheckCostListReq req) {
public CostResult<Long> checkCostCount(CheckCostListReq req) {
costService = CostServiceFactory.getCostService();
Long count = costService.checkCostList(req).getTotal();
return CostResult.success(count);
......@@ -450,15 +449,15 @@ public class CostController {
@ApiOperation("修改发票")
@PostMapping(value = "/check/lend/invoice")
public CostApiDto.UpdateCostResp invoice(@RequestParam String costNo,
@RequestParam Integer hasInvoice,
@RequestParam Integer updateuserid) {
public UpdateCostResp invoice(@RequestParam String costNo,
@RequestParam Integer hasInvoice,
@RequestParam Integer updateuserid) {
CostDomain costDomain = new CostDomain();
costDomain.setHasInvoice(hasInvoice);
costDomain.setCostNo(costNo);
CostApiDto.UpdateCostResp resp = costService.updateCost(costDomain);
UpdateCostResp resp = costService.updateCost(costDomain);
if (hasInvoice == 0) {
costLogService.save(costNo, updateuserid, "更改发票状态为:未给");
} else if (hasInvoice == 1) {
......
......@@ -2,7 +2,7 @@ package com.blt.other.module.cost.controller.costplan;
import com.bailuntec.cost.api.dto.CostPlanTempDto;
import com.blt.other.common.util.CurUtils;
import com.blt.other.module.cost.dto.CostPlanApiDto;
import com.blt.other.module.cost.dto.*;
import com.blt.other.module.cost.service.CostPlanSearchService;
import com.blt.other.module.cost.service.CostPlanService;
import com.blt.other.module.cost.service.CostPlanTempService;
......@@ -39,27 +39,27 @@ public class CostPlanController {
@ApiOperation("查询所有费用计划")
@GetMapping("/getAllCostPlan")
public CostPlanApiDto.GetAllCostPlanResp getAllCostPlan(CostPlanApiDto.GetAllCostPlanReq req) {
public GetAllCostPlanResp getAllCostPlan(GetAllCostPlanReq req) {
return costPlanService.getAllCostList(req);
}
@ApiOperation("搜索费用计划")
@PostMapping("/search/key")
public CostPlanApiDto.SearchByKeyResp searchByKey(@RequestParam String searchKey) {
public SearchByKeyResp searchByKey(@RequestParam String searchKey) {
return costPlanSearchService.searchByKey(searchKey);
}
@ApiOperation("根据费用计划单号查询费用计划单")
@PostMapping("getCostPlan")
public CostPlanApiDto.GetCostPlanResp getCostPlan(@RequestParam String costPlanNo) {
public GetCostPlanResp getCostPlan(@RequestParam String costPlanNo) {
return costPlanService.getByPlanNo(costPlanNo);
}
@ApiOperation("获取费用单计划子项")
@PostMapping("getPlanTmps")
public CostPlanApiDto.GetPlanTmpsResp getPlanTmps(@RequestParam String costPlanNo) {
public GetPlanTmpsResp getPlanTmps(@RequestParam String costPlanNo) {
List<CostPlanTempDto> tempListByPlanNo = costPlanTempService.getTempListByPlanNo(costPlanNo).getTemps();
BigDecimal planAmount = costPlanTempService.getTempListByPlanNo(costPlanNo).getTemps()
......@@ -67,7 +67,7 @@ public class CostPlanController {
.map(costPlanTempDto -> CurUtils.getCur(costPlanTempDto.getDic(), "CNY").multiply(costPlanTempDto.getAmount()))
.reduce(BigDecimal.ZERO, BigDecimal::add);
CostPlanApiDto.GetPlanTmpsResp resp = new CostPlanApiDto.GetPlanTmpsResp();
GetPlanTmpsResp resp = new GetPlanTmpsResp();
resp.setTmps(tempListByPlanNo);
resp.setPlanAmount(planAmount);
......@@ -79,7 +79,7 @@ public class CostPlanController {
public ResponseEntity<InputStreamResource> download(HttpServletRequest request, HttpServletResponse response) throws IOException {
String costPlanNo = request.getParameter("costPlanNo");
CostPlanApiDto.GetCostPlanResp byPlanNo = costPlanService.getByPlanNo(costPlanNo);
GetCostPlanResp byPlanNo = costPlanService.getByPlanNo(costPlanNo);
String filePath = byPlanNo.getCostPlan().getFilePath();
String fileName = byPlanNo.getFileName();
......
......@@ -2,6 +2,8 @@ package com.blt.other.module.cost.controller.costplan;
import com.blt.other.common.util.CurUtils;
import com.blt.other.module.cost.dto.CostPlanNewApiDto;
import com.blt.other.module.cost.dto.RestResp;
import com.blt.other.module.cost.dto.SaveResp;
import com.blt.other.module.cost.service.CostPlanService;
import com.blt.other.module.cost.service.impl.costplan.CostPlanServiceFactory;
import com.blt.other.module.database.model.CostPlanDomain;
......@@ -71,11 +73,11 @@ public class CostPlanNewController {
@ApiOperation("更新费用计划")
@PostMapping(value = {"/reset"})
public CostPlanNewApiDto.RestResp reset(@RequestBody CostPlanDomain costPlanDomain) {
public RestResp reset(@RequestBody CostPlanDomain costPlanDomain) {
CostPlanService costPlanService = CostPlanServiceFactory.getCostPlanService(costPlanDomain);
costPlanService.update(costPlanDomain);
CostPlanNewApiDto.RestResp resp = new CostPlanNewApiDto.RestResp();
RestResp resp = new RestResp();
resp.setSuccess(true);
resp.setMsg("已经修改");
return resp;
......@@ -83,11 +85,11 @@ public class CostPlanNewController {
@ApiOperation("新增费用计划")
@PostMapping(value = {"/save"})
public CostPlanNewApiDto.SaveResp save(@RequestBody CostPlanDomain costPlanDomain) {
public SaveResp save(@RequestBody CostPlanDomain costPlanDomain) {
CostPlanService costPlanService = CostPlanServiceFactory.getCostPlanService(costPlanDomain);
costPlanService.save(costPlanDomain);
CostPlanNewApiDto.SaveResp resp = new CostPlanNewApiDto.SaveResp();
SaveResp resp = new SaveResp();
resp.setCostPlanDomain(costPlanDomain);
resp.setCostPlanNo(costPlanDomain.getCostPlanNo());
resp.setMsg("success");
......
package com.blt.other.module.cost.controller.costplan;
import com.blt.other.module.cost.dto.CostPlanTempApiDto;
import com.blt.other.module.cost.dto.*;
import com.blt.other.module.cost.service.CostPlanTempService;
import com.blt.other.module.database.model.CostPlanTempDomain;
import io.swagger.annotations.Api;
......@@ -27,12 +27,12 @@ public class CostPlanTempController {
@ApiOperation(value = "保存无附件费用计划子项")
@PostMapping(value = {"/addItem"})
public CostPlanTempApiDto.AddItemResp addItem(CostPlanTempApiDto.AddItemReq req) {
public AddItemResp addItem(AddItemReq req) {
try {
return costPlanTempService.doSave(req);
} catch (Exception ex) {
log.error(ex.getMessage(), ex);
CostPlanTempApiDto.AddItemResp resp = new CostPlanTempApiDto.AddItemResp();
AddItemResp resp = new AddItemResp();
resp.setSuccess(false);
resp.setMsg(ex.getMessage());
return resp;
......@@ -41,18 +41,18 @@ public class CostPlanTempController {
@ApiOperation("获取费用计划编号对应的费用计划子项")
@GetMapping("/getCostTempByPlanNo")
public CostPlanTempApiDto.GetCostTempByPlanNoResp getCostTempByPlanNo(@RequestParam String costPlanNo) {
public GetCostTempByPlanNoResp getCostTempByPlanNo(@RequestParam String costPlanNo) {
return costPlanTempService.getTempListByPlanNo(costPlanNo);
}
@ApiOperation("删除费用计划子项")
@PostMapping("/deleteItem")
public CostPlanTempApiDto.DeleteItemResp deleteItem(@RequestParam String costPlanNo,
@RequestParam String tempNo) {
public DeleteItemResp deleteItem(@RequestParam String costPlanNo,
@RequestParam String tempNo) {
BigDecimal planAmount = costPlanTempService.deleteItemByPlanNoAndTempNo(costPlanNo, tempNo);
CostPlanTempApiDto.DeleteItemResp resp = new CostPlanTempApiDto.DeleteItemResp();
DeleteItemResp resp = new DeleteItemResp();
resp.setSuccess(true);
resp.setMsg("success");
resp.setPlanAmount(planAmount);
......@@ -61,19 +61,19 @@ public class CostPlanTempController {
@ApiOperation("根据费用计划模板编号获取费用计划模版")
@GetMapping("/getByTempNo")
public CostPlanTempApiDto.GetByTempNoResp getByTempNo(@RequestParam String tempNo) {
public GetByTempNoResp getByTempNo(@RequestParam String tempNo) {
CostPlanTempDomain domain = costPlanTempService.getByTempNo(tempNo);
CostPlanTempApiDto.GetByTempNoResp resp = new CostPlanTempApiDto.GetByTempNoResp();
GetByTempNoResp resp = new GetByTempNoResp();
resp.setTmp(domain.castToDto());
return resp;
}
@ApiOperation("更新费用项")
@PostMapping(value = {"/resetItem/noFile", "/resetItem/file"})
public CostPlanTempApiDto.ResetItemResp resetNoFile(CostPlanTempApiDto.ResetItemReq req) {
public ResetItemResp resetNoFile(ResetItemReq req) {
CostPlanTempDomain tmp = costPlanTempService.resetItem(req);
CostPlanTempApiDto.ResetItemResp resp = new CostPlanTempApiDto.ResetItemResp();
ResetItemResp resp = new ResetItemResp();
resp.setSuccess(true);
resp.setTmp(tmp);
return resp;
......
......@@ -3,7 +3,7 @@ package com.blt.other.module.cost.dao;
import com.bailuntec.cost.api.dto.ManageCostDto;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.blt.other.module.cost.dto.CostApiDto;
import com.blt.other.module.cost.dto.CheckCostListReq;
import com.blt.other.module.cost.model.CostDomain;
import com.blt.other.module.cost.vo.CostExportVo;
import org.apache.ibatis.annotations.Param;
......@@ -109,5 +109,5 @@ public interface CostDao extends BaseMapper<CostDomain> {
* @return
*/
IPage<CostDomain> checkCostList(@Param("page") IPage<CostDomain> page,
@Param("req") CostApiDto.CheckCostListReq req);
@Param("req") CheckCostListReq req);
}
package com.blt.other.module.cost.dto;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import java.math.BigDecimal;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2020/11/27 5:53 下午
*/
@ApiModel("添加费用计划子项响应入参")
@Data
public class AddItemReq {
// 费用单表 id
private Integer id;
private String costPlanNo; // 费用计划编号
private String tempNo; // 计划缓存编号
private String kindNo; // 种类编号
private String filePath; // 文件地址
private BigDecimal amount; // 费用总金额
private String costReason; // 付款理由
private String dic; // 币种
private String typeNo; // 大类编号
private BigDecimal planAmount;
// private MultipartFile fileSelect;
}
package com.blt.other.module.cost.dto;
import com.blt.other.module.database.model.CostPlanTempDomain;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import java.math.BigDecimal;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2020/11/27 5:52 下午
*/
@ApiModel("添加费用计划子项响应结果")
@Data
public class AddItemResp {
private CostPlanTempDomain tmp;
private String msg;
private Boolean success;
private BigDecimal plaAmount;
}
package com.blt.other.module.cost.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2020/11/27 5:48 下午
*/
@Data
public class CheckCostListReq {
Integer userid;
Integer pageNum;
Integer pageSize;
@ApiModelProperty("1-财务+最终审核 2-部门审核 3-人事审核")
Integer type;
@ApiModelProperty("1- 全部 2-待审核 3-已手动审核 4-已自动审核")
Integer status;
private String costNo;
}
......@@ -19,52 +19,15 @@ import java.util.List;
*/
public class CostApiDto {
@Data
public static class PrintListResp {
private Boolean success;
private List<CostListPrintDto> printList;
}
@Data
public static class GetByKeyResp {
private List<CostDto> costs;
private PageInfo<CostDomain> pageInfo;
private Boolean success;
}
@Data
public static class UpdateCostResp {
private String msg;
private CostDomain result;
private Integer update;
}
@Data
public static class GetAllLendCostResp {
private Boolean success;
private List<CostDto> lends;
private String msg;
public GetAllLendCostResp() {
this.msg = "success";
}
}
@Data
public static class GetCostByCostPlanNo {
List<CostDto> costs;
}
@Data
public static class CheckCostListReq {
Integer userid;
Integer pageNum;
Integer pageSize;
@ApiModelProperty("1-财务+最终审核 2-部门审核 3-人事审核")
Integer type;
@ApiModelProperty("1- 全部 2-待审核 3-已手动审核 4-已自动审核")
Integer status;
private String costNo;
}
}
......@@ -22,44 +22,11 @@ import java.util.List;
*/
public final class CostPlanApiDto {
@ApiModel("获取所有费用计划")
@Data
@AllArgsConstructor
@NoArgsConstructor
public static final class GetAllCostPlanResp {
private Boolean success;
private List<CostPlanDto> plans;
private PageInfo<CostPlanDomain> pageInfo;
}
@Data
public static final class GetAllCostPlanReq {
private Integer pageNum;
private Integer pageSize;
private Integer userId;
private Integer authType;
}
@Data
public static final class SearchByKeyResp {
private List<CostPlanDto> list;
}
@Data
public static final class GetCostPlanResp {
private CostPlanDomain costPlan;
private String fileName;
}
@ApiModel("获取费用单计划子项")
@Data
public static class GetPlanTmpsResp {
private List<CostPlanTempDto> tmps;
private BigDecimal planAmount;
}
}
......@@ -14,27 +14,8 @@ import lombok.Data;
*/
public class CostPlanNewApiDto {
@Data
@ApiModel("保存费用计划出参")
public static class SaveResp {
private Boolean success;
private String msg;
private CostPlanDomain costPlanDomain;
private String costPlanNo;
}
@Data
@ApiModel("更新费用计划出参")
public static class RestResp {
private Boolean success;
private String msg;
}
@Data
@ApiModel("更新费用计划出参")
public static class DeleteResp {
private Boolean success;
private String msg;
}
}
......@@ -7,7 +7,6 @@ import lombok.Data;
import org.springframework.web.multipart.MultipartFile;
import java.math.BigDecimal;
import java.util.List;
/**
* <p>
......@@ -19,78 +18,10 @@ import java.util.List;
*/
public final class CostPlanTempApiDto {
@ApiModel("添加费用计划子项响应结果")
@Data
public static class AddItemResp {
private CostPlanTempDomain tmp;
private String msg;
private Boolean success;
private BigDecimal plaAmount;
}
@ApiModel("添加费用计划子项响应入参")
@Data
public static class AddItemReq {
// 费用单表 id
private Integer id;
private String costPlanNo; // 费用计划编号
private String tempNo; // 计划缓存编号
private String kindNo; // 种类编号
private String filePath; // 文件地址
private BigDecimal amount; // 费用总金额
private String costReason; // 付款理由
private String dic; // 币种
private String typeNo; // 大类编号
private BigDecimal planAmount;
// private MultipartFile fileSelect;
}
@ApiModel("获取费用计划编号对应的费用计划子项出参")
@Data
public static class GetCostTempByPlanNoResp {
private List<CostPlanTempDto> temps;
private BigDecimal planAmount;
private Boolean success;
}
@ApiModel("删除费用计划模版行项目出参")
@Data
public static class DeleteItemResp {
private Boolean success;
private String msg;
private BigDecimal planAmount;
}
@ApiModel("根据费用计划模板编号获取费用计划模版出参")
@Data
public static class GetByTempNoResp {
private CostPlanTempDto tmp;
}
@ApiModel("更新费用计划子项入参")
@Data
public static class ResetItemReq {
private Integer id;
private String costPlanNo; // 费用计划编号
private String tempNo; // 计划缓存编号
private String kindNo; // 种类编号
private String filePath; // 文件地址
private BigDecimal amount; // 费用总金额
private String costReason; // 付款理由
private String dic; // 币种
private String typeNo; // 大类编号
private Boolean delecteFile;
private MultipartFile fileSelect2;
}
@ApiModel("更新费用计划子项出参")
@Data
public static class ResetItemResp {
private Boolean success;
private CostPlanTempDomain tmp;
}
}
package com.blt.other.module.cost.dto;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import java.math.BigDecimal;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2020/11/27 5:53 下午
*/
@ApiModel("删除费用计划模版行项目出参")
@Data
public class DeleteItemResp {
private Boolean success;
private String msg;
private BigDecimal planAmount;
}
package com.blt.other.module.cost.dto;
import io.swagger.annotations.ApiModel;
import lombok.Data;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2020/11/27 5:51 下午
*/
@Data
@ApiModel("更新费用计划出参")
public class DeleteResp {
private Boolean success;
private String msg;
}
package com.blt.other.module.cost.dto;
import lombok.Data;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2020/11/27 5:49 下午
*/
@Data
public final class GetAllCostPlanReq {
private Integer pageNum;
private Integer pageSize;
private Integer userId;
private Integer authType;
}
package com.blt.other.module.cost.dto;
import com.bailuntec.cost.api.dto.CostPlanDto;
import com.blt.other.module.database.model.CostPlanDomain;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2020/11/27 5:48 下午
*/
@ApiModel("获取所有费用计划")
@Data
@AllArgsConstructor
@NoArgsConstructor
public final class GetAllCostPlanResp {
private Boolean success;
private List<CostPlanDto> plans;
private PageInfo<CostPlanDomain> pageInfo;
}
package com.blt.other.module.cost.dto;
import com.bailuntec.cost.api.dto.CostDto;
import lombok.Data;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2020/11/27 4:29 下午
*/
@Data
public class GetAllLendCostResp {
private Boolean success;
private List<CostDto> lends;
private String msg;
public GetAllLendCostResp() {
this.msg = "success";
}
}
package com.blt.other.module.cost.dto;
import com.bailuntec.cost.api.dto.CostDto;
import com.blt.other.module.cost.model.CostDomain;
import com.github.pagehelper.PageInfo;
import lombok.Data;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2020/11/27 4:29 下午
*/
@Data
public class GetByKeyResp {
private List<CostDto> costs;
private PageInfo<CostDomain> pageInfo;
private Boolean success;
}
package com.blt.other.module.cost.dto;
import com.bailuntec.cost.api.dto.CostPlanTempDto;
import io.swagger.annotations.ApiModel;
import lombok.Data;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2020/11/27 5:54 下午
*/
@ApiModel("根据费用计划模板编号获取费用计划模版出参")
@Data
public class GetByTempNoResp {
private CostPlanTempDto tmp;
}
package com.blt.other.module.cost.dto;
import com.bailuntec.cost.api.dto.CostDto;
import lombok.Data;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2020/11/27 4:30 下午
*/
@Data
public class GetCostByCostPlanNo {
List<CostDto> costs;
}
......@@ -13,14 +13,11 @@ import java.util.List;
* </p>
*
* @author robbendev
* @since 2020/10/29 10:09 上
* @since 2020/11/27 5:47 下
*/
public class CostCheckApiDto {
@Data
public static class GetCostCheckListResp {
private String msg;
private List<CostDto> costDtos;
private PageInfo<CostDomain> pageInfo;
}
@Data
public class GetCostCheckListResp {
private String msg;
private List<CostDto> costDtos;
private PageInfo<CostDomain> pageInfo;
}
package com.blt.other.module.cost.dto;
import com.blt.other.module.database.model.CostPlanDomain;
import lombok.Data;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2020/11/27 5:49 下午
*/
@Data
public final class GetCostPlanResp {
private CostPlanDomain costPlan;
private String fileName;
}
package com.blt.other.module.cost.dto;
import com.bailuntec.cost.api.dto.CostPlanTempDto;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2020/11/27 5:53 下午
*/
@ApiModel("获取费用计划编号对应的费用计划子项出参")
@Data
public class GetCostTempByPlanNoResp {
private List<CostPlanTempDto> temps;
private BigDecimal planAmount;
private Boolean success;
}
package com.blt.other.module.cost.dto;
import com.bailuntec.cost.api.dto.CostPlanTempDto;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2020/11/27 5:50 下午
*/
@ApiModel("获取费用单计划子项")
@Data
public class GetPlanTmpsResp {
private List<CostPlanTempDto> tmps;
private BigDecimal planAmount;
}
package com.blt.other.module.cost.dto;
import com.bailuntec.cost.api.dto.CostListPrintDto;
import lombok.Data;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2020/11/27 4:28 下午
*/
@Data
public class PrintListResp {
private Boolean success;
private List<CostListPrintDto> printList;
}
package com.blt.other.module.cost.dto;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;
import java.math.BigDecimal;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2020/11/27 5:54 下午
*/
@ApiModel("更新费用计划子项入参")
@Data
public class ResetItemReq {
private Integer id;
private String costPlanNo; // 费用计划编号
private String tempNo; // 计划缓存编号
private String kindNo; // 种类编号
private String filePath; // 文件地址
private BigDecimal amount; // 费用总金额
private String costReason; // 付款理由
private String dic; // 币种
private String typeNo; // 大类编号
private Boolean delecteFile;
private MultipartFile fileSelect2;
}
package com.blt.other.module.cost.dto;
import com.blt.other.module.database.model.CostPlanTempDomain;
import io.swagger.annotations.ApiModel;
import lombok.Data;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2020/11/27 5:55 下午
*/
@ApiModel("更新费用计划子项出参")
@Data
public class ResetItemResp {
private Boolean success;
private CostPlanTempDomain tmp;
}
package com.blt.other.module.cost.dto;
import io.swagger.annotations.ApiModel;
import lombok.Data;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2020/11/27 5:51 下午
*/
@Data
@ApiModel("更新费用计划出参")
public class RestResp {
private Boolean success;
private String msg;
}
package com.blt.other.module.cost.dto;
import com.blt.other.module.database.model.CostPlanDomain;
import io.swagger.annotations.ApiModel;
import lombok.Data;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2020/11/27 5:51 下午
*/
@Data
@ApiModel("保存费用计划出参")
public class SaveResp {
private Boolean success;
private String msg;
private CostPlanDomain costPlanDomain;
private String costPlanNo;
}
package com.blt.other.module.cost.dto;
import com.bailuntec.cost.api.dto.CostPlanDto;
import lombok.Data;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2020/11/27 5:49 下午
*/
@Data
public final class SearchByKeyResp {
private List<CostPlanDto> list;
}
package com.blt.other.module.cost.dto;
import com.blt.other.module.cost.model.CostDomain;
import lombok.Data;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2020/11/27 4:29 下午
*/
@Data
public class UpdateCostResp {
private String msg;
private CostDomain result;
private Integer update;
}
package com.blt.other.module.cost.service;
import com.blt.other.module.cost.dto.CostApiDto;
import com.blt.other.module.cost.dto.GetByKeyResp;
import com.blt.other.module.cost.model.CostDomain;
import com.blt.other.module.cost.vo.CostListSearchKeysVo;
......@@ -14,7 +15,7 @@ public interface CostListSearchService {
* @param key key
* @return res
*/
CostApiDto.GetByKeyResp searchByKey(String key, int pageNum, int pageSize);
GetByKeyResp searchByKey(String key, int pageNum, int pageSize);
/**
* 多条件筛选
......@@ -22,7 +23,7 @@ public interface CostListSearchService {
* @param searchKeysVo param
* @return res
*/
CostApiDto.GetByKeyResp searchByKeys(CostListSearchKeysVo searchKeysVo);
GetByKeyResp searchByKeys(CostListSearchKeysVo searchKeysVo);
/**
* 获取借支单列表
......
package com.blt.other.module.cost.service;
import com.blt.other.module.cost.dto.CostPlanApiDto;
import com.blt.other.module.cost.dto.SearchByKeyResp;
public interface CostPlanSearchService {
......@@ -10,5 +11,5 @@ public interface CostPlanSearchService {
* @param key searchKey
* @return 费用计划
*/
CostPlanApiDto.SearchByKeyResp searchByKey(String key);
SearchByKeyResp searchByKey(String key);
}
......@@ -2,6 +2,9 @@ package com.blt.other.module.cost.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.blt.other.module.cost.dto.CostPlanApiDto;
import com.blt.other.module.cost.dto.GetAllCostPlanReq;
import com.blt.other.module.cost.dto.GetAllCostPlanResp;
import com.blt.other.module.cost.dto.GetCostPlanResp;
import com.blt.other.module.database.model.CostPlanDomain;
public interface CostPlanService {
......@@ -60,7 +63,7 @@ public interface CostPlanService {
* @param userId 当前登录用户oa userid
* @return 所有费用计划
*/
CostPlanApiDto.GetAllCostPlanResp getAllCostList(CostPlanApiDto.GetAllCostPlanReq userId);
GetAllCostPlanResp getAllCostList(GetAllCostPlanReq userId);
/**
* <p>
......@@ -70,5 +73,5 @@ public interface CostPlanService {
* @param planNo 费用计划编号
* @return 费用计划详情
*/
CostPlanApiDto.GetCostPlanResp getByPlanNo(String planNo);
GetCostPlanResp getByPlanNo(String planNo);
}
package com.blt.other.module.cost.service;
import com.blt.other.module.cost.dto.CostPlanTempApiDto;
import com.blt.other.module.cost.dto.*;
import com.blt.other.module.database.model.CostPlanTempDomain;
import org.springframework.lang.NonNull;
......@@ -16,7 +16,7 @@ public interface CostPlanTempService {
* @param req 费用计划模板
* @return resp
*/
CostPlanTempApiDto.AddItemResp doSave(CostPlanTempApiDto.AddItemReq req);
AddItemResp doSave(AddItemReq req);
/**
......@@ -27,7 +27,7 @@ public interface CostPlanTempService {
* @param costPlanNo 费用编号
* @return 费用计划行
*/
CostPlanTempApiDto.GetCostTempByPlanNoResp getTempListByPlanNo(String costPlanNo);
GetCostTempByPlanNoResp getTempListByPlanNo(String costPlanNo);
/**
* <p>
......@@ -59,5 +59,5 @@ public interface CostPlanTempService {
* @param req req
* @return resp
*/
CostPlanTempDomain resetItem(CostPlanTempApiDto.ResetItemReq req);
CostPlanTempDomain resetItem(ResetItemReq req);
}
......@@ -3,8 +3,10 @@ package com.blt.other.module.cost.service;
import com.bailuntec.cost.api.dto.CostDto;
import com.bailuntec.cost.api.dto.CostListPrintDto;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.blt.other.module.cost.dto.CheckCostListReq;
import com.blt.other.module.cost.dto.CostApiDto;
import com.blt.other.module.cost.dto.CostPageResult;
import com.blt.other.module.cost.dto.UpdateCostResp;
import com.blt.other.module.cost.model.CostDomain;
import com.blt.other.module.cost.vo.ApplyCallbackUrlVo;
import com.blt.other.module.cost.vo.CashierCallbackUrlVo;
......@@ -44,7 +46,7 @@ public interface CostService {
* @param costDomain costDomain
* @return res
*/
CostApiDto.UpdateCostResp updateCost(CostDomain costDomain);
UpdateCostResp updateCost(CostDomain costDomain);
/**
......@@ -109,7 +111,7 @@ public interface CostService {
* @param type 1-财务+最终审核 2-部门审核
* @return 费用单列表
*/
IPage<CostDto> checkCostList(CostApiDto.CheckCostListReq req);
IPage<CostDto> checkCostList(CheckCostListReq req);
/**
* <p>
......
......@@ -4,6 +4,7 @@ import com.bailuntec.cost.api.dto.CostDto;
import com.blt.other.module.cost.dao.CostDao;
import com.blt.other.module.cost.dao.CostListSearchDao;
import com.blt.other.module.cost.dto.CostApiDto;
import com.blt.other.module.cost.dto.GetByKeyResp;
import com.blt.other.module.cost.model.CostDomain;
import com.blt.other.module.cost.service.CostListSearchService;
import com.blt.other.module.cost.service.CostService;
......@@ -30,8 +31,8 @@ public class CostListSearchServiceImpl implements CostListSearchService {
CostDao costDao;
@Override
public CostApiDto.GetByKeyResp searchByKey(String key, int pageNum, int pageSize) {
CostApiDto.GetByKeyResp resp = new CostApiDto.GetByKeyResp();
public GetByKeyResp searchByKey(String key, int pageNum, int pageSize) {
GetByKeyResp resp = new GetByKeyResp();
PageHelper.startPage(pageNum, pageSize);
List<CostDomain> costDomains = costListSearchDao.selectByKey(Lists.newArrayList(key.split(",")).stream().filter(Objects::nonNull).collect(Collectors.toList()));
costService.setPrimaryDepartment(costDomains);
......@@ -45,8 +46,8 @@ public class CostListSearchServiceImpl implements CostListSearchService {
}
@Override
public CostApiDto.GetByKeyResp searchByKeys(CostListSearchKeysVo searchKeysVo) {
CostApiDto.GetByKeyResp resp = new CostApiDto.GetByKeyResp();
public GetByKeyResp searchByKeys(CostListSearchKeysVo searchKeysVo) {
GetByKeyResp resp = new GetByKeyResp();
PageHelper.startPage(searchKeysVo.getParams().getPageNum(), searchKeysVo.getParams().getPageSize());
List<CostDomain> domains = costListSearchDao.selectByKeys(searchKeysVo);
......
package com.blt.other.module.cost.service.impl;
import com.blt.other.module.cost.dao.CostPlanSearchDao;
import com.blt.other.module.cost.dto.CostPlanApiDto;
import com.blt.other.module.cost.dto.SearchByKeyResp;
import com.blt.other.module.cost.service.CostPlanSearchService;
import com.blt.other.module.database.model.CostPlanDomain;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -17,9 +17,9 @@ public class CostPlanSearchServiceImpl implements CostPlanSearchService {
private CostPlanSearchDao costPlanSearchDao;
@Override
public CostPlanApiDto.SearchByKeyResp searchByKey(String key) {
public SearchByKeyResp searchByKey(String key) {
List<CostPlanDomain> costDomainList = costPlanSearchDao.selectByKey(key);
CostPlanApiDto.SearchByKeyResp resp = new CostPlanApiDto.SearchByKeyResp();
SearchByKeyResp resp = new SearchByKeyResp();
resp.setList(costDomainList.stream().map(CostPlanDomain::castToDto).collect(Collectors.toList()));
return resp;
}
......
......@@ -23,8 +23,10 @@ import com.blt.other.module.auth.model.OaDepartment;
import com.blt.other.module.auth.model.OaUser;
import com.blt.other.module.auth.service.UserService;
import com.blt.other.module.cost.dao.*;
import com.blt.other.module.cost.dto.CheckCostListReq;
import com.blt.other.module.cost.dto.CostApiDto;
import com.blt.other.module.cost.dto.CostPageResult;
import com.blt.other.module.cost.dto.UpdateCostResp;
import com.blt.other.module.cost.model.CostDetailDomain;
import com.blt.other.module.cost.model.CostDomain;
import com.blt.other.module.cost.model.CostTemplateBaseCol;
......@@ -168,8 +170,8 @@ public abstract class AbstractCostService implements CostService {
@Transactional(rollbackFor = Exception.class)
@Override
public CostApiDto.UpdateCostResp updateCost(CostDomain costDomain) {
CostApiDto.UpdateCostResp resp = new CostApiDto.UpdateCostResp();
public UpdateCostResp updateCost(CostDomain costDomain) {
UpdateCostResp resp = new UpdateCostResp();
setCostDomain(costDomain);
Integer update = costDao.update(costDomain, new LambdaQueryWrapper<CostDomain>()
......@@ -264,7 +266,7 @@ public abstract class AbstractCostService implements CostService {
@Transactional
@Override
public IPage<CostDto> checkCostList(CostApiDto.CheckCostListReq req) {
public IPage<CostDto> checkCostList(CheckCostListReq req) {
IPage<CostDomain> page = new Page<>(req.getPageNum(), req.getPageSize());
return costDao.checkCostList(page, req).convert(CostDomain::castToDto);
......
......@@ -6,6 +6,9 @@ import com.blt.other.common.exception.BizRuntimeException;
import com.blt.other.module.auth.dao.UserDao;
import com.blt.other.module.cost.dao.*;
import com.blt.other.module.cost.dto.CostPlanApiDto;
import com.blt.other.module.cost.dto.GetAllCostPlanReq;
import com.blt.other.module.cost.dto.GetAllCostPlanResp;
import com.blt.other.module.cost.dto.GetCostPlanResp;
import com.blt.other.module.cost.model.CostDetailDomain;
import com.blt.other.module.cost.model.CostDomain;
import com.blt.other.module.cost.model.CostTemplateBaseCol;
......@@ -138,7 +141,7 @@ public abstract class AbstractCostPlanService implements CostPlanService {
}
@Override
public CostPlanApiDto.GetAllCostPlanResp getAllCostList(CostPlanApiDto.GetAllCostPlanReq req) {
public GetAllCostPlanResp getAllCostList(GetAllCostPlanReq req) {
if (req.getAuthType() != 0) {
req.setUserId(null);
}
......@@ -148,11 +151,11 @@ public abstract class AbstractCostPlanService implements CostPlanService {
PageInfo<CostPlanDomain> pageInfo = new PageInfo<>(allCostList);
List<CostPlanDto> costPlanDtos = allCostList.stream().map(CostPlanDomain::castToDto).collect(Collectors.toList());
return new CostPlanApiDto.GetAllCostPlanResp(true, costPlanDtos, pageInfo);
return new GetAllCostPlanResp(true, costPlanDtos, pageInfo);
}
@Override
public CostPlanApiDto.GetCostPlanResp getByPlanNo(String planNo) {
public GetCostPlanResp getByPlanNo(String planNo) {
CostPlanDomain costPlanDomain = costPlanDao.selectByNo(planNo);
costPlanDomain.setCostTemplate(costTemplateService.queryDetail(costPlanDomain.getCostTemplateId()));
......@@ -164,7 +167,7 @@ public abstract class AbstractCostPlanService implements CostPlanService {
fileName = split[split.length - 1];
}
}
CostPlanApiDto.GetCostPlanResp result = new CostPlanApiDto.GetCostPlanResp();
GetCostPlanResp result = new GetCostPlanResp();
result.setCostPlan(costPlanDomain);
result.setFileName(fileName);
return result;
......
......@@ -6,7 +6,7 @@ import com.blt.other.common.util.CurUtils;
import com.blt.other.common.util.PathUtil;
import com.blt.other.module.cost.dao.CostPlanDao;
import com.blt.other.module.cost.dao.CostPlanTempDao;
import com.blt.other.module.cost.dto.CostPlanTempApiDto;
import com.blt.other.module.cost.dto.*;
import com.blt.other.module.cost.service.CostPlanTempService;
import com.blt.other.module.cost.service.CostTypeKindService;
import com.blt.other.module.cost.utils.CostFileUtil;
......@@ -68,7 +68,7 @@ public class CostPlanTempServiceImpl implements CostPlanTempService {
@Transactional(rollbackFor = Exception.class)
@Override
public CostPlanTempApiDto.AddItemResp doSave(CostPlanTempApiDto.AddItemReq req) {
public AddItemResp doSave(AddItemReq req) {
CostTypeKindDomain kindByKindNo = costTypeKindService.getKindByKindNo(req.getKindNo());
req.setTypeNo(kindByKindNo.getTypeNo());
......@@ -91,7 +91,7 @@ public class CostPlanTempServiceImpl implements CostPlanTempService {
.eq(CostPlanDomain::getCostPlanNo, costPlanDomain.getCostPlanNo()));
}
CostPlanTempApiDto.AddItemResp resp = new CostPlanTempApiDto.AddItemResp();
AddItemResp resp = new AddItemResp();
resp.setMsg("success");
resp.setPlaAmount(CurUtils.getCur(costPlanTempDomain.getDic(), "CNY"));
resp.setTmp(costPlanTempDomain);
......@@ -101,7 +101,7 @@ public class CostPlanTempServiceImpl implements CostPlanTempService {
@Override
public CostPlanTempApiDto.GetCostTempByPlanNoResp getTempListByPlanNo(String costPlanNo) {
public GetCostTempByPlanNoResp getTempListByPlanNo(String costPlanNo) {
List<CostPlanTempDomain> list = costPlanTempDao.selectListByPlanNo(costPlanNo);
List<CostPlanTempDto> temps = list.stream().map(CostPlanTempDomain::castToDto).collect(Collectors.toList());
......@@ -113,7 +113,7 @@ public class CostPlanTempServiceImpl implements CostPlanTempService {
})
.reduce(BigDecimal.ZERO, BigDecimal::add);
CostPlanTempApiDto.GetCostTempByPlanNoResp resp = new CostPlanTempApiDto.GetCostTempByPlanNoResp();
GetCostTempByPlanNoResp resp = new GetCostTempByPlanNoResp();
resp.setPlanAmount(planAmount);
resp.setSuccess(true);
resp.setTemps(temps);
......@@ -152,7 +152,7 @@ public class CostPlanTempServiceImpl implements CostPlanTempService {
@Transactional(rollbackFor = Exception.class)
@Override
public CostPlanTempDomain resetItem(CostPlanTempApiDto.ResetItemReq req) {
public CostPlanTempDomain resetItem(ResetItemReq req) {
CostTypeKindDomain kindByKindNo = costTypeKindService.getKindByKindNo(req.getKindNo());
req.setTypeNo(kindByKindNo.getTypeNo());
......
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