Browse Source

接口审批最后流程审批时间显示

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@9300 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
hejq 8 years ago
parent
commit
ffb6062953

+ 22 - 14
src/main/java/com/uas/platform/b2b/mobile/service/impl/MobileTaskServiceImpl.java

@@ -121,11 +121,30 @@ public class MobileTaskServiceImpl implements MobileTaskService {
 				"select * from ( select t.ta_taskname taskname, t.ta_startdate startdate from office$task t where t.ta_statuscode = 'start' and t.ta_domancode = '"
 						+ emcode + "' and t.ta_uu = " + enuu + " order by t.ta_id desc ) where rownum < 2",
 				OfficeTask.class);
-		List<AppFlowOperation> lastProcess = commonDao.query(
-				"select * from ( select t.fop_caller caller, t.fop_dealname dealname, t.fop_dealtime dealtime from mobile$flowoperation t where t.fop_statuscode = 'UNAUDIT' and t.fop_nodedealuu = "
+		List<AppFlowOperation> nowProcess = commonDao.query(
+				"select * from ( select t.fop_caller caller, t.fop_dealname dealname, t.fop_dealtime dealtime,t.fop_nodelevel nodelevel,t.fop_sourceid sourceid from mobile$flowoperation t where t.fop_statuscode = 'UNAUDIT' and t.fop_nodedealuu = "
 						+ emcode + " and t.fop_nodeenuu = " + enuu + " order by t.fop_id desc ) where rownum < 2",
 				AppFlowOperation.class);
-
+		if (!CollectionUtils.isEmpty(nowProcess)) {
+			List<AppFlowOperation> lastProcess = commonDao
+					.query("select * from( select t.fop_caller caller, t.fop_dealname dealname, t.fop_dealtime dealtime from mobile$flowoperation t where t.fop_nodeenuu = "
+							+ enuu + " and t.fop_nodelevel = " + (nowProcess.get(0).getNodelevel() - 1)
+							+ " and t.fop_sourceid = " + nowProcess.get(0).getSourceid() + ")", AppFlowOperation.class);
+			if (!CollectionUtils.isEmpty(lastProcess)) {
+				map.put("lastProcessTime", lastProcess.get(0).getDealtime());
+				if (nowProcess.get(0).getDealname() != null) {
+					map.put("lastProcess", nowProcess.get(0).getDealname() + "的" + nowProcess.get(0).getCaller());
+				} else {
+					map.put("lastProcess", nowProcess.get(0).getCaller());
+				}
+			} else {
+				map.put("lastProcessTime", null);
+				map.put("lastProcess", null);
+			}
+		} else {
+			map.put("lastProcessTime", null);
+			map.put("lastProcess", null);
+		}
 		map.put("processcount", processcount);
 		map.put("taskcount", taskcount);
 		if (!CollectionUtils.isEmpty(lasttask)) {
@@ -135,17 +154,6 @@ public class MobileTaskServiceImpl implements MobileTaskService {
 			map.put("lasttask", null);
 			map.put("lasttaskTime", null);
 		}
-		if (!CollectionUtils.isEmpty(lastProcess)) {
-			map.put("lastProcessTime", lastProcess.get(0).getDealtime());
-			if (lastProcess.get(0).getDealname() != null) {
-				map.put("lastProcess", lastProcess.get(0).getDealname() + "的" + lastProcess.get(0).getCaller());
-			} else {
-				map.put("lastProcess", lastProcess.get(0).getCaller());
-			}
-		} else {
-			map.put("lastProcessTime", null);
-			map.put("lastProcess", null);
-		}
 		return map;
 	}