Просмотр исходного кода

BUG 24491【地块经营】—— 1.查看的内容与录入的不符合

master
yangfuda 2 месяцев назад
Родитель
Сommit
b81f154077
1 измененных файлов: 20 добавлений и 2 удалений
  1. +20
    -2
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/resource/TResourceOperationController.java

+ 20
- 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/resource/TResourceOperationController.java Просмотреть файл

@@ -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));
}



Загрузка…
Отмена
Сохранить