parent
							
								
									6727f02660
								
							
						
					
					
						commit
						585f330c22
					
				| @ -0,0 +1,65 @@ | ||||
| package com.dsic.gj_erp.controller.kban; | ||||
| 
 | ||||
| import com.dsic.gj_erp.bean.ResultBean; | ||||
| import com.dsic.gj_erp.service.zyjh.ZyjhService; | ||||
| import lombok.AllArgsConstructor; | ||||
| import org.springframework.web.bind.annotation.GetMapping; | ||||
| import org.springframework.web.bind.annotation.RequestMapping; | ||||
| import org.springframework.web.bind.annotation.RestController; | ||||
| 
 | ||||
| import java.util.HashMap; | ||||
| import java.util.List; | ||||
| import java.util.Map; | ||||
| 
 | ||||
| @RestController | ||||
| @RequestMapping("kban") | ||||
| @AllArgsConstructor | ||||
| public class KbanController { | ||||
| 
 | ||||
|     private final ZyjhService zyjhService; | ||||
| 
 | ||||
|     /** | ||||
|      * 各垮计划完成情况 | ||||
|      */ | ||||
|     @GetMapping("gxjhwcqk") | ||||
|     public ResultBean<?> gxjhwcqk(){ | ||||
|         List<Map<String, Object>> gxjhwcqk = zyjhService.gxjhwcqk(); | ||||
|         return new ResultBean<>(gxjhwcqk); | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * 各月份产量(吨) | ||||
|      */ | ||||
|     @GetMapping("gyfcl") | ||||
|     public ResultBean<?> gyfcl(){ | ||||
|         return new ResultBean<>(zyjhService.gyfcl()); | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * 计划完成情况(吨) | ||||
|      */ | ||||
|     @GetMapping("jhwcqk") | ||||
|     public ResultBean<?> jhwcqk(){ | ||||
|         return new ResultBean<>(zyjhService.jhwcqk()); | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * 各垮产量 | ||||
|      */ | ||||
|     @GetMapping("gekuachaliang") | ||||
|     public ResultBean<?> gekuachaliang(){ | ||||
|         return new ResultBean<>(zyjhService.gekuachaliang()); | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * 考勤情况 | ||||
|      */ | ||||
|     @GetMapping("kq") | ||||
|     public ResultBean<?> kq(){ | ||||
|         Map<String,Object> map=new HashMap<>(); | ||||
|         map.put("出勤",283); | ||||
|         map.put("请假",15); | ||||
|         map.put("缺勤",2); | ||||
|         return new ResultBean<>(map); | ||||
|     } | ||||
| } | ||||
| @ -0,0 +1,9 @@ | ||||
| package com.dsic.gj_erp.controller.kban; | ||||
| 
 | ||||
| import lombok.Getter; | ||||
| import lombok.Setter; | ||||
| 
 | ||||
| @Getter | ||||
| @Setter | ||||
| public class dto { | ||||
| } | ||||
| @ -0,0 +1,32 @@ | ||||
| package com.dsic.gj_erp.controller.yuyin; | ||||
| 
 | ||||
| import com.dsic.gj_erp.bean.ResultBean; | ||||
| import com.dsic.gj_erp.wsclient.WebSocketClientComponent; | ||||
| import com.dsic.gj_erp.wsclient.WebSocketService; | ||||
| import lombok.RequiredArgsConstructor; | ||||
| import org.springframework.web.bind.annotation.GetMapping; | ||||
| import org.springframework.web.bind.annotation.RequestMapping; | ||||
| import org.springframework.web.bind.annotation.RestController; | ||||
| import org.springframework.web.socket.WebSocketSession; | ||||
| 
 | ||||
| @RestController | ||||
| @RequestMapping("yuyin") | ||||
| @RequiredArgsConstructor | ||||
| public class YuyinController { | ||||
| 
 | ||||
|     private final WebSocketService socketService; | ||||
| 
 | ||||
|     private final WebSocketClientComponent clientComponent; | ||||
| 
 | ||||
|     /** | ||||
|      * 重连语音上报websocket服务器 | ||||
|      */ | ||||
|     @GetMapping("recon") | ||||
|     public ResultBean<?> recon(){ | ||||
|         WebSocketSession session = socketService.getSession(); | ||||
|         if (session==null){ | ||||
|             clientComponent.init(); | ||||
|         } | ||||
|         return new ResultBean<>(); | ||||
|     } | ||||
| } | ||||
					Loading…
					
					
				
		Reference in new issue