Browse Source

20250417

master
qiezi 9 months ago
parent
commit
9e5e93a71b
  1. 2
      src/main/java/com/heai/config/ShiroConfig.java
  2. 37
      src/main/resources/mapper/app/InventoryStock.xml
  3. 41
      src/main/resources/mapper/production/DailyPlanMapper.xml
  4. 35
      src/main/resources/mapper/production/PrintLabelRecordMapper.xml

2
src/main/java/com/heai/config/ShiroConfig.java

@ -56,6 +56,8 @@ public class ShiroConfig {
filterMap.put("/aaa.txt", "anon");
filterMap.put("/login", "anon");
filterMap.put("/board/**", "anon");
filterMap.put("/inventory/**", "anon");
filterMap.put("/inventory", "anon");
filterMap.put("/sysLanguagePack/**", "anon");
filterMap.put("/pad/**", "anon");
filterMap.put("/js/**", "anon");

37
src/main/resources/mapper/app/InventoryStock.xml

@ -4,13 +4,38 @@
<mapper namespace="com.heai.modules.app.dao.InventoryStockDao">
<select id="getInventoryStockData" resultType="com.heai.modules.app.entity.InventoryStockData">
select A.Site ,A.WarehouseID ,A.PartNo ,A.BatchNo ,A.LocationID ,A.FirstInDate ,A.LatestOutDate ,A.LatestInDate
,A.ActiveDate ,A.InQty ,A.OutQty ,A.QtyOnHand ,A.QtyReserved ,A.InStandardValue ,A.InActualValue ,A.OutStandardValue
,A.OutActualValue ,A.PartnerID ,A.PartnerType ,A.LatestCountDate ,A.Freezeflag ,A.QtyTmp ,A.ManufactureDate
,A.ExpiredDate ,A.QtytoIssue ,A.DemandPartnerType ,A.DemandPartnerID ,A.DemandPartnerName
,B.WareHouseName,dbo.Get_PartWeightFactorForMaterial(A.Site,A.PartNo,#{orderNo}) as WeightFactor
select A.Site
, A.WarehouseID
, A.PartNo
, A.BatchNo
, A.LocationID
, A.FirstInDate
, A.LatestOutDate
, A.LatestInDate
, A.ActiveDate
, A.InQty
, A.OutQty
, A.QtyOnHand
, A.QtyReserved
, A.InStandardValue
, A.InActualValue
, A.OutStandardValue
, A.OutActualValue
, A.PartnerID
, A.PartnerType
, A.LatestCountDate
, A.Freezeflag
, A.QtyTmp
, A.ManufactureDate
, A.ExpiredDate
, A.QtytoIssue
, A.DemandPartnerType
, A.DemandPartnerID
, A.DemandPartnerName
, B.WareHouseName
, dbo.Get_PartWeightFactorForMaterial(A.Site, A.PartNo, #{orderNo}) as WeightFactor
from InventoryStock A
left join WareHouse B on A.site = B.site and A.WarehouseID = B.WarehouseID
left join WareHouse B on A.site = B.site and A.WarehouseID = B.WarehouseID
<where>
<if test="site != null and site != ''">
and A.Site = #{site,jdbcType=VARCHAR}

41
src/main/resources/mapper/production/DailyPlanMapper.xml

@ -758,12 +758,28 @@
Group by QtyReported
</select>
<select id="getStockPrint" resultType="com.heai.modules.production.entity.StockPrintData">
select a.TransNo,a.Site,a.WareHouseId,a.BatchNo,a.LocationId,a.PartNo,a.OrderNo,a.TransDate,a.Qty,a.PrintFlag,dbo.Get_PartDesc(a.Site,a.PartNo) as partDesc,Round(dbo.Get_Part_NetWeight(a.Site,a.PartNo)*a.Qty/1000,2) weight
,dbo.Get_WareHouseDesc(a.Site,a.WareHouseId) as wareHouseDesc,dbo.Get_Part_UMID(a.Site,a.PartNo) umid,dbo.get_expiredDate_print(a.Site,a.PartNo,a.BatchNo) expiredDate
,dbo.Get_StorePrintPartStatus(a.Site,a.PartNo,a.BatchNo) status,isnull(Round(b.QtyOnHand,3),0) QtyOnHand
select a.TransNo
, a.Site
, a.WareHouseId
, a.BatchNo
, a.LocationId
, a.PartNo
, a.OrderNo
, a.TransDate
, a.Qty
, a.PrintFlag
, dbo.Get_PartDesc(a.Site, a.PartNo) as partDesc
, Round(dbo.Get_Part_NetWeight(a.Site, a.PartNo) * a.Qty / 1000, 2) weight
, dbo.Get_WareHouseDesc(a.Site, a.WareHouseId) as wareHouseDesc
, dbo.Get_Part_UMID(a.Site, a.PartNo) umid
, dbo.get_expiredDate_print(a.Site, a.PartNo, a.BatchNo) expiredDate
, dbo.Get_StorePrintPartStatus(a.Site, a.PartNo, a.BatchNo) status
, isnull(Round(b.QtyOnHand, 3), 0) QtyOnHand
from StockPrint a
left join InventoryStock b on a.Site=b.site and a.WareHouseId=b.WarehouseID and a.PartNo=b.PartNo and a.BatchNo=b.BatchNo and
a.LocationId=b.LocationId
left join InventoryStock b
on a.Site = b.site and a.WareHouseId = b.WarehouseID and a.PartNo = b.PartNo and
a.BatchNo = b.BatchNo and
a.LocationId = b.LocationId
<where>
<if test="startDate != null ">
and a.TransDate >= #{startDate}
@ -1712,11 +1728,16 @@
</select>
<select id="checkSPBOMIsIssure" resultType="com.heai.modules.app.entity.SoBomData">
select a.ComponentPartNo, ISNULL(Sum( case when b.Direction='-' then TransQty else TransQty*(-1.0) end), 0) as qty
from SOBOM a left join TransDetail b on a.site=b.site and a.ComponentPartNo=b.PartNo and b.TransNo like 'SI%'
and OrderRef3=convert(varchar(20),#{seqNo}) and (a.ComponentPartNo like 'RC%' or a.ComponentPartNo like 'SC%' or a.ComponentPartNo like 'VP%' )
where a.orderNo=#{orderNo} and a.site=#{site}
select a.ComponentPartNo,
ISNULL(Sum(case when b.Direction = '-' then TransQty else TransQty * (-1.0) end), 0) as qty
from SOBOM a
left join TransDetail b on a.site = b.site and a.ComponentPartNo = b.PartNo and b.TransNo like 'SI%'
and OrderRef3 = convert(varchar (20), #{seqNo}) and
(a.ComponentPartNo like 'RC%' or a.ComponentPartNo like 'SC%' or
a.ComponentPartNo like 'VP%')
where a.orderNo = #{orderNo}
and a.site = #{site}
group by a.ComponentPartNo
</select>

35
src/main/resources/mapper/production/PrintLabelRecordMapper.xml

@ -2,7 +2,7 @@
<mapper namespace="com.heai.modules.production.dao.PrintLabelRecordMapper">
<select id="handlerPrintBoxLabel" resultType="java.util.Map">
Select D.DelNotifyNo as batchNo
Select D.DelNotifyNo as batchNo
, '' as printerName
, 'N' as status
, D.DelnotifyNo as orderRef1
@ -18,19 +18,15 @@
, Convert(Integer, #{printTotalBoxCount}) as keyInfoInt1
, Convert(Integer, H.SeqNo - 1 + #{printBoxSeqNo}) as keyInfoInt2
, 'N/A' as keyInfoStr1
, '' as keyInfoStr2
, C.ShortCustomerName as keyInfoStr2
, -1 as keyInfoFloat1
, -1 as keyInfoFloat2
, 1 as printQty
, REPLACE(Address_E + ' Phone:' + S.PhoneNo + ' Email:' + S.Email, CHAR(13) + CHAR(10),
'') as siteDetail
, SiteName_E as siteName
, (case
when C.CustomerGroup = 'TBC' then CA.EndCustOurVendorCode
else C.OurVendorCode end) as endCustVendorCode
, REPLACE(Address_E + ' Phone:' + S.PhoneNo + ' Email:' + S.Email, CHAR(13) + CHAR(10),'') as siteDetail
, SiteName_E as siteName
, (case when C.CustomerGroup = 'TBC' then CA.EndCustOurVendorCode else C.OurVendorCode end) as endCustVendorCode
from CODelNotifyHeader as T
Left Join CustomerAddress as CA
On T.Site = CA.Site and T.CustomerID = CA.CustomerID and T.DelAddID = CA.AddressID
Left Join CustomerAddress as CA On T.Site = CA.Site and T.CustomerID = CA.CustomerID and T.DelAddID = CA.AddressID
Left join Customer as C on C.Site = T.Site and C.CustomerID = T.CustomerID
, CODelNotifyDetail as D
, Dual as H
@ -45,7 +41,7 @@
and H.SeqNo &lt;= #{boxNum}
and #{boxNum} > 0
Union all
Select D.DelNotifyNo as batchNo
Select D.DelNotifyNo as batchNo
, '' as printerName
, 'N' as status
, D.DelnotifyNo as orderRef1
@ -61,22 +57,17 @@
, Convert(Integer, #{printTotalBoxCount}) as keyInfoInt1
, Convert(Integer, H.SeqNo - 1 + #{scatteredBoxNo}) as keyInfoInt2
, 'N/A' as keyInfoStr1
, '' as keyInfoStr2
, C.ShortCustomerName as keyInfoStr2
, -1 as keyInfoFloat1
, -1 as keyInfoFloat2
, 1 as printQty
, REPLACE(Address_E + ' Phone:' + S.PhoneNo + ' Email:' + S.Email, CHAR(13) + CHAR(10),
'') as siteDetail
, SiteName_E as siteName
, (case
when C.CustomerGroup = 'TBC' then CA.EndCustOurVendorCode
else C.OurVendorCode end) as endCustVendorCode
, REPLACE(Address_E + ' Phone:' + S.PhoneNo + ' Email:' + S.Email, CHAR(13) + CHAR(10),'') as siteDetail
, SiteName_E as siteName
, (case when C.CustomerGroup = 'TBC' then CA.EndCustOurVendorCode else C.OurVendorCode end) as endCustVendorCode
from CODelNotifyHeader as T
Left Join CustomerAddress as CA
On T.Site = CA.Site and T.CustomerID = CA.CustomerID and T.DelAddID = CA.AddressID
Left Join CustomerAddress as CA On T.Site = CA.Site and T.CustomerID = CA.CustomerID and T.DelAddID = CA.AddressID
Left join Customer as C on C.Site = T.Site and C.CustomerID = T.CustomerID
, CODelNotifyDetail
as D
, CODelNotifyDetail as D
, Dual as H
, Site as S
Where T.Site = D.Site

Loading…
Cancel
Save