Commit 8d7301e3 authored by chenhao's avatar chenhao

当天车辆排班的次数

parent 48937377
...@@ -27,6 +27,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -27,6 +27,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.common.api.dto.DutyCarDto; import com.yeejoin.amos.boot.module.common.api.dto.DutyCarDto;
import com.yeejoin.amos.boot.module.common.api.service.IDutyCarService; import com.yeejoin.amos.boot.module.common.api.service.IDutyCarService;
import com.yeejoin.amos.boot.module.common.biz.service.impl.DutyCarServiceImpl;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -47,6 +48,8 @@ public class DutyCarController extends BaseController { ...@@ -47,6 +48,8 @@ public class DutyCarController extends BaseController {
@Autowired @Autowired
IDutyCarService iDutyCarService; IDutyCarService iDutyCarService;
@Autowired
DutyCarServiceImpl dutyCarServiceImpl;
/** /**
* 值班列表视图--分页 * 值班列表视图--分页
...@@ -165,5 +168,12 @@ public class DutyCarController extends BaseController { ...@@ -165,5 +168,12 @@ public class DutyCarController extends BaseController {
@ApiParam(value = "岗位") @RequestParam(required = false) String postType){ @ApiParam(value = "岗位") @RequestParam(required = false) String postType){
return ResponseHelper.buildResponse(iDutyCarService.getSchedulingDutyForSpecifyDate(dutyDay,shiftId,postType)); return ResponseHelper.buildResponse(iDutyCarService.getSchedulingDutyForSpecifyDate(dutyDay,shiftId,postType));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation("查询指定日期值班人信息列表")
@GetMapping("/getDutyCarCount")
public ResponseModel getDutyCarCount(
@ApiParam(value = "车辆id") @RequestParam(required = false) String carId
){
return ResponseHelper.buildResponse(dutyCarServiceImpl.getDutyCarCount(carId));
}
} }
\ No newline at end of file
...@@ -219,4 +219,16 @@ public class DutyCarServiceImpl extends DutyCommonServiceImpl implements IDutyCa ...@@ -219,4 +219,16 @@ public class DutyCarServiceImpl extends DutyCommonServiceImpl implements IDutyCa
return detailList; return detailList;
} }
public Object getDutyCarCount(String carId) {
List<Map<String, Object>> equipmentList = dutyPersonShiftMapper.getEquipmentForSpecifyDate(DateUtils.getDateNowShortStr(),
this.getGroupCode(), "carId", "carName", "teamName","result.carId");
int count =0;
for (Map<String, Object> map : equipmentList) {
if(map.containsKey("carId") && map.get("carId").equals(carId)) {
count++;
}
}
return count;
}
} }
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