Browse Source

日计划排产 日计划查询

master
ruanqi 4 years ago
parent
commit
fcf3f36f75
  1. 4
      src/main/java/com/letian/modules/production/service/impl/DailyPlanServiceImpl.java
  2. 2
      src/main/resources/mapper/production/DailyPlanMapper.xml
  3. 4
      src/main/resources/mapper/production/SOTaskOrderHeaderMapper.xml

4
src/main/java/com/letian/modules/production/service/impl/DailyPlanServiceImpl.java

@ -208,8 +208,8 @@ public class DailyPlanServiceImpl implements DailyPlanService {
// inData.setUpdateDate(new Date());
// inData.setUpdateBy(user);
CalendarDatetypeShiftData checkData = calendarDatetypeShiftMapper.findByShiftno(inData.getShiftno());
if (checkData != null) {
throw new RuntimeException("该班次编码存在!");
if (checkData == null) {
throw new RuntimeException("该班次编码存在!");
}
int index = calendarDatetypeShiftMapper.editShift(inData);
if(index==0){

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

@ -7,7 +7,7 @@
<select id="getShopOrderData" resultType="com.letian.modules.production.entity.ShopOrderData" parameterType="com.letian.modules.production.entity.DailyPlanInData">
select a.site, a.OrderNo,a.PartNo,a.Status,a.PlanStartDate,a.NeedDate,a.LotSize,a.EnterDate,a.UserName,
select top 10000 a.site, a.OrderNo,a.PartNo,a.Status,a.PlanStartDate,a.NeedDate,a.LotSize,a.EnterDate,a.UserName,
P.PartDescription,P.Spec,ISNULL(so.scheduling_size,0) as scheduling_size
FROM ShopOrder a
LEFT JOIN Part P ON P.PartNo=a.PartNo AND a.site=P.Site

4
src/main/resources/mapper/production/SOTaskOrderHeaderMapper.xml

@ -26,7 +26,7 @@ PartNo,UserName,EnterDate,Qtyfinished,ShiftId FROM SOTaskOrderHeader
</insert>
<select id="getWorkPlanData" resultType="com.letian.modules.production.entity.SOTaskOrderHeaderData" parameterType="com.letian.modules.production.entity.DailyPlanInData">
SELECT SOT.OrderNo,SOT.OrderDate,SOT.OrderQty,SOT.UserName,SOT.EnterDate,SOT.OrderRef1,SOT.ShiftId , cds.shiftno as ShiftNo ,cds.shiftdesc, SOT.QtyCirculation,SOT.Qtyfinished,SOT.CloseFlag FROM SOTaskOrderHeader SOT
SELECT top 10000 SOT.OrderNo,SOT.OrderDate,SOT.OrderQty,SOT.UserName,SOT.EnterDate,SOT.OrderRef1,SOT.ShiftId , cds.shiftno as ShiftNo ,cds.shiftdesc, SOT.QtyCirculation,SOT.Qtyfinished,SOT.CloseFlag FROM SOTaskOrderHeader SOT
LEFT join calendar_datetype_shift cds on cds.site=SOT.Site and SOT.shiftId=cds.id
<where>
<if test="site != null and site != ''">
@ -75,7 +75,7 @@ PartNo,UserName,EnterDate,Qtyfinished,ShiftId FROM SOTaskOrderHeader
</delete>
<select id="getDailyPlanData" parameterType="com.letian.modules.production.entity.DailyPlanInData" resultType="com.letian.modules.production.entity.SOTaskOrderHeaderData">
SELECT SOT.OrderNo,SOT.Site,SOT.Status,SOT.OrderDate,SOT.OrderQty,SOT.OrderRefType,SOT.OrderRef1, CASE WHEN SOT.CloseFlag ='N' THEN '正常' ELSE '已流转' END as CloseFlag,
SELECT top 10000 SOT.OrderNo,SOT.Site,SOT.Status,SOT.OrderDate,SOT.OrderQty,SOT.OrderRefType,SOT.OrderRef1, CASE WHEN SOT.CloseFlag ='N' THEN '正常' ELSE '已流转' END as CloseFlag,
SOT.PartNo,SOT.UserName,SOT.EnterDate,SOT.Qtyfinished,SOT.QtyFinished_Ontime,SOT.ShiftId,P.PartDescription,cds.shiftno as shiftNo,cds.shiftdesc ,QtyCirculation
FROM SOTaskOrderHeader SOT
LEFT join Part P on P.Site= SOT.Site and P.PartNo=SOT.PartNo

Loading…
Cancel
Save