Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
a44c3537
Commit
a44c3537
authored
Apr 07, 2022
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成需求
parent
1efb8429
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
123 additions
and
4 deletions
+123
-4
EquipFeignClient.java
...n/amos/boot/module/common/api/feign/EquipFeignClient.java
+11
-0
CarController.java
...ava/com/yeejoin/equipmanage/controller/CarController.java
+13
-0
CarPropertyMapper.java
...ava/com/yeejoin/equipmanage/mapper/CarPropertyMapper.java
+3
-0
ICarPropertyService.java
.../com/yeejoin/equipmanage/service/ICarPropertyService.java
+5
-0
CarPropertyServiceImpl.java
...join/equipmanage/service/impl/CarPropertyServiceImpl.java
+12
-0
PowerTransferServiceImpl.java
...module/jcs/biz/service/impl/PowerTransferServiceImpl.java
+22
-3
CarPropertyMapper.xml
...tem-equip/src/main/resources/mapper/CarPropertyMapper.xml
+25
-0
jcs-1.0.0.0.xml
...ystem-jcs/src/main/resources/db/changelog/jcs-1.0.0.0.xml
+32
-1
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/feign/EquipFeignClient.java
View file @
a44c3537
...
...
@@ -5,6 +5,7 @@ import java.util.List;
import
java.util.Map
;
import
com.yeejoin.amos.boot.module.common.api.dto.CarInfoDto
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
...
@@ -12,6 +13,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -107,6 +110,14 @@ public interface EquipFeignClient {
/**
* 根据id查询车辆车载水量及泡沫量
*
* @param carIds
* @return
*/
@RequestMapping
(
value
=
"/car/peoperty"
,
method
=
RequestMethod
.
POST
)
ResponseModel
<
Map
<
String
,
Object
>>
getCarPropertyByCarIds
(
@RequestBody
List
<
Long
>
carIds
);
/**
* 获取个队伍下车辆统计
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/CarController.java
View file @
a44c3537
...
...
@@ -378,6 +378,19 @@ public class CarController extends AbstractBaseController {
}
/**
* 根据id查询
*
* @param carIds
* @return
*/
@RequestMapping
(
value
=
"/peoperty"
,
method
=
RequestMethod
.
POST
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"根据id查询"
,
notes
=
"根据id查询"
)
public
Map
<
String
,
Object
>
getCarPropertyByCarIds
(
@RequestBody
List
<
Long
>
carIds
)
{
return
iCarPropertyService
.
getCarPropertyByCarIds
(
carIds
);
}
/**
* 根据id查询车辆详情信息
*
* @param id
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/CarPropertyMapper.java
View file @
a44c3537
...
...
@@ -7,6 +7,7 @@ import com.yeejoin.equipmanage.common.entity.vo.CarPropertyVo;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
/**
* Mapper 接口
...
...
@@ -33,4 +34,6 @@ public interface CarPropertyMapper extends BaseMapper<CarProperty> {
List
<
CarPropertyVo
>
getCarPropertyList
(
CarIndexVo
carIndexVo
);
List
<
CarPropertyVo
>
getCarPropertyListByCarIds
(
@Param
(
"list"
)
List
<
Long
>
carIds
);
Map
<
String
,
Object
>
getCarPropertyByCarIds
(
List
<
Long
>
carIds
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/ICarPropertyService.java
View file @
a44c3537
...
...
@@ -6,6 +6,7 @@ import com.yeejoin.equipmanage.common.entity.vo.CarIndexVo;
import
com.yeejoin.equipmanage.common.entity.vo.CarPropertyVo
;
import
java.util.List
;
import
java.util.Map
;
/**
* 服务类
...
...
@@ -25,4 +26,8 @@ public interface ICarPropertyService extends IService<CarProperty> {
List
<
CarPropertyVo
>
getCarPropertyList
(
CarIndexVo
carIndexVo
);
List
<
CarPropertyVo
>
getCarPropertyListByCarIds
(
List
<
Long
>
carIds
);
Map
<
String
,
Object
>
getCarPropertyByCarIds
(
List
<
Long
>
carIds
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/CarPropertyServiceImpl.java
View file @
a44c3537
...
...
@@ -10,7 +10,9 @@ import com.yeejoin.equipmanage.service.ICarPropertyService;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 服务实现类
...
...
@@ -48,4 +50,14 @@ public class CarPropertyServiceImpl extends ServiceImpl<CarPropertyMapper, CarPr
return
Lists
.
newArrayList
();
}
}
public
Map
<
String
,
Object
>
getCarPropertyByCarIds
(
List
<
Long
>
carIds
)
{
Map
<
String
,
Object
>
carPropertyByCarIds
=
carPropertyMapper
.
getCarPropertyByCarIds
(
carIds
);
if
(
carPropertyByCarIds
!=
null
&&
!
carPropertyByCarIds
.
isEmpty
())
{
return
carPropertyByCarIds
;
}
else
{
return
new
HashMap
<>();
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/PowerTransferServiceImpl.java
View file @
a44c3537
...
...
@@ -802,11 +802,13 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe
// 车载器材统计
fireAgentOnCarCount
(
totalCarList
,
arrivedCarList
,
resourceStatistics
,
"equipment"
,
"equip"
);
// TODO 车载水量统计
carCount
(
arrivedCarList
,
resourceStatistics
,
carTotal
,
"water"
);
// 车载药剂统计 车载水量统计
waterCount
(
carIdList
,
resourceStatistics
,
carTotal
,
"water"
);
// carCount(arrivedCarList, resourceStatistics, carTotal, "water");
// 车载药剂统计
fireAgentOnCarCount
(
totalCarList
,
arrivedCarList
,
resourceStatistics
,
"fireAgent"
,
"medicament"
);
/* fireAgentOnCarCount(totalCarList, arrivedCarList, resourceStatistics, "fireAgent", "medicament");*/
return
resourceStatistics
;
}
...
...
@@ -818,6 +820,23 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe
resourceStatistics
.
put
(
jsoKey
,
car
);
}
//泡沫和水车载统计
public
void
waterCount
(
List
<
Long
>
carIds
,
JSONObject
resourceStatistics
,
double
carTotal
,
String
jsoKey
)
{
JSONObject
obj
=
new
JSONObject
();
// 泡沫和水车载统计 获取调用车辆的车载资源
ResponseModel
<
Map
<
String
,
Object
>>
carPropertyByCarIds
=
equipFeignService
.
getCarPropertyByCarIds
(
carIds
);
obj
.
put
(
"total"
,
carTotal
);
obj
.
put
(
"count"
,
carPropertyByCarIds
.
getResult
().
get
(
"waterNum"
));
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"total"
,
carTotal
);
jsonObject
.
put
(
"count"
,
carPropertyByCarIds
.
getResult
().
get
(
"foamNum"
));
resourceStatistics
.
put
(
"medicament"
,
jsonObject
);
resourceStatistics
.
put
(
jsoKey
,
obj
);
}
public
void
dutyPersonCount
(
List
<
Long
>
carIdList
,
List
<
Long
>
arrivedCarIdList
,
JSONObject
resourceStatistics
)
{
// 当前时间所在班次
List
<
Long
>
shiftIdList
=
dutyCarService
.
getDutyShiftIdList
();
...
...
amos-boot-system-equip/src/main/resources/mapper/CarPropertyMapper.xml
View file @
a44c3537
...
...
@@ -72,4 +72,29 @@
</if>
</where>
</select>
<select
id=
"getCarPropertyByCarIds"
resultType=
"map"
>
SELECT
sum( VALUE ) as foamNum,
b.waterNum as waterNum
FROM
`wl_car_property`,
(SELECT
sum( VALUE ) as waterNum
FROM
`wl_car_property`
WHERE
car_id IN
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
AND equipment_index_key = '119car_full_water') b
WHERE
car_id IN
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
AND equipment_index_key = '119car_Fire_foam'
</select>
</mapper>
amos-boot-system-jcs/src/main/resources/db/changelog/jcs-1.0.0.0.xml
View file @
a44c3537
...
...
@@ -2840,8 +2840,39 @@
</sql>
</changeSet>
<changeSet
author=
"chenzhao"
id=
"2022-04-02-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<tableExists
tableName=
"cb_data_dictionary"
/>
</preConditions>
<comment>
update data cb_data_dictionary
</comment>
<sql>
UPDATE `cb_data_dictionary` SET name = '二级单位' WHERE sequence_nbr= 370;
UPDATE `cb_data_dictionary` SET name = '集团单位' WHERE sequence_nbr= 371;
</sql>
</changeSet>
<changeSet
author=
"chenzhao"
id=
"2022-04-02-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<primaryKeyExists
primaryKeyName=
"sequence_nbr"
tableName=
"cb_data_dictionary"
/>
</not>
</preConditions>
<comment>
insert data cb_data_dictionary
</comment>
<sql>
INSERT INTO `cb_data_dictionary`(`sequence_nbr`, `code`, `name`, `type`, `type_desc`) values (null,'1','重点单位','SFZD','是否重点单位');
INSERT INTO `cb_data_dictionary`(`sequence_nbr`, `code`, `name`, `type`, `type_desc`) values (null,'2','一般单位','SFZD','是否重点单位');
</sql>
</changeSet>
<changeSet
author=
"chenzhao"
id=
"2022-04-06-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<tableExists
tableName=
"cb_dynamic_form_column"
/>
</preConditions>
<comment>
update data cb_data_dictionary
</comment>
<sql>
update cb_dynamic_form_column set field_name = '是否重点单位',field_type = 'radio',column_config = '{"url": "", "data": [], "dict": "SFZD", "type": "dict"}'where sequence_nbr=7;
</sql>
</changeSet>
</databaseChangeLog>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment