Parcourir la source

配置文件又被修改了,配置文件能不能共用,不能共用就忽悠掉

chenrj-PC\chenrj il y a 9 ans
Parent
commit
d0462a1c19

+ 10 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/StatisticsBean.java

@@ -38,4 +38,14 @@ public class StatisticsBean {
     private Integer item_id ;
 
     private Integer checked_num;
+    
+    private Integer people_num;
+    
+    private int score_fifteen;
+    
+    private int score_fifty;
+    
+    private int score_over_fifty ;
+    
+    private int all_check_score ;
 }

+ 14 - 2
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/StatisticsController.java

@@ -23,15 +23,27 @@ public class StatisticsController extends BaseController {
 	private StatisticsService statisticsService;
     
     /**
-     * 通过方法id获取考核项
+     * 温馨服务考核情况反馈表(所有员工排名)
      * @return
      * String
      * @exception
      * @since  1.0.0
      */
     @RequestMapping(value = "/employee/order")
-    public String getByRuleId(@RequestBody StatisticsBean obj){
+    public String getEmployeeOrder(@RequestBody StatisticsBean obj){
     	List<StatisticsBo> lists=  statisticsService.getEmployeeCheckedInfo(obj);
     	return super.returnSuccessResult(lists);
     }
+    
+    /**
+     * 温馨服务检查千分考核扣分情况汇总表
+     * @param obj
+     * @return
+     */
+    @RequestMapping(value = "/score/info")
+    public String getScoreInfo(@RequestBody StatisticsBean obj){
+    	List<StatisticsBean> lists=  statisticsService.getFeeStationCheckedScore(obj);
+    	return super.returnSuccessResult(lists);
+    }
+    
 }

+ 3 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/cluster/DepartmentDao.java

@@ -6,6 +6,7 @@ import org.apache.ibatis.annotations.Mapper;
 
 import com.xintong.visualinspection.bean.FeeStation;
 import com.xintong.visualinspection.bean.Organ;
+import com.xintong.visualinspection.bean.StatisticsBean;
 
 /**
  * 文件名:UserInfoDao
@@ -20,4 +21,6 @@ public interface DepartmentDao  {
     public void delete(Integer id);
     public List<FeeStation> getAllFS();
     public FeeStation getFsBydeptId(Integer id);
+    
+    public List<StatisticsBean> selectFeeStationGroup(StatisticsBean obj);
 }

+ 5 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/StatisticsDao.java

@@ -16,5 +16,10 @@ public interface StatisticsDao  {
 	public List<StatisticsBean> selectStatistics(StatisticsBean obj);
 	
 	public List<StatisticsBean> selectCheckedTimes(StatisticsBean obj);
+	
+	public List<StatisticsBean> selectFeeStationCheckNum(StatisticsBean obj);
+	
+	public List<StatisticsBean> selectFeeStationCheckedScore(StatisticsBean obj);
    
+	public List<StatisticsBean> selectFeeStationCheckedPersonScoreDetail(StatisticsBean obj);
 }

+ 5 - 1
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/cluster/DepartmentMapper.xml

@@ -90,6 +90,10 @@
         id =#{id} or parentid=#{id}
     </delete>
 
-
+	<select id="selectFeeStationGroup" resultType="com.xintong.visualinspection.bean.StatisticsBean"  >
+		SELECT COUNT(1) AS people_num,s.ORGAN_ID AS dept_id, s.name from t_sys_users t 
+			       LEFT JOIN t_br_layer_fee_station s ON t.ORGANID = s.ORGAN_ID
+			WHERE t.POSITIONID =1 AND s.ORGAN_ID IS NOT NULL GROUP BY s.ORGAN_ID 
+	</select>
     
 </mapper>

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

@@ -29,5 +29,35 @@
     	GROUP BY t.checked_person
     </select>
     
+    <select id="selectFeeStationCheckNum" parameterType="com.xintong.visualinspection.bean.StatisticsBean" resultType="com.xintong.visualinspection.bean.StatisticsBean">
+    	SELECT COUNT(DISTINCT( t.checked_person )) AS check_num ,t.checked_dept AS dept_id FROM check_task  t
+    	WHERE 1=1
+    		<if test="start_date!=null and end_date != null">
+		        AND	 t.start_time &gt;= #{start_date} AND t.end_time &lt;= #{end_date} 
+			</if>
+    	 GROUP BY t.checked_dept
+    </select>
+    
+    <select id="selectFeeStationCheckedScore" parameterType="com.xintong.visualinspection.bean.StatisticsBean" resultType="com.xintong.visualinspection.bean.StatisticsBean">
+    	SELECT sum(t.score) AS score ,t.checked_dept AS dept_id 
+    		FROM check_score t 
+    		WHERE 1=1
+    		<if test="start_date!=null and end_date != null">
+		        AND	 t.start_time &gt;= #{start_date} AND t.end_time &lt;= #{end_date} 
+			</if>
+    		GROUP BY t.checked_dept,t.checked_person
+    </select>
+    
+    <select id="selectFeeStationCheckedPersonScoreDetail" parameterType="com.xintong.visualinspection.bean.StatisticsBean" resultType="com.xintong.visualinspection.bean.StatisticsBean">
+    	SELECT  u.checked_person AS user_id , u.checked_dept AS dept_id ,u.parent_id AS item_id ,sum(u.score) AS score ,s.name  FROM (
+			SELECT t.checked_person , t.checked_dept,ci.parent_id, t.score  FROM check_score t 
+			LEFT JOIN check_item ci ON t.check_item_id = ci.id
+			WHERE 1=1
+			<if test="start_date!=null and end_date != null">
+		        AND	 t.start_time &gt;= #{start_date} AND t.end_time &lt;= #{end_date} 
+			</if>
+			 )
+			u LEFT JOIN check_item s ON u.parent_id = s.id GROUP  BY checked_person,id
+    </select>
     
 </mapper>

+ 4 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/StatisticsService.java

@@ -23,4 +23,8 @@ public interface StatisticsService {
    
 	public List<StatisticsBo> getEmployeeCheckedInfo(StatisticsBean obj);
 	
+	public List<StatisticsBean> getFeeStationCheckedScore(StatisticsBean obj);
+	
+	public List<StatisticsBean> getFeeStationCheckItemScore(StatisticsBean obj);
+	
 }

+ 45 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/StatisticsServiceImpl.java

@@ -15,6 +15,7 @@ import org.springframework.stereotype.Service;
 import com.xintong.visualinspection.bean.StatisticsBean;
 import com.xintong.visualinspection.bean.StatisticsBo;
 import com.xintong.visualinspection.bean.User;
+import com.xintong.visualinspection.dao.cluster.DepartmentDao;
 import com.xintong.visualinspection.dao.master.StatisticsDao;
 import com.xintong.visualinspection.service.BaseService;
 import com.xintong.visualinspection.service.StatisticsService;
@@ -32,6 +33,9 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
     @Autowired
     private StatisticsDao statisticsDao ;
     
+    @Autowired
+    private DepartmentDao departmentDao ;
+    
 	@Override
 	public List<StatisticsBo> getEmployeeCheckedInfo(StatisticsBean obj) {
 		// 查看是否有部门id
@@ -87,5 +91,46 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 	
 		return lists;
 	}
+
+	@Override
+	public List<StatisticsBean> getFeeStationCheckedScore(StatisticsBean obj) {
+		// 获取收费站信息收费站人数
+		List<StatisticsBean> lists = departmentDao.selectFeeStationGroup(obj);
+		Map<Long,StatisticsBean> mapStationInfos = new HashMap<>();
+		for(StatisticsBean sta:lists){
+			mapStationInfos.put(sta.getDept_id(), sta);
+		}
+		
+		// 检索受检次数
+		List<StatisticsBean> listCheckNum = statisticsDao.selectFeeStationCheckNum(obj);
+		for(StatisticsBean sta:listCheckNum){
+			if(mapStationInfos.containsKey(sta.getDept_id())){
+				mapStationInfos.get(sta.getDept_id()).setChecked_num(sta.getChecked_num());
+			}
+		}
+		
+		List<StatisticsBean> listCheckedScore = statisticsDao.selectFeeStationCheckedScore(obj);
+		for(StatisticsBean sta:listCheckedScore){
+			if(mapStationInfos.containsKey(sta.getDept_id())){
+				StatisticsBean statis = mapStationInfos.get(sta.getDept_id());
+				statis.setAll_check_score( statis.getAll_check_score()+sta.getScore());
+				if(sta.getScore() <= 15){
+					statis.setScore_fifteen(statis.getScore_fifteen()+1);
+				}else if(sta.getScore()<=50){
+					statis.setScore_fifty(statis.getScore_fifty()+1);
+				}else{
+					statis.setScore_over_fifty(statis.getScore_over_fifty()+1);
+				}
+			}
+		}
+		
+		return new ArrayList<>(mapStationInfos.values());
+	}
+
+	@Override
+	public List<StatisticsBean> getFeeStationCheckItemScore(StatisticsBean obj) {
+		// TODO Auto-generated method stub
+		return null;
+	}
     
 }