春风项目四线(合箱线、总装线)
yyt
2024-05-20 d4f4376ab5aef071cb841de0f9a9b7f6cb16c651
增加380新产品
已添加4个文件
已修改19个文件
1084 ■■■■■ 文件已修改
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/common/Constants.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java 139 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/mapper/BsOrderSchedulingMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/IBsOrderSchedulingService.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/impl/BsOrderSchedulingServiceImpl.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/vo/SumDataVO.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/controller/DaOpcuaConfigController.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/mapper/OmProductionOrdeInfoMapper.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/IOmProductionOrdeInfoService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/impl/OmProductionOrdeInfoServiceImpl.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/plcserver/conf/OPCElement.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/bs/orderScheduling/BsOrderSchedulingMapper.xml 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/da/paramCollection/DaParamCollectionMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/om/productionOrde/OmProductionOrdeInfoMapper.xml 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-quartz/src/main/java/com/jcdm/quartz/task/RyTask.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/api/main/bs/orderScheduling/orderScheduling.js 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/login.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/kb/BalanceShaft/index.vue 281 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/kb/crankshaft/index.vue 243 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/om/productionOrde/detail.vue 184 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/om/productionOrde/index.vue 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/common/Constants.java
@@ -10,4 +10,9 @@
    public static final String IS_REPAIR = "是";
    public static final String IS_NOT_REPAIR = "否";
    public static final String UN_QUALIFIED = "0";
    public static final String ORDER_STATUS_ING = "2";
    public static final String WAIT_PRODUCTION = "1";
    public static final String FINISH_PRODUCTION = "3";
}
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java
@@ -12,26 +12,36 @@
import com.jcdm.common.core.domain.entity.SysDictData;
import com.jcdm.common.core.page.TableDataInfo;
import com.jcdm.common.enums.BusinessType;
import com.jcdm.common.utils.SecurityUtils;
import com.jcdm.common.utils.StringUtils;
import com.jcdm.common.utils.poi.ExcelUtil;
import com.jcdm.main.bs.orderScheduling.common.Constants;
import com.jcdm.main.bs.orderScheduling.domain.BsOrderScheduling;
import com.jcdm.main.bs.orderScheduling.service.IBsOrderSchedulingService;
import com.jcdm.main.bs.orderScheduling.vo.FollowReportVO;
import com.jcdm.main.bs.orderScheduling.vo.LineChartVO;
import com.jcdm.main.bs.orderScheduling.vo.SumDataVO;
import com.jcdm.main.da.paramCollection.domain.DaParamCollection;
import com.jcdm.main.da.paramCollection.mapper.DaParamCollectionMapper;
import com.jcdm.main.da.paramCollection.service.IDaParamCollectionService;
import com.jcdm.main.da.passingStationCollection.domain.DaPassingStationCollection;
import com.jcdm.main.om.productionOrde.domain.OmProductionOrdeInfo;
import com.jcdm.main.om.productionOrde.service.impl.OmProductionOrdeInfoServiceImpl;
import com.jcdm.main.plcserver.conf.OPCElement;
import com.jcdm.main.plcserver.sub.OPCUaSubscription;
import com.jcdm.system.service.ISysDictDataService;
import com.kangaroohy.milo.model.ReadWriteEntity;
import com.kangaroohy.milo.service.MiloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
@@ -53,6 +63,10 @@
    @Resource
    private ISysDictDataService iSysDictDataService;
    @Resource
    private OmProductionOrdeInfoServiceImpl productionOrdeInfoService;
    @Resource
    private DaParamCollectionMapper daParamCollectionService;
    @Autowired
    MiloService miloService;
@@ -182,6 +196,21 @@
        return getDataTable(list);
    }
    @GetMapping("/list3")
    public TableDataInfo list3(BsOrderScheduling bsOrderScheduling)
    {
        startPage();
        List<BsOrderScheduling> list = new ArrayList<>();
        if (StringUtils.isNotEmpty(bsOrderScheduling.getOrderNo())){
            list = bsOrderSchedulingService.selectBsOrderSchedulingPage(bsOrderScheduling);
        }
        List<BsOrderScheduling> collect = list.stream().filter(x -> Constants.UN_QUALIFIED.equals(x.getQualityStatus())).collect(Collectors.toList());
        if (CollUtil.isNotEmpty(collect)){
            String.valueOf(collect.size());
        }
        return getDataTable(list);
    }
    /**
     * å¯¼å‡ºè®¢å•æŽ’产列表
     */
