| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.by4cloud.platformx.business.dto.*; |
| | | import com.by4cloud.platformx.business.entity.Contract; |
| | | import com.by4cloud.platformx.business.entity.PaymentConfirm; |
| | | import com.by4cloud.platformx.business.vo.ContractExportExceVO; |
| | | import com.by4cloud.platformx.common.core.util.R; |
| | | import com.by4cloud.platformx.common.data.mybatis.BaseModel; |
| | | import com.by4cloud.platformx.common.log.annotation.SysLog; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 通过id手动推送合同中心 |
| | | * @param id id |
| | | * 手动推送合同中心 |
| | | * @param dto |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "通过id手动推送合同中心" , description = "通过id手动推送合同中心" ) |
| | | @GetMapping("/pushCenter/{id}" ) |
| | | public R pushCenter(@PathVariable("id" ) Long id) { |
| | | return contractService.pushCenter(id); |
| | | @Operation(summary = "手动推送合同中心" , description = "手动推送合同中心" ) |
| | | @PostMapping("/pushCenter" ) |
| | | public R pushCenter(@RequestBody PushCenterDTO dto) { |
| | | return contractService.pushCenter(dto); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | /** |
| | | * 导出excel 表格 |
| | | * @param contract 查询条件 |
| | | * @param queryDTO 查询条件 |
| | | * @param ids 导出指定ID |
| | | * @return excel 文件流 |
| | | */ |
| | | @ResponseExcel |
| | | @GetMapping("/export") |
| | | @PreAuthorize("@pms.hasPermission('business_contract_export')" ) |
| | | public List<Contract> export(Contract contract,Long[] ids) { |
| | | return contractService.list(Wrappers.lambdaQuery(contract).in(ArrayUtil.isNotEmpty(ids), Contract::getId, ids)); |
| | | public List<ContractExportExceVO> export(ContracQueryDTO queryDTO, Long[] ids) { |
| | | return contractService.export(queryDTO); |
| | | } |
| | | |
| | | /** |
| | |
| | | public R list(@ParameterObject Contract contract) { |
| | | return R.ok(contractService.listByScope(Wrappers.<Contract>lambdaQuery().eq(Contract::getContractStatus,2) |
| | | .eq(ObjUtil.isNotNull(contract.getPartyAId()),Contract::getPartyAId,contract.getPartyAId()) |
| | | .orderByDesc(Contract::getCreateTime))); |
| | | } |
| | | |
| | | @GetMapping("/listAssoci") |
| | | public R listAssoci(@ParameterObject Contract contract) { |
| | | return R.ok(contractService.listByScope(Wrappers.<Contract>lambdaQuery().eq(Contract::getContractStatus,2) |
| | | .and(wrapper -> wrapper |
| | | .eq(ObjUtil.isNotNull(contract.getPartyAId()),Contract::getPartyAId,contract.getPartyAId()) |
| | | .or() |
| | | .eq(ObjUtil.isNotNull(contract.getPartyAId()),Contract::getPartyCId,contract.getPartyAId()) |
| | | ) |
| | | .orderByDesc(Contract::getCreateTime))); |
| | | } |
| | | |
| | |
| | | * 新增合同-石工泵 |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "新增历史合同-石工泵" , description = "新增历史合同-石工泵" ) |
| | | @PostMapping("/addContractSgbHis") |
| | | @SysLog("新增历史合同-石工泵" ) |
| | | public R addContractSgbHis(@RequestBody ContractAddDTO addDTO) { |
| | | return contractService.addContractSgbHis(addDTO); |
| | | } |
| | | // @Operation(summary = "新增历史合同-石工泵" , description = "新增历史合同-石工泵" ) |
| | | // @PostMapping("/addContractSgbHis") |
| | | // @SysLog("新增历史合同-石工泵" ) |
| | | // public R addContractSgbHis(@RequestBody ContractAddDTO addDTO) { |
| | | // return contractService.addContractSgbHis(addDTO); |
| | | // } |
| | | |
| | | /** |
| | | * 新增合同-石工泵 |
| | | * 新增合同-石工泵(合同号新生成) |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "新增合同-石工泵" , description = "新增合同-石工泵" ) |
| | |
| | | @SysLog("新增合同-石工泵" ) |
| | | public R addContractSgb(@RequestBody ContractAddDTO addDTO) { |
| | | return contractService.addContractSgb(addDTO); |
| | | } |
| | | |
| | | /** |
| | | * 新增合同-石工泵(合同号复用) |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "新增合同-石工泵" , description = "新增合同-石工泵" ) |
| | | @PostMapping("/addContractNoSgb") |
| | | @SysLog("新增合同-石工泵(合同号复用)" ) |
| | | public R addContractNoSgb(@RequestBody ContractAddDTO addDTO) { |
| | | return contractService.addContractNoSgb(addDTO); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "删除合同-石工泵" , description = "删除合同-石工泵" ) |
| | | @PostMapping("/delContractSgb/{dataId}") |
| | | @GetMapping("/delContractSgb/{dataId}") |
| | | @SysLog("删除合同-石工泵" ) |
| | | public R delContractSgb(@PathVariable String dataId) { |
| | | return contractService.delContractSgb(dataId); |
| | |
| | | return contractService.finallyPdf(attDTO); |
| | | } |
| | | |
| | | @PostMapping("/associationPartyC") |
| | | public R associationPartyC(@RequestBody ContractAssociationPartyCyDTO associationPartyCyDTO) { |
| | | return contractService.associationPartyC(associationPartyCyDTO); |
| | | } |
| | | |
| | | @GetMapping("/getFinallyInfo/{id}") |
| | | public R getFinallyInfo(@PathVariable("id") Long id) { |
| | | return contractService.getFinallyInfo(id); |
| | | } |
| | | |
| | | @Inner(value = false) |
| | | @GetMapping("/erpPush/{id}") |
| | | public R erpPush(@PathVariable("id") Long id) { |
| | | return contractService.erpPush(id); |
| | | } |
| | | |
| | | @GetMapping("/getInvoiceObj/{id}") |
| | | public R getInvoiceObj(@PathVariable("id") Long id) { |
| | | return contractService.getInvoiceObj(id); |
| | | } |
| | | |
| | | /** |
| | | * 新增合同-石工泵 |
| | | * 新增合同(已推送合同中心) |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "新增历史合同" , description = "新增历史合同" ) |
| | | @Operation(summary = "新增历史合同(已推送合同中心)" , description = "新增历史合同(已推送合同中心)" ) |
| | | @PostMapping("/addContractHis") |
| | | @SysLog("新增历史合同" ) |
| | | public R addContractHis(@RequestBody ContractAddDTO addDTO) { |
| | | return contractService.addContractHis(addDTO); |
| | | } |
| | | |
| | | /** |
| | | * 新增合同(未推送合同中心) |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "新增历史合同(未推送合同中心)" , description = "新增历史合同(未推送合同中心)" ) |
| | | @PostMapping("/addContractHisNoCenter") |
| | | @SysLog("新增历史合同" ) |
| | | public R addContractHisNoCenter(@RequestBody ContractAddDTO addDTO) { |
| | | return contractService.addContractHisNoCenter(addDTO); |
| | | } |
| | | |
| | | /** |
| | | * 更新历史合同(未推送合同中心) |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "更新历史合同(未推送合同中心)" , description = "更新历史合同(未推送合同中心)" ) |
| | | @PostMapping("/updContractHisNoCenter") |
| | | @SysLog("更新历史合同" ) |
| | | public R updContractHisNoCenter(@RequestBody ContractUpdateDTO updateDTO) { |
| | | return contractService.updContractHisNoCenter(updateDTO); |
| | | } |
| | | |
| | | |
| | | @Inner(value = false) |
| | | @GetMapping("/takeEffect/{id}") |
| | | public R takeEffect(@PathVariable("id") Long id) { |
| | | contractService.takeEffect(id); |
| | | return R.ok(); |
| | | } |
| | | } |