| | |
| | | .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll() |
| | | .antMatchers("/sendDemo/push").permitAll() |
| | | .antMatchers("/jcdmMes/deviceResultFeedback").permitAll() |
| | | .antMatchers("/da/testDeviceInterface/**").permitAll() |
| | | .antMatchers("/main/paramCollection/**").permitAll() |
| | | // é¤ä¸é¢å¤çææ请æ±å
¨é¨éè¦é´æè®¤è¯ |
| | | .anyRequest().authenticated() |
| | | .and() |
| | |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤äº§åè¿ç¨åæ°ééå表 |
| | | */ |
| | | @GetMapping("/testput") |
| | | public void testput() |
| | | { |
| | | daParamCollectionService.pushGeelycvMesFeedback("80012","OP240"); |
| | | } |
| | | |
| | | /** |
| | | * 导åºè®¾å¤äº§åè¿ç¨åæ°ééå表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('main:paramCollection:export')") |
| | |
| | | |
| | | void jrmSaveCampaignTimeParameters(DaParamCollection daParamCollection); |
| | | void sendToFactoryMes(String stationCode,String productNum ); |
| | | |
| | | void pushGeelycvMesFeedback(String packID,String stationCode); |
| | | } |
| | |
| | | import com.jcdm.main.constant.Constants; |
| | | import com.jcdm.main.da.collectionParamConf.domain.DaCollectionParamConf; |
| | | import com.jcdm.main.da.collectionParamConf.mapper.DaCollectionParamConfMapper; |
| | | import com.jcdm.main.da.collectionParamConf.service.IDaCollectionParamConfService; |
| | | 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 org.apache.ibatis.session.SqlSession; |
| | | import org.apache.ibatis.session.SqlSessionFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.core.parameters.P; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.Instant; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private IDaParamCollectionService daParamCollectionService; |
| | | |
| | | @Autowired |
| | | private IDaCollectionParamConfService daCollectionParamConfService; |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤äº§åè¿ç¨åæ°éé |
| | |
| | | HttpResponse execute = HttpRequest.post(url).body(JSONUtil.toJsonStr(vo)).execute(); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void pushGeelycvMesFeedback(String packID, String stationCode) { |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | String url = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; |
| | | String totalResult = "0"; |
| | | List<DaParamCollection> paramList = daParamCollectionService.list(new LambdaQueryWrapper<DaParamCollection>().eq(DaParamCollection::getSfcCode, packID).eq(DaParamCollection::getLocationCode, stationCode)); |
| | | if(paramList.size() > 0){ |
| | | ParentVO parentVO = new ParentVO(); |
| | | parentVO.setSiteCode("3983"); |
| | | parentVO.setRecordId(String.valueOf(Instant.now().toEpochMilli())); |
| | | parentVO.setStationCode(stationCode); |
| | | parentVO.setProductNum(packID); |
| | | parentVO.setTotalResult("1"); |
| | | List<ChildVO> listChildVo = new ArrayList<>(); |
| | | |
| | | for (DaParamCollection daParamCollection : paramList) { |
| | | ChildVO childVO = new ChildVO(); |
| | | childVO.setItemCode(daParamCollection.getParamCode()); |
| | | BsFormulaChildInfo childOne = bsFormulaChildInfoService.getOne(new LambdaQueryWrapper<BsFormulaChildInfo>().eq(BsFormulaChildInfo::getParamCode, daParamCollection.getParamCode())); |
| | | DaCollectionParamConf paramConfOne = daCollectionParamConfService.getOne(new LambdaQueryWrapper<DaCollectionParamConf>().eq(DaCollectionParamConf::getCollectParameterId, daParamCollection.getParamCode())); |
| | | if(childOne!=null){ |
| | | String operationType = childOne.getOperationType(); |
| | | if(operationType.equals("1")){ |
| | | childVO.setItemType("2"); |
| | | }else if(operationType.equals("2")){ |
| | | childVO.setItemType("1"); |
| | | } |
| | | }else { |
| | | childVO.setItemType("3"); |
| | | } |
| | | if(paramConfOne!=null){ |
| | | childVO.setItemText(paramConfOne.getCollectParameterName()); |
| | | }else { |
| | | childVO.setItemText(""); |
| | | } |
| | | childVO.setItemValue(daParamCollection.getParamValue()); |
| | | |
| | | if(daParamCollection.getParamValue().equals("1")){ |
| | | childVO.setCheckResult("1"); |
| | | }else if(daParamCollection.getParamValue().equals("2")){ |
| | | childVO.setCheckResult("0"); |
| | | parentVO.setTotalResult("0"); |
| | | totalResult = "1"; |
| | | }else { |
| | | childVO.setCheckResult("1"); |
| | | } |
| | | childVO.setCheckTime(format.format(daParamCollection.getCollectionTime())); |
| | | listChildVo.add(childVO); |
| | | } |
| | | parentVO.setCheckList(listChildVo); |
| | | HttpResponse execute = HttpRequest.post(url).body(JSONUtil.toJsonStr(parentVO)).execute(); |
| | | System.out.println(execute.body()); |
| | | System.out.println("-----------------------"+totalResult); |
| | | } |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.da.testDeviceInterface.controller; |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.google.gson.JsonObject; |
| | | import com.jcdm.main.restful.qingYan.doman.ChildVO; |
| | | import com.jcdm.main.restful.qingYan.doman.ParentVO; |
| | | import com.jcdm.main.webservice.ItemList; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.jcdm.common.annotation.Log; |
| | | import com.jcdm.common.core.controller.BaseController; |
| | | import com.jcdm.common.core.domain.AjaxResult; |
| | | import com.jcdm.common.enums.BusinessType; |
| | | import com.jcdm.main.da.testDeviceInterface.domain.DaTestDeviceInterface; |
| | | import com.jcdm.main.da.testDeviceInterface.service.IDaTestDeviceInterfaceService; |
| | | import com.jcdm.common.utils.poi.ExcelUtil; |
| | | import com.jcdm.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * æµè¯è®¾å¤æ¥å£æ°æ®Controller |
| | | * |
| | | * @author hdy |
| | | * @date 2024-05-13 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/da/testDeviceInterface") |
| | | public class DaTestDeviceInterfaceController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IDaTestDeviceInterfaceService daTestDeviceInterfaceService; |
| | | |
| | | /** |
| | | * æ¥è¯¢æµè¯è®¾å¤æ¥å£æ°æ®å表 |
| | | */ |
| | | @PostMapping("/testPut") |
| | | public AjaxResult list(@RequestBody ParentVO parentVO) throws JsonProcessingException { |
| | | ObjectMapper mapper = new ObjectMapper(); |
| | | List<ChildVO> li = parentVO.getCheckList(); |
| | | String s = mapper.writeValueAsString(li); |
| | | DaTestDeviceInterface daTestDeviceInterface = new DaTestDeviceInterface(); |
| | | daTestDeviceInterface.setRecordId(parentVO.getRecordId()); |
| | | daTestDeviceInterface.setStationCode(parentVO.getStationCode()); |
| | | daTestDeviceInterface.setProductNum(parentVO.getProductNum()); |
| | | daTestDeviceInterface.setTotalResult(parentVO.getTotalResult()); |
| | | daTestDeviceInterface.setCheckList(s); |
| | | daTestDeviceInterfaceService.save(daTestDeviceInterface); |
| | | return AjaxResult.success("i"); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢æµè¯è®¾å¤æ¥å£æ°æ®å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('da:testDeviceInterface:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(DaTestDeviceInterface daTestDeviceInterface) |
| | | { |
| | | startPage(); |
| | | List<DaTestDeviceInterface> list = daTestDeviceInterfaceService.selectDaTestDeviceInterfaceList(daTestDeviceInterface); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºæµè¯è®¾å¤æ¥å£æ°æ®å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('da:testDeviceInterface:export')") |
| | | @Log(title = "æµè¯è®¾å¤æ¥å£æ°æ®", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, DaTestDeviceInterface daTestDeviceInterface) |
| | | { |
| | | List<DaTestDeviceInterface> list = daTestDeviceInterfaceService.selectDaTestDeviceInterfaceList(daTestDeviceInterface); |
| | | ExcelUtil<DaTestDeviceInterface> util = new ExcelUtil<DaTestDeviceInterface>(DaTestDeviceInterface.class); |
| | | util.exportExcel(response, list, "æµè¯è®¾å¤æ¥å£æ°æ®æ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·åæµè¯è®¾å¤æ¥å£æ°æ®è¯¦ç»ä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('da:testDeviceInterface:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(daTestDeviceInterfaceService.selectDaTestDeviceInterfaceById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢æµè¯è®¾å¤æ¥å£æ°æ® |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('da:testDeviceInterface:add')") |
| | | @Log(title = "æµè¯è®¾å¤æ¥å£æ°æ®", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody DaTestDeviceInterface daTestDeviceInterface) |
| | | { |
| | | return toAjax(daTestDeviceInterfaceService.insertDaTestDeviceInterface(daTestDeviceInterface)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹æµè¯è®¾å¤æ¥å£æ°æ® |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('da:testDeviceInterface:edit')") |
| | | @Log(title = "æµè¯è®¾å¤æ¥å£æ°æ®", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody DaTestDeviceInterface daTestDeviceInterface) |
| | | { |
| | | return toAjax(daTestDeviceInterfaceService.updateDaTestDeviceInterface(daTestDeviceInterface)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤æµè¯è®¾å¤æ¥å£æ°æ® |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('da:testDeviceInterface:remove')") |
| | | @Log(title = "æµè¯è®¾å¤æ¥å£æ°æ®", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(daTestDeviceInterfaceService.deleteDaTestDeviceInterfaceByIds(ids)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.da.testDeviceInterface.domain; |
| | | |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.jcdm.common.annotation.Excel; |
| | | import com.jcdm.common.core.domain.BaseEntity; |
| | | |
| | | /** |
| | | * æµè¯è®¾å¤æ¥å£æ°æ®å¯¹è±¡ da_test_device_interface |
| | | * |
| | | * @author hdy |
| | | * @date 2024-05-13 |
| | | */ |
| | | public class DaTestDeviceInterface extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** id */ |
| | | private Long id; |
| | | |
| | | /** æ£éªè®°å½ç¼å·ï¼ç±å设å¤æèªå®è§åçæï¼å¯ä¸ç¼ç */ |
| | | @Excel(name = "æ£éªè®°å½ç¼å·ï¼ç±å设å¤æèªå®è§åçæï¼å¯ä¸ç¼ç ") |
| | | private String recordId; |
| | | |
| | | /** æ£æµç«ç¹ç¼å· */ |
| | | @Excel(name = "æ£æµç«ç¹ç¼å·") |
| | | private String stationCode; |
| | | |
| | | /** 产ååºåå·-packç */ |
| | | @Excel(name = "产ååºåå·-packç ") |
| | | private String productNum; |
| | | |
| | | /** æ´ä½ç»æ ï¼0 ä¸åæ ¼ ï¼ 1 åæ ¼ï¼ */ |
| | | @Excel(name = "æ´ä½ç»æ ", readConverterExp = "0=,ä¸=åæ ¼,ï¼=,1=,å=æ ¼") |
| | | private String totalResult; |
| | | |
| | | /** å·¥åå· */ |
| | | @Excel(name = "å·¥åå·") |
| | | private String workOrderNo; |
| | | |
| | | /** ä¾åºåç±»å */ |
| | | @Excel(name = "ä¾åºåç±»å") |
| | | private String supplierType; |
| | | |
| | | /** å
¥å-åæ°å表 */ |
| | | @Excel(name = "å
¥å-åæ°å表") |
| | | private String checkList; |
| | | |
| | | /** ç¶æç¼ç ï¼success为æå,failä¸ºå¤±è´¥ï¼ */ |
| | | @Excel(name = "ç¶æç¼ç ", readConverterExp = "s=uccess为æå,fail为失败") |
| | | private String resultCode; |
| | | |
| | | /** æ¥å£çè¿åä¿¡æ¯ï¼å½failæ¶ä¼ææ¥éä¿¡æ¯ */ |
| | | @Excel(name = "æ¥å£çè¿åä¿¡æ¯ï¼å½failæ¶ä¼ææ¥éä¿¡æ¯") |
| | | private String resultMessage; |
| | | |
| | | /** åºå-åæ°å表 */ |
| | | @Excel(name = "åºå-åæ°å表") |
| | | private String resultData; |
| | | |
| | | /** å¤æ³¨ */ |
| | | @Excel(name = "å¤æ³¨") |
| | | private String remarks; |
| | | |
| | | /** å建ç¨æ· */ |
| | | @Excel(name = "å建ç¨æ·") |
| | | private String createUser; |
| | | |
| | | /** æ´æ¹ç¨æ· */ |
| | | @Excel(name = "æ´æ¹ç¨æ·") |
| | | private String updateUser; |
| | | |
| | | /** é¢çå段1 */ |
| | | private String spareField1; |
| | | |
| | | /** é¢çå段2 */ |
| | | private String spareField2; |
| | | |
| | | /** é¢çå段3 */ |
| | | private String spareField3; |
| | | |
| | | /** é¢çå段4 */ |
| | | private String spareField4; |
| | | |
| | | public void setId(Long id) |
| | | { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getId() |
| | | { |
| | | return id; |
| | | } |
| | | public void setRecordId(String recordId) |
| | | { |
| | | this.recordId = recordId; |
| | | } |
| | | |
| | | public String getRecordId() |
| | | { |
| | | return recordId; |
| | | } |
| | | public void setStationCode(String stationCode) |
| | | { |
| | | this.stationCode = stationCode; |
| | | } |
| | | |
| | | public String getStationCode() |
| | | { |
| | | return stationCode; |
| | | } |
| | | public void setProductNum(String productNum) |
| | | { |
| | | this.productNum = productNum; |
| | | } |
| | | |
| | | public String getProductNum() |
| | | { |
| | | return productNum; |
| | | } |
| | | public void setTotalResult(String totalResult) |
| | | { |
| | | this.totalResult = totalResult; |
| | | } |
| | | |
| | | public String getTotalResult() |
| | | { |
| | | return totalResult; |
| | | } |
| | | public void setWorkOrderNo(String workOrderNo) |
| | | { |
| | | this.workOrderNo = workOrderNo; |
| | | } |
| | | |
| | | public String getWorkOrderNo() |
| | | { |
| | | return workOrderNo; |
| | | } |
| | | public void setSupplierType(String supplierType) |
| | | { |
| | | this.supplierType = supplierType; |
| | | } |
| | | |
| | | public String getSupplierType() |
| | | { |
| | | return supplierType; |
| | | } |
| | | public void setCheckList(String checkList) |
| | | { |
| | | this.checkList = checkList; |
| | | } |
| | | |
| | | public String getCheckList() |
| | | { |
| | | return checkList; |
| | | } |
| | | public void setResultCode(String resultCode) |
| | | { |
| | | this.resultCode = resultCode; |
| | | } |
| | | |
| | | public String getResultCode() |
| | | { |
| | | return resultCode; |
| | | } |
| | | public void setResultMessage(String resultMessage) |
| | | { |
| | | this.resultMessage = resultMessage; |
| | | } |
| | | |
| | | public String getResultMessage() |
| | | { |
| | | return resultMessage; |
| | | } |
| | | public void setResultData(String resultData) |
| | | { |
| | | this.resultData = resultData; |
| | | } |
| | | |
| | | public String getResultData() |
| | | { |
| | | return resultData; |
| | | } |
| | | public void setRemarks(String remarks) |
| | | { |
| | | this.remarks = remarks; |
| | | } |
| | | |
| | | public String getRemarks() |
| | | { |
| | | return remarks; |
| | | } |
| | | public void setCreateUser(String createUser) |
| | | { |
| | | this.createUser = createUser; |
| | | } |
| | | |
| | | public String getCreateUser() |
| | | { |
| | | return createUser; |
| | | } |
| | | public void setUpdateUser(String updateUser) |
| | | { |
| | | this.updateUser = updateUser; |
| | | } |
| | | |
| | | public String getUpdateUser() |
| | | { |
| | | return updateUser; |
| | | } |
| | | public void setSpareField1(String spareField1) |
| | | { |
| | | this.spareField1 = spareField1; |
| | | } |
| | | |
| | | public String getSpareField1() |
| | | { |
| | | return spareField1; |
| | | } |
| | | public void setSpareField2(String spareField2) |
| | | { |
| | | this.spareField2 = spareField2; |
| | | } |
| | | |
| | | public String getSpareField2() |
| | | { |
| | | return spareField2; |
| | | } |
| | | public void setSpareField3(String spareField3) |
| | | { |
| | | this.spareField3 = spareField3; |
| | | } |
| | | |
| | | public String getSpareField3() |
| | | { |
| | | return spareField3; |
| | | } |
| | | public void setSpareField4(String spareField4) |
| | | { |
| | | this.spareField4 = spareField4; |
| | | } |
| | | |
| | | public String getSpareField4() |
| | | { |
| | | return spareField4; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("id", getId()) |
| | | .append("recordId", getRecordId()) |
| | | .append("stationCode", getStationCode()) |
| | | .append("productNum", getProductNum()) |
| | | .append("totalResult", getTotalResult()) |
| | | .append("workOrderNo", getWorkOrderNo()) |
| | | .append("supplierType", getSupplierType()) |
| | | .append("checkList", getCheckList()) |
| | | .append("resultCode", getResultCode()) |
| | | .append("resultMessage", getResultMessage()) |
| | | .append("resultData", getResultData()) |
| | | .append("remarks", getRemarks()) |
| | | .append("createUser", getCreateUser()) |
| | | .append("createTime", getCreateTime()) |
| | | .append("updateUser", getUpdateUser()) |
| | | .append("updateTime", getUpdateTime()) |
| | | .append("spareField1", getSpareField1()) |
| | | .append("spareField2", getSpareField2()) |
| | | .append("spareField3", getSpareField3()) |
| | | .append("spareField4", getSpareField4()) |
| | | .toString(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.da.testDeviceInterface.mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.jcdm.main.da.testDeviceInterface.domain.DaTestDeviceInterface; |
| | | |
| | | /** |
| | | * æµè¯è®¾å¤æ¥å£æ°æ®Mapperæ¥å£ |
| | | * |
| | | * @author hdy |
| | | * @date 2024-05-13 |
| | | */ |
| | | public interface DaTestDeviceInterfaceMapper extends BaseMapper<DaTestDeviceInterface> |
| | | { |
| | | /** |
| | | * æ¥è¯¢æµè¯è®¾å¤æ¥å£æ°æ® |
| | | * |
| | | * @param id æµè¯è®¾å¤æ¥å£æ°æ®ä¸»é® |
| | | * @return æµè¯è®¾å¤æ¥å£æ°æ® |
| | | */ |
| | | public DaTestDeviceInterface selectDaTestDeviceInterfaceById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢æµè¯è®¾å¤æ¥å£æ°æ®å表 |
| | | * |
| | | * @param daTestDeviceInterface æµè¯è®¾å¤æ¥å£æ°æ® |
| | | * @return æµè¯è®¾å¤æ¥å£æ°æ®éå |
| | | */ |
| | | public List<DaTestDeviceInterface> selectDaTestDeviceInterfaceList(DaTestDeviceInterface daTestDeviceInterface); |
| | | |
| | | /** |
| | | * æ°å¢æµè¯è®¾å¤æ¥å£æ°æ® |
| | | * |
| | | * @param daTestDeviceInterface æµè¯è®¾å¤æ¥å£æ°æ® |
| | | * @return ç»æ |
| | | */ |
| | | public int insertDaTestDeviceInterface(DaTestDeviceInterface daTestDeviceInterface); |
| | | |
| | | /** |
| | | * ä¿®æ¹æµè¯è®¾å¤æ¥å£æ°æ® |
| | | * |
| | | * @param daTestDeviceInterface æµè¯è®¾å¤æ¥å£æ°æ® |
| | | * @return ç»æ |
| | | */ |
| | | public int updateDaTestDeviceInterface(DaTestDeviceInterface daTestDeviceInterface); |
| | | |
| | | /** |
| | | * å é¤æµè¯è®¾å¤æ¥å£æ°æ® |
| | | * |
| | | * @param id æµè¯è®¾å¤æ¥å£æ°æ®ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteDaTestDeviceInterfaceById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå é¤æµè¯è®¾å¤æ¥å£æ°æ® |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteDaTestDeviceInterfaceByIds(Long[] ids); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.da.testDeviceInterface.service; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.jcdm.main.da.testDeviceInterface.domain.DaTestDeviceInterface; |
| | | |
| | | /** |
| | | * æµè¯è®¾å¤æ¥å£æ°æ®Serviceæ¥å£ |
| | | * |
| | | * @author hdy |
| | | * @date 2024-05-13 |
| | | */ |
| | | public interface IDaTestDeviceInterfaceService extends IService<DaTestDeviceInterface> |
| | | { |
| | | /** |
| | | * æ¥è¯¢æµè¯è®¾å¤æ¥å£æ°æ® |
| | | * |
| | | * @param id æµè¯è®¾å¤æ¥å£æ°æ®ä¸»é® |
| | | * @return æµè¯è®¾å¤æ¥å£æ°æ® |
| | | */ |
| | | public DaTestDeviceInterface selectDaTestDeviceInterfaceById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢æµè¯è®¾å¤æ¥å£æ°æ®å表 |
| | | * |
| | | * @param daTestDeviceInterface æµè¯è®¾å¤æ¥å£æ°æ® |
| | | * @return æµè¯è®¾å¤æ¥å£æ°æ®éå |
| | | */ |
| | | public List<DaTestDeviceInterface> selectDaTestDeviceInterfaceList(DaTestDeviceInterface daTestDeviceInterface); |
| | | |
| | | /** |
| | | * æ°å¢æµè¯è®¾å¤æ¥å£æ°æ® |
| | | * |
| | | * @param daTestDeviceInterface æµè¯è®¾å¤æ¥å£æ°æ® |
| | | * @return ç»æ |
| | | */ |
| | | public int insertDaTestDeviceInterface(DaTestDeviceInterface daTestDeviceInterface); |
| | | |
| | | /** |
| | | * ä¿®æ¹æµè¯è®¾å¤æ¥å£æ°æ® |
| | | * |
| | | * @param daTestDeviceInterface æµè¯è®¾å¤æ¥å£æ°æ® |
| | | * @return ç»æ |
| | | */ |
| | | public int updateDaTestDeviceInterface(DaTestDeviceInterface daTestDeviceInterface); |
| | | |
| | | /** |
| | | * æ¹éå é¤æµè¯è®¾å¤æ¥å£æ°æ® |
| | | * |
| | | * @param ids éè¦å é¤çæµè¯è®¾å¤æ¥å£æ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteDaTestDeviceInterfaceByIds(Long[] ids); |
| | | |
| | | /** |
| | | * å é¤æµè¯è®¾å¤æ¥å£æ°æ®ä¿¡æ¯ |
| | | * |
| | | * @param id æµè¯è®¾å¤æ¥å£æ°æ®ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteDaTestDeviceInterfaceById(Long id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.da.testDeviceInterface.service.impl; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.jcdm.common.utils.DateUtils; |
| | | import com.jcdm.main.da.passingStationCollection.domain.DaPassingStationCollection; |
| | | import com.jcdm.main.da.passingStationCollection.mapper.DaPassingStationCollectionMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.jcdm.main.da.testDeviceInterface.mapper.DaTestDeviceInterfaceMapper; |
| | | import com.jcdm.main.da.testDeviceInterface.domain.DaTestDeviceInterface; |
| | | import com.jcdm.main.da.testDeviceInterface.service.IDaTestDeviceInterfaceService; |
| | | |
| | | /** |
| | | * æµè¯è®¾å¤æ¥å£æ°æ®Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author hdy |
| | | * @date 2024-05-13 |
| | | */ |
| | | @Service |
| | | public class DaTestDeviceInterfaceServiceImpl extends ServiceImpl<DaTestDeviceInterfaceMapper, DaTestDeviceInterface> implements IDaTestDeviceInterfaceService |
| | | { |
| | | @Autowired |
| | | private DaTestDeviceInterfaceMapper daTestDeviceInterfaceMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢æµè¯è®¾å¤æ¥å£æ°æ® |
| | | * |
| | | * @param id æµè¯è®¾å¤æ¥å£æ°æ®ä¸»é® |
| | | * @return æµè¯è®¾å¤æ¥å£æ°æ® |
| | | */ |
| | | @Override |
| | | public DaTestDeviceInterface selectDaTestDeviceInterfaceById(Long id) |
| | | { |
| | | return daTestDeviceInterfaceMapper.selectDaTestDeviceInterfaceById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢æµè¯è®¾å¤æ¥å£æ°æ®å表 |
| | | * |
| | | * @param daTestDeviceInterface æµè¯è®¾å¤æ¥å£æ°æ® |
| | | * @return æµè¯è®¾å¤æ¥å£æ°æ® |
| | | */ |
| | | @Override |
| | | public List<DaTestDeviceInterface> selectDaTestDeviceInterfaceList(DaTestDeviceInterface daTestDeviceInterface) |
| | | { |
| | | return daTestDeviceInterfaceMapper.selectDaTestDeviceInterfaceList(daTestDeviceInterface); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢æµè¯è®¾å¤æ¥å£æ°æ® |
| | | * |
| | | * @param daTestDeviceInterface æµè¯è®¾å¤æ¥å£æ°æ® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertDaTestDeviceInterface(DaTestDeviceInterface daTestDeviceInterface) |
| | | { |
| | | daTestDeviceInterface.setCreateTime(DateUtils.getNowDate()); |
| | | return daTestDeviceInterfaceMapper.insertDaTestDeviceInterface(daTestDeviceInterface); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹æµè¯è®¾å¤æ¥å£æ°æ® |
| | | * |
| | | * @param daTestDeviceInterface æµè¯è®¾å¤æ¥å£æ°æ® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateDaTestDeviceInterface(DaTestDeviceInterface daTestDeviceInterface) |
| | | { |
| | | daTestDeviceInterface.setUpdateTime(DateUtils.getNowDate()); |
| | | return daTestDeviceInterfaceMapper.updateDaTestDeviceInterface(daTestDeviceInterface); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤æµè¯è®¾å¤æ¥å£æ°æ® |
| | | * |
| | | * @param ids éè¦å é¤çæµè¯è®¾å¤æ¥å£æ°æ®ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteDaTestDeviceInterfaceByIds(Long[] ids) |
| | | { |
| | | return daTestDeviceInterfaceMapper.deleteDaTestDeviceInterfaceByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤æµè¯è®¾å¤æ¥å£æ°æ®ä¿¡æ¯ |
| | | * |
| | | * @param id æµè¯è®¾å¤æ¥å£æ°æ®ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteDaTestDeviceInterfaceById(Long id) |
| | | { |
| | | return daTestDeviceInterfaceMapper.deleteDaTestDeviceInterfaceById(id); |
| | | } |
| | | } |
| | |
| | | public static void main(String[] args) { |
| | | String str = "uuuuuu11uuuuuuuuuuuuuuu"; |
| | | System.out.println(str.length()); |
| | | // getWorkReportResultFeedback() |
| | | } |
| | | |
| | | public static final String getRealmName = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration"; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.jcdm.main.da.testDeviceInterface.mapper.DaTestDeviceInterfaceMapper"> |
| | | |
| | | <resultMap type="DaTestDeviceInterface" id="DaTestDeviceInterfaceResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="recordId" column="record_id" /> |
| | | <result property="stationCode" column="station_code" /> |
| | | <result property="productNum" column="product_num" /> |
| | | <result property="totalResult" column="total_result" /> |
| | | <result property="workOrderNo" column="work_order_no" /> |
| | | <result property="supplierType" column="supplier_type" /> |
| | | <result property="checkList" column="check_list" /> |
| | | <result property="resultCode" column="result_code" /> |
| | | <result property="resultMessage" column="result_message" /> |
| | | <result property="resultData" column="result_data" /> |
| | | <result property="remarks" column="remarks" /> |
| | | <result property="createUser" column="create_user" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateUser" column="update_user" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="spareField1" column="spare_field1" /> |
| | | <result property="spareField2" column="spare_field2" /> |
| | | <result property="spareField3" column="spare_field3" /> |
| | | <result property="spareField4" column="spare_field4" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectDaTestDeviceInterfaceVo"> |
| | | select id, record_id, station_code, product_num, total_result, work_order_no, supplier_type, check_list, result_code, result_message, result_data, remarks, create_user, create_time, update_user, update_time, spare_field1, spare_field2, spare_field3, spare_field4 from da_test_device_interface |
| | | </sql> |
| | | |
| | | <select id="selectDaTestDeviceInterfaceList" parameterType="DaTestDeviceInterface" resultMap="DaTestDeviceInterfaceResult"> |
| | | <include refid="selectDaTestDeviceInterfaceVo"/> |
| | | <where> |
| | | <if test="recordId != null and recordId != ''"> and record_id = #{recordId}</if> |
| | | <if test="stationCode != null and stationCode != ''"> and station_code = #{stationCode}</if> |
| | | <if test="productNum != null and productNum != ''"> and product_num = #{productNum}</if> |
| | | <if test="totalResult != null and totalResult != ''"> and total_result = #{totalResult}</if> |
| | | <if test="workOrderNo != null and workOrderNo != ''"> and work_order_no = #{workOrderNo}</if> |
| | | <if test="supplierType != null and supplierType != ''"> and supplier_type = #{supplierType}</if> |
| | | <if test="resultCode != null and resultCode != ''"> and result_code = #{resultCode}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectDaTestDeviceInterfaceById" parameterType="Long" resultMap="DaTestDeviceInterfaceResult"> |
| | | <include refid="selectDaTestDeviceInterfaceVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertDaTestDeviceInterface" parameterType="DaTestDeviceInterface"> |
| | | insert into da_test_device_interface |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="recordId != null">record_id,</if> |
| | | <if test="stationCode != null">station_code,</if> |
| | | <if test="productNum != null">product_num,</if> |
| | | <if test="totalResult != null">total_result,</if> |
| | | <if test="workOrderNo != null">work_order_no,</if> |
| | | <if test="supplierType != null">supplier_type,</if> |
| | | <if test="checkList != null">check_list,</if> |
| | | <if test="resultCode != null">result_code,</if> |
| | | <if test="resultMessage != null">result_message,</if> |
| | | <if test="resultData != null">result_data,</if> |
| | | <if test="remarks != null">remarks,</if> |
| | | <if test="createUser != null">create_user,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateUser != null">update_user,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="spareField1 != null">spare_field1,</if> |
| | | <if test="spareField2 != null">spare_field2,</if> |
| | | <if test="spareField3 != null">spare_field3,</if> |
| | | <if test="spareField4 != null">spare_field4,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | | <if test="recordId != null">#{recordId},</if> |
| | | <if test="stationCode != null">#{stationCode},</if> |
| | | <if test="productNum != null">#{productNum},</if> |
| | | <if test="totalResult != null">#{totalResult},</if> |
| | | <if test="workOrderNo != null">#{workOrderNo},</if> |
| | | <if test="supplierType != null">#{supplierType},</if> |
| | | <if test="checkList != null">#{checkList},</if> |
| | | <if test="resultCode != null">#{resultCode},</if> |
| | | <if test="resultMessage != null">#{resultMessage},</if> |
| | | <if test="resultData != null">#{resultData},</if> |
| | | <if test="remarks != null">#{remarks},</if> |
| | | <if test="createUser != null">#{createUser},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateUser != null">#{updateUser},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="spareField1 != null">#{spareField1},</if> |
| | | <if test="spareField2 != null">#{spareField2},</if> |
| | | <if test="spareField3 != null">#{spareField3},</if> |
| | | <if test="spareField4 != null">#{spareField4},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateDaTestDeviceInterface" parameterType="DaTestDeviceInterface"> |
| | | update da_test_device_interface |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="recordId != null">record_id = #{recordId},</if> |
| | | <if test="stationCode != null">station_code = #{stationCode},</if> |
| | | <if test="productNum != null">product_num = #{productNum},</if> |
| | | <if test="totalResult != null">total_result = #{totalResult},</if> |
| | | <if test="workOrderNo != null">work_order_no = #{workOrderNo},</if> |
| | | <if test="supplierType != null">supplier_type = #{supplierType},</if> |
| | | <if test="checkList != null">check_list = #{checkList},</if> |
| | | <if test="resultCode != null">result_code = #{resultCode},</if> |
| | | <if test="resultMessage != null">result_message = #{resultMessage},</if> |
| | | <if test="resultData != null">result_data = #{resultData},</if> |
| | | <if test="remarks != null">remarks = #{remarks},</if> |
| | | <if test="createUser != null">create_user = #{createUser},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateUser != null">update_user = #{updateUser},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="spareField1 != null">spare_field1 = #{spareField1},</if> |
| | | <if test="spareField2 != null">spare_field2 = #{spareField2},</if> |
| | | <if test="spareField3 != null">spare_field3 = #{spareField3},</if> |
| | | <if test="spareField4 != null">spare_field4 = #{spareField4},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteDaTestDeviceInterfaceById" parameterType="Long"> |
| | | delete from da_test_device_interface where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteDaTestDeviceInterfaceByIds" parameterType="String"> |
| | | delete from da_test_device_interface where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¥è¯¢æµè¯è®¾å¤æ¥å£æ°æ®å表 |
| | | export function listTestDeviceInterface(query) { |
| | | return request({ |
| | | url: '/da/testDeviceInterface/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢æµè¯è®¾å¤æ¥å£æ°æ®è¯¦ç» |
| | | export function getTestDeviceInterface(id) { |
| | | return request({ |
| | | url: '/da/testDeviceInterface/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // æ°å¢æµè¯è®¾å¤æ¥å£æ°æ® |
| | | export function addTestDeviceInterface(data) { |
| | | return request({ |
| | | url: '/da/testDeviceInterface', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // ä¿®æ¹æµè¯è®¾å¤æ¥å£æ°æ® |
| | | export function updateTestDeviceInterface(data) { |
| | | return request({ |
| | | url: '/da/testDeviceInterface', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // å é¤æµè¯è®¾å¤æ¥å£æ°æ® |
| | | export function delTestDeviceInterface(id) { |
| | | return request({ |
| | | url: '/da/testDeviceInterface/' + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <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="æ£éªè®°å½ç¼å·" prop="recordId"> |
| | | <el-input |
| | | v-model="queryParams.recordId" |
| | | placeholder="请è¾å
¥æ£éªè®°å½ç¼å·ï¼ç±å设å¤æèªå®è§åçæï¼å¯ä¸ç¼ç " |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="ç«ç¹ç¼å·" prop="stationCode"> |
| | | <el-input |
| | | v-model="queryParams.stationCode" |
| | | placeholder="请è¾å
¥æ£æµç«ç¹ç¼å·" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="packç " prop="productNum"> |
| | | <el-input |
| | | v-model="queryParams.productNum" |
| | | placeholder="请è¾å
¥äº§ååºåå·-packç " |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="æ´ä½ç»æ " prop="totalResult"> |
| | | <el-input |
| | | v-model="queryParams.totalResult" |
| | | placeholder="请è¾å
¥æ´ä½ç»æ " |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥åå·" prop="workOrderNo"> |
| | | <el-input |
| | | v-model="queryParams.workOrderNo" |
| | | placeholder="请è¾å
¥å·¥åå·" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="ä¾åºåç±»å" prop="supplierType">--> |
| | | <!-- <el-select v-model="queryParams.supplierType" placeholder="请éæ©ä¾åºåç±»å" clearable>--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="dict in dict.type.${dictType}"--> |
| | | <!-- :key="dict.value"--> |
| | | <!-- :label="dict.label"--> |
| | | <!-- :value="dict.value"--> |
| | | <!-- />--> |
| | | <!-- </el-select>--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="ç¶æç¼ç " prop="resultCode"> |
| | | <el-input |
| | | v-model="queryParams.resultCode" |
| | | placeholder="请è¾å
¥ç¶æç¼ç " |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item style="float: right"> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-card> |
| | | |
| | | <el-card style="margin-top: 10px" class="box-card"> |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-plus" |
| | | size="mini" |
| | | @click="handleAdd" |
| | | v-hasPermi="['da:testDeviceInterface:add']" |
| | | >æ°å¢</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | icon="el-icon-edit" |
| | | size="mini" |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['da:testDeviceInterface:edit']" |
| | | >ä¿®æ¹</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="danger" |
| | | plain |
| | | icon="el-icon-delete" |
| | | size="mini" |
| | | :disabled="multiple" |
| | | @click="handleDelete" |
| | | v-hasPermi="['da:testDeviceInterface:remove']" |
| | | >å é¤</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="el-icon-download" |
| | | size="mini" |
| | | @click="handleExport" |
| | | v-hasPermi="['da:testDeviceInterface:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table border v-loading="loading" :data="testDeviceInterfaceList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="id" align="center" prop="id" /> |
| | | <el-table-column label="æ£éªè®°å½ç¼å·" align="center" prop="recordId"> |
| | | </el-table-column> |
| | | <el-table-column label="ç«ç¹ç¼å·" align="center" prop="stationCode"> |
| | | </el-table-column> |
| | | <el-table-column label="packç " align="center" prop="productNum"> |
| | | </el-table-column> |
| | | <el-table-column label="æ´ä½ç»æ " align="center" prop="totalResult"> |
| | | </el-table-column> |
| | | <el-table-column label="å·¥åå·" align="center" prop="workOrderNo"> |
| | | </el-table-column> |
| | | <el-table-column label="ä¾åºåç±»å" align="center" prop="supplierType"> |
| | | </el-table-column> |
| | | <el-table-column label="å
¥å" align="center" prop="checkList"> |
| | | </el-table-column> |
| | | <el-table-column label="ç¶æç¼ç " align="center" prop="resultCode"> |
| | | </el-table-column> |
| | | <el-table-column label="è¿åä¿¡æ¯" align="center" prop="resultMessage"> |
| | | </el-table-column> |
| | | <el-table-column label="åºå" align="center" prop="resultData"> |
| | | </el-table-column> |
| | | <el-table-column label="å建ç¨æ·" align="center" prop="createUser"> |
| | | </el-table-column> |
| | | <el-table-column label="å建æ¶é´" align="center" prop="createTime"> |
| | | </el-table-column> |
| | | <el-table-column label="æ´æ¹ç¨æ·" align="center" prop="updateUser"> |
| | | </el-table-column> |
| | | <el-table-column label="æ´æ¹æ¶é´" align="center" prop="updateTime"> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" width="200" label="æä½" align="center" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="success" |
| | | plain |
| | | style="width: 72px" |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['da:testDeviceInterface:edit']" |
| | | >ä¿®æ¹</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="danger" |
| | | plain |
| | | style="width: 72px" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['da:testDeviceInterface:remove']" |
| | | >å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-card> |
| | | |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="queryParams.pageNum" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | |
| | | <!-- æ·»å æä¿®æ¹æµè¯è®¾å¤æ¥å£æ°æ®å¯¹è¯æ¡ --> |
| | | <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <span slot="title"> |
| | | <i class="el-icon-s-order"></i> |
| | | {{titleName}} |
| | | </span> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="æ£éªè®°å½ç¼å·ï¼ç±å设å¤æèªå®è§åçæï¼å¯ä¸ç¼ç " prop="recordId"> |
| | | <el-input v-model="form.recordId" placeholder="请è¾å
¥æ£éªè®°å½ç¼å·ï¼ç±å设å¤æèªå®è§åçæï¼å¯ä¸ç¼ç " /> |
| | | </el-form-item> |
| | | <el-form-item label="æ£æµç«ç¹ç¼å·" prop="stationCode"> |
| | | <el-input v-model="form.stationCode" placeholder="请è¾å
¥æ£æµç«ç¹ç¼å·" /> |
| | | </el-form-item> |
| | | <el-form-item label="产ååºåå·-packç " prop="productNum"> |
| | | <el-input v-model="form.productNum" placeholder="请è¾å
¥äº§ååºåå·-packç " /> |
| | | </el-form-item> |
| | | <el-form-item label="æ´ä½ç»æ " prop="totalResult"> |
| | | <el-input v-model="form.totalResult" placeholder="请è¾å
¥æ´ä½ç»æ " /> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥åå·" prop="workOrderNo"> |
| | | <el-input v-model="form.workOrderNo" placeholder="请è¾å
¥å·¥åå·" /> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="ä¾åºåç±»å" prop="supplierType">--> |
| | | <!-- <el-select v-model="form.supplierType" placeholder="请éæ©ä¾åºåç±»å">--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="dict in dict.type.${dictType}"--> |
| | | <!-- :key="dict.value"--> |
| | | <!-- :label="dict.label"--> |
| | | <!-- :value="dict.value"--> |
| | | <!-- ></el-option>--> |
| | | <!-- </el-select>--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="å
¥å-åæ°å表" prop="checkList"> |
| | | <el-input v-model="form.checkList" placeholder="请è¾å
¥å
¥å-åæ°å表" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç¶æç¼ç " prop="resultCode"> |
| | | <el-input v-model="form.resultCode" placeholder="请è¾å
¥ç¶æç¼ç " /> |
| | | </el-form-item> |
| | | <el-form-item label="æ¥å£çè¿åä¿¡æ¯ï¼å½failæ¶ä¼ææ¥éä¿¡æ¯" prop="resultMessage"> |
| | | <el-input v-model="form.resultMessage" placeholder="请è¾å
¥æ¥å£çè¿åä¿¡æ¯ï¼å½failæ¶ä¼ææ¥éä¿¡æ¯" /> |
| | | </el-form-item> |
| | | <el-form-item label="åºå-åæ°å表" prop="resultData"> |
| | | <el-input v-model="form.resultData" placeholder="请è¾å
¥åºå-åæ°å表" /> |
| | | </el-form-item> |
| | | <el-form-item label="å¤æ³¨" prop="remarks"> |
| | | <el-input v-model="form.remarks" placeholder="请è¾å
¥å¤æ³¨" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm">ç¡® å®</el-button> |
| | | <el-button @click="cancel">å æ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { listTestDeviceInterface, getTestDeviceInterface, delTestDeviceInterface, addTestDeviceInterface, updateTestDeviceInterface } from "@/api/main/da/testDeviceInterface/testDeviceInterface"; |
| | | |
| | | export default { |
| | | name: "TestDeviceInterface", |
| | | data() { |
| | | return { |
| | | // é®ç½©å± |
| | | loading: true, |
| | | titleName: "", |
| | | // éä¸æ°ç» |
| | | ids: [], |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // æµè¯è®¾å¤æ¥å£æ°æ®è¡¨æ ¼æ°æ® |
| | | testDeviceInterfaceList: [], |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | | open: false, |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | recordId: null, |
| | | stationCode: null, |
| | | productNum: null, |
| | | totalResult: null, |
| | | workOrderNo: null, |
| | | supplierType: null, |
| | | resultCode: null, |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | | // 表åæ ¡éª |
| | | rules: { |
| | | id: [ |
| | | { required: true, message: "idä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | /** æ¥è¯¢æµè¯è®¾å¤æ¥å£æ°æ®å表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listTestDeviceInterface(this.queryParams).then(response => { |
| | | this.testDeviceInterfaceList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // åæ¶æé® |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表åéç½® |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | recordId: null, |
| | | stationCode: null, |
| | | productNum: null, |
| | | totalResult: null, |
| | | workOrderNo: null, |
| | | supplierType: null, |
| | | checkList: null, |
| | | resultCode: null, |
| | | resultMessage: null, |
| | | resultData: null, |
| | | remarks: null, |
| | | createUser: null, |
| | | createTime: null, |
| | | updateUser: null, |
| | | updateTime: null, |
| | | spareField1: null, |
| | | spareField2: null, |
| | | spareField3: null, |
| | | spareField4: null |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | | /** æç´¢æé®æä½ */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | /** éç½®æé®æä½ */ |
| | | resetQuery() { |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | | // å¤éæ¡éä¸æ°æ® |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.id) |
| | | this.single = selection.length!==1 |
| | | this.multiple = !selection.length |
| | | }, |
| | | /** æ°å¢æé®æä½ */ |
| | | handleAdd() { |
| | | this.reset(); |
| | | this.open = true; |
| | | this.titleName = "æ·»å æµè¯è®¾å¤æ¥å£æ°æ®"; |
| | | }, |
| | | /** ä¿®æ¹æé®æä½ */ |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | const id = row.id || this.ids |
| | | getTestDeviceInterface(id).then(response => { |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.titleName = "ä¿®æ¹æµè¯è®¾å¤æ¥å£æ°æ®"; |
| | | }); |
| | | }, |
| | | /** æ交æé® */ |
| | | submitForm() { |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | if (this.form.id != null) { |
| | | updateTestDeviceInterface(this.form).then(response => { |
| | | this.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addTestDeviceInterface(this.form).then(response => { |
| | | this.$modal.msgSuccess("æ°å¢æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | /** å é¤æé®æä½ */ |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | this.$modal.confirm('æ¯å¦ç¡®è®¤å é¤æµè¯è®¾å¤æ¥å£æ°æ®ç¼å·ä¸º"' + ids + '"çæ°æ®é¡¹ï¼').then(function() { |
| | | return delTestDeviceInterface(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("å é¤æå"); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** 导åºæé®æä½ */ |
| | | handleExport() { |
| | | this.download('da/testDeviceInterface/export', { |
| | | ...this.queryParams |
| | | }, `testDeviceInterface_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | }; |
| | | </script> |