huangchengzdm 8 лет назад
Родитель
Сommit
1a7124c050

+ 65 - 0
Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/bean/FwqCheckOther.java

@@ -0,0 +1,65 @@
+package com.xintong.visualinspection.bean;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 文件名:FwqCheckOther
+ * 版本信息:日期:2018/5/2 Copyright 江苏省交通规划设计院 Corporation 2018 版权所有.
+ */
+@Data
+public class FwqCheckOther implements Serializable {
+
+    // pk
+    private Long id;
+    // 服务区id
+    private Long dept_id;
+    // 服务区名称
+    private String organ_name;
+    // 稽查人
+    private Long check_person_id;
+    // 扣分值
+    private Long check_score;
+    // 考核项id
+    private Long check_item_id;
+    // 扣分描述
+    private String remark;
+    // 稽查类型1,2,3,4
+    private Integer check_type;
+    // 附件ids
+    private String file_ids;
+    // 稽查次数
+    private Integer check_num;
+    // 稽查时间
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm",timezone = "GMT+8")
+    private Date check_time;
+    // 稽查月份名称 年/月
+    private String check_time_name;
+    // 删除标志 0 正常,1删除
+    private Integer delete_flag;
+    // 更新时间
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date update_time;
+    // 清障检查类型
+    private Integer wrecker_check_type;
+    // 清障检查类型名称
+    private String wrecker_check_type_name;
+    // 特情稽查类型
+    private Integer special_check_type;
+    // 特情稽查类型名称
+    private String special_check_type_name;
+    // 扣分项名称
+    private String check_item_name;
+    // 扣分类型名
+    private String pcheckname;
+    // 统计时,查询条件(期间)
+    private String check_period;
+    //
+    private String scoretype;
+
+}

+ 40 - 0
Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/bean/FwqCheckOtherStatistics.java

@@ -0,0 +1,40 @@
+package com.xintong.visualinspection.bean;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.HashMap;
+
+/**
+ * 文件名:OtherCheckStatistics
+ * 版本信息:日期:2017/12/20 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@Data
+public class FwqCheckOtherStatistics implements Serializable {
+    private String deptid;
+    private String pdeptid;
+    private String deptname;
+    private String pdeptname;
+    private HashMap<String,Integer> scoremap;
+    private Integer totalcheck;
+    private HashMap<String,HashMap<String,Integer>> scoretypemap;
+    private Integer totalScore;
+    private String level;
+
+
+
+    public void setScoremap(HashMap<String, Integer> scoremap) {
+        this.scoremap = scoremap;
+
+        this.totalScore = 1000;
+        for (Integer i:scoremap.values()
+             ) {
+            this.totalScore-=i;
+        }
+        this.level="优秀";
+        if(this.totalScore<1000 && this.totalScore>=985 ){ this.level="优秀";}
+        if(this.totalScore<985 && this.totalScore>=950 ){ this.level="优良";}
+        if(this.totalScore<950 ){ this.level="合格";}
+    }
+
+}

+ 27 - 0
Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/bean/Item.java

@@ -0,0 +1,27 @@
+package com.xintong.visualinspection.bean;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 文件名:Item
+ * 版本信息:日期:2018/5/2 Copyright 江苏省交通规划设计院 Corporation 2018 版权所有.
+ */
+@Data
+public class Item implements Serializable {
+    //编号
+    private Integer id;
+    //父节点id
+    private Long parent_id;
+    //名称
+    private String name;
+    //内容
+    private String content;
+    //分数
+    private Integer score;
+    //分数类型(奖励--1  or惩罚--2 )
+    private Integer score_type;
+    //考核类型或考核项,1:考核类型;2:考核项
+    private Integer type;
+}

+ 74 - 0
Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/service/CheckOtherService_F.java

