jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java
@@ -25,6 +25,8 @@ 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.da.tileMatchCollection.domain.DaTileMatchCollection; import com.jcdm.main.da.tileMatchCollection.service.IDaTileMatchCollectionService; import com.jcdm.main.om.productionOrde.domain.OmProductionOrdeInfo; import com.jcdm.main.om.productionOrde.service.impl.OmProductionOrdeInfoServiceImpl; import com.jcdm.main.plcserver.conf.OPCElement; @@ -67,6 +69,8 @@ private OmProductionOrdeInfoServiceImpl productionOrdeInfoService; @Resource private DaParamCollectionMapper daParamCollectionService; @Resource private IDaTileMatchCollectionService daTileMatchCollectionService; @Autowired MiloService miloService; @@ -343,9 +347,17 @@ saveData.setParamValue(engineNo); saveData.setLocationCode("OP010"); saveData.setParamCode("XTM"); saveData.setParamName("ç®±ä½ç "); saveData.setParamName("ç®±ä½"); daParamCollectionService.insertDaParamCollection(saveData); DaTileMatchCollection MatchCollection = new DaTileMatchCollection(); MatchCollection.setSfcCode(OrderScheduling.getEngineNo()); MatchCollection.setParamValue(engineNo); MatchCollection.setLocationCode("OP010"); MatchCollection.setParamCode("XTM"); MatchCollection.setParamName("ç®±ä½"); daTileMatchCollectionService.insertDaTileMatchCollection(MatchCollection); //æ´æ°ä¸çº¿æ°é int onlineNum = 0; List<BsOrderScheduling> onlineNumList = bsOrderSchedulingService.selectBsOrderSchedulingList(bsOrderScheduling) jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/controller/DaOpcuaConfigController.java
@@ -2,6 +2,7 @@ import java.util.List; import java.util.stream.Collectors; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; import cn.hutool.core.collection.CollUtil; @@ -11,6 +12,8 @@ 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.tileMatchCollection.domain.DaTileMatchCollection; import com.jcdm.main.da.tileMatchCollection.service.IDaTileMatchCollectionService; import com.jcdm.main.da.tileMatchMiddleware.domain.DaTileMatchMiddleware; import com.jcdm.main.da.tileMatchMiddleware.service.IDaTileMatchMiddlewareService; import com.jcdm.main.da.tileMatchRules.domain.DaTileMatchRules; @@ -54,6 +57,8 @@ private IDaTileMatchRulesService daTileMatchRulesService; @Autowired private IDaTileMatchMiddlewareService daTileMatchMiddlewareService; @Resource private IDaTileMatchCollectionService daTileMatchCollectionService; /** * æ¥è¯¢äº¤äºä¿¡å·é ç½®å表 @@ -163,6 +168,14 @@ saveData.setParamName("æ²è½´"); daParamCollectionService.insertDaParamCollection(saveData); DaTileMatchCollection MatchCollection = new DaTileMatchCollection(); MatchCollection.setSfcCode(SNCode); MatchCollection.setParamValue(barcode); MatchCollection.setLocationCode(locationCode); MatchCollection.setParamCode("CZM"); MatchCollection.setParamName("æ²è½´"); daTileMatchCollectionService.insertDaTileMatchCollection(MatchCollection); DaTileMatchRules TileMatchRules = new DaTileMatchRules(); TileMatchRules.setProductSeries("380Y"); TileMatchRules.setScanObject1("è¿æ"); jcdm-main/src/main/java/com/jcdm/main/da/tileMatchCollection/controller/DaTileMatchCollectionController.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,104 @@ package com.jcdm.main.da.tileMatchCollection.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; 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.tileMatchCollection.domain.DaTileMatchCollection; import com.jcdm.main.da.tileMatchCollection.service.IDaTileMatchCollectionService; import com.jcdm.common.utils.poi.ExcelUtil; import com.jcdm.common.core.page.TableDataInfo; /** * æ¡ç ééController * * @author yyt * @date 2024-06-06 */ @RestController @RequestMapping("/da/tileMatchCollection") public class DaTileMatchCollectionController extends BaseController { @Autowired private IDaTileMatchCollectionService daTileMatchCollectionService; /** * æ¥è¯¢æ¡ç ééå表 */ @PreAuthorize("@ss.hasPermi('da:tileMatchCollection:list')") @GetMapping("/list") public TableDataInfo list(DaTileMatchCollection daTileMatchCollection) { startPage(); List<DaTileMatchCollection> list = daTileMatchCollectionService.selectDaTileMatchCollectionList(daTileMatchCollection); return getDataTable(list); } /** * 导åºæ¡ç ééå表 */ @PreAuthorize("@ss.hasPermi('da:tileMatchCollection:export')") @Log(title = "æ¡ç éé", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, DaTileMatchCollection daTileMatchCollection) { List<DaTileMatchCollection> list = daTileMatchCollectionService.selectDaTileMatchCollectionList(daTileMatchCollection); ExcelUtil<DaTileMatchCollection> util = new ExcelUtil<DaTileMatchCollection>(DaTileMatchCollection.class); util.exportExcel(response, list, "æ¡ç ééæ°æ®"); } /** * è·åæ¡ç éé详ç»ä¿¡æ¯ */ @PreAuthorize("@ss.hasPermi('da:tileMatchCollection:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { return success(daTileMatchCollectionService.selectDaTileMatchCollectionById(id)); } /** * æ°å¢æ¡ç éé */ @PreAuthorize("@ss.hasPermi('da:tileMatchCollection:add')") @Log(title = "æ¡ç éé", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody DaTileMatchCollection daTileMatchCollection) { return toAjax(daTileMatchCollectionService.insertDaTileMatchCollection(daTileMatchCollection)); } /** * ä¿®æ¹æ¡ç éé */ @PreAuthorize("@ss.hasPermi('da:tileMatchCollection:edit')") @Log(title = "æ¡ç éé", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody DaTileMatchCollection daTileMatchCollection) { return toAjax(daTileMatchCollectionService.updateDaTileMatchCollection(daTileMatchCollection)); } /** * å é¤æ¡ç éé */ @PreAuthorize("@ss.hasPermi('da:tileMatchCollection:remove')") @Log(title = "æ¡ç éé", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(daTileMatchCollectionService.deleteDaTileMatchCollectionByIds(ids)); } } jcdm-main/src/main/java/com/jcdm/main/da/tileMatchCollection/domain/DaTileMatchCollection.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,123 @@ package com.jcdm.main.da.tileMatchCollection.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_tile_match_collection * * @author yyt * @date 2024-06-06 */ public class DaTileMatchCollection extends BaseEntity { private static final long serialVersionUID = 1L; /** id */ private Long id; /** åå¨æºå· */ @Excel(name = "åå¨æºå·") private String sfcCode; /** é¶ä»¶ç¼å· */ @Excel(name = "é¶ä»¶ç¼å·") private String paramCode; /** é¶ä»¶å称 */ @Excel(name = "é¶ä»¶å称") private String paramName; /** å¤æ³¨ */ @Excel(name = "å¤æ³¨") private String remarks; /** å·¥åºç¼å· */ @Excel(name = "å·¥åºç¼å·") private String locationCode; /** æ¡ç */ @Excel(name = "æ¡ç ") private String paramValue; public void setId(Long id) { this.id = id; } public Long getId() { return id; } public void setSfcCode(String sfcCode) { this.sfcCode = sfcCode; } public String getSfcCode() { return sfcCode; } public void setParamCode(String paramCode) { this.paramCode = paramCode; } public String getParamCode() { return paramCode; } public void setParamName(String paramName) { this.paramName = paramName; } public String getParamName() { return paramName; } public void setRemarks(String remarks) { this.remarks = remarks; } public String getRemarks() { return remarks; } public void setLocationCode(String locationCode) { this.locationCode = locationCode; } public String getLocationCode() { return locationCode; } public void setParamValue(String paramValue) { this.paramValue = paramValue; } public String getParamValue() { return paramValue; } @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) .append("id", getId()) .append("sfcCode", getSfcCode()) .append("paramCode", getParamCode()) .append("paramName", getParamName()) .append("createTime", getCreateTime()) .append("remarks", getRemarks()) .append("locationCode", getLocationCode()) .append("paramValue", getParamValue()) .toString(); } } jcdm-main/src/main/java/com/jcdm/main/da/tileMatchCollection/mapper/DaTileMatchCollectionMapper.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,61 @@ package com.jcdm.main.da.tileMatchCollection.mapper; import java.util.List; import com.jcdm.main.da.tileMatchCollection.domain.DaTileMatchCollection; /** * æ¡ç ééMapperæ¥å£ * * @author yyt * @date 2024-06-06 */ public interface DaTileMatchCollectionMapper { /** * æ¥è¯¢æ¡ç éé * * @param id æ¡ç ééä¸»é® * @return æ¡ç éé */ public DaTileMatchCollection selectDaTileMatchCollectionById(Long id); /** * æ¥è¯¢æ¡ç ééå表 * * @param daTileMatchCollection æ¡ç éé * @return æ¡ç éééå */ public List<DaTileMatchCollection> selectDaTileMatchCollectionList(DaTileMatchCollection daTileMatchCollection); /** * æ°å¢æ¡ç éé * * @param daTileMatchCollection æ¡ç éé * @return ç»æ */ public int insertDaTileMatchCollection(DaTileMatchCollection daTileMatchCollection); /** * ä¿®æ¹æ¡ç éé * * @param daTileMatchCollection æ¡ç éé * @return ç»æ */ public int updateDaTileMatchCollection(DaTileMatchCollection daTileMatchCollection); /** * å é¤æ¡ç éé * * @param id æ¡ç ééä¸»é® * @return ç»æ */ public int deleteDaTileMatchCollectionById(Long id); /** * æ¹éå é¤æ¡ç éé * * @param ids éè¦å é¤çæ°æ®ä¸»é®éå * @return ç»æ */ public int deleteDaTileMatchCollectionByIds(Long[] ids); } jcdm-main/src/main/java/com/jcdm/main/da/tileMatchCollection/service/IDaTileMatchCollectionService.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,61 @@ package com.jcdm.main.da.tileMatchCollection.service; import java.util.List; import com.jcdm.main.da.tileMatchCollection.domain.DaTileMatchCollection; /** * æ¡ç ééServiceæ¥å£ * * @author yyt * @date 2024-06-06 */ public interface IDaTileMatchCollectionService { /** * æ¥è¯¢æ¡ç éé * * @param id æ¡ç ééä¸»é® * @return æ¡ç éé */ public DaTileMatchCollection selectDaTileMatchCollectionById(Long id); /** * æ¥è¯¢æ¡ç ééå表 * * @param daTileMatchCollection æ¡ç éé * @return æ¡ç éééå */ public List<DaTileMatchCollection> selectDaTileMatchCollectionList(DaTileMatchCollection daTileMatchCollection); /** * æ°å¢æ¡ç éé * * @param daTileMatchCollection æ¡ç éé * @return ç»æ */ public int insertDaTileMatchCollection(DaTileMatchCollection daTileMatchCollection); /** * ä¿®æ¹æ¡ç éé * * @param daTileMatchCollection æ¡ç éé * @return ç»æ */ public int updateDaTileMatchCollection(DaTileMatchCollection daTileMatchCollection); /** * æ¹éå é¤æ¡ç éé * * @param ids éè¦å é¤çæ¡ç éé主é®éå * @return ç»æ */ public int deleteDaTileMatchCollectionByIds(Long[] ids); /** * å é¤æ¡ç ééä¿¡æ¯ * * @param id æ¡ç ééä¸»é® * @return ç»æ */ public int deleteDaTileMatchCollectionById(Long id); } jcdm-main/src/main/java/com/jcdm/main/da/tileMatchCollection/service/impl/DaTileMatchCollectionServiceImpl.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,95 @@ package com.jcdm.main.da.tileMatchCollection.service.impl; import java.util.List; import com.jcdm.common.utils.DateUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.jcdm.main.da.tileMatchCollection.mapper.DaTileMatchCollectionMapper; import com.jcdm.main.da.tileMatchCollection.domain.DaTileMatchCollection; import com.jcdm.main.da.tileMatchCollection.service.IDaTileMatchCollectionService; /** * æ¡ç ééServiceä¸å¡å±å¤ç * * @author yyt * @date 2024-06-06 */ @Service public class DaTileMatchCollectionServiceImpl implements IDaTileMatchCollectionService { @Autowired private DaTileMatchCollectionMapper daTileMatchCollectionMapper; /** * æ¥è¯¢æ¡ç éé * * @param id æ¡ç ééä¸»é® * @return æ¡ç éé */ @Override public DaTileMatchCollection selectDaTileMatchCollectionById(Long id) { return daTileMatchCollectionMapper.selectDaTileMatchCollectionById(id); } /** * æ¥è¯¢æ¡ç ééå表 * * @param daTileMatchCollection æ¡ç éé * @return æ¡ç éé */ @Override public List<DaTileMatchCollection> selectDaTileMatchCollectionList(DaTileMatchCollection daTileMatchCollection) { return daTileMatchCollectionMapper.selectDaTileMatchCollectionList(daTileMatchCollection); } /** * æ°å¢æ¡ç éé * * @param daTileMatchCollection æ¡ç éé * @return ç»æ */ @Override public int insertDaTileMatchCollection(DaTileMatchCollection daTileMatchCollection) { daTileMatchCollection.setCreateTime(DateUtils.getNowDate()); return daTileMatchCollectionMapper.insertDaTileMatchCollection(daTileMatchCollection); } /** * ä¿®æ¹æ¡ç éé * * @param daTileMatchCollection æ¡ç éé * @return ç»æ */ @Override public int updateDaTileMatchCollection(DaTileMatchCollection daTileMatchCollection) { return daTileMatchCollectionMapper.updateDaTileMatchCollection(daTileMatchCollection); } /** * æ¹éå é¤æ¡ç éé * * @param ids éè¦å é¤çæ¡ç ééä¸»é® * @return ç»æ */ @Override public int deleteDaTileMatchCollectionByIds(Long[] ids) { return daTileMatchCollectionMapper.deleteDaTileMatchCollectionByIds(ids); } /** * å é¤æ¡ç ééä¿¡æ¯ * * @param id æ¡ç ééä¸»é® * @return ç»æ */ @Override public int deleteDaTileMatchCollectionById(Long id) { return daTileMatchCollectionMapper.deleteDaTileMatchCollectionById(id); } } jcdm-main/src/main/java/com/jcdm/main/da/tileMatchRules/controller/DaTileMatchRulesController.java
@@ -2,11 +2,14 @@ import java.util.List; import java.util.stream.Collectors; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; import cn.hutool.core.collection.CollUtil; import com.jcdm.main.da.paramCollection.domain.DaParamCollection; import com.jcdm.main.da.paramCollection.service.IDaParamCollectionService; import com.jcdm.main.da.tileMatchCollection.domain.DaTileMatchCollection; import com.jcdm.main.da.tileMatchCollection.service.IDaTileMatchCollectionService; import com.jcdm.main.da.tileMatchMiddleware.domain.DaTileMatchMiddleware; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; @@ -44,6 +47,8 @@ @Autowired public IDaParamCollectionService daParamCollectionService; @Resource private IDaTileMatchCollectionService daTileMatchCollectionService; /** * æ¥è¯¢é ç¦è§åå表() @@ -168,10 +173,18 @@ saveData.setSfcCode(SNCode); saveData.setParamValue(barcode); saveData.setLocationCode(locationCode); saveData.setParamCode("CZM"); saveData.setParamName("æ²è½´"); saveData.setParamCode("PHZ"); saveData.setParamName("平衡轴"); daParamCollectionService.insertDaParamCollection(saveData); DaTileMatchCollection MatchCollection = new DaTileMatchCollection(); MatchCollection.setSfcCode(SNCode); MatchCollection.setParamValue(barcode); MatchCollection.setLocationCode(locationCode); MatchCollection.setParamCode("PHZ"); MatchCollection.setParamName("平衡轴"); daTileMatchCollectionService.insertDaTileMatchCollection(MatchCollection); DaParamCollection ParamCollection = new DaParamCollection(); ParamCollection.setSfcCode(SNCode); List<DaParamCollection> DaParamCollectionlist=daParamCollectionService.selectDaParamCollectionList(ParamCollection); jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java
@@ -99,31 +99,33 @@ logger.info("-------çå¬å°,{}çæ«ç æªæ«ç çCODE_CHECKçä¿¡å·",identifier); scannerGunMessage(); } // if (identifier.equals(OPCElement.OP060_HX_CODE_CHECK) && "1".equals(value.toString())){ // Object SNCodeObject = miloService.readFromOpcUa("CFL4HX.OP060.Code1").getValue(); // if (null == SNCodeObject){ // SNCodeObject = miloService.readFromOpcUa("CFL4HX.OP060.Code").getValue(); // } // if (null != SNCodeObject){ // String XT=""; // String CZ=""; // String SNCode = SNCodeObject.toString(); // DaParamCollection ParamCollection = new DaParamCollection(); // ParamCollection.setSfcCode(SNCode); // List<DaParamCollection> DaParamCollectionlist=daParamCollectionService.selectDaParamCollectionList(ParamCollection); // List<DaParamCollection> XTParamCollection = DaParamCollectionlist.stream().filter(x -> "ç®±ä½".equals(x.getParamName())).collect(Collectors.toList()); // if (CollUtil.isNotEmpty(XTParamCollection)){ // DaParamCollection lastOne = XTParamCollection.get(0); // XT = lastOne.getParamValue(); // } // List<DaParamCollection> CZParamCollection = DaParamCollectionlist.stream().filter(x -> "æ²è½´".equals(x.getParamName())).collect(Collectors.toList()); // if (CollUtil.isNotEmpty(CZParamCollection)){ // DaParamCollection lastOne = CZParamCollection.get(0); // CZ = lastOne.getParamValue(); // } // passingStationCollectionServiceImpl.sendMessage(XT+"*"+CZ,"OP060"); // } // } if (identifier.equals(OPCElement.OP060_HX_CODE_CHECK) && "1".equals(value.toString())){ Object SNCodeObject = miloService.readFromOpcUa("CFL4HX.OP060.Code1").getValue(); if (null == SNCodeObject){ SNCodeObject = miloService.readFromOpcUa("CFL4HX.OP060.Code").getValue(); } if (null != SNCodeObject){ String XT=null; String CZ=null; String SNCode = SNCodeObject.toString(); DaParamCollection ParamCollection = new DaParamCollection(); ParamCollection.setSfcCode(SNCode); List<DaParamCollection> DaParamCollectionlist=daParamCollectionService.selectDaParamCollectionList(ParamCollection); List<DaParamCollection> XTParamCollection = DaParamCollectionlist.stream().filter(x -> "ç®±ä½".equals(x.getParamName())).collect(Collectors.toList()); if (CollUtil.isNotEmpty(XTParamCollection)){ DaParamCollection lastOne = XTParamCollection.get(0); XT = lastOne.getParamValue(); } List<DaParamCollection> CZParamCollection = DaParamCollectionlist.stream().filter(x -> "æ²è½´".equals(x.getParamName())).collect(Collectors.toList()); if (CollUtil.isNotEmpty(CZParamCollection)){ DaParamCollection lastOne = CZParamCollection.get(0); CZ = lastOne.getParamValue(); } if(null != XT&&null != CZ) { passingStationCollectionServiceImpl.sendMessage(XT+"*"+CZ,"OP060"); } } } } if (collect2.contains(identifier)){ if ("1".equals(value.toString())){ jcdm-main/src/main/resources/mapper/da/tileMatchCollection/DaTileMatchCollectionMapper.xml
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,86 @@ <?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.tileMatchCollection.mapper.DaTileMatchCollectionMapper"> <resultMap type="DaTileMatchCollection" id="DaTileMatchCollectionResult"> <result property="id" column="id" /> <result property="sfcCode" column="sfc_code" /> <result property="paramCode" column="param_code" /> <result property="paramName" column="param_name" /> <result property="createTime" column="create_time" /> <result property="remarks" column="remarks" /> <result property="locationCode" column="location_code" /> </resultMap> <sql id="selectDaTileMatchCollectionVo"> select id, sfc_code, param_code, param_name, create_time, remarks, location_code,param_value from da_tile_match_collection </sql> <select id="selectDaTileMatchCollectionList" parameterType="DaTileMatchCollection" resultMap="DaTileMatchCollectionResult"> <include refid="selectDaTileMatchCollectionVo"/> <where> <if test="sfcCode != null and sfcCode != ''"> and sfc_code = #{sfcCode}</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="paramName != null and paramName != ''"> and param_name like concat('%', #{paramValue}, '%')</if> <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if> <if test="locationCode != null and locationCode != ''"> and location_code = #{locationCode}</if> </where> </select> <select id="selectDaTileMatchCollectionById" parameterType="Long" resultMap="DaTileMatchCollectionResult"> <include refid="selectDaTileMatchCollectionVo"/> where id = #{id} </select> <insert id="insertDaTileMatchCollection" parameterType="DaTileMatchCollection"> insert into da_tile_match_collection <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null">id,</if> <if test="sfcCode != null">sfc_code,</if> <if test="paramCode != null">param_code,</if> <if test="paramName != null">param_name,</if> <if test="paramValue != null">param_value,</if> <if test="createTime != null">create_time,</if> <if test="remarks != null">remarks,</if> <if test="locationCode != null">location_code,</if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="id != null">#{id},</if> <if test="sfcCode != null">#{sfcCode},</if> <if test="paramCode != null">#{paramCode},</if> <if test="paramName != null">#{paramName},</if> <if test="paramValue != null">#{paramValue},</if> <if test="createTime != null">#{createTime},</if> <if test="remarks != null">#{remarks},</if> <if test="locationCode != null">#{locationCode},</if> </trim> </insert> <update id="updateDaTileMatchCollection" parameterType="DaTileMatchCollection"> update da_tile_match_collection <trim prefix="SET" suffixOverrides=","> <if test="sfcCode != null">sfc_code = #{sfcCode},</if> <if test="paramCode != null">param_code = #{paramCode},</if> <if test="paramName != null">param_name = #{paramName},</if> <if test="paramValue != null">param_value = #{paramValue},</if> <if test="createTime != null">create_time = #{createTime},</if> <if test="remarks != null">remarks = #{remarks},</if> <if test="locationCode != null">location_code = #{locationCode},</if> </trim> where id = #{id} </update> <delete id="deleteDaTileMatchCollectionById" parameterType="Long"> delete from da_tile_match_collection where id = #{id} </delete> <delete id="deleteDaTileMatchCollectionByIds" parameterType="String"> delete from da_tile_match_collection where id in <foreach item="id" collection="array" open="(" separator="," close=")"> #{id} </foreach> </delete> </mapper> jcdm-ui/src/api/main/da/tileMatchCollection/tileMatchCollection.js
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,44 @@ import request from '@/utils/request' // æ¥è¯¢æ¡ç ééå表 export function listTileMatchCollection(query) { return request({ url: '/da/tileMatchCollection/list', method: 'get', params: query }) } // æ¥è¯¢æ¡ç ééè¯¦ç» export function getTileMatchCollection(id) { return request({ url: '/da/tileMatchCollection/' + id, method: 'get' }) } // æ°å¢æ¡ç éé export function addTileMatchCollection(data) { return request({ url: '/da/tileMatchCollection', method: 'post', data: data }) } // ä¿®æ¹æ¡ç éé export function updateTileMatchCollection(data) { return request({ url: '/da/tileMatchCollection', method: 'put', data: data }) } // å é¤æ¡ç éé export function delTileMatchCollection(id) { return request({ url: '/da/tileMatchCollection/' + id, method: 'delete' }) } jcdm-ui/src/views/main/da/tileMatchCollection/index.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,338 @@ <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="sfcCode"> <el-input v-model="queryParams.sfcCode" placeholder="请è¾å ¥åå¨æºå·" clearable @keyup.enter.native="handleQuery" /> </el-form-item> <el-form-item label="é¶ä»¶ç¼å·" prop="paramCode"> <el-input v-model="queryParams.paramCode" placeholder="请è¾å ¥é¶ä»¶ç¼å·" clearable @keyup.enter.native="handleQuery" /> </el-form-item> <el-form-item label="é¶ä»¶å称" prop="paramName"> <el-input v-model="queryParams.paramName" placeholder="请è¾å ¥é¶ä»¶å称" clearable @keyup.enter.native="handleQuery" /> </el-form-item> <el-form-item label="å¤æ³¨" prop="remarks"> <el-input v-model="queryParams.remarks" placeholder="请è¾å ¥å¤æ³¨" clearable @keyup.enter.native="handleQuery" /> </el-form-item> <el-form-item label="å·¥åºç¼å·" prop="locationCode"> <el-input v-model="queryParams.locationCode" 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:tileMatchCollection: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:tileMatchCollection: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:tileMatchCollection: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:tileMatchCollection:export']" >导åº</el-button> </el-col> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> </el-row> <el-table border v-loading="loading" :data="tileMatchCollectionList" @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="sfcCode"> <!-- <template slot-scope="scope">--> <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.sfcCode"/>--> <!-- </template>--> </el-table-column> <el-table-column label="é¶ä»¶ç¼å·" align="center" prop="paramCode"> <!-- <template slot-scope="scope">--> <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.paramCode"/>--> <!-- </template>--> </el-table-column> <el-table-column label="é¶ä»¶å称" align="center" prop="paramName"> <!-- <template slot-scope="scope">--> <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.paramName"/>--> <!-- </template>--> </el-table-column> <el-table-column label="å¤æ³¨" align="center" prop="remarks"> <!-- <template slot-scope="scope">--> <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.remarks"/>--> <!-- </template>--> </el-table-column> <el-table-column label="å·¥åºç¼å·" align="center" prop="locationCode"> <!-- <template slot-scope="scope">--> <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.locationCode"/>--> <!-- </template>--> </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:tileMatchCollection:edit']" >ä¿®æ¹</el-button> <el-button size="mini" type="danger" plain style="width: 72px" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['da:tileMatchCollection: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="sfcCode"> <el-input v-model="form.sfcCode" placeholder="请è¾å ¥åå¨æºå·" /> </el-form-item> <el-form-item label="é¶ä»¶ç¼å·" prop="paramCode"> <el-input v-model="form.paramCode" placeholder="请è¾å ¥é¶ä»¶ç¼å·" /> </el-form-item> <el-form-item label="é¶ä»¶å称" prop="paramName"> <el-input v-model="form.paramName" placeholder="请è¾å ¥é¶ä»¶å称" /> </el-form-item> <el-form-item label="å¤æ³¨" prop="remarks"> <el-input v-model="form.remarks" placeholder="请è¾å ¥å¤æ³¨" /> </el-form-item> <el-form-item label="å·¥åºç¼å·" prop="locationCode"> <el-input v-model="form.locationCode" 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 { listTileMatchCollection, getTileMatchCollection, delTileMatchCollection, addTileMatchCollection, updateTileMatchCollection } from "@/api/main/da/tileMatchCollection/tileMatchCollection"; export default { name: "TileMatchCollection", data() { return { // é®ç½©å± loading: true, titleName: "", // éä¸æ°ç» ids: [], // éå个ç¦ç¨ single: true, // éå¤ä¸ªç¦ç¨ multiple: true, // æ¾ç¤ºæç´¢æ¡ä»¶ showSearch: true, // æ»æ¡æ° total: 0, // æ¡ç ééè¡¨æ ¼æ°æ® tileMatchCollectionList: [], // å¼¹åºå±æ é¢ title: "", // æ¯å¦æ¾ç¤ºå¼¹åºå± open: false, // æ¥è¯¢åæ° queryParams: { pageNum: 1, pageSize: 10, sfcCode: null, paramCode: null, paramName: null, remarks: null, locationCode: null }, // 表ååæ° form: {}, // 表åæ ¡éª rules: { id: [ { required: true, message: "idä¸è½ä¸ºç©º", trigger: "blur" } ], } }; }, created() { this.getList(); }, methods: { /** æ¥è¯¢æ¡ç ééå表 */ getList() { this.loading = true; listTileMatchCollection(this.queryParams).then(response => { this.tileMatchCollectionList = response.rows; this.total = response.total; this.loading = false; }); }, // åæ¶æé® cancel() { this.open = false; this.reset(); }, // 表åéç½® reset() { this.form = { id: null, sfcCode: null, paramCode: null, paramName: null, createTime: null, remarks: null, locationCode: 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 getTileMatchCollection(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) { updateTileMatchCollection(this.form).then(response => { this.$modal.msgSuccess("ä¿®æ¹æå"); this.open = false; this.getList(); }); } else { addTileMatchCollection(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 delTileMatchCollection(ids); }).then(() => { this.getList(); this.$modal.msgSuccess("å é¤æå"); }).catch(() => {}); }, /** 导åºæé®æä½ */ handleExport() { this.download('da/tileMatchCollection/export', { ...this.queryParams }, `tileMatchCollection_${new Date().getTime()}.xlsx`) } } }; </script>