From 7931656b17def59e738843eebb13411051e29a39 Mon Sep 17 00:00:00 2001
From: zhangnaisong <2434969829@qq.com>
Date: 星期五, 26 一月 2024 15:13:43 +0800
Subject: [PATCH] 单兵端查看已通过的申请提交
---
ard-work/src/main/java/com/ruoyi/app/application/controller/ArdAppApplicationController.java | 13 +++++++++++++
ard-work/src/main/java/com/ruoyi/app/application/mapper/ArdAppApplicationMapper.java | 2 ++
ard-work/src/main/java/com/ruoyi/app/application/service/impl/ArdAppApplicationServiceImpl.java | 34 +++++++++++++++++++---------------
ard-work/src/main/java/com/ruoyi/app/application/service/IArdAppApplicationService.java | 2 ++
ard-work/src/main/resources/mapper/app/ArdAppApplicationMapper.xml | 8 ++++++++
5 files changed, 44 insertions(+), 15 deletions(-)
diff --git a/ard-work/src/main/java/com/ruoyi/app/application/controller/ArdAppApplicationController.java b/ard-work/src/main/java/com/ruoyi/app/application/controller/ArdAppApplicationController.java
index 47c0851..5b5d0d5 100644
--- a/ard-work/src/main/java/com/ruoyi/app/application/controller/ArdAppApplicationController.java
+++ b/ard-work/src/main/java/com/ruoyi/app/application/controller/ArdAppApplicationController.java
@@ -197,4 +197,17 @@
return AjaxResult.error();
}
}
+
+ @GetMapping("/getSendPositionTrue")
+ @ApiOperation("鍗曞叺绔煡鐪嬮�氳繃鐨勭敵璇�")
+ public AjaxResult getSendPositionTrue() {
+ String soilderId = SecurityUtils.getUserId();
+ try{
+ Map<String,List<Map<String,Object>>> result = ardAppApplicationService.getSendPositionTrue(soilderId);
+ return AjaxResult.success(result);
+ }catch(Exception e){
+ e.printStackTrace();
+ return AjaxResult.error();
+ }
+ }
}
diff --git a/ard-work/src/main/java/com/ruoyi/app/application/mapper/ArdAppApplicationMapper.java b/ard-work/src/main/java/com/ruoyi/app/application/mapper/ArdAppApplicationMapper.java
index c5df2a4..d5a1f0e 100644
--- a/ard-work/src/main/java/com/ruoyi/app/application/mapper/ArdAppApplicationMapper.java
+++ b/ard-work/src/main/java/com/ruoyi/app/application/mapper/ArdAppApplicationMapper.java
@@ -73,6 +73,8 @@
public List<Map<String,Object>> selectArdAppApplicationByCommanderIdTrue(String commanderId);
+ public List<Map<String,Object>> selectArdAppApplicationBySoilderIdTrue(String soilderId);
+
public List<Map<String,Object>> selectArdAppApplicationBySoilderIdFalse(String soilderId);
public int updateSoilderCheckByCommanderIdAndSoilderIdAndType(@Param("soilderId")String soilderId,@Param("commanderId")String commanderId,@Param("applicationType")String applicationType);
diff --git a/ard-work/src/main/java/com/ruoyi/app/application/service/IArdAppApplicationService.java b/ard-work/src/main/java/com/ruoyi/app/application/service/IArdAppApplicationService.java
index 9fd02fb..dbbd192 100644
--- a/ard-work/src/main/java/com/ruoyi/app/application/service/IArdAppApplicationService.java
+++ b/ard-work/src/main/java/com/ruoyi/app/application/service/IArdAppApplicationService.java
@@ -71,6 +71,8 @@
public Map<String,List<Map<String,Object>>> getCheckPositionTrue(String commanderId);
+ public Map<String,List<Map<String,Object>>> getSendPositionTrue(String soilderId);
+
public Map<String,List<Map<String,Object>>> getCheckPositionOwn(String soilderId);
public int approvalCheckPositionOwn(String soilderId,Map<String,String> para);
diff --git a/ard-work/src/main/java/com/ruoyi/app/application/service/impl/ArdAppApplicationServiceImpl.java b/ard-work/src/main/java/com/ruoyi/app/application/service/impl/ArdAppApplicationServiceImpl.java
index 04a2dd7..f259cdf 100644
--- a/ard-work/src/main/java/com/ruoyi/app/application/service/impl/ArdAppApplicationServiceImpl.java
+++ b/ard-work/src/main/java/com/ruoyi/app/application/service/impl/ArdAppApplicationServiceImpl.java
@@ -264,29 +264,32 @@
List<Map<String,Object>> ardAppApplicationList = ardAppApplicationMapper.selectArdAppApplicationByCommanderIdTrue(commanderId);
Date date = new Date();
//鏌ョ湅鎸囨尌绔綅缃敵璇�
- /*List<Map<String, Object>> resultCommanderPosition = new ArrayList();
+ List<Map<String, Object>> resultCommanderPosition = new ArrayList();
+ //鏌ョ湅杞﹁締浣嶇疆鐢宠
+ List<Map<String, Object>> resultSYCarsPosition = new ArrayList();
for(Map<String, Object> map : ardAppApplicationList){
Long interval = date.getTime() - Long.parseLong((String)map.get("begin"));
interval = 24 * 60 * 60 * 1000 - interval;
Long hour = interval / (60 * 60 * 1000);
Long min = (interval - hour * 60 * 60 * 1000) / (60 * 1000);
- map.put("time",hour + "鏃�" + min + "鍒�");
+ Long second = (interval - hour * 60 * 60 * 1000 - min * 60 * 1000) / 1000;
+ map.put("time",hour + "鏃�" + min + "鍒�" + second + "绉�");
if(((String)map.get("applicationType")).equals("Commander")){
resultCommanderPosition.add(map);
- }
- }*/
- //鏌ョ湅杞﹁締浣嶇疆鐢宠
- /*List<Map<String, Object>> resultSYCarsPosition = new ArrayList();
- for(Map<String, Object> map : ardAppApplicationList){
- Long interval = date.getTime() - Long.parseLong((String)map.get("begin"));
- interval = 24 * 60 * 60 * 1000 - interval;
- Long hour = interval / (60 * 60 * 1000);
- Long min = (interval - hour * 60 * 60 * 1000) / (60 * 1000);
- map.put("time",hour + "鏃�" + min + "鍒�");
- if(((String)map.get("applicationType")).equals("SYCar")){
+ }else if(((String)map.get("applicationType")).equals("SYCar")){
resultSYCarsPosition.add(map);
}
- }*/
+ }
+ result.put("commander",resultCommanderPosition);
+ result.put("SYCars",resultSYCarsPosition);
+ return result;
+ }
+
+ @Override
+ public Map<String, List<Map<String, Object>>> getSendPositionTrue(String soilderId) {
+ Map<String, List<Map<String, Object>>> result = new HashMap();
+ List<Map<String,Object>> ardAppApplicationList = ardAppApplicationMapper.selectArdAppApplicationBySoilderIdTrue(soilderId);
+ Date date = new Date();
//鏌ョ湅鎸囨尌绔綅缃敵璇�
List<Map<String, Object>> resultCommanderPosition = new ArrayList();
//鏌ョ湅杞﹁締浣嶇疆鐢宠
@@ -296,7 +299,8 @@
interval = 24 * 60 * 60 * 1000 - interval;
Long hour = interval / (60 * 60 * 1000);
Long min = (interval - hour * 60 * 60 * 1000) / (60 * 1000);
- map.put("time",hour + "鏃�" + min + "鍒�");
+ Long second = (interval - hour * 60 * 60 * 1000 - min * 60 * 1000) / 1000;
+ map.put("time",hour + "鏃�" + min + "鍒�" + second + "绉�");
if(((String)map.get("applicationType")).equals("Commander")){
resultCommanderPosition.add(map);
}else if(((String)map.get("applicationType")).equals("SYCar")){
diff --git a/ard-work/src/main/resources/mapper/app/ArdAppApplicationMapper.xml b/ard-work/src/main/resources/mapper/app/ArdAppApplicationMapper.xml
index 5cf992a..4e3790c 100644
--- a/ard-work/src/main/resources/mapper/app/ArdAppApplicationMapper.xml
+++ b/ard-work/src/main/resources/mapper/app/ArdAppApplicationMapper.xml
@@ -123,6 +123,14 @@
where commander_id = #{commanderId} and state = '1'
</select>
+ <select id="selectArdAppApplicationBySoilderIdTrue" parameterType="java.lang.String" resultType="java.util.Map">
+ select aaa.soilder_id as "soilderId",aaa.commander_id as "commanderId",
+ aaa.reason,aaa.begin,aaa.state,aaa.application_type as "applicationType",
+ su.user_name as "userName",su.nick_name as "nickName" from ard_app_application aaa
+ inner join sys_user su on aaa.commander_id = su.user_id
+ where soilder_id = #{soilderId} and state = '1'
+ </select>
+
<select id="selectArdAppApplicationBySoilderIdFalse" parameterType="java.lang.String" resultType="java.util.Map">
select aaa.soilder_id as "soilderId",aaa.commander_id as "commanderId",
aaa.reason,aaa.begin,aaa.state,aaa.application_type as "applicationType",
--
Gitblit v1.9.3