zhubaomin
昨天 6f2c512bffe6faaa8536fa98fbf2b2e552b6a2ac
pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateGroup/IrrigateGroupCtrl.java
@@ -460,6 +460,11 @@
        if (bindingResult != null && bindingResult.hasErrors()) {
            return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
        }
        // 先判断表内是否存在相同的 groupCode
        if (irrigateGroupSv.existsByGroupCode(po.getGroupCode())) {
            return BaseResponseUtils.buildFail(IrrigateResultCode.GROUP_CODE_ALREADY_EXISTS.getMessage());
        }
        Map map_result = irrigateGroupSv.addIrrigateGroup(po);
        if(map_result.get("success").equals(false)) {
@@ -505,6 +510,11 @@
        if(po.getGroupId() == null) {
            return BaseResponseUtils.buildErrorMsg("轮灌组ID不能为空");
        }
        // 先判断表内是否存在相同的 groupCode(排除当前正在修改的记录)
        if (irrigateGroupSv.existsByGroupCodeExcludeId(po.getGroupCode(), po.getGroupId())) {
            return BaseResponseUtils.buildFail(IrrigateResultCode.GROUP_CODE_ALREADY_EXISTS.getMessage());
        }
        Map map_result = irrigateGroupSv.updateIrrigateGroup(po);
        if(map_result.get("success").equals(false)) {
@@ -531,6 +541,26 @@
    }
    /**
     * 获取项目下轮灌组
     * @param qo
     * @return
     */
    @GetMapping(path = "/getGroupsByProjectId")
    @SsoAop()
    public BaseResponse<List<VoGroupSimple>> getGroupsByProjectId(QoGroup qo) {
        if(qo.getProjectId() == null) {
            return BaseResponseUtils.buildErrorMsg("请选择项目");
        }
        try {
            return BaseResponseUtils.buildSuccess(irrigateGroupSv.getGroupsByProjectId(qo));
        } catch (Exception e) {
            log.error("获取轮灌组记录异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
    }
    /**
     * 获取全部轮灌组,新代码
     * @return
     */