根据sfc查处workCenter

master
赵嘉伟 3 years ago
parent 9103dfb8f6
commit 30c739062d

@ -361,12 +361,12 @@ public class AbnormalBillController {
}
@GetMapping("/findResrceBySfc")
public R findResrceBySfc(SfcDispatchDto sfcDispatch){
@GetMapping("/findResrceAndWorkCenterBySfc")
public R findResrceAndWorkCenterBySfc(SfcDispatchDto sfcDispatch){
try{
return R.ok(sfcDispatchCommonService.findResrceBySfc(sfcDispatch));
return R.ok(sfcDispatchCommonService.findResrceAndWorkCenterBySfc(sfcDispatch));
}catch (Exception e){
return R.failed("根据sfc查找设备失败:"+e.getMessage());
return R.failed("根据sfc查找设备和工作中心失败:"+e.getMessage());
}
}

@ -43,7 +43,7 @@ public interface SfcDispatchCommonService {
* @param sfcDispatch
* @return
*/
SfcDispatchDto findResrceBySfc(SfcDispatchDto sfcDispatch);
SfcDispatchDto findResrceAndWorkCenterBySfc(SfcDispatchDto sfcDispatch);
/**
*

@ -53,7 +53,7 @@ public interface SfcDispatchMapper extends BaseMapper<SfcDispatch> {
* @param site
* @return
*/
SfcDispatchDto findResrceBySfc(@Param("sfcDispatch")SfcDispatchDto sfcDispatch, @Param("site") String site);
SfcDispatchDto findResrceAndWorkCenterBySfc(@Param("sfcDispatch")SfcDispatchDto sfcDispatch, @Param("site") String site);
SfcDispatchDto findSfcDispatchBySfc(@Param("site")String site, @Param("dto")SfcDispatchDto sfcDispatch);

@ -691,10 +691,9 @@ public class SfcDispatchServiceImpl extends ServiceImpl<SfcDispatchMapper, SfcDi
}
@Override
public SfcDispatchDto findResrceBySfc(SfcDispatchDto sfcDispatch) {
public SfcDispatchDto findResrceAndWorkCenterBySfc(SfcDispatchDto sfcDispatch) {
String site = CommonMethods.getSite();
String[] status = {"START","COMPLETE"};
return sfcDispatchMapper.findResrceBySfc(sfcDispatch,site);
return sfcDispatchMapper.findResrceAndWorkCenterBySfc(sfcDispatch,site);
}
@Override

@ -794,15 +794,15 @@
WHERE SITE = #{site} AND DISPATCH_NO = #{dispatchNo}
</update>
<select id="findResrceBySfc" resultType="com.foreverwin.mesnac.common.dto.SfcDispatchDto">
SELECT ZSD2.RESRCE FROM
<select id="findResrceAndWorkCenterBySfc" resultType="com.foreverwin.mesnac.common.dto.SfcDispatchDto">
SELECT ZSD2.RESRCE,ZSD2.WORK_CENTER WORK_CENTER FROM
SFC S
INNER JOIN SFC_ROUTING SR ON SR.SFC_BO = S.HANDLE
INNER JOIN SFC_ROUTER ST ON ST.SFC_ROUTING_BO = SR.HANDLE
INNER JOIN SFC_STEP SS ON SS.SFC_ROUTER_BO = ST.HANDLE AND (SS.QTY_IN_QUEUE > 0 OR SS.QTY_IN_WORK > 0)
LEFT JOIN Z_SFC_DISPATCH ZSD2 ON ZSD2.DISPATCH_NO = S.SFC || '-' || SS.STEP_ID
WHERE S.SITE = #{site}
AND ZSD2.RESRCE IS NOT NULL AND S.SFC = #{sfcDispatch.sfc}
AND S.SFC = #{sfcDispatch.sfc}
</select>
<select id="findSfcDispatchBySfc" resultType="com.foreverwin.mesnac.common.dto.SfcDispatchDto">

@ -1,18 +1,18 @@
package com.foreverwin.mesnac.meapi.service.impl;
import com.foreverwin.mesnac.meapi.dto.ShopOrderDto;
import com.foreverwin.modular.core.util.CommonMethods;
import com.foreverwin.modular.core.util.FrontPage;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.meapi.model.ShopOrder;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.foreverwin.mesnac.meapi.dto.ShopOrderDto;
import com.foreverwin.mesnac.meapi.mapper.ShopOrderMapper;
import com.foreverwin.mesnac.meapi.model.ShopOrder;
import com.foreverwin.mesnac.meapi.service.ShopOrderService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.foreverwin.modular.core.util.CommonMethods;
import com.foreverwin.modular.core.util.FrontPage;
import com.sap.me.status.StatusBOHandle;
import org.eclipse.jetty.util.StringUtil;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;

Loading…
Cancel
Save