diff --git a/traffic-back/src/main/java/com/springboot/traffic/controller/trafficController.java b/traffic-back/src/main/java/com/springboot/traffic/controller/trafficController.java index 76e81fa..63da9db 100644 --- a/traffic-back/src/main/java/com/springboot/traffic/controller/trafficController.java +++ b/traffic-back/src/main/java/com/springboot/traffic/controller/trafficController.java @@ -45,4 +45,67 @@ public class trafficController { return result; } + /**获取首页内容*/ + @RequestMapping(value = "/getAllContent", method = {RequestMethod.POST,RequestMethod.GET}) + @ResponseBody + public Map getAllContent(@RequestBody Map param) { + Map result = trafficService.getAllContent(param); + return result; + } + + /**查询违章处理*/ + @RequestMapping(value = "/illegalTreatment", method = {RequestMethod.POST,RequestMethod.GET}) + @ResponseBody + public Map illegalTreatment(@RequestBody Map param) { + Map result = trafficService.illegalTreatment(param); + return result; + } + + /**处理违章处理*/ + @RequestMapping(value = "/handle", method = {RequestMethod.POST,RequestMethod.GET}) + @ResponseBody + public Map handle(@RequestBody Map param) { + Map result = trafficService.handle(param); + return result; + } + + /**查询违章信息*/ + @RequestMapping(value = "/getIllegalInfo", method = {RequestMethod.POST,RequestMethod.GET}) + @ResponseBody + public Map getIllegalInfo(@RequestBody Map param) { + Map result = trafficService.getIllegalInfo(param); + return result; + } + + /**新增车辆挂牌*/ + @RequestMapping(value = "/insertPlateInfo", method = {RequestMethod.POST,RequestMethod.GET}) + @ResponseBody + public Map insertPlateInfo(@RequestBody Map param) { + Map result = trafficService.insertPlateInfo(param); + return result; + } + + /**查询车辆挂牌信息*/ + @RequestMapping(value = "/selectPlateInfo", method = {RequestMethod.POST,RequestMethod.GET}) + @ResponseBody + public Map selectPlateInfo(@RequestBody Map param) { + Map result = trafficService.selectPlateInfo(param); + return result; + } + + /**查询留言*/ + @RequestMapping(value = "/getLeaveMessage", method = {RequestMethod.POST,RequestMethod.GET}) + @ResponseBody + public Map getLeaveMessage(@RequestBody Map param) { + Map result = trafficService.getLeaveMessage(param); + return result; + } + + /**查询留言*/ + @RequestMapping(value = "/insertLeaveMessage", method = {RequestMethod.POST,RequestMethod.GET}) + @ResponseBody + public Map insertLeaveMessage(@RequestBody Map param) { + Map result = trafficService.insertLeaveMessage(param); + return result; + } } diff --git a/traffic-back/src/main/java/com/springboot/traffic/dao/mapping/trafficMapper.xml b/traffic-back/src/main/java/com/springboot/traffic/dao/mapping/trafficMapper.xml index a57f4a6..6115d50 100644 --- a/traffic-back/src/main/java/com/springboot/traffic/dao/mapping/trafficMapper.xml +++ b/traffic-back/src/main/java/com/springboot/traffic/dao/mapping/trafficMapper.xml @@ -12,9 +12,128 @@ #{formName.phone} ) + + + + + + + + + + + + update traffic_illegal_info set status = '1' where id = #{id} + + + + + + + + INSERT INTO traffic_plate_info ( id, create_id, create_time, plate_number, car_brand, qualified_no, car_size, car_type ) + VALUES + ( uuid(),#{createId},now(),#{plateNumber},#{carBrand},#{qualifiedNo},#{carSize},#{carType}) + + + + + + + + INSERT INTO traffic_leave_message ( id,content, create_id, create_time) + VALUES + ( uuid(),#{content},#{createId},now()) + \ No newline at end of file diff --git a/traffic-back/src/main/java/com/springboot/traffic/dao/trafficMapper.java b/traffic-back/src/main/java/com/springboot/traffic/dao/trafficMapper.java index e0be967..100584a 100644 --- a/traffic-back/src/main/java/com/springboot/traffic/dao/trafficMapper.java +++ b/traffic-back/src/main/java/com/springboot/traffic/dao/trafficMapper.java @@ -22,5 +22,34 @@ public interface trafficMapper { */ List> getUser(Map param); + /** + * 获取信息公告 + */ + List> getSchoolNotice(Map param); + /** + * 获取交通资讯 + */ + List> getParentAdvice(Map param); + + /** + * 获取警示教育 + */ + List> getStudentThinking(Map param); + + List> illegalTreatment(Map param); + + int handle(Map param); + + List> getIllegalInfo(Map param); + + List> getScrapInfo(Map param); + + int insertPlateInfo(Map param); + + List> selectPlateInfo(Map param); + + List> getLeaveMessage(Map param); + + int insertLeaveMessage(Map param); } diff --git a/traffic-back/src/main/java/com/springboot/traffic/service/impl/trafficServiceImpl.java b/traffic-back/src/main/java/com/springboot/traffic/service/impl/trafficServiceImpl.java index ca2956e..f16bcdf 100644 --- a/traffic-back/src/main/java/com/springboot/traffic/service/impl/trafficServiceImpl.java +++ b/traffic-back/src/main/java/com/springboot/traffic/service/impl/trafficServiceImpl.java @@ -5,18 +5,19 @@ import com.springboot.traffic.service.trafficService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import javax.annotation.Resource; import java.util.HashMap; import java.util.List; import java.util.Map; @Service public class trafficServiceImpl implements trafficService { - @Autowired + @Resource trafficMapper trafficMapper; /** * 用户注册 - * @param 用户名、密码、手机号 + * @param * @return 成功与否、数据 */ @Override @@ -35,7 +36,7 @@ public class trafficServiceImpl implements trafficService { /** * 用户登录 - * @param 用户名、密码 + * @param * @return 用户是否注册 */ @Override @@ -51,4 +52,121 @@ public class trafficServiceImpl implements trafficService { result.put("data", res); return result; } + @Override + public Map getAllContent(Map param) { + Map result = new HashMap<>(); + Map res = new HashMap<>(); + List> schoolNoticeList = trafficMapper.getSchoolNotice(param); + res.put("schoolNoticeList",schoolNoticeList); + List> parentAdvice = trafficMapper.getParentAdvice(param); + res.put("parentAdvice",parentAdvice); + List> studentThinking = trafficMapper.getStudentThinking(param); + res.put("studentThinking",studentThinking); + result.put("data",res); + result.put("success",true); + return result; + } + + @Override + public Map illegalTreatment(Map param) { + Map result = new HashMap<>(); + List> res = null; + try { + res = trafficMapper.illegalTreatment(param); + } catch (Exception e) { + e.printStackTrace(); + } + result.put("success", true); + result.put("data", res); + return result; + } + + @Override + public Map handle(Map param) { + Map result = new HashMap<>(); + int res = 0; + try { + res = trafficMapper.handle(param); + } catch (Exception e) { + e.printStackTrace(); + } + result.put("success", true); + result.put("data", res); + return result; + } + + @Override + public Map getIllegalInfo(Map param) { + Map result = new HashMap<>(); + List> res = null; + try { + if ("1".equals(param.get("status"))) { + res = trafficMapper.getScrapInfo(param); + } else { + res = trafficMapper.getIllegalInfo(param); + } + } catch (Exception e) { + e.printStackTrace(); + } + result.put("success", true); + result.put("data", res); + return result; + } + + @Override + public Map insertPlateInfo(Map param) { + Map result = new HashMap<>(); + int res = 0; + try { + res = trafficMapper.insertPlateInfo(param); + } catch (Exception e) { + e.printStackTrace(); + } + result.put("success", true); + result.put("data", res); + return result; + } + + @Override + public Map selectPlateInfo(Map param) { + Map result = new HashMap<>(); + List> res = null; + try { + res = trafficMapper.selectPlateInfo(param); + } catch (Exception e) { + e.printStackTrace(); + } + result.put("success", true); + result.put("data", res); + return result; + } + + @Override + public Map getLeaveMessage(Map param) { + Map result = new HashMap<>(); + List> res = null; + try { + res = trafficMapper.getLeaveMessage(param); + } catch (Exception e) { + e.printStackTrace(); + } + result.put("success", true); + result.put("data", res); + return result; + } + + @Override + public Map insertLeaveMessage(Map param) { + Map result = new HashMap<>(); + int res = 0; + try { + res = trafficMapper.insertLeaveMessage(param); + } catch (Exception e) { + e.printStackTrace(); + } + result.put("success", true); + result.put("data", res); + return result; + } + } diff --git a/traffic-back/src/main/java/com/springboot/traffic/service/trafficService.java b/traffic-back/src/main/java/com/springboot/traffic/service/trafficService.java index cfe5a74..542ed8c 100644 --- a/traffic-back/src/main/java/com/springboot/traffic/service/trafficService.java +++ b/traffic-back/src/main/java/com/springboot/traffic/service/trafficService.java @@ -18,5 +18,22 @@ public interface trafficService { */ Map getUser(Map param); + /** + * 获取首页内容 + */ + Map getAllContent(Map param); + Map illegalTreatment(Map param); + + Map handle(Map param); + + Map getIllegalInfo(Map param); + + Map insertPlateInfo(Map param); + + Map selectPlateInfo(Map param); + + Map getLeaveMessage(Map param); + + Map insertLeaveMessage(Map param); } diff --git a/traffic-front/src/App.vue b/traffic-front/src/App.vue index 4149885..72d4843 100644 --- a/traffic-front/src/App.vue +++ b/traffic-front/src/App.vue @@ -11,5 +11,7 @@ export default { diff --git a/traffic-front/src/assets/css/public.css b/traffic-front/src/assets/css/public.css index 8e77aae..10f420e 100644 --- a/traffic-front/src/assets/css/public.css +++ b/traffic-front/src/assets/css/public.css @@ -1,3 +1,17 @@ html{ - overflow-x: hidden; + height: 100%; + overflow-y: overlay; +} +body{ + height: 100%; + padding-right: 17px!important; +} +.pointer{ + cursor: pointer; +} +.them-blue{ + color: #409EFF; +} +.special-them-blue:hover{ + color: #409EFF; } diff --git a/traffic-front/src/assets/img/no-data.png b/traffic-front/src/assets/img/no-data.png new file mode 100644 index 0000000..c2444dd Binary files /dev/null and b/traffic-front/src/assets/img/no-data.png differ diff --git a/traffic-front/src/components/DiscardQuery.vue b/traffic-front/src/components/DiscardQuery.vue index e41b514..df09d76 100644 --- a/traffic-front/src/components/DiscardQuery.vue +++ b/traffic-front/src/components/DiscardQuery.vue @@ -1,9 +1,9 @@