@@ -237,4 +266,114 @@
    {
        return toAjax(bsOrderSchedulingService.deleteBsOrderSchedulingByIds(ids));
    }
    @GetMapping("/getSumData")
    public R getSumData(BsOrderScheduling bsOrderScheduling){
        List<BsOrderScheduling> list = new ArrayList<>();
        int onlineNum = 0;
        int finishNum = 0;
        if (StringUtils.isNotEmpty(bsOrderScheduling.getOrderNo())){
            list = bsOrderSchedulingService.selectBsOrderSchedulingPage(bsOrderScheduling);
            List<BsOrderScheduling> onlineNumList = list.stream().filter(x -> Constants.ORDER_STATUS_ING.equals(x.getProductionStatus())).collect(Collectors.toList());
            if (CollUtil.isNotEmpty(onlineNumList)){
                onlineNum = onlineNumList.size();
            }
            List<BsOrderScheduling> finishNumList = list.stream().filter(x -> Constants.FINISH_PRODUCTION.equals(x.getProductionStatus())).collect(Collectors.toList());
            if (CollUtil.isNotEmpty(finishNumList)){
                finishNum = finishNumList.size();
            }
        }
        List<BsOrderScheduling> collect = list.stream().filter(x -> Constants.UN_QUALIFIED.equals(x.getQualityStatus())).collect(Collectors.toList());
        String unqualified = "0";
        if (CollUtil.isNotEmpty(collect)){
            unqualified = String.valueOf(collect.size());
        }
        SumDataVO vo = new SumDataVO();
        vo.setFinishNum(finishNum);
        vo.setOnlineNum(onlineNum);
        vo.setUnqualified(unqualified);
        return R.ok(vo);
    }
    /**
     * æ ¡éªŒå‘动机号是否和机型匹配、是否重复扫描、是否超出计划数量
     * @param engineNo ç®±ä½“码
     * @param model æœºåž‹
     * @return boolean
     */
    @Transactional(rollbackFor = Exception.class)
    @GetMapping("/engineNoIsInModel")
    public R engineNoIsInModel(String engineNo,String model,String orderNo) throws Exception {
        if (StringUtils.isEmpty(engineNo)){
            return R.ok(500,"箱体码为空或已存在,请重试");
        }
        BsOrderScheduling bsOrderScheduling = new BsOrderScheduling();
        bsOrderScheduling.setOrderNo(orderNo);
        //bsOrderScheduling.setProductionStatus("1");
        List<BsOrderScheduling> allList = bsOrderSchedulingService.selectBsOrderSchedulingList(bsOrderScheduling);
        List<BsOrderScheduling> dlist = allList.stream().filter(x->x.getProductionStatus().equals(Constants.WAIT_PRODUCTION)).collect(Collectors.toList());
        List<BsOrderScheduling> collect = allList.stream().filter(x -> x.getProductionStatus().equals(Constants.ORDER_STATUS_ING)
                        ||x.getProductionStatus().equals(Constants.FINISH_PRODUCTION)).collect(Collectors.toList());
        BsOrderScheduling OrderScheduling=dlist.get(0);
        DaParamCollection daParamCollection = new DaParamCollection();
        daParamCollection.setParamValue(engineNo);
        daParamCollection.setSfcCode("OP010");
        List<DaParamCollection> list = daParamCollectionService.selectDaParamCollectionList(daParamCollection);
        if (CollUtil.isNotEmpty(list)){
            return R.ok(500,"已存在此箱体码,请勿重复扫描");
        }
        OmProductionOrdeInfo info = new OmProductionOrdeInfo();
        info.setWorkOrderNo(orderNo);
        List<OmProductionOrdeInfo> omProductionOrdeInfos = productionOrdeInfoService.selectOmProductionOrdeInfoList(info);
        if (CollUtil.isNotEmpty(omProductionOrdeInfos)){
            OmProductionOrdeInfo omProductionOrdeInfo = omProductionOrdeInfos.get(0);
            Long planQty = omProductionOrdeInfo.getPlanQty();
            if (planQty<collect.size()){
                return R.ok(500,"超出计划数量,请检查后重试");
            }
        }
        //插入数据
        DaParamCollection saveData = new DaParamCollection();
        saveData.setSfcCode(OrderScheduling.getEngineNo());
        saveData.setParamValue(engineNo);
        saveData.setLocationCode("OP010");
        saveData.setParamCode("XTM");
        saveData.setParamName("箱体码");
        daParamCollectionService.insertDaParamCollection(saveData);
        //更新上线数量
        int onlineNum = 0;
        List<BsOrderScheduling> onlineNumList = bsOrderSchedulingService.selectBsOrderSchedulingList(bsOrderScheduling)
                .stream().filter(x -> Constants.ORDER_STATUS_ING.equals(x.getProductionStatus())||x.getProductionStatus().equals(Constants.FINISH_PRODUCTION)).collect(Collectors.toList());
        if (CollUtil.isNotEmpty(onlineNumList)){
            onlineNum = onlineNumList.size();
        }
        OmProductionOrdeInfo omProductionOrdeInfo = new OmProductionOrdeInfo();
        omProductionOrdeInfo.setWorkOrderNo(orderNo);
        List<OmProductionOrdeInfo> omList = productionOrdeInfoService.selectOmProductionOrdeInfoList(omProductionOrdeInfo);
        if (CollUtil.isNotEmpty(omList)){
            OmProductionOrdeInfo omInfo = omList.get(0);
            String s = String.valueOf(onlineNum);
            long l = Long.parseLong(s);
            omInfo.setActualOnlineQty(l);
            productionOrdeInfoService.updateOmProductionOrdeInfo(omInfo);
        }
        //OPC操作
        ReadWriteEntity entity = new ReadWriteEntity("CFL4HX.HOP010.Code", OrderScheduling.getEngineNo());
        OPCUaSubscription.miloService.writeToOpcUa(entity);//写SN
        ReadWriteEntity entity2 = new ReadWriteEntity("CFL4HX.HOP010.SNDoor", 1);
        OPCUaSubscription.miloService.writeToOpcByte(entity2);//写完成
        OrderScheduling.setProductionStatus("2");
        bsOrderSchedulingService.updateBsOrderScheduling(OrderScheduling);
        return R.ok();
    }
}
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/mapper/BsOrderSchedulingMapper.java
@@ -37,6 +37,8 @@
     */
    public List<BsOrderScheduling> selectBsOrderSchedulingList(BsOrderScheduling bsOrderScheduling);
    public List<BsOrderScheduling> selectBsOrderSchedulingPage(BsOrderScheduling bsOrderScheduling);
    public Integer getProduceNumToday(BsOrderScheduling bsOrderScheduling);
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/IBsOrderSchedulingService.java
@@ -36,6 +36,7 @@
     * @return è®¢å•æŽ’产集合
     */
    public List<BsOrderScheduling> selectBsOrderSchedulingList(BsOrderScheduling bsOrderScheduling);
    public List<BsOrderScheduling> selectBsOrderSchedulingPage(BsOrderScheduling bsOrderScheduling);
    public FollowReportVO getFollowReportList(BsOrderScheduling bsOrderScheduling);
    public List<LineChartVO> getOffLineNum();
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/impl/BsOrderSchedulingServiceImpl.java
@@ -92,6 +92,18 @@
    }
    @Override
    public List<BsOrderScheduling> selectBsOrderSchedulingPage(BsOrderScheduling bsOrderScheduling)
    {
        if(bsOrderScheduling.getDateConditions()!=null){
            String[] conditions = bsOrderScheduling.getDateConditions();
            bsOrderScheduling.setStartTime(conditions[0]);
            bsOrderScheduling.setEndTime(conditions[1]);
        }
        return bsOrderSchedulingMapper.selectBsOrderSchedulingPage(bsOrderScheduling);
    }
    @Override
    public FollowReportVO getFollowReportList(BsOrderScheduling bsOrderScheduling)
    {
        FollowReportVO vo = new FollowReportVO();
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/vo/SumDataVO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
package com.jcdm.main.bs.orderScheduling.vo;
import lombok.Data;
@Data
public class SumDataVO {
    private Integer onlineNum;
    private Integer finishNum;
    private String unqualified;
}
jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/controller/DaOpcuaConfigController.java
@@ -6,6 +6,8 @@
import com.jcdm.main.da.opcuaconfig.domain.DaOpcuaConfig;
import com.jcdm.main.da.opcuaconfig.domain.NodeEntity;
import com.jcdm.main.da.opcuaconfig.service.IDaOpcuaConfigService;
import com.jcdm.main.plcserver.sub.OPCUaSubscription;
import com.kangaroohy.milo.model.ReadWriteEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@@ -110,14 +112,13 @@
    @PreAuthorize("@ss.hasPermi('da:opcuaconfig:query')")
    @GetMapping(value = "/SNCode/{SNCode}/{locationCode}")
    public AjaxResult setSNCode(@PathVariable("SNCode") String SNCode,@PathVariable("locationCode") String locationCode) {
        //NodeEntity node= NodeEntity.builder().index(2).identifier("CFL4CVT"+"."+locationCode+".SNCode").value(SNCode).type("string").build();
        Boolean out= null;
        ReadWriteEntity entity = new ReadWriteEntity("CFL4HX."+locationCode+".SNCode", SNCode);
        Boolean out= true;
        try {
           // out = ClientHandler.write(node);
            OPCUaSubscription.miloService.writeToOpcUa(entity);//写SN
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        return toAjax(out);
    }
}
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java
@@ -81,11 +81,21 @@
    /**
     * èŽ·å–生产工单详细信息
     */
//    @PreAuthorize("@ss.hasPermi('om:productionOrde:query')")
//    @GetMapping(value = "/{id}")
//    public AjaxResult getInfo(@PathVariable("id") Long id)
//    {
//        return success(omProductionOrdeInfoService.selectOmProductionOrdeInfoById(id));
//    }
    /**
     * èŽ·å–生产工单详细信息
     */
    @PreAuthorize("@ss.hasPermi('om:productionOrde:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    @GetMapping("/{ids}")
    public AjaxResult getInfo(@PathVariable Long[] ids)
    {
        return success(omProductionOrdeInfoService.selectOmProductionOrdeInfoById(id));
        return success(omProductionOrdeInfoService.selectOmProductionOrdeInfoByIds(ids));
    }
    /**
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/mapper/OmProductionOrdeInfoMapper.java
@@ -21,6 +21,15 @@
    public OmProductionOrdeInfo selectOmProductionOrdeInfoById(Long id);
    /**
     * æŸ¥è¯¢ç”Ÿäº§å·¥å•
     *
     * @param ids ç”Ÿäº§å·¥å•ä¸»é”®
     * @return ç”Ÿäº§å·¥å•
     */
    public OmProductionOrdeInfo selectOmProductionOrdeInfoByIds(Long[] ids);
    /**
     * æŸ¥è¯¢ç”Ÿäº§å·¥å•åˆ—表
     * 
     * @param omProductionOrdeInfo ç”Ÿäº§å·¥å•
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/IOmProductionOrdeInfoService.java
@@ -22,6 +22,14 @@
    public OmProductionOrdeInfo selectOmProductionOrdeInfoById(Long id);
    /**
     * æŸ¥è¯¢ç”Ÿäº§å·¥å•
     *
     * @param ids ç”Ÿäº§å·¥å•ä¸»é”®
     * @return ç”Ÿäº§å·¥å•
     */
    public OmProductionOrdeInfo selectOmProductionOrdeInfoByIds(Long[] ids);
    /**
     * æŸ¥è¯¢ç”Ÿäº§å·¥å•åˆ—表
     * 
     * @param omProductionOrdeInfo ç”Ÿäº§å·¥å•
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/impl/OmProductionOrdeInfoServiceImpl.java
@@ -39,6 +39,18 @@
    }
    /**
     * æŸ¥è¯¢ç”Ÿäº§å·¥å•
     *
     * @param ids ç”Ÿäº§å·¥å•ä¸»é”®
     * @return ç”Ÿäº§å·¥å•
     */
    @Override
    public OmProductionOrdeInfo selectOmProductionOrdeInfoByIds(Long[] ids)
    {
        return omProductionOrdeInfoMapper.selectOmProductionOrdeInfoByIds(ids);
    }
    /**
     * æŸ¥è¯¢ç”Ÿäº§å·¥å•åˆ—表
     * 
     * @param omProductionOrdeInfo ç”Ÿäº§å·¥å•
jcdm-main/src/main/java/com/jcdm/main/plcserver/conf/OPCElement.java
@@ -22,12 +22,15 @@
    private static final String OP020_ITEM = "OP.OP100.";//
    private static final String OP120_ITEM_HX = "CFL4HX.OP120.";//
    private static final String OP120_ITEM_ZZ = "CFL4ZZ.OP120.";//
    private static final String OP020_ITEM_HX = "CFL4HX.HOP020.";//
    private static final String OP121_ITEM_ZZ = "CFL4ZZ.OP121.";//
    public static final String OP020_SaveRequest = OP020_ITEM + "SaveRequest";//请求保存
    public static final String OP120_SaveRequestLast = OP120_ITEM_HX + "SaveRequestLast";//请求保存
    public static final String OP020_MesSaveFeed = OP020_ITEM + "MesSaveFeed";//Mes保存完成
    public static final String OP120_ZZ_CODE_CHECK = OP120_ITEM_ZZ + "CodeCheck";//请求保存
    public static final String OP020_HX_CODE_CHECK = OP020_ITEM_HX + "CodeCheck";//请求保存
    public static final String OP121_ZZ_CODE_CHECK = OP121_ITEM_ZZ + "CodeCheckFeed";//请求保存
    public static final String OP050_HX_CODE_CHECK = "CFL4HX.OP050.CodeCheck";//请求保存
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java
@@ -199,6 +199,14 @@
                    || OPCElement.OP695_ZZ_CODE_CHECK.equals(Node) || OPCElement.OP755_ZZ_CODE_CHECK.equals(Node)){
                        rework(SNCode,Node,daPassingStationCollections,rmRepairRecords);
                    }
                    if (OPCElement.OP020_HX_CODE_CHECK.equals(Node)) {
                        //激光打码
                        String[] printcode=SNCode.split("\\s+");
                        ReadWriteEntity entity3 = new ReadWriteEntity("CFL4HX.HOP020.PrintCode1", printcode[0]);
                        OPCUaSubscription.miloService.writeToOpcUa(entity3);//写SN
                        ReadWriteEntity entity5 = new ReadWriteEntity("CFL4HX.HOP020.PrintCode2", printcode[1]);
                        OPCUaSubscription.miloService.writeToOpcUa(entity5);//写SN
                    }
                    System.out.println(entity);
                }
@@ -461,7 +469,7 @@
            //更新工单状态
            if ("OP790".equals(parts[1])) {
                bsOrderScheduling.setReport20("0");
                //bsOrderScheduling.setReport20("0");
                bsOrderScheduling.setProductionStatus("3");
                bsOrderScheduling.setFinalAssemblyOfflineTime(new Date());
            }else if("OP050".equals(parts[1])){
@@ -469,6 +477,7 @@
                bsOrderScheduling.setProductionStatus("2");
                bsOrderScheduling.setBoxClosingOnlineTime(new Date());
            }else if("OP120".equals(parts[1])){
                bsOrderScheduling.setReport20("0");
                bsOrderScheduling.setFinalAssemblyLaunchTime(new Date());
                bsOrderScheduling.setClosingBoxOfflineTime(new Date());
            }
jcdm-main/src/main/resources/mapper/bs/orderScheduling/BsOrderSchedulingMapper.xml
@@ -94,6 +94,58 @@
            </if>
        </where>
    </select>
    <select id="selectBsOrderSchedulingPage" parameterType="BsOrderScheduling" resultMap="BsOrderSchedulingResult">
        <include refid="selectBsOrderSchedulingVo"/>
        <where>
            <if test="orderNo != null  and orderNo != ''"> and order_no = #{orderNo}</if>
            <if test="engineNo != null  and engineNo != ''"> and engine_no = #{engineNo}</if>
            <if test="productType != null  and productType != ''"> and product_type = #{productType}</if>
            <if test="model != null  and model != ''"> and model = #{model}</if>
            <if test="productionStatus != null  and productionStatus != ''"> and production_status = #{productionStatus}</if>
            <if test="workingHours != null  and workingHours != ''"> and working_hours = #{workingHours}</if>
            <if test="currentWorkstation != null  and currentWorkstation != ''"> and current_workstation = #{currentWorkstation}</if>
            <if test="qualityStatus != null  and qualityStatus != ''"> and quality_status = #{qualityStatus}</if>
            <if test="whetherOrPrint != null  and whetherOrPrint != ''"> and whether_or_print = #{whetherOrPrint}</if>
            <if test="report10 != null  and report10 != ''"> and report_10 = #{report10}</if>
            <if test="report20 != null  and report20 != ''"> and report_20 = #{report20}</if>
            <if test="combinedBoxTime != null  and combinedBoxTime != ''"> and combined_box_time = #{combinedBoxTime}</if>
            <if test="finalAssemblyTime != null  and finalAssemblyTime != ''"> and final_assembly_time = #{finalAssemblyTime}</if>
            <if test="operator != null  and operator != ''"> and operator = #{operator}</if>
            <if test="operateTime != null  and operateTime != ''"> and operate_time = #{operateTime}</if>
            <if test="status != null  and status != ''"> and status = #{status}</if>
            <if test="spareField1 != null  and spareField1 != ''"> and spare_field_1 = #{spareField1}</if>
            <if test="spareField2 != null  and spareField2 != ''"> and spare_field_2 = #{spareField2}</if>
            <if test="spareField3 != null  and spareField3 != ''"> and spare_field_3 = #{spareField3}</if>
            <if test="spareField4 != null  and spareField4 != ''"> and spare_field_4 = #{spareField4}</if>
            <if test="createUser != null  and createUser != ''"> and create_user = #{createUser}</if>
            <if test="updateUser != null  and updateUser != ''"> and update_user = #{updateUser}</if>
            <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
            <if test="report30 != null  and report30 != ''"> and report_30 = #{report30}</if>
            <if test="dateConditions != null  and dateConditions != ''"> and operate_time BETWEEN #{startTime} AND #{endTime}</if>
            <if test="boxClosingOnlineTime != null  and boxClosingOnlineTime != ''"> and box_closing_online_time = #{boxClosingOnlineTime}</if>
            <if test="closingBoxOfflineTime != null  and closingBoxOfflineTime != ''"> and closing_box_offline_time = #{closingBoxOfflineTime}</if>
            <if test="finalAssemblyLaunchTime != null  and finalAssemblyLaunchTime != ''"> and final_assembly_launch_time = #{finalAssemblyLaunchTime}</if>
            <if test="finalAssemblyOfflineTime != null  and finalAssemblyOfflineTime != ''"> and final_assembly_offline_time = #{finalAssemblyOfflineTime}</if>
            <if test="cvtLaunchTime != null  and cvtLaunchTime != ''"> and cvt_launch_time = #{cvtLaunchTime}</if>
            <if test="cvtOfflineTime != null  and cvtOfflineTime != ''"> and cvt_offline_time = #{cvtOfflineTime}</if>
            <if test="startTime != null and startTime != '' and endTime != null and endTime != ''"> and cvt_offline_time between #{startTime} and #{endTime}</if>
            <if test="engineNoList != null and engineNoList.size() > 0">
                and engine_no in
                <foreach collection="engineNoList" open="(" close=")" separator="," item="engine">
                    #{engine}
                </foreach>
            </if>
            <if test="engineNoListExcel != null and engineNoListExcel.size() > 0">
                and engine_no in
                <foreach collection="engineNoListExcel" open="(" close=")" separator="," item="engine">
                    #{engine}
                </foreach>
            </if>
            and (production_status = '2' or production_status = '3')
        </where>
        order by create_time DESC
    </select>
    
    <select id="selectBsOrderSchedulingById" parameterType="Long" resultMap="BsOrderSchedulingResult">
        <include refid="selectBsOrderSchedulingVo"/>
jcdm-main/src/main/resources/mapper/da/paramCollection/DaParamCollectionMapper.xml
@@ -46,6 +46,7 @@
            <if test="locationCode != null  and locationCode != ''"> and location_code = #{locationCode}</if>
            <if test="equipmentNo != null  and equipmentNo != ''"> and equipment_no = #{equipmentNo}</if>
            <if test="paramCode != null  and paramCode != ''"> and param_code = #{paramCode}</if>
            <if test="paramValue != null  and paramValue != ''"> and param_value = #{paramValue}</if>
            <if test="dateConditions != null  and dateConditions != ''"> and collection_time BETWEEN #{startTime} AND #{endTime}</if>
        </where>
    </select>
jcdm-main/src/main/resources/mapper/om/productionOrde/OmProductionOrdeInfoMapper.xml
@@ -82,6 +82,15 @@
        <include refid="selectOmProductionOrdeInfoVo"/>
        where id = #{id}
    </select>
    <select id="selectOmProductionOrdeInfoByIds" parameterType="String" resultMap="OmProductionOrdeInfoResult">
        select type_z,product_code,line_code,route_code, bom_code, recipe_code, sum(plan_qty) plan_qty,serial_number, order_status from om_production_orde_info
        where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
        GROUP BY  type_z,product_code,line_code,route_code, bom_code, recipe_code,serial_number, order_status
    </select>
        
    <insert id="insertOmProductionOrdeInfo" parameterType="OmProductionOrdeInfo">
        insert into om_production_orde_info
jcdm-quartz/src/main/java/com/jcdm/quartz/task/RyTask.java
@@ -54,6 +54,7 @@
                orderScheduling.setReport10("1");
                int i = bsOrderSchedulingService.updateBsOrderScheduling(orderScheduling);
                System.out.println("更新状态成功");
                //logger.info("{}合箱报工成功",orderScheduling.getOrderNo());
            }
        }
    }
@@ -63,12 +64,13 @@
        bsOrderScheduling.setReport20("0");
        List<BsOrderScheduling> bsOrderSchedulings = bsOrderSchedulingService.selectBsOrderSchedulingList(bsOrderScheduling);
        for (BsOrderScheduling orderScheduling : bsOrderSchedulings) {
            String xmlResult = ReceivingServices.getInterfaceInformationXml(url, getProductionPlanInformationXml(orderScheduling.getOrderNo(), "0790"));
            String xmlResult = ReceivingServices.getInterfaceInformationXml(url, getProductionPlanInformationXml(orderScheduling.getOrderNo(), "0020"));
            String status = ReceivingServices.xmlToJSON3(xmlResult);
            if(status.equals("1")){
                orderScheduling.setReport20("1");
                int i = bsOrderSchedulingService.updateBsOrderScheduling(orderScheduling);
                System.out.println("更新状态成功");
                //logger.info("{}总装报工成功",orderScheduling.getOrderNo());
            }
        }
    }
@@ -86,7 +88,7 @@
                "      </urn:ZPP_BC_001>\n" +
                "   </soapenv:Body>\n" +
                "</soapenv:Envelope>";
        logger.info("{}",content);
        //logger.info("{}",content);
        return content;
    }
}
jcdm-ui/src/api/main/bs/orderScheduling/orderScheduling.js
@@ -42,6 +42,32 @@
    params: query
  })
}
export function listOrderScheduling3(query) {
  return request({
    url: '/bs/orderScheduling/list3',
    method: 'get',
    params: query
  })
}
export function getSumDataMethod(query) {
  return request({
    url: '/bs/orderScheduling/getSumData',
    method: 'get',
    params: query
  })
}
export function engineNoIsInModel(param) {
  return request({
    url: '/bs/orderScheduling/engineNoIsInModel',
    method: 'get',
    params: param
  })
}
// æŸ¥è¯¢è®¢å•æŽ’产详细
export function getOrderScheduling(id) {
  return request({
jcdm-ui/src/views/login.vue
@@ -77,8 +77,8 @@
    return {
      codeUrl: "",
      loginForm: {
        username: "admin",
        password: "admin123",
        username: "SC001",
        password: "123456",
        rememberMe: false,
        code: "",
        uuid: ""
jcdm-ui/src/views/main/kb/BalanceShaft/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,281 @@
<template>
  <div class="app-container">
    <el-row :gutter="3">
      <el-col :span="6">
        <el-card shadow="always" class="boxSize">
          <div class="centerImg">
            <img style="width: 140px;height: 30px;" src="@/assets/logo/jcdm2.png" alt="dark">
            <!--            <span class="nextLine" style="font-weight: bold">{{currentTime}}</span>-->
          </div>
        </el-card>
      </el-col>
      <el-col :span="3">
        <el-card shadow="always" class="boxSize">
          <span class="centerText" style="height: 60px">{{locationCode}}</span>
        </el-card>
      </el-col>
      <el-col :span="15">
        <el-card shadow="always" class="boxSize">
          <span class="centerText" >{{locationName}}</span>
        </el-card>
      </el-col>
    </el-row>
   <el-row :gutter="0"  >
     <el-col :span="14">
       <el-card   class="box-card" style="margin-top: 5px" >
             <el-form ref="form" :model="form"  label-width="25%"   >
               <el-form-item prop="engineNo" style="margin-top: 16px">
               <span slot="label" style="font-size:22px;color:black;"><strong>平衡轴码</strong></span>
                 <el-input style="font-size:20px" v-model="form.engineNo" placeholder="请扫描平衡轴码" clearable  @input="EngineNohandleChange">
                   <el-button slot="append" plain type="info" @click="EngineNohandleChange" icon="el-icon-search"></el-button>
                 </el-input>
               </el-form-item>
             </el-form>
             <el-form ref="form" :model="form"  label-width="25%"  >
               <el-form-item   prop="productType"style="margin-top: 30px" >
                  <span slot="label" style="font-size:22px;color:black"><strong>机型</strong></span>
                 <el-input disabled style="font-size:20px"  value="form.productType" v-model="form.productType" placeholder="" />
               </el-form-item>
             </el-form>
             <el-form ref="form" :model="form"  label-width="25%"  >
               <el-form-item   prop="orderNo" style="margin-top: 30px">
               <span  slot="label" style="font-size:22px;color:black"><strong>工单编号</strong></span>
                 <el-input disabled style="font-size:20px" v-model="form.orderNo" placeholder="" />
               </el-form-item>
             </el-form>
             <el-form ref="form" :model="form"  label-width="25%"  >
               <el-form-item   prop="currentWorkstation" style="margin-top: 30px">
               <span slot="label" style="font-size:22px;color:black"><strong>质量状态</strong></span>
                 <el-input disabled style="font-size:20px" v-model:value="form.add" placeholder="" />
               </el-form-item>
             </el-form>
         <el-divider></el-divider>
         <el-row :gutter="10" class="mb8" type="flex" justify="center"  style="text-align: center">
           <el-col :span="1.5">
             <el-button plain  :disabled="buttondisabled" type="primary" style="width:400px;height:160px" v-hasPermi="['bs:formula:add']" @click="forceOnline">
               <span   class="el-icon-thumb"   style="font-size:40px;color:black"></span>
               <span style="font-size:45px;color:black"><strong>强制上线</strong></span>
             </el-button>
           </el-col>
         </el-row>
       </el-card>
     </el-col>
     <el-col :span="10"  inline style="margin-top: 5px">
         <el-card class="custom-content" style="height: 530px" >
         <el-col :span="14"style="  ">
           <span style="font-size:25px"><strong>质量数据</strong></span>
           <el-divider></el-divider>
           {{this.form.engineCheckList}}
         </el-col>
         </el-card>
     </el-col>
   </el-row>
  </div>
</template>
<script>
import { listOrderScheduling, getOrderScheduling, delOrderScheduling, addOrderScheduling, updateOrderScheduling } from "@/api/main/bs/orderScheduling/orderScheduling";
import { listPassingStationCollection, getPassingStationCollection, delPassingStationCollection, addPassingStationCollection, updatePassingStationCollection } from "@/api/main/da/passingStationCollection/passingStationCollection";
import {listLineInfo} from "@/api/main/bs/lineInfo/lineInfo";
import { setSNCode } from "@/api/main/da/opcuaconfig/opcuaconfig";
import {getIp, listStationConf} from "@/api/main/sc/stationConf";
export default {
  components: { },
  options: [],
  props: [],
  data() {
    return {
      options: [],
      total: 0,
      engineCheckList:[],
      showFlag:false,
      buttondisabled:true,
      locationCode: "未配置",
      locationName: "未配置工位",
      codeValue: "",
      code: "",
      lastTime: "",
      nextTime: "",
      lastCode: "",
      nextCode: "",
      dtmainId: "",
      // æŸ¥è¯¢å‚æ•°
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        engineNo: null,
        productType:null,
        orderNo:null,
        qualityStatus:null,
        currentWorkstation: null,
        add: null,
        engineCheckList:'暂无数据',
      },
      // è¡¨å•å‚æ•°
      form: {
        engineNo: null,
        productType:null,
        orderNo:null,
        qualityStatus:null,
        currentWorkstation: null,
        add: null,
        engineCheckList:'暂无数据',
      },
      add: null,
    };
  },
  computed: {},
  watch: {},
  created() {
    window.document.onkeypress = (e) => {
      if (window.event) {
        this.nextCode = e.keyCode;
      } else if (e.which) {
        this.nextCode = e.which;
      }
      if (e.which === 13) {
        // é”®ç›˜å›žè½¦äº‹ä»¶
        if (this.code.length < 3) return; // æ‰«ç æžªçš„速度很快,手动输入的时间不会让code的长度大于2,所以这里不会对扫码枪有效
        this.parseQRCode(this.code); // èŽ·å–到扫码枪输入的内容,做别的操作
        this.lastCode = "";
        this.lastTime = "";
        return;
      }
      this.nextTime = new Date().getTime();
      if (!this.lastTime && !this.lastCode) {
        this.code = ""; // æ¸…空上次的条形码
        this.code += e.key;
      }
      if (this.lastCode && this.lastTime && this.nextTime - this.lastTime > 500) {
        // å½“扫码前有keypress事件时,防止首字缺失
        this.code = e.key;
      } else if (this.lastCode && this.lastTime) {
        this.code += e.key;
      }
      this.lastCode = this.nextCode;
      this.lastTime = this.nextTime;
    };
  },
  mounted() {
    this.getStationConf();
  },
  methods: {
    getStationConf() {
      getIp().then(response => {
        let queryParams = {
          ipAddress: response.msg,
        }
        listStationConf(queryParams).then(response => {
          this.locationName = response.rows[0].processesName
          this.locationCode = response.rows[0].processesCode
        });
      });
    },
    reset() {
      this.form = {
        engineNo:null,
        productType:null,
        orderNo:null,
        qualityStatus:null,
        currentWorkstation: null,
        add: null,
        engineCheckList:'暂无数据',
      };
      this.resetForm("form");
    },
    EngineNohandleChange(){
      if(this.form.engineNo !== null && this.form.engineNo !== undefined){
        //let OrderSchedulingParam = {engineNo: null}
        setSNCode(this.form.engineNo,this.locationCode)
        //OrderSchedulingParam.engineNo = this.form.engineNo;
     /*   listOrderScheduling(OrderSchedulingParam).then(response => {
          if(response.total === 1 ){
            this.form.productType = response.rows[0].model
            this.form.orderNo = response.rows[0].orderNo
            this.form.qualityStatus = response.rows[0].qualityStatus
            this.form.currentWorkstation = response.rows[0].currentWorkstation
            this.form.add= response.rows[0].currentWorkstation+ response.rows[0].qualityStatus
            if(this.form.qualityStatus ==='不合格'){
              this.buttondisabled = false;
            }
            else{
              this.buttondisabled = true;
            }
          }
          else{
            this.reset();
            this.buttondisabled = true
            const h = this.$createElement;
            this.$message({
              message: h('p',null, [
                       h('span', null, '警告 '),
                       h('i', { style: 'color: black' }, '输入的发动机号有误'),
                       h()]),
              type: 'error',
              center: true,
              offset:300
            });
          }
        });*/
        /*let PassingStationCollectionParam = {sfcCode: null}
        PassingStationCollectionParam.sfcCode = this.form.engineNo;
        listPassingStationCollection(PassingStationCollectionParam).then(ponse =>{
          this.engineCheckList = ponse.rows.locationCode ;
          if(ponse.rows.length >= 1 && this.form.engineNo !== undefined){
            this.form.engineCheckList = ''
            for (let i = 0; i < ponse.rows.length; i++) {
              this.form.engineCheckList += '   å·¥ä½:'+ ponse.rows[i].locationCode+'['+ponse.rows[i].outRsSign+']'
            }
          }
          else{
            this.form.engineCheckList = '暂无数据'
          }
        });*/
      }
    },
    parseQRCode(code) {
      this.form.engineNo = code;
    },
  },
  }
