| | |
| | | |
| | | 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"; |
| | | } |
| | |
| | | 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; |
| | |
| | | @Resource |
| | | private ISysDictDataService iSysDictDataService; |
| | | |
| | | @Resource |
| | | private OmProductionOrdeInfoServiceImpl productionOrdeInfoService; |
| | | @Resource |
| | | private DaParamCollectionMapper daParamCollectionService; |
| | | |
| | | @Autowired |
| | | MiloService miloService; |
| | |
| | | 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); |
| | | } |
| | | |
| | | /** |
| | | * 导åºè®¢åæ产å表 |
| | | */ |
| | |
| | | { |
| | | 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(); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | public List<BsOrderScheduling> selectBsOrderSchedulingList(BsOrderScheduling bsOrderScheduling); |
| | | |
| | | public List<BsOrderScheduling> selectBsOrderSchedulingPage(BsOrderScheduling bsOrderScheduling); |
| | | |
| | | |
| | | public Integer getProduceNumToday(BsOrderScheduling bsOrderScheduling); |
| | | |
| | |
| | | * @return 订åæ产éå |
| | | */ |
| | | public List<BsOrderScheduling> selectBsOrderSchedulingList(BsOrderScheduling bsOrderScheduling); |
| | | public List<BsOrderScheduling> selectBsOrderSchedulingPage(BsOrderScheduling bsOrderScheduling); |
| | | public FollowReportVO getFollowReportList(BsOrderScheduling bsOrderScheduling); |
| | | public List<LineChartVO> getOffLineNum(); |
| | | |
| | |
| | | } |
| | | |
| | | @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(); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.bs.orderScheduling.vo; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class SumDataVO { |
| | | private Integer onlineNum; |
| | | private Integer finishNum; |
| | | private String unqualified; |
| | | } |
| | |
| | | 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; |
| | |
| | | @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); |
| | | } |
| | | } |
| | |
| | | /** |
| | | * è·åç产工å详ç»ä¿¡æ¯ |
| | | */ |
| | | // @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)); |
| | | } |
| | | |
| | | /** |
| | |
| | | public OmProductionOrdeInfo selectOmProductionOrdeInfoById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢ç产工å |
| | | * |
| | | * @param ids ç产工åä¸»é® |
| | | * @return ç产工å |
| | | */ |
| | | public OmProductionOrdeInfo selectOmProductionOrdeInfoByIds(Long[] ids); |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢ç产工åå表 |
| | | * |
| | | * @param omProductionOrdeInfo ç产工å |
| | |
| | | public OmProductionOrdeInfo selectOmProductionOrdeInfoById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢ç产工å |
| | | * |
| | | * @param ids ç产工åä¸»é® |
| | | * @return ç产工å |
| | | */ |
| | | public OmProductionOrdeInfo selectOmProductionOrdeInfoByIds(Long[] ids); |
| | | |
| | | /** |
| | | * æ¥è¯¢ç产工åå表 |
| | | * |
| | | * @param omProductionOrdeInfo ç产工å |
| | |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ç产工å |
| | | * |
| | | * @param ids ç产工åä¸»é® |
| | | * @return ç产工å |
| | | */ |
| | | @Override |
| | | public OmProductionOrdeInfo selectOmProductionOrdeInfoByIds(Long[] ids) |
| | | { |
| | | return omProductionOrdeInfoMapper.selectOmProductionOrdeInfoByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ç产工åå表 |
| | | * |
| | | * @param omProductionOrdeInfo ç产工å |
| | |
| | | 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";//请æ±ä¿å |
| | | |
| | |
| | | || 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); |
| | | |
| | | } |
| | |
| | | |
| | | //æ´æ°å·¥åç¶æ |
| | | if ("OP790".equals(parts[1])) { |
| | | bsOrderScheduling.setReport20("0"); |
| | | //bsOrderScheduling.setReport20("0"); |
| | | bsOrderScheduling.setProductionStatus("3"); |
| | | bsOrderScheduling.setFinalAssemblyOfflineTime(new Date()); |
| | | }else if("OP050".equals(parts[1])){ |
| | |
| | | bsOrderScheduling.setProductionStatus("2"); |
| | | bsOrderScheduling.setBoxClosingOnlineTime(new Date()); |
| | | }else if("OP120".equals(parts[1])){ |
| | | bsOrderScheduling.setReport20("0"); |
| | | bsOrderScheduling.setFinalAssemblyLaunchTime(new Date()); |
| | | bsOrderScheduling.setClosingBoxOfflineTime(new Date()); |
| | | } |
| | |
| | | </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"/> |
| | |
| | | <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> |
| | |
| | | <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 |
| | |
| | | orderScheduling.setReport10("1"); |
| | | int i = bsOrderSchedulingService.updateBsOrderScheduling(orderScheduling); |
| | | System.out.println("æ´æ°ç¶ææå"); |
| | | //logger.info("{}åç®±æ¥å·¥æå",orderScheduling.getOrderNo()); |
| | | } |
| | | } |
| | | } |
| | |
| | | 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()); |
| | | } |
| | | } |
| | | } |
| | |
| | | " </urn:ZPP_BC_001>\n" + |
| | | " </soapenv:Body>\n" + |
| | | "</soapenv:Envelope>"; |
| | | logger.info("{}",content); |
| | | //logger.info("{}",content); |
| | | return content; |
| | | } |
| | | } |
| | |
| | | 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({ |
| | |
| | | return { |
| | | codeUrl: "", |
| | | loginForm: { |
| | | username: "admin", |
| | | password: "admin123", |
| | | username: "SC001", |
| | | password: "123456", |
| | | rememberMe: false, |
| | | code: "", |
| | | uuid: "" |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |
| | |
| | | <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"> |
| | |
| | | @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> |
| | |
| | | <el-button @click="cancel">å æ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | </div> |
| | | <Detail v-if="showDetailFlag" :singleSelect="singleSelect"></Detail> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | } 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: [], |
| | |
| | | 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') ; |
| | | } |
| | | }, |
| | | |
| | |
| | | spareField3: null, |
| | | typeZ: null, |
| | | spareField4: null, |
| | | adds:null |
| | | adds:null, |
| | | idNums:null |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | | // å¤éæ¡éä¸æ°æ® |
| | | /** å¤éæ¡éä¸æ°æ® */ |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.id) |
| | | this.move = selection.length!==1 |
| | |
| | | this.single = false |
| | | this.multiple = false |
| | | } |
| | | if(selection[0].orderStatus === '2' && selection.length === 1){ |
| | | this.singleSelect = selection[0] |
| | | } |
| | | } |
| | | |
| | | }, |
| | | |
| | | /** æ°å¢æé®æä½ */ |
| | |
| | | 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); |
| | |
| | | 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; |
| | |
| | | ...this.queryParams |
| | | }, `productionOrde_${new Date().getTime()}.xlsx`) |
| | | }, |
| | | |
| | | goToPage() { |
| | | this.showDetailFlag=true |
| | | console.log('this.showDetailFlag',this.showDetailFlag) |
| | | //æ´æ°å®é
ç产æ¥æ |
| | | //updateOrderInfo(this.singleSelect) |
| | | }, |
| | | } |
| | | }; |
| | | </script> |