cl
2024-05-23 ba1a7a9ef126296e2798e313dc5b43f775a1123c
guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP170Callback.java
@@ -28,7 +28,6 @@
import cn.stylefeng.guns.modular.sc.serialNumbersConf.service.SerialNumbersConfService;
import cn.stylefeng.guns.plcserver.opc.GlobalVariable;
import cn.stylefeng.guns.plcserver.opc.OPCElement;
import cn.stylefeng.guns.plcserver.opc.unit.OPCUnit;
import cn.stylefeng.guns.plcserver.tool.DateTool;
import cn.stylefeng.guns.plcserver.tool.LogUtil;
import com.kangaroohy.milo.model.ReadWriteEntity;
@@ -166,6 +165,7 @@
                .getValue().toString();
        ReadWriteEntity entity = new ReadWriteEntity(OPCElement.OP170_J_PC_FINISH,true);
        miloService.writeToOpcUa(entity);//写PC完成
        //修改报工记录
        ProductionOrderRecordsParam productionOrderRecordsParam = new ProductionOrderRecordsParam();
        productionOrderRecordsParam.setWorkOrderNo(S_ORDER_CODE);
@@ -174,7 +174,9 @@
        if(!list2.isEmpty()){
            ProductionOrderRecordsResult productionOrderRecordsResult = list2.get(0);
            productionOrderRecordsParam.setId(productionOrderRecordsResult.getId());
            productionOrderRecordsParam.setWhetherPass(S_PRODUCT_STATE_CODE);
                if("2".equals(S_PRODUCT_STATE_CODE)) {
                    productionOrderRecordsParam.setWhetherPass("不合格");
                }
            productionOrderRecordsParam.setEndTime(DateTool.getLocalTimeForDate());
            productionOrderRecordsService.update(productionOrderRecordsParam);
        }
@@ -210,7 +212,9 @@
        logger.info("OP170工位,handleFinsh PC处理完成!");
    }
    public void handleMaterial() {
        if(S_ORDER_CODE.isEmpty()){
            return;
        }
        //查询批次上料信息
        ProductionOrderBatchInfoParam productionOrderBatchInfoParam = new ProductionOrderBatchInfoParam();
        productionOrderBatchInfoParam.setWorkOrderNo(S_ORDER_CODE);