</script>
<style scoped>
::v-deep .el-input__inner{
  height: 40px;
}
::v-deep .el-form-item__label {
  line-height: 40px;
}
.custom-content {
  height: 50%; /* è®¾ç½®é«˜åº¦ä¸º50% */
}
.boxSize{
  height: 60px;
}
.centerText{
  color: black;
  font-weight: bold;
  font-size: 20px;
  display: flex;
  justify-content: center;
  margin-top: 5px
}
/*.my-custom-modal .el-dialog__wrapper {*/
/*  width: 400px; !* è®¾ç½®å®½åº¦ *!*/
/*  height: 200px; !* è®¾ç½®é«˜åº¦ *!*/
/*  top: 50px; !* è®¾ç½®è·ç¦»é¡µé¢é¡¶éƒ¨çš„位置 *!*/
/*  left: 50px; !* è®¾ç½®è·ç¦»é¡µé¢å·¦ä¾§çš„位置 *!*/
/*}*/
</style>
jcdm-ui/src/views/main/kb/crankshaft/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,243 @@
<template>
  <div class="app-container">
    <el-card   class="box-card"  style="height: 60px" >
      <template>
        <div class="container" type="flex" justify="center" style="text-align:center">
          <!--          <el-row   type="flex" justify="center" style="text-align:center;height: 12px" >-->
          <!--            <el-col  type="flex" justify="center"  :span="14" style="text-align:center">-->
          <el-divider><span style="font-size:30px;color:black"><strong>曲轴码扫码上线</strong></span></el-divider>
          <!--            </el-col>-->
          <!--          </el-row>-->
        </div>
      </template>
    </el-card>
    <el-row :gutter="3">
      <el-col :span="6">
        <el-card shadow="always" class="boxSize">
          <div class="centerImg">
            <img style="width: 140px;height: 30px;" src="@/assets/logo/jcdm2.png" alt="dark">
          </div>
        </el-card>
      </el-col>
      <el-col :span="3">
        <el-card shadow="always" class="boxSize">
          <span class="centerText" style="height: 60px">{{locationCode}}</span>
        </el-card>
      </el-col>
      <el-col :span="15">
        <el-card shadow="always" class="boxSize">
          <span class="centerText" >{{locationName}}</span>
        </el-card>
      </el-col>
    </el-row>
   <el-row :gutter="0"  >
     <el-col :span="14">
       <el-card   class="box-card" style="margin-top: 5px" >
             <el-form ref="form" :model="form"  label-width="25%"   >
               <el-form-item prop="engineNo" style="margin-top: 16px">
               <span slot="label" style="font-size:22px;color:black;"><strong>曲轴码</strong></span>
                 <el-input style="font-size:20px" v-model="form.engineNo" placeholder="请扫描曲轴码" clearable  @input="EngineNohandleChange">
                   <el-button slot="append" plain type="info" @click="EngineNohandleChange" icon="el-icon-search"></el-button>
                 </el-input>
               </el-form-item>
             </el-form>
             <el-form ref="form" :model="form"  label-width="25%"  >
               <el-form-item   prop="productType"style="margin-top: 30px" >
                  <span slot="label" style="font-size:22px;color:black"><strong>机型</strong></span>
                 <el-input disabled style="font-size:20px"  value="form.productType" v-model="form.productType" placeholder="" />
               </el-form-item>
             </el-form>
             <el-form ref="form" :model="form"  label-width="25%"  >
               <el-form-item   prop="orderNo" style="margin-top: 30px">
               <span  slot="label" style="font-size:22px;color:black"><strong>工单编号</strong></span>
                 <el-input disabled style="font-size:20px" v-model="form.orderNo" placeholder="" />
               </el-form-item>
             </el-form>
             <el-form ref="form" :model="form"  label-width="25%"  >
               <el-form-item   prop="currentWorkstation" style="margin-top: 30px">
               <span slot="label" style="font-size:22px;color:black"><strong>质量状态</strong></span>
                 <el-input disabled style="font-size:20px" v-model:value="form.add" placeholder="" />
               </el-form-item>
             </el-form>
         <el-divider></el-divider>
         <el-row :gutter="10" class="mb8" type="flex" justify="center"  style="text-align: center">
           <el-col :span="1.5">
             <el-button plain  :disabled="buttondisabled" type="primary" style="width:400px;height:160px" v-hasPermi="['bs:formula:add']" @click="forceOnline">
               <span   class="el-icon-thumb"   style="font-size:40px;color:black"></span>
               <span style="font-size:45px;color:black"><strong>强制上线</strong></span>
             </el-button>
           </el-col>
         </el-row>
       </el-card>
     </el-col>
     <el-col :span="10"  inline style="margin-top: 5px">
       <el-card class="custom-content"  style="height: 264px">
         <el-col :span="14">
           <span style="font-size:25px"><strong>质量状态</strong></span>
           <el-divider></el-divider>
           {{this.form.engineCheckList}}
         </el-col>
       </el-card>
       <el-card class="custom-content" style="height: 264px" >
         <el-col :span="14"style="  ">
           <span style="font-size:25px"><strong>最终结果</strong></span>
           <el-divider></el-divider>
           {{queryParams.productType}}
         </el-col>
       </el-card>
     </el-col>
   </el-row>
  </div>
