zhubaomin
2025-03-25 802fc74478ae3f2c4e8ab7cd417f97469c84f157
pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/crop/CropCtrl.java
@@ -9,10 +9,7 @@
import com.dy.pipIrrGlobal.pojoIr.IrProject;
import com.dy.pipIrrGlobal.voIr.VoCrop;
import com.dy.pipIrrGlobal.voIr.VoCropOne;
import com.dy.pipIrrGlobal.voIr.VoProject;
import com.dy.pipIrrGlobal.voIr.VoProjectOne;
import com.dy.pipIrrGlobal.voSe.VoActiveCard;
import com.dy.pipIrrIrrigate.crop.QueryVo;
import com.dy.pipIrrIrrigate.result.IrrigateResultCode;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
@@ -74,7 +71,7 @@
        try {
            Integer rec = Optional.ofNullable(cropSv.addCrop(po)).orElse(0);
            if (rec == 0) {
                return BaseResponseUtils.buildFail(IrrigateResultCode.ADD_PROJECT_FAIL.getMessage());
                return BaseResponseUtils.buildFail(IrrigateResultCode.ADD_CROP_FAIL.getMessage());
            }
        } catch (Exception e) {
            log.error("添加作物异常", e);
@@ -102,13 +99,13 @@
    @SsoAop()
    public BaseResponse<Boolean> delete(@RequestBody Map map) {
        if (map == null || map.size() <= 0) {
            BaseResponseUtils.buildFail(IrrigateResultCode.PLEASE_INPUT_PROJECT_ID.getMessage());
            BaseResponseUtils.buildFail(IrrigateResultCode.PLEASE_INPUT_CROP_ID.getMessage());
        }
        Long cropId = Long.parseLong(map.get("id").toString());
        try {
            Integer rows = cropSv.deleteCrop(cropId);
            if (rows == 0) {
                return BaseResponseUtils.buildFail(IrrigateResultCode.DELETE_PROJECT_FAIL.getMessage());
                return BaseResponseUtils.buildFail(IrrigateResultCode.DELETE_CROP_FAIL.getMessage());
            }
        } catch (Exception e) {
            log.error("删除作物异常", e);
@@ -142,7 +139,7 @@
        try {
            Integer rec = Optional.ofNullable(cropSv.updateCrop(po)).orElse(0);
            if (rec == 0) {
                return BaseResponseUtils.buildFail(IrrigateResultCode.UPDATE_PROJECT_FAIL.getMessage());
                return BaseResponseUtils.buildFail(IrrigateResultCode.UPDATE_CROP_FAIL.getMessage());
            }
        } catch (Exception e) {
            log.error("修改作物异常", e);