Explorar o código

待办已办逻辑修改

koul %!s(int64=4) %!d(string=hai) anos
pai
achega
4d1cb3f2ca

+ 8 - 7
src/main/java/com/uas/service/Impl/SysNotifyTodoWebServiceImpl.java

@@ -89,7 +89,7 @@ public class SysNotifyTodoWebServiceImpl implements SysNotifyTodoWebService {
         // 将组织数据设置到组织架构信息接入上下文
         // 将组织数据设置到组织架构信息接入上下文
         context.setTargets(person);
         context.setTargets(person);
         context.setType(1);
         context.setType(1);
-        return getTodoData(context,cond);
+        return getTodoData(context,cond,1);
     }
     }
 
 
 
 
@@ -99,9 +99,9 @@ public class SysNotifyTodoWebServiceImpl implements SysNotifyTodoWebService {
         // 将组织数据设置到组织架构信息接入上下文
         // 将组织数据设置到组织架构信息接入上下文
         context.setTargets(person);
         context.setTargets(person);
         context.setType(2);
         context.setType(2);
-        return getTodoData(context,cond);
+        return getTodoData(context,cond,2);
     }
     }
-    private String getTodoData(NotifyTodoGetContext context,String cond){
+    private String getTodoData(NotifyTodoGetContext context,String cond,int landraytype){
         String res = "";
         String res = "";
         try {
         try {
             // 调用 WebService 接口,并接收请求返回的数据
             // 调用 WebService 接口,并接收请求返回的数据
@@ -116,7 +116,8 @@ public class SysNotifyTodoWebServiceImpl implements SysNotifyTodoWebService {
                 if (message.indexOf("errorPage")==-1) {
                 if (message.indexOf("errorPage")==-1) {
                     JSONObject jsonObject = JSONObject.fromObject(message);
                     JSONObject jsonObject = JSONObject.fromObject(message);
                     JSONArray docs = jsonObject.getJSONArray("docs");
                     JSONArray docs = jsonObject.getJSONArray("docs");
-                    SqlRowList rs = baseDao.queryForRowSet("select jp_landrayid,jp_id,jp_processinstanceid from jprocess where nvl(jp_landrayid,' ')<>' ' and jp_status='待审批' and jp_nodedealman='" + cond + "'");
+                    SqlRowList rs = baseDao.queryForRowSet("select jp_landrayid,jp_id,jp_processinstanceid from " +
+                            "jprocess where nvl(jp_landrayid,' ')<>' ' and jp_status='待审批' and jp_nodedealman='" + cond + "' and jp_landraytype="+landraytype);
                     while (rs.next()){
                     while (rs.next()){
                         if (message.indexOf(rs.getString("jp_landrayid"))==-1) {
                         if (message.indexOf(rs.getString("jp_landrayid"))==-1) {
                             sqls.add("update jprocess set jp_status='已审批' where jp_id='"+rs.getString("jp_id")+"'");
                             sqls.add("update jprocess set jp_status='已审批' where jp_id='"+rs.getString("jp_id")+"'");
@@ -130,13 +131,13 @@ public class SysNotifyTodoWebServiceImpl implements SysNotifyTodoWebService {
                         if (baseDao.getCountByCondition("jprocess", "jp_landrayid='" + object.getString("id") + "'") == 0) {
                         if (baseDao.getCountByCondition("jprocess", "jp_landrayid='" + object.getString("id") + "'") == 0) {
                             sqls.add("insert into jprocess(jp_id, jp_name, jp_launcherid, jp_launchername, jp_form, " +
                             sqls.add("insert into jprocess(jp_id, jp_name, jp_launcherid, jp_launchername, jp_form, " +
                                     "jp_launchtime, jp_table, jp_status, jp_url,jp_landrayid,jp_nodedealman,jp_codevalue," +
                                     "jp_launchtime, jp_table, jp_status, jp_url,jp_landrayid,jp_nodedealman,jp_codevalue," +
-                                    "jp_processinstanceid,jp_nodename) values(process_seq.nextval,'" + object.getString("subject") + "','" + object.getString("creator") + "','" +
+                                    "jp_processinstanceid,jp_nodename,jp_landraytype) values(process_seq.nextval,'" + object.getString("subject") + "','" + object.getString("creator") + "','" +
                                     object.getString("creatorName") + "','" + object.getString("key") + "',to_date('" + object.getString("createTime") + "','yyyy-MM-dd HH24:mi:ss'),'" +
                                     object.getString("creatorName") + "','" + object.getString("key") + "',to_date('" + object.getString("createTime") + "','yyyy-MM-dd HH24:mi:ss'),'" +
-                                    object.getString("modelName") + "','待审批','http://oa.seg.com.cn:8081" + link + "','" + object.getString("id") + "','" + cond + "','" + object.getString("moduleName") + "','" + object.getString("id") + "','" + cond + "')");
+                                    object.getString("modelName") + "','待审批','http://oa.seg.com.cn:8081" + link + "','" + object.getString("id") + "','" + cond + "','" + object.getString("moduleName") + "','" + object.getString("id") + "','" + cond + "',"+landraytype+")");
                         }
                         }
                     }
                     }
                 } else {
                 } else {
-                    SqlRowList rowSet = baseDao.queryForRowSet("select jp_processinstanceid from jprocess where nvl(jp_landrayid,' ')<>' ' and jp_status='待审批' and jp_nodedealman='" + cond + "'");
+                    SqlRowList rowSet = baseDao.queryForRowSet("select jp_processinstanceid from jprocess where nvl(jp_landrayid,' ')<>' ' and jp_status='待审批' and jp_nodedealman='" + cond + "' and jp_landraytype="+landraytype);
                     while (rowSet.next()) {
                     while (rowSet.next()) {
                         sqls.add("update jprocess set jp_status='已审批' where nvl(jp_landrayid,' ')<>' ' and jp_nodedealman='" + cond + "' and jp_processinstanceid='"+rowSet.getString("jp_processinstanceid")+"'");
                         sqls.add("update jprocess set jp_status='已审批' where nvl(jp_landrayid,' ')<>' ' and jp_nodedealman='" + cond + "' and jp_processinstanceid='"+rowSet.getString("jp_processinstanceid")+"'");
                         sqls.add("insert into jnode (jn_id,jn_name, jn_dealmanid,jn_processinstanceid,JN_DEALTIME, JN_DEALRESULT) values (jnode_seq.nextval,'" + cond + "','" + cond + "','" + rowSet.getString("jp_processinstanceid") + "',to_char(sysdate,'yyyy-MM-dd HH24:mi:ss'),'详见蓝凌OA')");
                         sqls.add("insert into jnode (jn_id,jn_name, jn_dealmanid,jn_processinstanceid,JN_DEALTIME, JN_DEALRESULT) values (jnode_seq.nextval,'" + cond + "','" + cond + "','" + rowSet.getString("jp_processinstanceid") + "',to_char(sysdate,'yyyy-MM-dd HH24:mi:ss'),'详见蓝凌OA')");