|
|
|
@ -97,6 +97,18 @@ public class SfcDispatchServiceImpl extends ServiceImpl<SfcDispatchMapper, SfcDi
|
|
|
|
|
public List<SfcDispatchDto> findSfcDispatchList(Map paramMap) {
|
|
|
|
|
List<SfcDispatchDto> list = sfcDispatchMapper.findSfcDispatchList(paramMap);
|
|
|
|
|
if (list == null || list.size() <= 0) {
|
|
|
|
|
// List<SfcDispatchDto> sfcDispatchDtoList=new ArrayList<>();
|
|
|
|
|
// for(SfcDispatchDto sfcDispatchDto:list){
|
|
|
|
|
// Sfc sfcServiceById = sfcService.getById(HandleEnum.SFC.getHandle(CommonMethods.getSite(), sfcDispatchDto.getSfc()));
|
|
|
|
|
// if (sfcServiceById==null){
|
|
|
|
|
// sfcDispatchDto.setDrawingsRevision(null);
|
|
|
|
|
// }else {
|
|
|
|
|
// String itemBo = sfcServiceById.getItemBo();
|
|
|
|
|
// String path="/"+ StringUtil.trimHandle(itemBo)+"_"+StringUtil.trimRevision(itemBo)+"/";
|
|
|
|
|
// sfcDispatchDto.setDrawingsRevision(path);
|
|
|
|
|
// }
|
|
|
|
|
// sfcDispatchDtoList.add(sfcDispatchDto);
|
|
|
|
|
// }
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -233,8 +245,8 @@ public class SfcDispatchServiceImpl extends ServiceImpl<SfcDispatchMapper, SfcDi
|
|
|
|
|
String shopOrder = sfcDispatchDto.getShopOrder();
|
|
|
|
|
String dispatchNo = sfcDispatchDto.getDispatchNo();
|
|
|
|
|
String status = sfcDispatchDto.getDispatchStatus();
|
|
|
|
|
if (!DispatchStatusEnum.NEW.getCode().equals(status) && !DispatchStatusEnum.RELEASE.getCode().equals(status) && !DispatchStatusEnum.PAUSE.getCode().equals(status)) {
|
|
|
|
|
throw BusinessException.build("工单[" + shopOrder + "]的派工单[" + dispatchNo + "]派工状态不是新建、发布或暂挂状态,不能变更为取消!");
|
|
|
|
|
if (!DispatchStatusEnum.NEW.getCode().equals(status) && !DispatchStatusEnum.RELEASE.getCode().equals(status) && !DispatchStatusEnum.PAUSE.getCode().equals(status) && !DispatchStatusEnum.START.getCode().equals(status)) {
|
|
|
|
|
throw BusinessException.build("工单[" + shopOrder + "]的派工单[" + dispatchNo + "]派工状态不是新建、发布、已开始或暂挂状态,不能变更为取消!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//校验派工单领料状态为无需叫料或未叫料
|
|
|
|
|