|
@@ -25,14 +25,66 @@ public class ContractInfoController {
|
|
|
private final IContractInfoService contractInfoService;
|
|
|
|
|
|
/**
|
|
|
- * 新增项目
|
|
|
+ * 新增合同
|
|
|
*/
|
|
|
@PostMapping("/addContractInfo")
|
|
|
- @ApiOperationSupport(order = 2)
|
|
|
- @ApiOperation(value = "新增项目")
|
|
|
+ @ApiOperationSupport(order = 1)
|
|
|
+ @ApiOperation(value = "新增合同")
|
|
|
public R addContractInfo(@RequestBody ControlContractInfo contractInfo) {
|
|
|
contractInfoService.addContractInfo(contractInfo);
|
|
|
return R.success("新增成功");
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 删除合同
|
|
|
+ */
|
|
|
+ @GetMapping("/deleteContractInfoById")
|
|
|
+ @ApiOperationSupport(order = 1)
|
|
|
+ @ApiOperation(value = "删除合同")
|
|
|
+ public R deleteContractInfoById(Long id) {
|
|
|
+ contractInfoService.deleteContractInfoById(id);
|
|
|
+ return R.success("删除成功");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改合同
|
|
|
+ */
|
|
|
+ @PostMapping("/updateContractInfo")
|
|
|
+ @ApiOperationSupport(order = 1)
|
|
|
+ @ApiOperation(value = "修改合同")
|
|
|
+ public R updateContractInfo(@RequestBody ControlContractInfo contractInfo) {
|
|
|
+ contractInfoService.updateContractInfo(contractInfo);
|
|
|
+ return R.success("修改成功");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询单个合同信息
|
|
|
+ */
|
|
|
+ @GetMapping("/getContractInfoById")
|
|
|
+ @ApiOperationSupport(order = 2)
|
|
|
+ @ApiOperation(value = "查询单个合同信息")
|
|
|
+ public R getContractInfoById(Long id) {
|
|
|
+ return R.data(contractInfoService.getContractInfoById(id));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取合同类型字典
|
|
|
+ */
|
|
|
+ @GetMapping("/getContractTypeDict")
|
|
|
+ @ApiOperationSupport(order = 2)
|
|
|
+ @ApiOperation(value = "获取合同类型字典")
|
|
|
+ public R getContractTypeDict() {
|
|
|
+ return R.data(contractInfoService.getContractTypeDict());
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取未被关联的项目
|
|
|
+ */
|
|
|
+ @GetMapping("getNoConnectionProject")
|
|
|
+ @ApiOperationSupport(order = 2)
|
|
|
+ @ApiOperation(value = "获取未被关联的项目")
|
|
|
+ public R getNoConnectionProject(){
|
|
|
+ return R.data(contractInfoService.getNoConnectionProject());
|
|
|
+ }
|
|
|
+
|
|
|
}
|