Browse Source

增加待审批数量和最后一级标题

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@7544 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
hejq 9 years ago
parent
commit
815ee34737

+ 8 - 7
src/main/java/com/uas/platform/b2b/mobile/service/impl/MobileTaskServiceImpl.java

@@ -21,6 +21,7 @@ import com.uas.platform.b2b.dao.OfficeTaskDao;
 import com.uas.platform.b2b.dao.OfficeTaskReplyDao;
 import com.uas.platform.b2b.dao.UserBaseInfoDao;
 import com.uas.platform.b2b.mobile.enumeration.MobileStatus;
+import com.uas.platform.b2b.mobile.model.AppFlowOperation;
 import com.uas.platform.b2b.mobile.service.MobileTaskService;
 import com.uas.platform.b2b.model.OfficeTask;
 import com.uas.platform.b2b.model.OfficeTaskReply;
@@ -112,18 +113,18 @@ public class MobileTaskServiceImpl implements MobileTaskService {
 		ModelMap map = new ModelMap();
 		String doing = "select count(*) from office$task where ta_domancode = " + emcode + " and ta_uu =" + enuu
 				+ " and ta_statuscode = 'start'";
-		String todo = "select count(*) from office$task where ta_recordercode = " + emcode + " and ta_uu =" + enuu
-				+ " and ta_statuscode = 'unconfirmed'";
+		String todo = "select count(*) from mobile$flowoperation where fop_dealuu = " + emcode + " and fop_nodeenuu ="
+				+ enuu + " and fop_statuscode = 'UNAUDIT'";
 		Integer processcount = commonDao.queryForObject(todo, Integer.class);
 		Integer taskcount = commonDao.queryForObject(doing, Integer.class);
 		List<OfficeTask> lasttask = commonDao.query(
 				"select * from ( select t.ta_taskname taskname 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<OfficeTask> lastProcess = commonDao.query(
-				"select * from ( select t.ta_taskname taskname from office$task t where t.ta_statuscode = 'unconfirmed' 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_nodename nodename from mobile$flowoperation t where t.fop_statuscode = 'UNAUDIT' and t.fop_dealuu = "
+						+ emcode + " and t.fop_nodeenuu = " + enuu + " order by t.fop_id desc ) where rownum < 2",
+				AppFlowOperation.class);
 
 		map.put("processcount", processcount);
 		map.put("taskcount", taskcount);
@@ -133,7 +134,7 @@ public class MobileTaskServiceImpl implements MobileTaskService {
 			map.put("lasttask", null);
 		}
 		if (!CollectionUtils.isEmpty(lastProcess)) {
-			map.put("lastProcess", lastProcess.get(0).getTaskname());
+			map.put("lastProcess", lastProcess.get(0).getNodename());
 		} else {
 			map.put("lastProcess", null);
 		}