opt:晶棒库报表和回温库报表查询逻辑优化、页面优化

This commit is contained in:
DESKTOP-5DIJMF9\admin
2024-09-09 11:03:37 +08:00
parent 8c96550696
commit 23f96ca8f6
13 changed files with 148 additions and 101 deletions

View File

@@ -21,20 +21,56 @@ public interface IReportService extends IService<ReportDto> {
*/
IPage<ReportDto> queryAll(ReportQuery whereJson, PageQuery pageable);
/**
* 回温间库存明细
* @param whereJson
* @param pageable
* @return
*/
IPage<HwDto> queryHwDetail(ReportQuery whereJson, PageQuery pageable);
/**
* 回温间入库明细------------------------
* @param whereJson
* @param pageable
* @return
*/
IPage<HwDto> queryHwIn(ReportQuery whereJson, PageQuery pageable);
/**
* 回温间待入库明细---------------
* @param whereJson
* @param pageable
* @return
*/
IPage<HwDto> queryHwInPending(ReportQuery whereJson, PageQuery pageable);
/**
* 回温间出库明细------------------
* @param whereJson
* @param pageable
* @return
*/
IPage<HwDto> queryHwOut(ReportQuery whereJson, PageQuery pageable);
/**
* 回温间待出库存明细------------
* @param whereJson
* @param pageable
* @return
*/
IPage<HwDto> queryHwOutPending(ReportQuery whereJson, PageQuery pageable);
/**
* 原料库库存明细-------
* @param whereJson
* @param pageable
* @return
*/
IPage<YlDto> queryYlDetail(ReportQuery whereJson, PageQuery pageable);
/**
* 查询工单库存
* 原料库工单库存明细------
* @param whereJson
* @param pageable
* @return
@@ -42,15 +78,27 @@ public interface IReportService extends IService<ReportDto> {
IPage<YCLKCDto> queryYlOutDetail(ReportQuery whereJson, PageQuery pageable);
/**
* 查询原料缓存区库存
* 查询原料缓存区库存-----
* @param whereJson
* @param pageable
* @return
*/
IPage<YCLKCDto> queryMoveDetail(ReportQuery whereJson, PageQuery pageable);
/**
* 原材入库明细--------
* @param whereJson
* @param pageable
* @return
*/
IPage<YlDto> queryYlIn(ReportQuery whereJson, PageQuery pageable);
/**
* 原料库出库明细--------
* @param whereJson
* @param pageable
* @return
*/
IPage<YlDto> queryYlOut(ReportQuery whereJson, PageQuery pageable);
void queryYlDetailDownload(ReportQuery whereJson, PageQuery pageable, HttpServletResponse response) throws IOException;

View File

@@ -53,8 +53,8 @@
sch_base_point p,sch_base_material m
WHERE
p.vehicle_code2 = m.PalletSN
and
vehicle_code2!='' AND vehicle_code2 is not null
AND vehicle_code2!=''
AND vehicle_code2 is not null
<if test="query.supplierName != null">
and m.supplierName like CONCAT('%', #{query.supplierName}, '%')
</if>
@@ -183,24 +183,22 @@
<select id="queryYlIn" resultType="org.nl.wms.sch.report.service.dto.YlDto">
SELECT
m.lotSN,
p.point_code as pointCode,
p.point_name as pointName,
p.region_code as regionCode,
p.region_name as regionName,
p.vehicle_code2 as subTray,
p.vehicle_code as motherTray,
t.update_time as updateTime,
p.point_code AS pointCode,
p.point_name AS pointName,
p.region_code AS regionCode,
p.region_name AS regionName,
t.vehicle_code2 AS subTray,
t.vehicle_code AS motherTray,
t.update_time AS updateTime,
m.*
FROM
sch_base_task t,sch_base_point p,sch_base_material m
sch_base_task t,
sch_base_point p,
sch_base_material m
WHERE
p.vehicle_code2 = m.PalletSN
and
t.point_code2 like 'HJ%'
and
t.point_code2=p.point_code
and
p.vehicle_code2!='' AND p.vehicle_code2 is not null
t.vehicle_code2 = m.PalletSN
AND t.point_code2 = p.point_code
AND t.point_code2 LIKE 'HJ%'
<if test="query.supplierName != null">
and m.supplierName like CONCAT('%', #{query.supplierName}, '%')
</if>
@@ -225,24 +223,24 @@
<select id="queryYlOut" resultType="org.nl.wms.sch.report.service.dto.YlDto">
SELECT
m.lotSN,
p.point_code as pointCode,
p.point_name as pointName,
p.region_code as regionCode,
p.region_name as regionName,
p.vehicle_code2 as subTray,
p.vehicle_code as motherTray,
t.update_time as updateTime,
p.point_code AS pointCode,
p.region_name AS regionName,
p2.point_code AS pointCode2,
p2.region_name AS regionName2,
t.vehicle_code2 AS subTray,
t.vehicle_code AS motherTray,
t.update_time AS updateTime,
m.*
FROM
sch_base_task t,sch_base_point p,sch_base_material m
sch_base_task t,
sch_base_point p,
sch_base_point p2,
sch_base_material m
WHERE
p.vehicle_code2 = m.PalletSN
and
t.point_code2 like 'XHW%'
and
t.point_code2=p.point_code
and
p.vehicle_code2!='' AND p.vehicle_code2 is not null
t.vehicle_code2 = m.PalletSN
AND t.point_code1 = p.point_code
AND t.point_code2 = p2.point_code
AND t.point_code2 LIKE 'XHW%'
<if test="query.supplierName != null">
and m.supplierName like CONCAT('%', #{query.supplierName}, '%')
</if>
@@ -261,7 +259,7 @@
<if test="query.ingotBatch != null">
and m.ingotBatch like CONCAT('%', #{query.ingotBatch}, '%')
</if>
ORDER BY t.update_time DESC,point_code ASC
ORDER BY t.update_time DESC
</select>
<select id="queryHwDetail" resultType="org.nl.wms.sch.report.service.dto.HwDto">
@@ -274,19 +272,19 @@
p.vehicle_code AS motherTray,
p.update_time AS updateTime,
p.ing_task_code AS ing_task_code,
ANY_VALUE ( v.standing_time ) AS standingTime,
ANY_VALUE ( m2.siliconGrade ) AS siliconGrade,
ANY_VALUE ( m2.productDescription ) AS productDescription,
ANY_VALUE ( m2.supplierName ) AS supplierName,
ANY_VALUE ( m2.ingotBatch ) AS ingotBatch,
ANY_VALUE ( m2.number ) AS number,
v.standing_time AS standingTime,
m2.siliconGrade AS siliconGrade,
m2.productDescription AS productDescription,
m2.supplierName AS supplierName,
m2.ingotBatch AS ingotBatch,
m2.number AS number,
TIMESTAMPDIFF(
HOUR,
p.update_time,
curtime()) AS usedTime
FROM
sch_base_point p
LEFT JOIN sch_base_vehiclematerialgroup v ON p.point_code = v.point_code
LEFT JOIN sch_base_vehiclematerialgroup v ON p.vehicle_code2 = v.vehicle_code
LEFT JOIN (
SELECT
m.PalletSN AS PalletSN,
@@ -332,8 +330,6 @@
<if test="query.number != null">
and m2.number = #{query.number}
</if>
GROUP BY
pointCode
ORDER BY pointCode ASC
</select>
@@ -341,14 +337,14 @@
SELECT
p.point_code AS pointCode,
p.region_name AS regionName,
p.vehicle_code2 AS subTray,
p.vehicle_code AS motherTray,
p.update_time AS updateTime,
ANY_VALUE ( m2.siliconGrade ) AS siliconGrade,
ANY_VALUE ( m2.productDescription ) AS productDescription,
ANY_VALUE ( m2.supplierName ) AS supplierName,
ANY_VALUE ( m2.ingotBatch ) AS ingotBatch,
ANY_VALUE ( m2.number ) AS number,
t.vehicle_code2 AS subTray,
t.vehicle_code AS motherTray,
t.update_time AS updateTime,
m2.siliconGrade AS siliconGrade,
m2.productDescription AS productDescription,
m2.supplierName AS supplierName,
m2.ingotBatch AS ingotBatch,
m2.number AS number,
TIMESTAMPDIFF(
HOUR,
p.update_time,
@@ -379,8 +375,8 @@
m.ingotBatch
) m2 ON t.vehicle_code2 = m2.PalletSN
WHERE
p.vehicle_code2 != ''
AND p.vehicle_code2 IS NOT NULL
t.vehicle_code2 != ''
AND t.vehicle_code2 IS NOT NULL
AND t.point_code2 LIKE 'XHW%'
AND t.task_status in ('5')
<if test="query.supplierName != null">
@@ -401,9 +397,7 @@
<if test="query.number != null">
and m2.number = #{query.number}
</if>
GROUP BY
pointCode
ORDER BY p.update_time DESC, pointCode ASC
ORDER BY t.update_time DESC
</select>
<select id="queryHwInPending" resultType="org.nl.wms.sch.report.service.dto.HwDto">
@@ -475,17 +469,17 @@
SELECT
p.point_code AS pointCode,
p.region_name AS regionName,
ANY_VALUE ( p2.point_code ) AS pointCode2,
ANY_VALUE ( p2.region_name ) AS regionName2,
ANY_VALUE ( t.vehicle_code2 ) AS subTray,
ANY_VALUE ( t.vehicle_code ) AS motherTray,
p.update_time AS updateTime,
ANY_VALUE ( v.standing_time ) AS standingTime,
ANY_VALUE ( m2.siliconGrade ) AS siliconGrade,
ANY_VALUE ( m2.productDescription ) AS productDescription,
ANY_VALUE ( m2.supplierName ) AS supplierName,
ANY_VALUE ( m2.ingotBatch ) AS ingotBatch,
ANY_VALUE ( m2.number ) AS number,
p2.point_code AS pointCode2,
p2.region_name AS regionName2,
t.vehicle_code2 AS subTray,
t.vehicle_code AS motherTray,
t.update_time AS updateTime,
v.standing_time AS standingTime,
m2.siliconGrade AS siliconGrade,
m2.productDescription AS productDescription,
m2.supplierName AS supplierName,
m2.ingotBatch AS ingotBatch,
m2.number AS number,
TIMESTAMPDIFF(
HOUR,
p.update_time,
@@ -518,8 +512,8 @@
m.ingotBatch
) m2 ON t.vehicle_code2 = m2.PalletSN
WHERE
p.vehicle_code2 != ''
AND p.vehicle_code2 IS NOT NULL
t.vehicle_code2 != ''
AND t.vehicle_code2 IS NOT NULL
AND t.is_delete = '0'
AND t.point_code1 LIKE 'XHW%'
AND t.point_code2 LIKE 'FHW%'
@@ -541,9 +535,7 @@
<if test="query.number != null">
and m2.number = #{query.number}
</if>
GROUP BY
pointCode
ORDER BY p.update_time DESC, pointCode ASC
ORDER BY t.update_time DESC
</select>
<select id="queryHwOutPending" resultType="org.nl.wms.sch.report.service.dto.HwDto">
@@ -552,8 +544,8 @@
p.region_name AS regionName,
ANY_VALUE ( p2.point_code ) AS pointCode2,
ANY_VALUE ( p2.region_name ) AS regionName2,
ANY_VALUE ( t.vehicle_code2 ) AS subTray,
ANY_VALUE ( t.vehicle_code ) AS motherTray,
ANY_VALUE ( p.vehicle_code2 ) AS subTray,
ANY_VALUE ( p.vehicle_code ) AS motherTray,
p.update_time AS updateTime,
ANY_VALUE ( m2.siliconGrade ) AS siliconGrade,
ANY_VALUE ( m2.productDescription ) AS productDescription,

View File

@@ -23,6 +23,14 @@ public class YlDto implements Serializable {
* 区域名称
*/
private String regionName;
/**
* 目的点位编码
*/
private String pointCode2;
/**
* 目的区域名称
*/
private String regionName2;
/**
* 子托号
*/

View File

@@ -177,14 +177,14 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, ReportDto> impl
for(YlDto detailDto:pages.getRecords()){
Map<String, Object> mp = new LinkedHashMap<>();
mp.put("点位编码",detailDto.getPointCode());
mp.put("点位名称",detailDto.getPointCode());
mp.put("区域编码",detailDto.getRegionCode());
mp.put("区域名称",detailDto.getRegionName());
mp.put("目的点位编码",detailDto.getPointCode2());
mp.put("目的区域名称",detailDto.getRegionName2());
mp.put("子托号",detailDto.getSubTray());
mp.put("母拖号",detailDto.getMotherTray());
mp.put("物料名称",detailDto.getProductDescription());
mp.put("供应商名称",detailDto.getSupplierName());
mp.put("库时间",detailDto.getUpdateTime());
mp.put("库时间",detailDto.getUpdateTime());
mp.put("棒源等级",detailDto.getSiliconGrade());
mp.put("客户来料批次号",detailDto.getIngotBatch());
mp.put("晶棒号",detailDto.getLotSN());
@@ -279,7 +279,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, ReportDto> impl
mp.put("母拖号",detailDto.getMotherTray());
mp.put("物料名称",detailDto.getProductDescription());
mp.put("供应商名称",detailDto.getSupplierName());
mp.put("库时间",detailDto.getUpdateTime());
mp.put("库时间",detailDto.getUpdateTime());
mp.put("棒源等级",detailDto.getSiliconGrade());
mp.put("客户来料批次号",detailDto.getIngotBatch());
mp.put("回温时间",detailDto.getStandingTime());