This commit is contained in:
linfso 2024-10-07 19:23:42 +08:00
parent 45bc2c59fd
commit 042247b507
5 changed files with 46 additions and 0 deletions

View File

@ -271,6 +271,26 @@ public class EmisTmsScanRecordController extends EmisBaseController
}
}
/**
* 查询运单收发到派签最后一条轨迹
* @param billCode
* @return
*/
@GetMapping("/getNormalLastScanRecord")
public AjaxResult getNormalLastScanRecord(String billCode)
{
if(StringUtils.isEmpty(billCode)){
return AjaxResult.error("获取失败");
}
try {
EmisTmsScanRecord lastScanRecord=emisTmsScanRecordService.selectNormalLastScanRecord(billCode);
return AjaxResult.success("查询成功", lastScanRecord);
}catch (Exception ex){
ex.printStackTrace();
return AjaxResult.error("获取失败");
}
}
/**
* 查询TMS扫描记录列表

View File

@ -44,6 +44,8 @@ public interface EmisTmsScanRecordMapper extends BaseMapper<EmisTmsScanRecord>
public EmisTmsScanRecord selectLastRecordBaseInfoByBillCode(String billCode);
public EmisTmsScanRecord selectNormalLastScanRecord(String billCode);
/**
* 查询列表
*

View File

@ -36,6 +36,8 @@ public interface IEmisTmsScanRecordService extends IDataAuditService
public EmisTmsScanRecord selectLastRecord(String billCode);
public EmisTmsScanRecord selectNormalLastScanRecord(String billCode);
/**
* 查询TMS扫描记录列表
*

View File

@ -108,6 +108,19 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
return emisTmsScanRecordMapper.selectLastRecordBaseInfoByBillCode(billCode);
}
/**
* 查询运单收发到派签最后一条扫描记录
* @param billCode
* @return
*/
@Override
public EmisTmsScanRecord selectNormalLastScanRecord(String billCode)
{
return emisTmsScanRecordMapper.selectNormalLastScanRecord(billCode);
}
/**
* 查询TMS扫描记录列表
*

View File

@ -281,6 +281,15 @@
order by create_time desc limit 1
</select>
<!-- 获取订单最后一条扫描记录 -->
<select id="selectNormalLastScanRecord" parameterType="string" resultMap="BaseEmisTmsScanRecordResult">
select id, bill_code, main_bill_code, bl_sub_bill, order_sn, scan_type, pre_or_next_station, pre_or_next_station_code, pre_or_next_station_phone, pre_or_next_man_code, pre_or_next_man_phone, scan_date, scan_man_code, scan_man_phone, scan_man, pre_or_next_man, scan_site, scan_site_code, scan_site_phone, scan_weight, weight, dest_site_code, dest_code, dispatch_or_send_man, dispatch_or_send_man_code, dispatch_or_send_man_phone, sign_date, sign_man, sign_site, sign_site_code, record_man, record_man_code, record_man_phone, record_site_code, car_no, bag_no, truck_man, truck_code, data_from, pic_url, public_trace_info, inner_trace_info, rel_id, status, del_flag, create_by, create_time, update_by, update_time, remark, update_site, create_site
from emis_tms_scan_record a
where del_flag='0' and a.main_bill_code = #{billCode} and scan_type in('10','20','30','40','50')
order by create_time desc limit 1
</select>
<!-- 检查扫描唯一性 -->
<select id="checkSiteScanUnique" parameterType="EmisTmsScanRecord" resultType="int">
select count(1) from emis_tms_scan_record