@@ -0,0 +1,74 @@
+package com.xintong.visualinspection.service;
+
+import com.xintong.visualinspection.bean.FwqCheckOther;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Map;
+
+public interface CheckOtherService_F {
+
+    /**
+     * 查询第三方暗访稽查数据
+     *
+     * @param page
+     * @param size
+     * @param fwqOtherCheck
+     * @return
+     */
+    Object getAllCheckOther(Integer page, Integer size, FwqCheckOther fwqOtherCheck);
+
+    /**
+     * 新增稽查数据
+     *
+     * @param fwqOtherCheck
+     */
+    void addCheckOther(FwqCheckOther fwqOtherCheck);
+
+    /**
+     * 根据id删除稽查记录
+     *
+     * @param id
+     */
+    void deleteCheckOther(Long id);
+
+    /**
+     * 根据id修改稽查记录
+     *
+     * @param fwqOtherCheck
+     */
+    void updateCheckOther(FwqCheckOther fwqOtherCheck);
+
+    /**
+     * 根据id获取稽查记录
+     *
+     * @param id
+     * @return
+     */
+    FwqCheckOther selectCheckById(Long id);
+
+    /**
+     * 统计数据
+     *
+     * @param fwqOtherCheck
+     * @return
+     */
+    Map<String, Object> getCheckOtherStatistics(FwqCheckOther fwqOtherCheck);
+
+    /**
+     * 统计数据导出
+     *
+     * @param fwqOtherCheck
+     * @param req
+     * @param resp
+     */
+    void getExcel(FwqCheckOther fwqOtherCheck, HttpServletRequest req, HttpServletResponse resp);
+
+    /**
+     * 第三方暗访稽查导出excel
+     * @param fwqOtherCheck
+     * @param req
+     * @param resp
+     */
+    void getOtherCheckExcel(FwqCheckOther fwqOtherCheck, HttpServletRequest req, HttpServletResponse resp);
+}

+ 7 - 0
Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/service/CommonService.java

@@ -1,6 +1,8 @@
 package com.xintong.visualinspection.service;
 
 import com.xintong.visualinspection.bean.Constant;
+import com.xintong.visualinspection.bean.FeeStation;
+import com.xintong.visualinspection.bean.Item;
 import com.xintong.visualinspection.bean.Job;
 import com.xintong.visualinspection.bean.Organ;
 import com.xintong.visualinspection.bean.User;
@@ -19,4 +21,9 @@ public interface CommonService {
     public Map<String,Constant> getCodeMap();
     public Map<String,List<Constant>> getCodeFlagMap();
     public Map<Long,Job> getJobMap();
+    public Map<Long, Item> getItemMap();
+    // 获得考核项(ruleId=21,22,23,24)
+    public List<String> getCheckItemName(Long ruleId);
+    // 获得部门信息,比如SA,RM内容
+    public List<FeeStation> getAllDeptByLayer(String key);
 }

+ 15 - 0
Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/service/ItemService.java

@@ -0,0 +1,15 @@
+package com.xintong.visualinspection.service;
+
+
+import com.xintong.visualinspection.bean.Item;
+
+import java.util.List;
+
+/**
+ * @author huangcheng
+ * @since 2018/5/2
+ */
+public interface ItemService {
+    public List<Item> getAll();
+    public List<String> getCheckItemName(Long id);
+}

+ 161 - 91
Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/util/CacheUtil.java

@@ -1,11 +1,14 @@
 package com.xintong.visualinspection.util;
 
 import com.xintong.visualinspection.bean.Constant;
+import com.xintong.visualinspection.bean.FeeStation;
+import com.xintong.visualinspection.bean.Item;
 import com.xintong.visualinspection.bean.Job;
 import com.xintong.visualinspection.bean.Organ;
 import com.xintong.visualinspection.bean.User;
 import com.xintong.visualinspection.service.ConstantService;
 import com.xintong.visualinspection.service.DepartmentService;
+import com.xintong.visualinspection.service.ItemService;
 import com.xintong.visualinspection.service.JobService;
 import com.xintong.visualinspection.service.UserService;
 import org.slf4j.LoggerFactory;
