diff --git a/java/ShitJudge.java b/java/ShitJudge.java new file mode 100644 index 0000000000000000000000000000000000000000..b5b4cd1fc49b3bcd2e2f94515f5e7acb42a3a708 --- /dev/null +++ b/java/ShitJudge.java @@ -0,0 +1,19 @@ +/** + * 判断表单数据是否被发起流程. + * + * @param _formDef 表单对象 + * @param id 表单数据id + * @return + */ +public boolean isFormDataAssocationProcess(FormDef _formDef, Long id) { + String sql = "select count(*) from t_auto_" + _formDef.getId() + " where db_id=:id and processinstanceid_ is not null"; + Map params = new HashMap(); + params.put("id", id); + int count = this.genericJdbcDAO.queryForInt(sql, params); + // 这个判断,一口老血喷出来,一个项目经理写的 + if (count > 0) { + return true; + } else { + return false; + } +} \ No newline at end of file