|
|
|
@ -39,6 +39,8 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.transaction.annotation.Propagation;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
import org.springframework.util.StringUtils;
|
|
|
|
|
|
|
|
|
@ -474,6 +476,7 @@ public class MesPackageNoGenerateStepService extends BaseStepService implements
|
|
|
|
|
mesProduceSnPrintModel.getPackageList().addAll(packageList);
|
|
|
|
|
|
|
|
|
|
MesProduceSnPrintModel printModel = null;
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
printModel = strategyService.execute(null, mesProduceSnPrintModel, null, stepResult, reqBean, true);
|
|
|
|
|
} catch (ImppBusiException e) {
|
|
|
|
@ -485,7 +488,10 @@ public class MesPackageNoGenerateStepService extends BaseStepService implements
|
|
|
|
|
this.sendMessage(reqBean, resultBean.writeDbLog(MesPcnEnumUtil.WORK_CELL_SCAN_MONITOR_LOG_TYPE.ERROR.getValue()), webMsg, MesPcnEnumUtil.STATION_BUSI_TYPE.MESSAGE, MesPcnEnumUtil.STATION_DATA_TYPE.EXP_TEXT);
|
|
|
|
|
this.cacheException(reqBean, reqBean.getStepName(), webMsg, e, true);
|
|
|
|
|
foundExThrowNoShowMsg();
|
|
|
|
|
} else MesPcnException.throwBusiException("%s %s!", webMsg, e.toString());
|
|
|
|
|
} else {
|
|
|
|
|
this.cacheException(reqBean, reqBean.getStepName(), webMsg, e, false);
|
|
|
|
|
MesPcnException.throwBusiException(webMsg);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (CollectionUtils.isEmpty(printModel.getPrintContextList())) return;
|
|
|
|
@ -503,6 +509,7 @@ public class MesPackageNoGenerateStepService extends BaseStepService implements
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
@Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = {ImppBusiException.class, Exception.class})
|
|
|
|
|
public void doForcePrint(StationRequestBean reqBean, StationResultBean resultBean, StepResult stepResult, List<MesPackageDataContext> packageDataContextList, MesPackage packageDb) {
|
|
|
|
|
savePackageDb(reqBean, packageDb, packageDataContextList.size(), true, false);
|
|
|
|
|
List<MesPackage> packageList = new ArrayList<>();
|
|
|
|
|