</template>
<script>
import { listOrderScheduling, getOrderScheduling, delOrderScheduling, addOrderScheduling, updateOrderScheduling } from "@/api/main/bs/orderScheduling/orderScheduling";
import { listPassingStationCollection, getPassingStationCollection, delPassingStationCollection, addPassingStationCollection, updatePassingStationCollection } from "@/api/main/da/passingStationCollection/passingStationCollection";
import {listLineInfo} from "@/api/main/bs/lineInfo/lineInfo";
import { setSNCode } from "@/api/main/da/opcuaconfig/opcuaconfig";
import {getIp, listStationConf} from "@/api/main/sc/stationConf";
export default {
  components: { },
  options: [],
  props: [],
  data() {
    return {
      options: [],
      total: 0,
      engineCheckList:[],
      showFlag:false,
      buttondisabled:true,
      locationCode: "未配置",
      locationName: "未配置工位",
      codeValue: "",
      code: "",
      lastTime: "",
      nextTime: "",
      lastCode: "",
      nextCode: "",
      dtmainId: "",
      // æŸ¥è¯¢å‚æ•°
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        engineNo: null,
        productType:null,
        orderNo:null,
        qualityStatus:null,
        currentWorkstation: null,
        add: null,
        engineCheckList:'暂无数据',
      },
      // è¡¨å•å‚æ•°
      form: {
        engineNo: null,
        productType:null,
        orderNo:null,
        qualityStatus:null,
        currentWorkstation: null,
        add: null,
        engineCheckList:'暂无数据',
      },
      add: null,
    };
  },
  computed: {},
  watch: {},
  created() {
    window.document.onkeypress = (e) => {
      if (window.event) {
        this.nextCode = e.keyCode;
      } else if (e.which) {
        this.nextCode = e.which;
      }
      if (e.which === 13) {
        // é”®ç›˜å›žè½¦äº‹ä»¶
        if (this.code.length < 3) return; // æ‰«ç æžªçš„速度很快,手动输入的时间不会让code的长度大于2,所以这里不会对扫码枪有效
        this.parseQRCode(this.code); // èŽ·å–到扫码枪输入的内容,做别的操作
        this.lastCode = "";
        this.lastTime = "";
        return;
      }
      this.nextTime = new Date().getTime();
      if (!this.lastTime && !this.lastCode) {
        this.code = ""; // æ¸…空上次的条形码
        this.code += e.key;
      }
      if (this.lastCode && this.lastTime && this.nextTime - this.lastTime > 500) {
        // å½“扫码前有keypress事件时,防止首字缺失
        this.code = e.key;
      } else if (this.lastCode && this.lastTime) {
        this.code += e.key;
      }
      this.lastCode = this.nextCode;
      this.lastTime = this.nextTime;
    };
  },
  mounted() {
    this.getStationConf();
  },
  methods: {
    getStationConf() {
      getIp().then(response => {
        let queryParams = {
          ipAddress: response.msg,
        }
        listStationConf(queryParams).then(response => {
          this.locationName = response.rows[0].processesName
          this.locationCode = response.rows[0].processesCode
        });
      });
    },
    reset() {
      this.form = {
        engineNo:null,
        productType:null,
        orderNo:null,
        qualityStatus:null,
        currentWorkstation: null,
        add: null,
        engineCheckList:'暂无数据',
      };
      this.resetForm("form");
    },
    EngineNohandleChange(){
      if(this.form.engineNo !== null && this.form.engineNo !== undefined){
        setSNCode(this.form.engineNo,this.locationCode)
      }
    },
    parseQRCode(code) {
      this.form.engineNo = code;
    },
  },
  }
