This commit is contained in:
linfso 2024-06-02 07:39:21 +08:00
parent a0406b433d
commit a0f490a9cd
5 changed files with 70 additions and 13 deletions

View File

@ -85,7 +85,22 @@ public class EmisTmsScanRecordController extends BaseController
public TableDataInfo queryScanStatDataList(EmisTmsScanRecord emisTmsScanRecord)
{
startPage();
List<ScanStatDataInfo> list = emisTmsScanRecordService.queryScanStatDataList(emisTmsScanRecord);
emisTmsScanRecord.getParams().put("thisSiteCode",getLoginUser().getUser().getOwnerSiteCode());
List<ScanStatDataInfo> list = emisTmsScanRecordService.queryScanStatList(emisTmsScanRecord);
return getDataTable(list);
}
/**
* 获取扫描记录统计明细
* @param emisTmsScanRecord
* @return
*/
@GetMapping("/queryScanStatRecordList")
public TableDataInfo queryScanStatRecordList(EmisTmsScanRecord emisTmsScanRecord)
{
startPage();
emisTmsScanRecord.getParams().put("thisSiteCode",getLoginUser().getUser().getOwnerSiteCode());
List<EmisTmsScanRecord> list = emisTmsScanRecordService.queryScanStatRecordList(emisTmsScanRecord);
return getDataTable(list);
}

View File

@ -90,7 +90,8 @@ public interface EmisTmsScanRecordMapper extends BaseMapper<EmisTmsScanRecord>
* @param emisTmsScanRecord
* @return
*/
public List<ScanStatDataInfo> queryScanStatDataList(EmisTmsScanRecord emisTmsScanRecord);
public List<ScanStatDataInfo> queryScanStatList(EmisTmsScanRecord emisTmsScanRecord);
public List<EmisTmsScanRecord> queryScanStatRecordList(EmisTmsScanRecord emisTmsScanRecord);
}

View File

@ -96,10 +96,12 @@ public interface IEmisTmsScanRecordService
/**
* 签收异常对比-扫描统计数据
* 签收异常对比-扫描统计数据,及明细
* @param emisTmsScanRecord
* @return
*/
public List<ScanStatDataInfo> queryScanStatDataList(EmisTmsScanRecord emisTmsScanRecord);
public List<ScanStatDataInfo> queryScanStatList(EmisTmsScanRecord emisTmsScanRecord);
public List<EmisTmsScanRecord> queryScanStatRecordList(EmisTmsScanRecord emisTmsScanRecord);
}

View File

@ -680,8 +680,14 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
* @return
*/
@Override
public List<ScanStatDataInfo> queryScanStatDataList(EmisTmsScanRecord emisTmsScanRecord){
return emisTmsScanRecordMapper.queryScanStatDataList(emisTmsScanRecord);
public List<ScanStatDataInfo> queryScanStatList(EmisTmsScanRecord emisTmsScanRecord){
return emisTmsScanRecordMapper.queryScanStatList(emisTmsScanRecord);
}
@Override
public List<EmisTmsScanRecord> queryScanStatRecordList(EmisTmsScanRecord emisTmsScanRecord) {
return emisTmsScanRecordMapper.queryScanStatRecordList(emisTmsScanRecord);
}
@ -690,5 +696,4 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
}

View File

