Browse Source

20250429

master
qiezi 9 months ago
parent
commit
372926e28b
  1. 63
      src/main/resources/mapper/taskmanage/TaskDatailDao.xml

63
src/main/resources/mapper/taskmanage/TaskDatailDao.xml

@ -229,33 +229,21 @@
</if>
<if test="params.summaryType != null and params.summaryType >= 3">
T.BatchNo,
max(T.LatestOutDate) as LatestOutDate,
max(T.LatestInDate) as LatestInDate,
max(T.ActiveDate) as ActiveDate,
min(T.ManufactureDate) as ManufactureDate,
max(T.ExpiredDate) as ExpiredDate,
max(T.DemandPartnerType) as DemandPartnerType,
max(T.DemandPartnerName) as DemandPartnerName,
</if>
min(T.FirstInDate) as FirstInDate,
max(T.LatestCountDate) as LatestCountDate,
min(T.Freezeflag) as Freezeflag,
P.PartType,
P.FamilyID,
dbo.Get_PartFamilyDesc(P.Site, P.FamilyID) as FamilyName,
P.GroupID,
dbo.Get_PartGroupDesc(T.Site, P.GroupID) as PartGroup,
max(T.LatestOutDate) as LatestOutDate,
max(T.LatestInDate) as LatestInDate,
max(T.ActiveDate) as ActiveDate,
max(T.PartnerID) as PartnerID,
max(T.PartnerType) as PartnerType,
min(T.ManufactureDate) as ManufactureDate,
max(T.ExpiredDate) as ExpiredDate,
sum(Round(T.QtyOnHand, 3)) as QtyOnHand,
sum(Round(isnull(T.QtyReserved, 0), 3)) as QtyReserved,
sum(Round(isnull(T.InStandardValue, 0), 4) - Round(isnull(T.OutStandardValue, 0), 4)) as StandartStockValue,
sum(Round(isnull(T.InActualValue, 0), 4) - Round(isnull(T.OutActualValue, 0), 4)) as ActualStockValue,
max(T.DemandPartnerType) as DemandPartnerType,
max(T.DemandPartnerID) as DemandPartnerID,
max(T.DemandPartnerName) as DemandPartnerName,
sum(Round(T.QtyOnHand, 3)) as QtyOnHand
from InventoryStock as T,
Part as P
where T.Site = P.Site
and T.PartNo = P.PartNo
and Round(T.QtyOnHand, 3) > 0
<if test="params.loginUser != null and params.loginUser != ''">
and T.Site in (Select Site from AccessSite where upper(UserID) = #{params.loginUser})
</if>
@ -302,24 +290,21 @@
and #{params.endExpiredDate} >= T.ExpiredDate
</if>
group by
T.Site,
T.PartNo,
P.PartDescription,
P.Spec,
<if test="params.summaryType != null and params.summaryType >= 1">
T.WarehouseID,
</if>
P.UMID,
<if test="params.summaryType != null and params.summaryType >= 2">
T.LocationID,
</if>
<if test="params.summaryType != null and params.summaryType >= 3">
T.BatchNo,
</if>
P.Site,
P.FamilyID,
P.GroupID,
P.PartType
T.Site,
T.PartNo,
P.PartDescription,
P.Spec,
<if test="params.summaryType != null and params.summaryType >= 1">
T.WarehouseID,
</if>
P.UMID,
<if test="params.summaryType != null and params.summaryType >= 2">
T.LocationID,
</if>
<if test="params.summaryType != null and params.summaryType >= 3">
T.BatchNo,
</if>
P.Site
</select>
</mapper>
Loading…
Cancel
Save