|
|
|
@ -528,6 +528,31 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService {
|
|
|
|
|
return proOrderWorkorderMapper.selectProOrderWorkerderByWorkerIds(workerIds);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 通过子工单code查询并返回所有级联工单
|
|
|
|
|
* @param code
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
@DS("#header.poolName")
|
|
|
|
|
public AjaxResult getWorkOrders(String code) {
|
|
|
|
|
// 创建返回工单列表
|
|
|
|
|
List<ProOrderWorkorder> proOrderWorkorderList = new ArrayList<ProOrderWorkorder>();
|
|
|
|
|
// 查询该工单信息
|
|
|
|
|
ProOrderWorkorder proOrderWorkorder = proOrderWorkorderMapper.selectWorkOrderByCode(code);
|
|
|
|
|
boolean flag = true;
|
|
|
|
|
while (flag) {
|
|
|
|
|
proOrderWorkorderList.add(proOrderWorkorder);
|
|
|
|
|
ProOrderWorkorder workorder = proOrderWorkorderMapper.selectWorkOrderByCode(proOrderWorkorder.getParentOrder());
|
|
|
|
|
if (workorder != null) {
|
|
|
|
|
BeanUtils.copyProperties(workorder,proOrderWorkorder);
|
|
|
|
|
} else {
|
|
|
|
|
flag = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return success(proOrderWorkorderList);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 格式化工单信息(递归处理)
|
|
|
|
|
*
|
|
|
|
|