shichongfu
2023-06-06 1f29ebaf549bb9616aaf904aba2fc89f3482b91a
Merge branch 'master' of http://nonxin.cn:8090/r/product/product-server-administration/V2.0.0
已修改2个文件
46 ■■■■■ 文件已修改
src/main/java/com/product/administration/controller/CooperateController.java 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/product/administration/service/CooperatesService.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/product/administration/controller/CooperateController.java
@@ -13,6 +13,7 @@
import com.product.core.exception.BaseException;
import com.product.core.spring.context.SpringMVCContextHolder;
import com.product.module.sys.version.ApiVersion;
import com.product.tool.flow.service.FlowCoordinationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -35,7 +36,8 @@
    @Autowired
    CooperatesService cooperatesService;
    @Autowired
    public FlowCoordinationService flowCoordinationService;
    /**
     * @Date: 2020-03-23 18:00
     * @Author: ZhouJie
@@ -331,7 +333,6 @@
                    SystemCode.SYSTEM_DELETE_COOPERATES_FAIL.getText());
        }
    }
    /**
     * @Date: 2020-04-01 16:06
     * @Author: ZhouJie
@@ -374,6 +375,46 @@
        }
    }
    /**
     * @Date: 2020-04-01 16:06
     * @Author: ZhouJie
     * @Description: 协同办公撤回或者中止 type 5中止 6 撤回
     */
    @RequestMapping(value = "/recession-stop-cooperate/{version}", method = RequestMethod.POST)
    public String recessionOrStopCooperate(HttpServletRequest request) {
        try {
            // 获取参数
            FieldSetEntity fse = null;
            Object bean = request.getAttribute(CoreConst.API_POST_REQUEST_DATA);
            if (bean != null) {
                RequestParameterEntity reqp = (RequestParameterEntity) bean;
                fse = reqp.getFormData();
            }
            // 判断参数是否为空
            if (bean == null || fse == null) {
                SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_FORM_NODATA.getValue(),
                        SystemCode.SYSTEM_FORM_NODATA.getText());
                return this.error(SystemCode.SYSTEM_FORM_NODATA.getValue(), SystemCode.SYSTEM_FORM_NODATA.getText());
            }
            // 判断表名是否正常
            if (!CmnConst.PRODUCT_OA_COOPERATES.equals(fse.getTableName())) {
                SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_TABLE_NODATA.getValue(),
                        SystemCode.SYSTEM_TABLE_NODATA.getText());
                return this.error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText());
            }
            flowCoordinationService.saveCoordinationStartFlow(fse);
            return OK();
        } catch (BaseException e) {
            e.printStackTrace();
            SpringMVCContextHolder.getSystemLogger().error(e);
            return this.error(e);
        } catch (Exception e) {
            e.printStackTrace();
            SpringMVCContextHolder.getSystemLogger().error(e);
            return this.error(SystemCode.SYSTEM_SEND_COOPERATES_FAIL.getValue(),
                    SystemCode.SYSTEM_SEND_COOPERATES_FAIL.getText());
        }
    }
    /**
     * @description: 暂存待办
     * @author: ZhouJie
     * @date: 2021-05-26 16:44
src/main/java/com/product/administration/service/CooperatesService.java
@@ -252,6 +252,7 @@
     */
    public void saveTodo(FieldSetEntity fs) throws BaseException {
        fs.setValue("status", 1);
        fs.setValue("handle_time", new Date());
        baseDao.update(fs);
    }