Commit 5fe57328 authored by 韩桐桐's avatar 韩桐桐

fix(jg):BUG26747 + 打印汇总表只打印状态为【在用】的设备

parent 9e689c92
......@@ -2399,6 +2399,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
for (int i = 0; i < equipmentLists.size(); i++) {
JSONObject equipmentItem = equipmentLists.getJSONObject(i);
equipmentItem.put("useDate", timeToMonths(useDateValue));
// 过滤出目前在用的设备
if(!this.checkEquStatusInUse(equipmentItem.getString("record"))){
equipmentLists.remove(i);
}
}
allEquipment.addAll(equipmentLists);
}
......@@ -2449,6 +2453,17 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
return futureList;
}
/**
* 根据record判断设备状态是否为【在用】
* @param record
* @return
*/
private boolean checkEquStatusInUse(String record) {
IdxBizJgUseInfo useInfo = idxBizJgUseInfoService.lambdaQuery().select(IdxBizJgUseInfo::getEquState).eq(IdxBizJgUseInfo::getRecord, record).one();
return EquimentEnum.ZAIYONG.getCode().toString().equals(useInfo.getEquState());
}
/**
* 导出基本信息汇总表(工业管道/气瓶)
*
......
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