|
|
|
@ -31,7 +31,10 @@ import com.foreverwin.mesnac.production.mapper.SfcCrossMapper;
|
|
|
|
|
import com.foreverwin.mesnac.production.mapper.SfcDataAssembleMapper;
|
|
|
|
|
import com.foreverwin.mesnac.production.model.LoadInventory;
|
|
|
|
|
import com.foreverwin.mesnac.production.model.SfcHoldLog;
|
|
|
|
|
import com.foreverwin.mesnac.production.service.*;
|
|
|
|
|
import com.foreverwin.mesnac.production.service.LoadInventoryService;
|
|
|
|
|
import com.foreverwin.mesnac.production.service.PodTemplateService;
|
|
|
|
|
import com.foreverwin.mesnac.production.service.SfcCrossService;
|
|
|
|
|
import com.foreverwin.mesnac.production.service.SfcHoldLogService;
|
|
|
|
|
import com.foreverwin.modular.core.exception.BaseException;
|
|
|
|
|
import com.foreverwin.modular.core.meext.MEServices;
|
|
|
|
|
import com.foreverwin.modular.core.util.CommonMethods;
|
|
|
|
@ -40,6 +43,7 @@ import com.sap.me.production.AssemblyComponent;
|
|
|
|
|
import com.sap.me.production.AssemblyDataField;
|
|
|
|
|
import com.sap.me.production.AssemblyServiceInterface;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
import org.springframework.context.i18n.LocaleContextHolder;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
@ -55,6 +59,8 @@ import java.util.*;
|
|
|
|
|
@Service
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
public class PodTemplateServiceImpl implements PodTemplateService {
|
|
|
|
|
@Value("${ws.erp.enabled}")
|
|
|
|
|
private boolean enabled;
|
|
|
|
|
@Autowired
|
|
|
|
|
private ResrceService resrceService;
|
|
|
|
|
@Autowired
|
|
|
|
@ -334,7 +340,9 @@ public class PodTemplateServiceImpl implements PodTemplateService {
|
|
|
|
|
//更改派工单状态
|
|
|
|
|
sfcDispatchCommonService.updateSfcDispatchStatus(site, CommonMethods.getUser(), dispatchNo, DispatchStatusEnum.COMPLETE.getCode(),workHour);
|
|
|
|
|
//报工
|
|
|
|
|
sendErp(sfc, stepId, qty, BigDecimal.ZERO, workHour);
|
|
|
|
|
if (enabled){
|
|
|
|
|
sendErp(sfc, stepId, qty, BigDecimal.ZERO, workHour);
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
ExceptionUtil.throwException(e);
|
|
|
|
|
}
|
|
|
|
|