|
|
|
@ -20,6 +20,8 @@ import com.cjy.traceability.framework.common.pojo.PageParam; |
|
|
|
|
import com.cjy.traceability.framework.common.pojo.PageResult; |
|
|
|
|
import com.cjy.traceability.framework.common.pojo.CommonResult; |
|
|
|
|
import com.cjy.traceability.framework.common.util.object.BeanUtils; |
|
|
|
|
|
|
|
|
|
import static com.cjy.traceability.framework.common.pojo.CommonResult.error; |
|
|
|
|
import static com.cjy.traceability.framework.common.pojo.CommonResult.success; |
|
|
|
|
|
|
|
|
|
import com.cjy.traceability.framework.excel.core.util.ExcelUtils; |
|
|
|
@ -62,7 +64,7 @@ public class BlockController { |
|
|
|
|
public CommonResult<Boolean> deleteBlock(@RequestParam("id") Integer id) { |
|
|
|
|
boolean result = blockService.selectIsBindCropper(id); |
|
|
|
|
if(result){ |
|
|
|
|
return success(false); |
|
|
|
|
return error(400,"地块已绑定作物,无法删除"); |
|
|
|
|
}else{ |
|
|
|
|
blockService.deleteBlock(id); |
|
|
|
|
return success(true); |
|
|
|
|