Browse Source

日计划排产 日计划查询

master
ruanqi 4 years ago
parent
commit
6988359d6d
  1. 9
      src/main/java/com/letian/modules/base/entity/SOScheduledRoutingData.java
  2. 19
      src/main/java/com/letian/modules/production/dao/PalletMapper.java
  3. 6
      src/main/java/com/letian/modules/production/service/impl/PalletServiceImpl.java
  4. 7
      src/main/java/com/letian/modules/sys/entity/SysUserEntity.java
  5. 2
      src/main/resources/mapper/production/DailyPlanMapper.xml
  6. 14
      src/main/resources/mapper/production/PalletMapper.xml

9
src/main/java/com/letian/modules/base/entity/SOScheduledRoutingData.java

@ -192,6 +192,7 @@ public class SOScheduledRoutingData {
*/
private String virtualResourceFlag;
private String operationDesc;
private String resourceId;
public String getSite() {
return site;
@ -480,5 +481,13 @@ public class SOScheduledRoutingData {
public void setOperationDesc(String operationDesc) {
this.operationDesc = operationDesc;
}
public String getResourceId() {
return resourceId;
}
public void setResourceId(String resourceId) {
this.resourceId = resourceId;
}
}

19
src/main/java/com/letian/modules/production/dao/PalletMapper.java

@ -1,11 +1,13 @@
package com.letian.modules.production.dao;
import com.letian.modules.base.entity.SOScheduledRoutingData;
import com.letian.modules.base.utils.ResponseData;
import com.letian.modules.pda.entity.NotifyHeaderOutData;
import com.letian.modules.pda.entity.StockDataInData;
import com.letian.modules.production.entity.*;
import com.letian.modules.sys.entity.SysUserEntity;
import com.letian.modules.sys.entity.UserIpData;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
@ -26,7 +28,7 @@ public interface PalletMapper {
*/
List<PalletListData> getPalletData(PalletListData inData);
void updateQtyReported(@Param("site") String site,@Param("orderNo") String orderNo,@Param("orderDate") String orderDate,@Param("shiftId") String shiftId);
void updateSOSdelFlag(@Param("site") String site,@Param("orderNo") String orderNo,@Param("orderDate") String orderDate,@Param("shiftId") String shiftId,@Param("userId") String userId);
/**
* @Description 保存栈板信息
* @Title savePallet
@ -269,4 +271,19 @@ public interface PalletMapper {
List<NotifyHeaderOutData> getNotifyHeaderData(@Param("site") String site,@Param("delNotifyNo") String delNotifyNo);
void finishPreparation(@Param("site") String site,@Param("delNotifyNo") String delNotifyNo,@Param("username") String username);
SOScheduledRoutingData getSOScheduleData(@Param("site") String site,@Param("orderNo") String orderNo,@Param("orderDate") String orderDate,@Param("shiftId") String shiftId);
/**
* @Description TODO
* @Title deleteSOSList
* @param site
 * @param orderNo
 * @param orderDate
 * @param shiftId
* @author rq
* @date 2022/5/10 16:36
* @return void
* @throw
*/
void deleteSOSList(@Param("site") String site,@Param("workCenterNo") String workCenterNo,@Param("resourceId") String resourceId,@Param("seqNo") Integer seqNo);
}

6
src/main/java/com/letian/modules/production/service/impl/PalletServiceImpl.java

@ -1,6 +1,7 @@
package com.letian.modules.production.service.impl;
import com.letian.common.utils.IPUtils;
import com.letian.modules.base.entity.SOScheduledRoutingData;
import com.letian.modules.base.utils.DateUtils;
import com.letian.modules.base.utils.ResponseData;
import com.letian.modules.pda.dao.*;
@ -310,6 +311,11 @@ public class PalletServiceImpl implements PalletService {
detailSubs.add(detailSub);
//更新派工单上报工数量
palletMapper.updateQtyReported(site,inList.get(j).getOrderNo(),inData.getOrderDate(),inData.getShiftid());
SOScheduledRoutingData getSOScheduleData= palletMapper.getSOScheduleData(site,inList.get(j).getOrderNo(),inData.getOrderDate(),inData.getShiftid());
if(getSOScheduleData.getQtyRequired()<=getSOScheduleData.getQtyReported()){
palletMapper.updateSOSdelFlag(site,inList.get(j).getOrderNo(),inData.getOrderDate(),inData.getShiftid(),userId);
palletMapper.deleteSOSList(site,getSOScheduleData.getsWorkCenterNo(),getSOScheduleData.getsResourceID(),getSOScheduleData.getSeqNo());
}
}
//批量保存当前的序列号数据
transDao.batchInsertTransDetailSubs(detailSubs);

7
src/main/java/com/letian/modules/sys/entity/SysUserEntity.java

@ -84,14 +84,13 @@ public class SysUserEntity implements Serializable {
* 工厂编号
*/
@NotBlank(message="工厂编码不能为空", groups = {AddGroup.class, UpdateGroup.class})
private Long site;
private String site;
public Long getSite() {
public String getSite() {
return site;
}
public void setSite(Long site) {
public void setSite(String site) {
this.site = site;
}

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

@ -74,7 +74,7 @@
and D.EnterDate<![CDATA[ >= ]]> #{date3}
</if>
<if test="date4 != null">
and D.EnterDate-1<![CDATA[<]]> #{date4}
and D.EnterDate-1 <![CDATA[<]]> #{date4}
</if>
<if test="date1 != null">
and D.NeedDate<![CDATA[ >= ]]>#{date1}

14
src/main/resources/mapper/production/PalletMapper.xml

@ -3,7 +3,7 @@
<mapper namespace="com.letian.modules.production.dao.PalletMapper">
<select id="getPalletData" resultType="com.letian.modules.production.entity.PalletListData">
SELECT top 5000 id,site,pallet_no,pallet_desc,status,virtual_flag,area,current_location,created_date,created_by,update_date,update_by,
SELECT top 2000 id,site,pallet_no,pallet_desc,status,virtual_flag,area,current_location,created_date,created_by,update_date,update_by,
version from pallet_list
<where>
<if test="status != null and status != ''">
@ -22,7 +22,7 @@
AND created_date>#{date2}
</if>
</where>
order By created_date DESC
order By pallet_no DESC
</select>
<insert id="savePallet" parameterType="com.letian.modules.production.entity.PalletListData">
@ -184,6 +184,12 @@
<update id="updateQtyReported">
update SOScheduledRouting set QtyReported=QtyReported+1 where Site =#{site} and OrderNo=#{orderNo} and S_ScheduledDate=#{orderDate} and S_ShiftNo=#{shiftId}
</update>
<update id="updateSOSdelFlag">
update SOScheduledRouting set ClosedFlag='Y',Closedby=#{userId},ClosedDate=GetDate() where Site =#{site} and OrderNo=#{orderNo} and S_ScheduledDate=#{orderDate} and S_ShiftNo=#{shiftId}
</update>
<select id="getSOScheduleData" resultType="SOScheduledRoutingData">
select top 1 QtyReported,QtyRequired,SeqNo,S_WorkCenterNo,S_ResourceID from SOScheduledRouting where Site =#{site} and OrderNo=#{orderNo} and S_ScheduledDate=#{orderDate} and S_ShiftNo=#{shiftId}
</select>
<select id="getNotifyHeaderData" resultType="com.letian.modules.pda.entity.NotifyHeaderOutData">
SELECT pickupStatus from CODelNotifyHeader where Site=#{site} and DelNotifyNo=#{delNotifyNo}
</select>
@ -191,4 +197,8 @@
<update id="finishPreparation">
update CODelNotifyHeader set pickupStatus='备货完成',Pickupdate=GetDate(),Pickupby=#{username} where Site =#{site} and DelNotifyNo=#{delNotifyNo}
</update>
<delete id="deleteSOSList">
delete from SOScheduledList where Site=#{site} and WorkCenterNo=#{workCenterNo} and ResourceID=#{resourceId} and LinkedSeqNo=#{seqNo}
</delete>
</mapper>
Loading…
Cancel
Save