</script>
<style scoped>
::v-deep .el-input__inner{
  height: 40px;
}
::v-deep .el-form-item__label {
  line-height: 40px;
}
.custom-content {
  height: 50%; /* è®¾ç½®é«˜åº¦ä¸º50% */
}
.boxSize{
  height: 60px;
}
.centerText{
  color: black;
  font-weight: bold;
  font-size: 20px;
  display: flex;
  justify-content: center;
  margin-top: 5px
}
</style>
jcdm-ui/src/views/main/om/productionOrde/detail.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,184 @@
<template>
  <div class="app-container">
    <div style="height: 100%;width: 100%">
      <el-card class="box-card">
        <el-form :model="queryParams" size="large" :inline="true" label-width="68px" @submit.native.prevent>
          <el-form-item label-width="200" label="箱体码" :prop="queryParams.productionNotice"  style="align-content: center">
            <input v-model="queryParams.productionNotice"
                      ref="inputdata"
                   style="height: 39px; width: 300px"
                   placeholder="请扫描箱体码"
                     />
          </el-form-item>
<!--          <el-button size="large" type="primary" >上线</el-button>-->
<!--          <el-button size="large" type="danger">下线</el-button>-->
          <el-button size="large" type="info" @click="refresh">返回</el-button>
        </el-form>
      </el-card>
      <el-row :gutter="0">
        <el-col :span="6">
          <div >
            <el-card style="height: 460px">
              <el-descriptions class="margin-top" :column="1" direction="horizontal">
                <el-descriptions-item label="生产订单">{{singleSelect.workOrderNo}}</el-descriptions-item>
                <el-descriptions-item label="机型" :span="2">{{singleSelect.typeZ}}</el-descriptions-item>
                <el-descriptions-item label="计划数量">
                  {{singleSelect.planQty}}
                </el-descriptions-item>
                <el-descriptions-item label="上线数量">{{onlineNum}}</el-descriptions-item>
                <el-descriptions-item label="完成数量">{{finishNum}}</el-descriptions-item>
                <el-descriptions-item label="不合格数">{{unReachNum}}</el-descriptions-item>
              </el-descriptions>
            </el-card>
          </div>
        </el-col>
        <el-col :span="18">
          <div>
            <el-card style="height: 460px; overflow: auto">
              <el-table border :data="orderSchedulingList">
                <el-table-column
                  type="index"
                  label="序号"
                  width="50"></el-table-column>
                <el-table-column label="生产订单" align="center" prop="orderNo" width="130">
                </el-table-column>
                <el-table-column label="发动机号" align="center" prop="engineNo" width="150">
                </el-table-column>
                <el-table-column label="机型" align="center" prop="model">
                </el-table-column>
                <el-table-column label="生产状态" align="center" prop="productionStatus">
                  <template slot-scope="scope">
                    <dict-tag :options="dict.type.order_scheduling_produce_status" :value="scope.row.productionStatus"/>
                  </template>
                </el-table-column>
                <el-table-column label="质量状态" align="center" prop="qualityStatus">
                  <template slot-scope="scope">
                    <dict-tag :options="dict.type.quality_status" :value="scope.row.qualityStatus"/>
                  </template>
                </el-table-column>
                <el-table-column label="操作人" align="center" prop="operator">
                </el-table-column>
                <el-table-column label="操作时间" align="center" prop="operateTime" width="160">
                  <template slot-scope="scope">
                    <span>{{ parseTime(scope.row.operateTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
                  </template>
                </el-table-column>
              </el-table>
              <pagination
                v-show="total>0"
                :total="total"
                :page.sync="queryParams.pageNum"
                :limit.sync="queryParams.pageSize"
                @pagination="getListData"
              />
            </el-card>
          </div>
        </el-col>
      </el-row>
    </div>
  </div>
</template>
<script>
import { engineNoIsInModel, getSumDataMethod, listOrderScheduling3 } from "../../../../api/main/bs/orderScheduling/orderScheduling";
export default {
  name: 'Detail',
  props: ['singleSelect'],
  dicts: ['order_scheduling_produce_status','quality_status','print_status','material_type'],
  data(){
    return{
      // æ€»æ¡æ•°
      total: 0,
      queryParams: {
        orderNo:'',
        pageNum: 1,
        pageSize: 10,
      },
      orderSchedulingList: [],
      onlineNum: 0,
      finishNum: 0,
      unReachNum: 0,
      scannerFlag: false
    }
  },
  methods:{
    handleQuery(){
    },
    refresh() {
      location.reload();
    },
    setFocus(){
      this.$nextTick(()=>{
        this.$refs.inputdata.focus()
      })
    },
    handleScannerInput(event){
      if (this.scannerFlag){
        this.queryParams.productionNotice = ''
        this.$refs.inputdata.value = ''
        this.scannerFlag = false
      }
      console.log('+++++++++++++++=++++++',event)
      const input = event.target
      const inputValue = input.value
      this.queryParams.productionNotice = inputValue
      console.log('----------------------',this.queryParams.productionNotice)
      if (event.key === 'Enter'){
        this.scannerFlag = true
        //扫描完成
        engineNoIsInModel({engineNo:this.queryParams.productionNotice,
          model:this.singleSelect.typeZ,orderNo:this.singleSelect.workOrderNo
        }).then(res => {
          console.log('rerrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrs----',res)
          if (res.data===500){
            console.log('====---===')
            this.$message({
              message:res.msg,
              type:'warning'
            })
          }else {
            this.$message({
              message:'操作成功',
              type:'success'
            })
            this.getListData()
          }
        })
      }
    },
    //查询列表
    getListData(){
      console.log('this.queryParams.workOrderNo',this.singleSelect.workOrderNo)
      this.queryParams.orderNo = this.singleSelect.workOrderNo
      console.log('this.queryParams',this.queryParams)
      listOrderScheduling3(this.queryParams).then(res => {
        this.orderSchedulingList = res.rows
        this.total = res.total
      })
      getSumDataMethod(this.queryParams).then(res =>{
        console.log('res',res)
        this.onlineNum = res.data.onlineNum
        this.finishNum = res.data.finishNum
        this.unReachNum = res.data.unqualified
      })
    }
  },
  mounted() {
    console.log('singleSelect111',this.singleSelect)
    this.getListData()
    this.setFocus()
    this.$refs.inputdata.addEventListener('keydown',this.handleScannerInput)
  },
  beforeDestroy() {
    this.$refs.inputdata.removeEventListener('keydown',this.handleScannerInput)
  }
}
</script>
jcdm-ui/src/views/main/om/productionOrde/index.vue
@@ -1,5 +1,6 @@
<template>
  <div class="app-container">
    <div v-if="!showDetailFlag">
    <el-card class="box-card">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item label-width="100" label="生产通知单" prop="productName">
@@ -113,6 +114,16 @@
          @click="CreatehandleUpdate"
          v-hasPermi="['om:productionOrde:createUpdate']"
        >生成</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          :disabled="!single"
          @click="goToPage"
        >开始作业</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
@@ -301,7 +312,8 @@
        <el-button @click="cancel">取 æ¶ˆ</el-button>
      </div>
    </el-dialog>
    </div>
    <Detail v-if="showDetailFlag" :singleSelect="singleSelect"></Detail>
  </div>
</template>
@@ -322,15 +334,19 @@
} from "@/api/main/bs/orderScheduling/orderScheduling";
import {listMaterial} from "@/api/main/bs/material/material";
import {listModelNumber} from "@/api/main/bs/modelNumber/modelNumber";
import Detail from "./detail.vue";
export default {
  name: "ProductionOrde",
  dicts: ['order_state','year','month','day','subscription_type', 'sys_yes_no', 'data_type','sys_normal_disable'],
  components: {
    ItemSelect ,
    Detail
  },
  data() {
    return {
      showDetailFlag: false,
      singleSelect:{},
      titleName: '',
      options: [],
      lineOptions: [],
@@ -495,10 +511,10 @@
        dateTimeRule = dateTimeRule + day;
        dateTimeRule = dateTimeRule + this.markNo;
        this.form.dateTimeRule = dateTimeRule;//此处赋值不加机型
        dateTimeRule = dateTimeRule + this.form.typeZ;//此处加机型,顺序不能颠倒
        dateTimeRule = this.form.typeZ +" "+dateTimeRule;//此处加机型,顺序不能颠倒
        //赋值起始编码
        this.form.startEndCode = dateTimeRule +  String(parseInt(startCode)).padStart(3, '0') + "         " + dateTimeRule + String(parseInt(startCode) + parseInt(planQty)-1).padStart(3, '0') ;
        this.form.startEndCode =   dateTimeRule + String(parseInt(startCode)).padStart(3, '0') + "         " + dateTimeRule + String(parseInt(startCode) + parseInt(planQty)-1).padStart(3, '0') ;
      }
    },
@@ -638,7 +654,8 @@
        spareField3: null,
        typeZ: null,
        spareField4: null,
        adds:null
        adds:null,
        idNums:null
      };
      this.resetForm("form");
    },
@@ -652,7 +669,7 @@
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // å¤šé€‰æ¡†é€‰ä¸­æ•°æ®
    /** å¤šé€‰æ¡†é€‰ä¸­æ•°æ® */
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.move = selection.length!==1
@@ -664,8 +681,10 @@
          this.single = false
          this.multiple = false
        }
        if(selection[0].orderStatus === '2' && selection.length === 1){
          this.singleSelect = selection[0]
        }
      }
    },
    /** æ–°å¢žæŒ‰é’®æ“ä½œ */
@@ -689,6 +708,7 @@
          this.form.typeL = response.rows[0].typeL;
        });
        this.form = response.data;
        this.form.idNums=id;
        this.Createopen = true;
        this.titleName = "生成箱体条码";
        // return Array.from({ length: parseInt(this.actualQty) }, (_, index) => index + 1);
@@ -758,7 +778,7 @@
    saveBoxCode(){
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.id != null) {
          if (this.form.idNums != null) {
            addOrderSchedulingForBoxCode(this.form).then(response => {
              this.$modal.msgSuccess("保存成功");
              this.Createopen = false;
@@ -785,7 +805,12 @@
        ...this.queryParams
      }, `productionOrde_${new Date().getTime()}.xlsx`)
    },
    goToPage() {
      this.showDetailFlag=true
      console.log('this.showDetailFlag',this.showDetailFlag)
      //更新实际生产日期
      //updateOrderInfo(this.singleSelect)
    },
  }
};
</script>