条码打印次数更新

tags/yfai-pcn-ext-v2.1
xiangwei.zhang 9 months ago
parent ccc52308e3
commit a05cd762bc

@ -171,6 +171,8 @@ public class MesProduceSnPrintService implements IMesProduceSnPrintService {
resultModel.getMesProduceSnList().forEach(mesProduceSn -> {
mesProduceSn.setWorkCenterCode(workCenterCode);
mesProduceSn.setPrintCount(MesPcnExtConstWords.ONE);
mesProduceSn.setPrintStatus(MesExtEnumUtil.PRINT_STATUS.PRINTED.getValue());
mesProduceSn.setFid(UUID.randomUUID().toString());
//保存条码
mesProduceSnRDao.insert(mesProduceSn);

@ -143,9 +143,13 @@ public class MesProductSnPrintStepService extends BaseStepService {
for (MesProductionPsOutContext outSn : productionPsOutContextList) {
DdlPackBean packBean = DdlPackBean.getDdlPackBean(outSn.getOrganizeCode());
DdlPreparedPack.getNumEqualPack(outSn.getId(), MesPcnExtConstWords.ID, packBean);
mesProduceSnRao.updateByProperties(
new String[]{MesPcnExtConstWords.PRINT_STATUS, MesPcnExtConstWords.MODIFY_USER, MesPcnExtConstWords.MODIFY_DATE_TIME},
new Object[]{MesExtEnumUtil.PRINT_STATUS.PRINTED.getValue(), reqBean.getUserInfo(), TimeTool.getNowTime(true)}, packBean);
MesProduceSn produceSn = mesProduceSnRao.getByProperty(packBean);
if (produceSn!= null) {
mesProduceSnRao.updateByProperties(
new String[]{MesPcnExtConstWords.PRINT_STATUS, "printCount", MesPcnExtConstWords.MODIFY_USER, MesPcnExtConstWords.MODIFY_DATE_TIME},
new Object[]{MesExtEnumUtil.PRINT_STATUS.PRINTED.getValue(),MesPcnExtConstWords.ONE, reqBean.getUserInfo(), TimeTool.getNowTime(true)}, packBean);
}
}
//保存打印条码记录
snLogRao.saveAll(snLogList);

Loading…
Cancel
Save