chenrj-PC\chenrj 8 năm trước cách đây
mục cha
commit
b35d4e0e48

+ 3 - 3
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/StatisticsMapper.xml

@@ -98,7 +98,7 @@
 			(
 			SELECT 
 					monthfunc (t.start_time) AS mth, 
-				sum(m.check_item_score) AS checkd_all_score,t.* 
+				sum(m.check_item_score) AS checkd_all_score, m.* 
 				FROM 
 				check_score m INNER JOIN 
 				( select * From check_task t 
@@ -115,7 +115,7 @@
 						  ) t  
 			ON m.task_id = t.id
 				WHERE 1=1
-					GROUP BY mth , t.checked_person
+					GROUP BY mth , m.checked_person
 					
 			) checked_score_t
 		LEFT JOIN (
@@ -223,7 +223,7 @@
 			(
 				SELECT 
 					monthfunc (t.start_time) AS mth, 
-				sum(m.check_item_score) AS checkd_all_score,t.* 
+				sum(m.check_item_score) AS checkd_all_score,m.* 
 				FROM 
 				check_score m INNER JOIN 
 				( select * From check_task t 

+ 16 - 2
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/StatisticsServiceImpl.java

@@ -805,6 +805,20 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 	public StatisticsBean getCheckedScoreInfo(StatisticsBean obj) {
 		int people_num = 0;
 		StatisticsBean returnObj = new StatisticsBean();
+		
+		// 获取收费站信息收费站人数
+//		Constant t = CodeUtil.getCodeByFlagAndValue("feestation_check_jobs", "1");
+//		String[] postions = t.getCode_name().split(",");
+//		User user = new User();
+//		List<Integer> positionList = new ArrayList<Integer>();
+//		for (int i = 0; i < postions.length; i++) {
+//			positionList.add(Integer.parseInt(postions[i]));
+//		}
+//		// 检查人数 和 检查次数
+//		obj.setPosition_ids(positionList);
+//		// 检索受检人数
+//		List<StatisticsBean> checkedNumList =  statisticsDao.selectFeeStationCheckNum(obj);
+		
 		if (obj.getQueryType() == 0) {
 			// 公司
 			// 公司总人数
@@ -841,9 +855,9 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 		List<StatisticsBean> userLostScoreInfoList = statisticsDao.selectCheckedScoreList(obj);
 
 		for (StatisticsBean sta : userLostScoreInfoList) {
-			if (sta.getAll_check_score() / sta.getChecked_num() <= 15) {
+			if (sta.getAll_check_score()  <= 15) {
 				returnObj.setScore_fifteen(returnObj.getScore_fifteen() + 1);
-			} else if (sta.getAll_check_score() / sta.getChecked_num() <= 50) {
+			} else if (sta.getAll_check_score() <= 50) {
 				returnObj.setScore_fifty(returnObj.getScore_fifty() + 1);
 			} else {
 				returnObj.setScore_over_fifty(returnObj.getScore_over_fifty() + 1);