Commit 7cdbdf0d authored by 李成龙's avatar 李成龙

Merge branch 'developer' of http://172.16.10.76/moa/amos-boot-biz into developer

parents 6a26a690 35ba3b18
......@@ -3,6 +3,9 @@ package com.yeejoin.amos.boot.module.common.api.service;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.module.common.api.dto.DutyCarDto;
import java.util.List;
import java.util.Map;
/**
* @author DELL
*/
......@@ -30,4 +33,5 @@ public interface IDutyCarService extends IDutyCommonService {
*/
JSONObject isFireCarDriver();
int getDutyCarCount(Long carId);
List<Map<String, Object>> getDutyCaruser(Long carId);
}
......@@ -144,6 +144,15 @@ select * from (
cd.FIELD_VALUE
END
) AS #{equipmentId},
MAX(
CASE
WHEN cd.FIELD_CODE = 'userName' THEN
cd.FIELD_VALUE
END
) AS 'userName',
MAX(
CASE
WHEN cd.FIELD_CODE = #{equipmentName} THEN
......
......@@ -1104,6 +1104,7 @@ public class CommandController extends BaseController {
if (e.get("carState").equals("在位")) {
e.put("carState", FireCarStatusEnum.执勤.getName());
}
String sequenceNbr = e.get("sequenceNbr").toString();
//同步力量调派车辆任务状态
alertFormValue.stream().forEach(v -> {
......@@ -1470,12 +1471,21 @@ public class CommandController extends BaseController {
powerTransferCompanyResources = powerTransferCompanyResourcesService.getByAlertCalledIdCarId(alertCalledId, carid);
// 随车人员
List<PowerData> powerDataOne = powerTransferMapper.getPowerDataOne(carid);
if(!ValidationUtil.isEmpty(powerDataOne)) {
// List<PowerData> powerDataOne = powerTransferMapper.getPowerDataOne(carid);
List<Map<String, Object>> equipmentList = iDutyCarService.getDutyCaruser(carid);
if(!ValidationUtil.isEmpty(equipmentList)) {
String str = "";
String newStr = "";
for(int i = 0; i < powerDataOne.size(); i++ ) {
newStr = str.concat(powerDataOne.get(i).getPostTypeName()).concat(":").concat(powerDataOne.get(i).getUser());
for(int i = 0; i < equipmentList.size(); i++ ) {
if(i==equipmentList.size()-1){
newStr = str.concat(equipmentList.get(i).get("userName")+"");
}else{
newStr = str.concat(equipmentList.get(i).get("userName")+",");
}
}
powerTransferCompanyResources.setPw(newStr);
} else {
......
......@@ -238,4 +238,16 @@ public class DutyCarServiceImpl extends DutyCommonServiceImpl implements IDutyCa
return count;
}
@Override
public List<Map<String, Object>> getDutyCaruser(Long carId) {
List<Map<String, Object>> equipmentList = dutyPersonShiftMapper.getEquipmentForSpecifyDate(DateUtils.getDateNowShortStr(),
this.getGroupCode(), "carId", "carName", "teamName","");
equipmentList = equipmentList.stream().filter((e) ->
e.containsKey("carId") && e.get("carId").equals(Long.toString(carId))
).collect(Collectors.toList());
return equipmentList;
}
}
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