|
|
|
@@ -192,7 +192,16 @@ public class TResourceOperationController extends BaseController |
|
|
|
if(dept.getOrgCode().length() < 12){ |
|
|
|
return error("非村、组级行政区划,不允许添加地块!"); |
|
|
|
} |
|
|
|
|
|
|
|
TResourceLand land = tResourceLandService.selectTResourceLandByDkbm(tResourceOperation.getDkbm()); |
|
|
|
if(land != null){ |
|
|
|
tResourceOperation.setDkmc(land.getDkmc()); |
|
|
|
tResourceOperation.setDkdz(land.getDkdz()); |
|
|
|
tResourceOperation.setDkxz(land.getDkxz()); |
|
|
|
tResourceOperation.setDknz(land.getDknz()); |
|
|
|
tResourceOperation.setDkbz(land.getDkbz()); |
|
|
|
}else{ |
|
|
|
return error("地块代码无法查询到地块!"); |
|
|
|
} |
|
|
|
tResourceOperation.setImportCode(dept.getImportCode()); |
|
|
|
return toAjax(tResourceOperationService.insertTResourceOperation(tResourceOperation)); |
|
|
|
} |
|
|
|
@@ -205,7 +214,16 @@ public class TResourceOperationController extends BaseController |
|
|
|
@PostMapping("/update") |
|
|
|
public AjaxResult edit(@RequestBody TResourceOperation tResourceOperation) |
|
|
|
{ |
|
|
|
|
|
|
|
TResourceLand land = tResourceLandService.selectTResourceLandByDkbm(tResourceOperation.getDkbm()); |
|
|
|
if(land != null){ |
|
|
|
tResourceOperation.setDkmc(land.getDkmc()); |
|
|
|
tResourceOperation.setDkdz(land.getDkdz()); |
|
|
|
tResourceOperation.setDkxz(land.getDkxz()); |
|
|
|
tResourceOperation.setDknz(land.getDknz()); |
|
|
|
tResourceOperation.setDkbz(land.getDkbz()); |
|
|
|
}else{ |
|
|
|
return error("地块代码无法查询到地块!"); |
|
|
|
} |
|
|
|
return toAjax(tResourceOperationService.updateTResourceOperation(tResourceOperation)); |
|
|
|
} |
|
|
|
|
|
|
|
|