@@ -17,95 +20,162 @@ import java.util.Map;
 
 public class CacheUtil {
 
-    public static Map<String,String> commonDataMap = new HashMap<String,String>();
-
-	public static Map<Long,User> userMap = new HashMap<Long,User>();
-	
-	public static Map<Long,Organ> deptMap = new HashMap<Long,Organ>();
-	
-	public static Map<String,Constant> codeMap = new HashMap<String,Constant>();
-	
-	public static Map<String,List<Constant>> codeFlagMap = new HashMap<String,List<Constant>>();
-	
-	public static Map<Long,Job> jobMap = new HashMap<Long,Job>();
-	
-	private static final org.slf4j.Logger logger = LoggerFactory.getLogger(CacheUtil.class);
-	
-	public static void refreshCodeMap(ConstantService constantService){
-		//加载用户信息
-		List<Constant> constantList = constantService.getAll();
-		for(Constant c:constantList){
-			CacheUtil.codeMap.put(c.getCode_flag()+"_"+c.getCode_value(), c);
-			List<Constant> list = CacheUtil.codeFlagMap.get(c.getCode_flag());
-			if(list==null) list = new ArrayList<Constant>();
-			list.add(c);
-			CacheUtil.codeFlagMap.put(c.getCode_flag(),list);
-		}
-		logger.info("加载用户信息成功,数据数:"+CacheUtil.userMap.size());
-	}
-	
-	public static void refreshUserMap(UserService userService){
-		//加载用户信息
-		List<User> userList = userService.getAll();
-		for(User user:userList){
-			CacheUtil.userMap.put(new Long(user.getId()), user);
-		}
-		logger.info("加载用户信息成功,数据数:"+CacheUtil.userMap.size());
-	}
-	
-	public static void refreshDeptMap(DepartmentService deptService){
-		//加载部门信息
-		List<Organ> deptList = deptService.getAll();
-		for(Organ organ:deptList){
-			CacheUtil.deptMap.put(new Long(organ.getId()), organ);
-		}
-		logger.info("加载部门信息成功,数据数:"+CacheUtil.deptMap.size());
-	}
-	
-	public static void refreshJobMap(JobService jobService){
-		//加载用户信息
-		Job j = new Job();
-		j.setDept_id(1L);
-		List<Job> jobList = jobService.getJobList(j);
-		for(Job job:jobList){
-			CacheUtil.jobMap.put(new Long(job.getId()), job);
-		}
-		logger.info("加载用户信息成功,数据数:"+CacheUtil.userMap.size());
-	}
-	
-	public static User getUserFromMap(Long key){
-		if(key == null) return null;
-		return  CacheUtil.userMap.get(key);
-	}
-	
-	public static String getUserTurenameFromMap(Long key){
-		if(getUserFromMap(key)!=null && key!=null){
-			return getUserFromMap(key).getTruename();
-		}
-		return null;
-	}
-	
-	public static Organ getOrganFromMap(Long key){
-		if(key == null) return null;
-		return  CacheUtil.deptMap.get(key);
-	}
-	
-	public static String getOrgannameFromMap(Long key){
-		if(getOrganFromMap(key)!=null){
-			return getOrganFromMap(key).getOrganname();
-		}
-		return null;
-	}
-	
-	public static Job getJobFromMap(Long key){
-		if(key == null) return null;
-		return  CacheUtil.jobMap.get(key);
-	}
-	
-	public static String getJobnameFromMap(Long key){
-		if(getJobFromMap(key)!=null){
-			return getJobFromMap(key).getName();
-		}
-		return null;
-	}
+    public static Map<String, String> commonDataMap = new HashMap<String, String>();
+
+    public static Map<Long, User> userMap = new HashMap<Long, User>();
+
+    public static Map<Long, Organ> deptMap = new HashMap<Long, Organ>();
+
+    public static Map<String, Constant> codeMap = new HashMap<String, Constant>();
+
+    public static Map<String, List<Constant>> codeFlagMap = new HashMap<String, List<Constant>>();
+
+    public static Map<Long, Job> jobMap = new HashMap<Long, Job>();
+
+    public static Map<Long, Item> itemMap = new HashMap<Long, Item>();
+
+    public static Map<Long, List<String>> itemNameMap = new HashMap<Long, List<String>>();
+
+    public static Map<String, List<FeeStation>> allDeptMap = new HashMap<String, List<FeeStation>>();
+
+    private static final org.slf4j.Logger logger = LoggerFactory.getLogger(CacheUtil.class);
+
+    public static void refreshCodeMap(ConstantService constantService) {
+        //加载用户信息
+        List<Constant> constantList = constantService.getAll();
+        for (Constant c : constantList) {
+            CacheUtil.codeMap.put(c.getCode_flag() + "_" + c.getCode_value(), c);
+            List<Constant> list = CacheUtil.codeFlagMap.get(c.getCode_flag());
+            if (list == null) {
+                list = new ArrayList<Constant>();
+            }
+            list.add(c);
+            CacheUtil.codeFlagMap.put(c.getCode_flag(), list);
+        }
+        logger.info("加载CODE信息成功,数据数:" + CacheUtil.codeFlagMap.size());
+    }
+
+    public static void refreshUserMap(UserService userService) {
+        //加载用户信息
+        List<User> userList = userService.getAll();
+        for (User user : userList) {
+            CacheUtil.userMap.put(new Long(user.getId()), user);
+        }
+        logger.info("加载用户信息成功,数据数:" + CacheUtil.userMap.size());
+    }
+
+    public static void refreshDeptMap(DepartmentService deptService) {
+        //加载部门信息
+        List<Organ> deptList = deptService.getAll();
+        for (Organ organ : deptList) {
+            CacheUtil.deptMap.put(new Long(organ.getId()), organ);
+        }
+        logger.info("加载部门信息成功,数据数:" + CacheUtil.deptMap.size());
+    }
+
+    public static void refreshJobMap(JobService jobService) {
+        //加载用户信息
+        Job j = new Job();
+        j.setDept_id(1L);
+        List<Job> jobList = jobService.getJobList(j);
+        for (Job job : jobList) {
+            CacheUtil.jobMap.put(new Long(job.getId()), job);
+        }
+        logger.info("加载职位信息成功,数据数:" + CacheUtil.jobMap.size());
+    }
+
+    public static void refreshItemMap(ItemService itemService) {
+        //加载部门信息
+        List<Item> itemList = itemService.getAll();
+        for (Item checkItem : itemList) {
+            CacheUtil.itemMap.put(new Long(checkItem.getId()), checkItem);
+        }
+        logger.info("加载考核项信息成功,数据数:" + CacheUtil.itemMap.size());
+    }
+
+    public static void refreshItemNameMap(ItemService itemService) {
+        List<Long> list = new ArrayList<Long>();
+        list.add(21L);// 第三方暗访
+        list.add(22L);// 特情稽查
+        list.add(23L);// 现场检查
+        list.add(24L);// 数据平台应用
+        for (Long id : list) {
+            List<String> itemList = itemService.getCheckItemName(id);
+            CacheUtil.itemNameMap.put(id, itemList);
+            logger.info("加载ruleId={},查询考核项信息成功,数据数:{}", id, CacheUtil.itemNameMap.size());
+        }
+    }
+
+    public static void refreshSAList(DepartmentService deptService) {
+        List<FeeStation> saList = deptService.getAllSA();
+        List<FeeStation> rmList = deptService.getAllRM();
+        CacheUtil.allDeptMap.put("SA", saList);
+        CacheUtil.allDeptMap.put("RM", rmList);
+        logger.info(CacheUtil.allDeptMap.toString());
+        logger.info("加载所有服务区,道管信息成功,数据list数:{}", CacheUtil.allDeptMap.size());
+    }
+
+    public static User getUserFromMap(Long key) {
+        if (key == null) {
+            return null;
+        }
+        return CacheUtil.userMap.get(key);
+    }
+
+    public static String getUserTurenameFromMap(Long key) {
+        if (getUserFromMap(key) != null && key != null) {
+            return getUserFromMap(key).getTruename();
+        }
+        return null;
+    }
+
+    public static Organ getOrganFromMap(Long key) {
+        if (key == null) {
+            return null;
+        }
+        return CacheUtil.deptMap.get(key);
+    }
+
+    public static String getOrgannameFromMap(Long key) {
+        if (getOrganFromMap(key) != null) {
+            return getOrganFromMap(key).getOrganname();
+        }
+        return null;
+    }
+
+    public static Job getJobFromMap(Long key) {
+        if (key == null) {
+            return null;
+        }
+        return CacheUtil.jobMap.get(key);
+    }
+
+    public static String getJobnameFromMap(Long key) {
+        if (getJobFromMap(key) != null) {
+            return getJobFromMap(key).getName();
+        }
+        return null;
+    }
+
+    public static Item getItemFromMap(Long key) {
+        if (key == null) {
+            return null;
+        }
+        return CacheUtil.itemMap.get(key);
+    }
+
+    public static String getItemNameFromMap(Long key) {
+        if (getItemFromMap(key) != null) {
+            return getItemFromMap(key).getName();
+        }
+        return null;
+    }
+
+    public static List<String> getItemNameList(Long key) {
+        return CacheUtil.itemNameMap.get(key);
+    }
+
+    public static List<FeeStation> getDeptByLayerFromMap(String key) {
+        return CacheUtil.allDeptMap.get(key);
+    }
 }