QRCODE拆分

This commit is contained in:
syruan 2023-12-24 18:02:25 +08:00
parent 88dd16d839
commit 43c3bd1484
5 changed files with 35 additions and 1 deletions

View File

@ -43,6 +43,17 @@ public class LeaseOutDetailsController extends BaseController {
return getDataTable(leaseOutDetailsService.getMaMachineByCode(maCode));
}
/**
* 根据QrCode编码查询设备信息
* @param qrCode 二维码编码
* @return 设备信息
*/
@Log(title = "根据QRcode编码获取设备信息", businessType = BusinessType.QUERY)
@GetMapping("/getMaMachineByQrCode")
public TableDataInfo getMaMachineByQrCode(@RequestParam(value = "qrCode") String qrCode) {
return getDataTable(leaseOutDetailsService.getMaMachineByQrCode(qrCode));
}
/**
* 领料出库对库存处理
* @param record 出库内容

View File

@ -20,4 +20,6 @@ public interface LeaseOutDetailsService {
AjaxResult submitOut(LeaseOutDetails record);
List<MaMachine> getMaMachineByCode(String maCode);
List<MaMachine> getMaMachineByQrCode(String qrCode);
}

View File

@ -92,4 +92,9 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService {
}
@Override
public List<MaMachine> getMaMachineByQrCode(String qrCode) {
return maMachineMapper.getMaMachineByQrCode(qrCode);
}
}

View File

@ -11,6 +11,8 @@ public interface MaMachineMapper {
public List<MaMachine> getMaMachineByCode(String maCode);
public List<MaMachine> getMaMachineByQrCode(String qrCode);
public List<MaMachine> getMaMachineList(MaMachine maMachine);
public int maMachineAdd(MaMachine maMachine);

View File

@ -90,7 +90,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join ma_type mt1 on mt.parent_id = mt1.type_id
left join ma_type mt2 on mt1.parent_id = mt2.type_id
left join ma_label_bind mmb on m.ma_id = mmb.ma_id and m.type_id = mmb.type_id
where m.ma_code = #{maCode} or m.qr_code = #{maCode}
where m.ma_code = #{maCode}
</select>
<select id="getMaMachineByQrCode" parameterType="java.lang.String" resultMap="MaMachineResult">
select m.ma_id, m.type_id, m.ma_code, m.pre_code, m.ma_status, dic.name maStatusName, m.qr_code, m.buy_price, m.ma_vender, m.out_fac_time, m.out_fac_code,
m.assets_code, m.check_man, m.this_check_time, m.next_check_time, m.gps_code, m.rfid_code, m.erp_code, m.transfer_code,
m.in_out_num, m.buy_task, m.own_house ,m.company_id ,mt.type_name specificationType,mt1.type_name deviceType, mt2.type_name itemType,
mmb.label_code labelCode
from ma_machine m
left join (select id,p_id,name from sys_dic where p_id in (select id from sys_dic where value = 'ma_status')) dic on m.ma_status = dic.id
left join ma_type mt on m.type_id = mt.type_id
left join ma_type mt1 on mt.parent_id = mt1.type_id
left join ma_type mt2 on mt1.parent_id = mt2.type_id
left join ma_label_bind mmb on m.ma_id = mmb.ma_id and m.type_id = mmb.type_id
where m.qr_code = #{maCode}
</select>