|
|
|
|
@ -57,6 +57,8 @@ import org.springblade.scheduling.scheduling.service.*; |
|
|
|
|
import org.springblade.scheduling.scheduling.vo.PersonAbilityVO; |
|
|
|
|
import org.springblade.scheduling.scheduling.vo.SameTroughVO; |
|
|
|
|
import org.springblade.scheduling.scheduling.vo.WorkPlanVO; |
|
|
|
|
import org.springblade.wms.feign.StGlassCakeOutClient; |
|
|
|
|
import org.springblade.wms.pojo.dto.StGlassCakeOutDTO; |
|
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
@ -103,6 +105,7 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO |
|
|
|
|
private final ICraftAbilityService craftAbilityService; |
|
|
|
|
private final IPartVersionService partVersionService; |
|
|
|
|
private final IPartRelationService partRelationService; |
|
|
|
|
private final StGlassCakeOutClient glassCakeOutClient; |
|
|
|
|
|
|
|
|
|
@Value("${business.oldMes.url}") |
|
|
|
|
private String oldMesUrl; |
|
|
|
|
@ -408,6 +411,7 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO |
|
|
|
|
Map<Long, List<SintTempCurveEntity>> sintMap, |
|
|
|
|
Map<Long, String> workCenterMap, |
|
|
|
|
Map<Long, String> craftAbilityMap) { |
|
|
|
|
List<StGlassCakeOutDTO> glassCakeOutList = new ArrayList<>(); |
|
|
|
|
List<WorkOrderEntity> workOrderList = new ArrayList<>(); |
|
|
|
|
list = mergeYieldOrderList(list); |
|
|
|
|
LocalDateTime localDateTime = LocalDateTime.now(); |
|
|
|
|
@ -875,6 +879,15 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO |
|
|
|
|
order.setErrorInfo(null); |
|
|
|
|
yieldOrderService.updateById(order); |
|
|
|
|
workOrderList.add(workOrder); |
|
|
|
|
if(order.getYieldType() == YieldOrderEnum.YIELD_TYPE_3.getCode()){ |
|
|
|
|
StGlassCakeOutDTO glassDto = new StGlassCakeOutDTO(); |
|
|
|
|
glassDto.setPrintMark("1".equals(part.getIsPrint()) ? false : true); |
|
|
|
|
glassDto.setPowderWeight(part.getPowderWeight().toString()); |
|
|
|
|
glassDto.setMaterialNo(part.getMaterial()); |
|
|
|
|
glassDto.setThickness(part.getFormingThickness().toString()); |
|
|
|
|
glassCakeOutList.add(glassDto); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.error("报错订单是:" + order.getId() + ",报错信息是:" + e.getMessage()); |
|
|
|
|
@ -882,6 +895,9 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
if(CollectionUtils.isNotEmpty(glassCakeOutList)){ |
|
|
|
|
glassCakeOutClient.batchGeneratePreOutOrder(glassCakeOutList); |
|
|
|
|
} |
|
|
|
|
if (CollectionUtils.isNotEmpty(workOrderList)) { |
|
|
|
|
this.sendWorkOrderToOldMes(workOrderList); |
|
|
|
|
} |
|
|
|
|
@ -1596,11 +1612,6 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO |
|
|
|
|
return map; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public IPage<WorkOrderVO> selectGlassCakeOrderPage(IPage<WorkOrderVO> page, WorkOrderVO workOrder) { |
|
|
|
|
return page.setRecords(baseMapper.selectGlassCakeOrderPage(page, workOrder)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void saveWorkOrderFromBak(String cardNo) { |
|
|
|
|
@ -1709,6 +1720,18 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO |
|
|
|
|
return page.setRecords(list); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void test() { |
|
|
|
|
List<StGlassCakeOutDTO> list = new ArrayList<>(); |
|
|
|
|
StGlassCakeOutDTO glassDto = new StGlassCakeOutDTO(); |
|
|
|
|
glassDto.setPrintMark(false); |
|
|
|
|
glassDto.setPowderWeight("1"); |
|
|
|
|
glassDto.setMaterialNo("2"); |
|
|
|
|
glassDto.setThickness("3"); |
|
|
|
|
list.add(glassDto); |
|
|
|
|
glassCakeOutClient.batchGeneratePreOutOrder(list); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public Double calPersonHours(YieldOrderEntity order,YieldOrderCraftEntity craft,PartEntity part){ |
|
|
|
|
Double personTime = 0.0; |
|
|
|
|
List<PersonAbilityEntity> personAbilityList = personAbilityService.list(Wrappers.<PersonAbilityEntity>lambdaQuery() |
|
|
|
|
|