| | |
| | | import com.by4cloud.platformx.business.service.ContractService; |
| | | import com.by4cloud.platformx.common.security.annotation.Inner; |
| | | import com.by4cloud.platformx.common.security.util.SecurityUtils; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import com.by4cloud.platformx.common.excel.annotation.ResponseExcel; |
| | |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | |
| | | return contractService.genCurrentOverdue(); |
| | | } |
| | | |
| | | /** |
| | | * 生成新合同 |
| | | * @param id id |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "通过id生成新合同" , description = "通过id生成新合同" ) |
| | | @GetMapping("/copyNewContract/{id}" ) |
| | | public R copyNewContract(@PathVariable("id" ) Long id) { |
| | | return contractService.copyNewContract(id); |
| | | } |
| | | |
| | | /** |
| | | * 根据客商查询合同 |
| | | * @param busId id |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "根据客商查询合同" , description = "根据客商查询合同" ) |
| | | @GetMapping("/listByBusId/{busId}" ) |
| | | public R listByBusId(@PathVariable("busId" ) Long busId) { |
| | | return R.ok(contractService.listByScope(Wrappers.<Contract>lambdaQuery().eq(Contract::getPartyAId,busId) |
| | | .gt(Contract::getBillingAmout,new BigDecimal("0")))); |
| | | } |
| | | |
| | | /** |
| | | * 根据模版生成word一煤机加工承揽合同 |
| | | * @param id id |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "根据模版生成word合同" , description = "根据模版生成word合同" ) |
| | | @GetMapping("/exportContractYMJJGCLWord/{id}" ) |
| | | public void exportContractYMJJGCLWord(@PathVariable("id" ) Long id, HttpServletResponse response) { |
| | | contractService.exportContractYMJJGCLWord(id,response); |
| | | } |
| | | } |