Browse Source

处置调度

develop
wangsixiang 6 months ago
parent
commit
ffba40c835
  1. 4
      zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java
  2. 2
      zc-business/src/main/resources/mapper/business/DcWarningMapper.xml

4
zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java

@ -612,6 +612,7 @@ public class DcWarningServiceImpl implements IDcWarningService
}
@Override
@Transactional(rollbackFor = Exception.class)
public AjaxResult commandAndDispatch(DcWarning dcWarning) {
Map<String, Object> mapAll = new HashMap<>();
HashMap<String, Object> dcDispatch = dcWarningMapper.selectDcDispatch(dcWarning.getId());//查询是否存在调度记录
@ -671,6 +672,7 @@ public class DcWarningServiceImpl implements IDcWarningService
}
//指挥调度,当调度信息为空的时候调用智能分配资源
@Override
@Transactional(rollbackFor = Exception.class)
public AjaxResult intelligentSource(DcWarning dcWarning) {
String stakeMark = dcWarning.getStakeMark();
ArrayList<HashMap<String,Object>> hashMaps = new ArrayList<>();
@ -747,7 +749,7 @@ public class DcWarningServiceImpl implements IDcWarningService
employees = Long.parseLong(map.get("employeesId").toString());//人员
}
Long vehicles=null;
if (map.get("vehiclesId").toString()!=null){
if (map.get("vehiclesId")!=null){
vehicles = Long.parseLong(map.get("vehiclesId").toString());//车辆
}
DcDispatch dcDispatch = new DcDispatch();

2
zc-business/src/main/resources/mapper/business/DcWarningMapper.xml

@ -319,7 +319,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where parent_id!=0
</select>
<select id="selectOrganizationEmployees" resultType="java.util.HashMap">
select id, name,contact_number contactNumber from dc_employees where organization_id=#{organizationId}
select id, name,contact_number contactNumber from dc_employees where organization_id=#{organizationId} and employees_type=1
</select>
<select id="selectShifts" resultType="java.util.HashMap">
select shifts.scheduling,employees.name shiftsName,employees.contact_number shiftsNumber from dc_shifts as shifts

Loading…
Cancel
Save