Commit f57bdf45 by 焦凯

优化上次修改

parent fe6a233f
...@@ -65,8 +65,7 @@ public class ContractController { ...@@ -65,8 +65,7 @@ public class ContractController {
@GetMapping("/sand/user/contractInfo/{contractInfoId}") @GetMapping("/sand/user/contractInfo/{contractInfoId}")
public KObject queryContractInfoForCompany(@PathVariable UUID contractInfoId) { public KObject queryContractInfoForCompany(@PathVariable UUID contractInfoId) {
KObject contractInfo = contractService.queryContractInfo(contractInfoId); return queryContractInfo(contractInfoId);
return contractInfo;
} }
@GetMapping("/contractInfo/{contractInfoId}") @GetMapping("/contractInfo/{contractInfoId}")
...@@ -85,9 +84,7 @@ public class ContractController { ...@@ -85,9 +84,7 @@ public class ContractController {
@PostMapping("/sand/user/contract/change/check") @PostMapping("/sand/user/contract/change/check")
public Object checkChangeAbledForCompany(@RequestBody BaseEntity contract) { public Object checkChangeAbledForCompany(@RequestBody BaseEntity contract) {
UUID id = UUID.fromString(contract.getId()); return checkChangeAbled(contract);
Boolean result = contractService.checkChangeAbled(id);
return ResponseObj.success("校验成功", result);
} }
@PostMapping("/contract/change/check") @PostMapping("/contract/change/check")
public Object checkChangeAbled(@RequestBody BaseEntity contract) { public Object checkChangeAbled(@RequestBody BaseEntity contract) {
...@@ -98,12 +95,7 @@ public class ContractController { ...@@ -98,12 +95,7 @@ public class ContractController {
@PostMapping("/sand/user/contract/change/history") @PostMapping("/sand/user/contract/change/history")
public Object getChangeHistoryForCompany(@RequestBody BaseEntity contract) { public Object getChangeHistoryForCompany(@RequestBody BaseEntity contract) {
UUID id = UUID.fromString(contract.getId()); return getChangeHistory(contract);
List<KObject> result = contractService.getChangeHistory(id);
if(null == result || result.size()<=0){
return JSONObjectUtils.toJson(new ArrayList<KObject>()).toString();
}
return JSONObjectUtils.toJson(result).toString();
} }
@PostMapping("/contract/change/history") @PostMapping("/contract/change/history")
public Object getChangeHistory(@RequestBody BaseEntity contract) { public Object getChangeHistory(@RequestBody BaseEntity contract) {
......
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