@ -105,24 +105,58 @@
</select>
<!--获取扫描统计数据-->
<select id="queryScanStatDataList" parameterType="EmisTmsScanRecord" resultMap="ScanStatDataInfoResult">
<select id="queryScanStatList" parameterType="EmisTmsScanRecord" resultMap="ScanStatDataInfoResult">
select scan_site_code ,
count(DISTINCT bill_code) as scan_count,
GROUP_CONCAT(DISTINCT bill_code) as bill_code_str
from emis_tms_scan_record
where del_flag='0' and scan_type=#{scanType} and scan_site_code=#{scanSiteCode}
where del_flag='0'
<if test="scanSiteCode != null and scanSiteCode != ''"> and scan_site_code=#{scanSiteCode}</if>
<if test="scanType != null and scanType != ''"> and scan_type=#{scanType}</if>
<if test="preOrNextStationCode != null and preOrNextStationCode != ''"> and pre_or_next_station_code=#{preOrNextStationCode}</if>
<if test="scanManCode != null and scanManCode != ''"> and scan_man_code=#{scanManCode}</if>
<if test="params.beginScanDate != null and params.beginScanDate != ''">
and scan_date <![CDATA[ >= ]]> #{params.beginScanDate}
</if>
<if test="params.endScanDate != null and params.endScanDate != ''">
and scan_date <![CDATA[ <= ]]> #{params.endScanDate}
</if>
<if test="params.isSubBill != null and params.isSubBill = '1'">
<if test="params.thisSiteScanType != null and params.thisSiteScanType !=''">
and bill_code in(
select bill_code from emis_tms_scan_record where scan_site_code=#{params.thisSiteCode} and scan_type=#{params.thisSiteScanType}
)
</if>
GROUP BY scan_site_code
</select>
<select id="queryScanStatRecordList" parameterType="EmisTmsScanRecord" resultMap="EmisTmsScanRecordResult">
select distinct scan_site_code,bill_code
from emis_tms_scan_record
where del_flag='0'
<if test="scanSiteCode != null and scanSiteCode != ''"> and scan_site_code=#{scanSiteCode}</if>
<if test="scanType != null and scanType != ''"> and scan_type=#{scanType}</if>
<if test="preOrNextStationCode != null and preOrNextStationCode != ''"> and pre_or_next_station_code=#{preOrNextStationCode}</if>
<if test="scanManCode != null and scanManCode != ''"> and scan_man_code=#{scanManCode}</if>
<if test="params.beginScanDate != null and params.beginScanDate != ''">
and scan_date <![CDATA[ >= ]]> #{params.beginScanDate}
</if>
<if test="params.endScanDate != null and params.endScanDate != ''">
and scan_date <![CDATA[ <= ]]> #{params.endScanDate}
</if>
<if test="params.thisSiteScanType != null and params.thisSiteScanType !=''">
and bill_code in(
select bill_code from emis_tms_scan_record where scan_site_code=#{params.thisSiteCode} and scan_type=#{params.thisSiteScanType}
)
</if>
</select>
<!-- 获取物流轨迹 -->
<select id="selectTraceListByBillCode" parameterType="string" resultMap="EmisTmsScanRecordResult">
@ -168,12 +202,12 @@
<if test="orderSn != null and orderSn != '' "> and order_sn like concat(#{orderSn}, '%')</if>
<if test="scanType != null and scanType != ''"> and scan_type=#{scanType}</if>
<if test="preOrNextStation != null and preOrNextStation != ''"> and pre_or_next_station like concat('%', #{preOrNextStation}, '%')</if>
<if test="preOrNextStationCode != null and preOrNextStationCode != ''"> and pre_or_next_station_code like concat('%', #{preOrNextStationCode}, '%')</if>
<if test="preOrNextStationCode != null and preOrNextStationCode != ''"> and pre_or_next_station_code=#{preOrNextStationCode}</if>
<if test="preOrNextStationPhone != null and preOrNextStationPhone != ''"> and pre_or_next_station_phone like concat('%', #{preOrNextStationPhone}, '%')</if>
<if test="preOrNextManCode != null and preOrNextManCode != ''"> and pre_or_next_man_code like concat('%', #{preOrNextManCode}, '%')</if>
<if test="preOrNextManCode != null and preOrNextManCode != ''"> and pre_or_next_man_code=#{preOrNextManCode}</if>
<if test="preOrNextManPhone != null and preOrNextManPhone != ''"> and pre_or_next_man_phone like concat('%', #{preOrNextManPhone}, '%')</if>
<if test="scanDate != null "> and scan_date like concat('%', #{scanDate}, '%')</if>
<if test="scanManCode != null and scanManCode != ''"> and scan_man_code like concat('%', #{scanManCode}, '%')</if>
<if test="scanManCode != null and scanManCode != ''"> and scan_man_code=#{scanManCode}</if>
<if test="scanManPhone != null and scanManPhone != ''"> and scan_man_phone like concat('%', #{scanManPhone}, '%')</if>
<if test="scanMan != null and scanMan != ''"> and scan_man like concat('%', #{scanMan}, '%')</if>
<if test="preOrNextMan != null and preOrNextMan != ''"> and pre_or_next_man like concat('%', #{preOrNextMan}, '%')</if>