功能优化

This commit is contained in:
mashuai 2025-09-06 19:37:17 +08:00
parent 1ac2534ff9
commit c9eae46186
4 changed files with 14 additions and 6 deletions

View File

@ -106,4 +106,7 @@ public class BmQrBoxInfo extends BaseEntity
@ApiModelProperty(value = "任务ID")
private String taskId;
@ApiModelProperty("机具类型1机具2安全工器具")
private int jiJuType;
}

View File

@ -589,18 +589,21 @@ public class BmQrBoxServiceImpl implements BmQrBoxService {
if (null == bmQrBoxInfo.getBoxCode() || null == bmQrBoxInfo.getMaTypeId()) {
return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), "标准箱编码或机具类型id不能为空");
}
final List<BmQrBoxInfo> recordList = bmQrBoxMapper.getBoxBindListByCode(bmQrBoxInfo);
List<BmQrBoxInfo> recordList = new ArrayList<>();
List<BmQrBoxInfo> list = bmQrBoxMapper.getBoxBindListByCode(bmQrBoxInfo);
int num = 0;
String msg;
if (CollectionUtil.isNotEmpty(recordList)) {
for (final BmQrBoxInfo qrBoxInfo : recordList) {
if (CollectionUtil.isNotEmpty(list)) {
for (BmQrBoxInfo qrBoxInfo : list) {
if (qrBoxInfo.getMaStatus().equals(MaMachineStatusEnum.IN_STORE.getStatus().toString())) {
recordList.add(qrBoxInfo);
num ++;
}
}
msg = "监测到" + bmQrBoxInfo.getBoxCode() + "标准箱中有" + recordList.size() + "台设备,符合出库条件设备" + num + "台,请确认是否出库!";
msg = "监测到" + bmQrBoxInfo.getBoxCode() + "标准箱中有" + list.size() + "台设备,符合出库条件设备" + num + "台,请确认是否出库!";
} else {
msg = "监测到" + bmQrBoxInfo.getBoxCode() + "标准箱中无符合出库条件的设备,请检查后重新提交!";
recordList = new ArrayList<>();
}
// 返回包含设备列表和消息的结果
final Map<String, Object> result = new HashMap<>(2);

View File

@ -233,7 +233,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mm.ma_id as maId,
mm.ma_code as maCode,
mm.type_id as maTypeId,
mm.ma_status as maStatus
mm.ma_status as maStatus,
mt.jiju_type as jijuType
FROM bm_qrcode_box_bind qb
LEFT JOIN ma_machine mm ON qb.ma_id = mm.ma_id
LEFT JOIN ma_type mt ON mm.type_id = mt.type_id AND mt.del_flag = '0'

View File

@ -347,7 +347,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
case when mm.ma_status = '1' then '在库'
else ''
end as statusName,
mt.manage_type as manageType
mt.manage_type as manageType,
mt.jiju_type as jijuType
FROM ma_machine mm
LEFT JOIN ma_type mt ON mm.type_id = mt.type_id AND mt.del_flag = '0'
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id AND mt1.del_flag = '0'