操作面板完成

master
philip 3 years ago
parent ea3e2c5c9f
commit 2a7422d305

@ -13,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -76,9 +77,16 @@ public class PodTemplateController {
if (StringUtil.isBlank(resrce)) { if (StringUtil.isBlank(resrce)) {
throw new BaseException("资源不能为空"); throw new BaseException("资源不能为空");
} }
for (SfcDto sfcDto : sfcDtoList) { ArrayList<String> sfcList = new ArrayList<>();
podTemplateService.sfcComplete(sfcDto,resrce); try {
for (SfcDto sfcDto : sfcDtoList) {
String completeSfc = podTemplateService.sfcComplete(sfcDto, resrce);
sfcList.add(completeSfc);
}
}catch (Exception e){
return R.failed(sfcList,e.getMessage());
} }
return R.ok(); return R.ok();
} }

@ -16,7 +16,7 @@ public interface PodTemplateService {
void sfcStart(Map<String, Object> map); void sfcStart(Map<String, Object> map);
void sfcComplete(SfcDto sfcDto, String resrce); String sfcComplete(SfcDto sfcDto, String resrce);
void sendErp(String sfc, String stepId, BigDecimal qty, BigDecimal scrapQty, BigDecimal workHour); void sendErp(String sfc, String stepId, BigDecimal qty, BigDecimal scrapQty, BigDecimal workHour);

@ -237,7 +237,7 @@ public class PodTemplateServiceImpl implements PodTemplateService {
} }
@Override @Override
public void sfcComplete(SfcDto sfcDto, String resrce) { public String sfcComplete(SfcDto sfcDto, String resrce) {
String site = CommonMethods.getSite(); String site = CommonMethods.getSite();
String operation = sfcDto.getOperation(); String operation = sfcDto.getOperation();
Operation currentRevisionRef = operationService.getCurrentRevisionRef(site, operation); Operation currentRevisionRef = operationService.getCurrentRevisionRef(site, operation);
@ -309,6 +309,7 @@ public class PodTemplateServiceImpl implements PodTemplateService {
} catch (Exception e) { } catch (Exception e) {
ExceptionUtil.throwException(e); ExceptionUtil.throwException(e);
} }
return sfc;
} }

Loading…
Cancel
Save