Commit c7518606 authored by 李秀明's avatar 李秀明

Merge remote-tracking branch 'origin/develop_dl_bugfix_0723' into develop_dl_bugfix_0723

parents c0c70725 be45102f
......@@ -1695,14 +1695,31 @@
( CASE a.peopleType WHEN '1601' THEN '驻站消防员' WHEN '1602' THEN '运维人员' END ) AS peopleType,
(
CASE
WHEN a.peopleType = '1601' THEN
IFNULL((
SELECT
concat( fp.post_qualification_code, ',' ) REGEXP concat( REPLACE ( '1421,1422,1423,1424,1425,1823,1824,1825,1826,1827', ',', ',|' ), ',' )), 0)
WHEN a.peopleType = '1602' THEN
IFNULL((SELECT concat( fp.post_qualification_code, ',' ) REGEXP concat( REPLACE ( '1427,1428,1429,1430,1431', ',', ',|' ), ',' )), 0) END
(
IF
((
SELECT
concat( fp.post_qualification_code, ',' ) REGEXP concat( REPLACE ( '1427,1428,1429,1430,1431', ',', ',|' ), ',' )) > 0,
1,
0
)
)
WHEN a.peopleType = '1601' THEN
(
IF
(
(
concat( fp.post_qualification_code, ',' ) REGEXP concat( REPLACE ( '1823,1824,1825,1826,1827', ',', ',|' ), ',' ) > 0
AND concat( fp.post_qualification_code, ',' ) REGEXP concat( REPLACE ( '1421,1422,1423,1424,1425', ',', ',|' ), ',' ) > 0
),
1,
0
)) ELSE 0
END
) AS isOk,
fp.post_qualification_code AS qualificationCode
fp.post_qualification_code AS qualificationCode,
fp.post_qualification as qualificationName
FROM
(
SELECT
......
......@@ -83,7 +83,7 @@ public class PluginInterceptor implements Interceptor {
field.set(boundSql, sql);
return executor.query(mappedStatement, parameter, rowBounds, resultHandler, cacheKey, boundSql);
} else if ("com.yeejoin.equipmanage.mapper.FireFightingSystemMapper.getSystemInfoPage".equals(id) ||
"com.yeejoin.equipmanage.mapper.EmergencyMapper.alarmList".equals(id)) {
"com.yeejoin.equipmanage.mapper.EmergencyMapper.alarmList".equals(id) || "com.yeejoin.equipmanage.mapper.CarMapper.getCarInfoPage".equals(id)) {
//执行结果
String sortField = "";
if (parameter instanceof HashMap) {
......
......@@ -3921,28 +3921,6 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
peopleTypeCode = "ZZXFY".equalsIgnoreCase(peopleTypeCode) ? "1601" : "YWRY".equalsIgnoreCase(peopleTypeCode) ? "1602" : "";
}
IPage<Map<String, Object>> iPage = this.baseMapper.getPage(page, bizOrgCode, peopleTypeCode);
iPage.getRecords().stream().forEach(e->{
StringBuilder cardNames = new StringBuilder("");
List<String> codes = Arrays.asList(String.valueOf(e.get("qualificationCode")).split(","));
if (CollectionUtils.isNotEmpty(codes)) {
for (String code : codes) {
if (YJJYY.contains(code)) {
cardNames.append("应急救援员证");
cardNames.append(",");
} else if (ZCXFGCS.contains(code)) {
cardNames.append("注册消防工程师证");
cardNames.append(",");
} else if (XFY.contains(code)) {
cardNames.append("消防员证");
cardNames.append(",");
} else if (XFSSCZY.contains(code)) {
cardNames.append("消防设施操作员证");
cardNames.append(",");
}
}
}
e.put("qualificationName", cardNames.length() > 0 ? cardNames.substring(0, cardNames.length() - 1) : "");
});
return iPage;
}
......
......@@ -68,12 +68,17 @@ public class CarStatisticController extends AbstractBaseController {
@RequestMapping(value = "/page", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "获取车辆分页", notes = "获取车辆分页")
public ResponseModel getCarInfoPage(CommonPageable commonPageable, @RequestParam(required = false) String bizOrgCode,
@RequestParam(required = false) String carNum) {
@RequestParam(required = false) String sorter) {
if (commonPageable.getPageNumber() == 0) {
commonPageable.setPageNumber(1);
}
Page page = new Page<>(commonPageable.getPageNumber(), commonPageable.getPageSize());
Page<Map<String, Object>> page1 = carMapper.getCarInfoPage(page, bizOrgCode, carNum);
String sortField = "", sortOrder = "";
if (org.springframework.util.StringUtils.hasText(sorter)) {
sortField = sorter.split("@")[0];
sortOrder = sorter.split("@")[1];
}
Page<Map<String, Object>> page1 = carMapper.getCarInfoPage(page, bizOrgCode, sortField, sortOrder);
return CommonResponseUtil.success(page1);
}
......
......@@ -94,7 +94,7 @@ public interface CarMapper extends BaseMapper<Car> {
@Update("update wl_car set latitude = #{latitude} , longitude = #{longitude} where iot_code = #{iotCode}")
void updateCarLocationByIotCode(String iotCode,Double latitude,Double longitude);
Page<Map<String, Object>> getCarInfoPage(Page page, @Param("bizOrgCode") String bizOrgCode, @Param("carNum") String carNum);
Page<Map<String, Object>> getCarInfoPage(Page page, @Param("bizOrgCode") String bizOrgCode, @Param("sortField") String sortField, @Param("sortOrder") String sortOrder);
Page<Map<String, Object>> getStationCarInfoPage(Page page, @Param("bizOrgCode") String bizOrgCode);
}
......@@ -747,11 +747,15 @@
</where>
GROUP BY wc.biz_org_code
) d
<if test="carNum!=null and carNum !='' and carNum=1">
ORDER BY d.fireCar DESC
</if>
<if test="carNum!=null and carNum !='' and carNum=0">
ORDER BY d.fireCar ASC
<if test="sortField != null and sortField != ''">
<choose>
<when test="sortOrder == 'ascend'">
ORDER BY @SORT_FIELD ASC
</when>
<otherwise>
ORDER BY @SORT_FIELD DESC
</otherwise>
</choose>
</if>
</select>
......
......@@ -7204,6 +7204,7 @@
AND wes.biz_org_code LIKE CONCAT(#{bizOrgCode},'%')
</if>
</where>
GROUP BY wes.id
</select>
<select id="getSystemAlarmNum" resultType="Map">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment