From 2fec1051da5d9f3e5dbef812aa06b5db76792151 Mon Sep 17 00:00:00 2001
From: zhubaomin <zhubaomin>
Date: 星期五, 23 八月 2024 17:15:01 +0800
Subject: [PATCH] 2024-08-23 朱宝民 常用用水时长及用水量自动配置、获取接口
---
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmIrrigateProfile.java | 69 +++++++++
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoIrrigaterProfile.java | 35 +++++
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/CommandSv.java | 17 ++
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmIrrigateProfileMapper.java | 37 +++++
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/PipIrrBaseApplication.java | 2
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/util/InitListener.java | 52 ++++++
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/ValveCtrl.java | 16 ++
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmIrrigateProfileMapper.xml | 143 ++++++++++++++++++++
pipIrr-platform/pipIrr-global/src/main/resources/init-config.xml | 20 ++
9 files changed, 384 insertions(+), 7 deletions(-)
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmIrrigateProfileMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmIrrigateProfileMapper.java
new file mode 100644
index 0000000..e1d417a
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmIrrigateProfileMapper.java
@@ -0,0 +1,37 @@
+package com.dy.pipIrrGlobal.daoRm;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.dy.pipIrrGlobal.pojoRm.RmIrrigateProfile;
+import com.dy.pipIrrGlobal.voRm.VoIrrigaterProfile;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-08-23 15:17
+ * @LastEditTime 2024-08-23 15:17
+ * @Description
+ */
+
+@Mapper
+public interface RmIrrigateProfileMapper extends BaseMapper<RmIrrigateProfile> {
+ int deleteByPrimaryKey(Long id);
+
+ int insert(RmIrrigateProfile record);
+
+ int insertSelective(RmIrrigateProfile record);
+
+ RmIrrigateProfile selectByPrimaryKey(Long id);
+
+ int updateByPrimaryKeySelective(RmIrrigateProfile record);
+
+ int updateByPrimaryKey(RmIrrigateProfile record);
+
+ /**
+ * 鏍规嵁閰嶇疆绫诲瀷鑾峰彇閰嶇疆鍊�
+ * @param type
+ * @return
+ */
+ List<VoIrrigaterProfile> getIrrPro(Integer type);
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmIrrigateProfile.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmIrrigateProfile.java
new file mode 100644
index 0000000..6630729
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmIrrigateProfile.java
@@ -0,0 +1,69 @@
+package com.dy.pipIrrGlobal.pojoRm;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-08-23 15:17
+ * @LastEditTime 2024-08-23 15:17
+ * @Description
+ */
+
+import com.alibaba.fastjson2.annotation.JSONField;
+import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.dy.common.po.BaseEntity;
+import jakarta.validation.constraints.NotNull;
+import lombok.*;
+
+/**
+ * 鐏屾簤閰嶇疆琛�
+ */
+@TableName(value = "rm_irrigate_profile", autoResultMap = true)
+@Data
+@Builder
+@ToString
+@NoArgsConstructor
+@AllArgsConstructor
+public class RmIrrigateProfile implements BaseEntity {
+ public static final long serialVersionUID = 202408230823001L;
+
+ /**
+ * 涓婚敭
+ */
+ @JSONField(serializeUsing = ObjectWriterImplToString.class)
+ @TableId(type = IdType.INPUT)
+ private Long id;
+
+ /**
+ * 榛樿鍊�
+ */
+ @NotNull(message = "閰嶇疆榛樿鍊间笉鑳戒负绌�")
+ private Integer defaultValue;
+
+ /**
+ * 璁¢噺鍗曚綅;1-鏃讹紙h锛夛紝2-鍒嗭紙min锛夛紝3-绔嬫柟绫筹紙cbm锛�
+ */
+ private Byte unit;
+
+ /**
+ * 鎺掑簭
+ */
+ private Integer sort;
+
+ /**
+ * 绫诲瀷;1-鐢ㄦ椂锛�2-鐢ㄦ按閲�
+ */
+ private Byte type;
+
+ /**
+ * 澶囨敞淇℃伅
+ */
+ private String remarks;
+
+ /**
+ * 鏄惁鍒犻櫎鏍囪瘑
+ */
+ private Long deleted;
+
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoIrrigaterProfile.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoIrrigaterProfile.java
new file mode 100644
index 0000000..5ff2740
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoIrrigaterProfile.java
@@ -0,0 +1,35 @@
+package com.dy.pipIrrGlobal.voRm;
+
+import com.alibaba.fastjson2.annotation.JSONField;
+import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import lombok.Data;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-08-23 8:43
+ * @LastEditTime 2024-08-23 8:43
+ * @Description 鐏屾簤閰嶇疆瑙嗗浘瀵硅薄
+ */
+
+@Data
+@JsonPropertyOrder({ "irrProId", "defaultValue", "unit"})
+public class VoIrrigaterProfile {
+ private static final long serialVersionUID = 202408230844001L;
+
+ /**
+ * 鐏屾簤閰嶇疆ID
+ */
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ private Long irrProId;
+
+ /**
+ * 閰嶇疆榛樿鍊�
+ */
+ private Integer defaultValue;
+
+ /**
+ * 璁¢噺鍗曚綅
+ */
+ private String unit;
+}
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/init-config.xml b/pipIrr-platform/pipIrr-global/src/main/resources/init-config.xml
index 5b007fd..427a63b 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/init-config.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/init-config.xml
@@ -28,6 +28,16 @@
<item4 typeName="鍏绘畺鐢ㄦ按"/>
<item5 typeName="缁垮寲鐢ㄦ按"/>
</waterTypes>
+ <irrigateProfile>
+ <item1 default_value = "10" unit = "2" sort = "1" type = "1"/>
+ <item2 default_value = "20" unit = "2" sort = "2" type = "1" />
+ <item3 default_value = "1" unit = "1" sort = "3" type = "1"/>
+ <item4 default_value = "2" unit = "1" sort = "4" type = "1"/>
+ <item5 default_value = "20" unit = "3" sort = "1" type = "2"/>
+ <item6 default_value = "30" unit = "3" sort = "2" type = "2"/>
+ <item7 default_value = "50" unit = "3" sort = "3" type = "2"/>
+ <item8 default_value = "80" unit = "3" sort = "4" type = "2"/>
+ </irrigateProfile>
</org1>
<org2 tag="pj" name="鐗囪" enable="false">
<districts>
@@ -55,6 +65,16 @@
<item4 typeName="鍏绘畺鐢ㄦ按"/>
<item5 typeName="缁垮寲鐢ㄦ按"/>
</waterTypes>
+ <irrigateProfile>
+ <item1 default_value = "10" unit = "2" sort = "1" type = "1"/>
+ <item2 default_value = "20" unit = "2" sort = "2" type = "1" />
+ <item3 default_value = "1" unit = "1" sort = "3" type = "1"/>
+ <item4 default_value = "2" unit = "1" sort = "4" type = "1"/>
+ <item5 default_value = "20" unit = "3" sort = "1" type = "2"/>
+ <item6 default_value = "30" unit = "3" sort = "2" type = "2"/>
+ <item7 default_value = "50" unit = "3" sort = "3" type = "2"/>
+ <item8 default_value = "80" unit = "3" sort = "4" type = "2"/>
+ </irrigateProfile>
</org2>
</orgs>
</config>
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmIrrigateProfileMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmIrrigateProfileMapper.xml
new file mode 100644
index 0000000..813c6da
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmIrrigateProfileMapper.xml
@@ -0,0 +1,143 @@
+<?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.dy.pipIrrGlobal.daoRm.RmIrrigateProfileMapper">
+ <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoRm.RmIrrigateProfile">
+ <!--@mbg.generated-->
+ <!--@Table rm_irrigate_profile-->
+ <id column="id" jdbcType="BIGINT" property="id"/>
+ <result column="default_value" jdbcType="INTEGER" property="defaultValue"/>
+ <result column="unit" jdbcType="TINYINT" property="unit"/>
+ <result column="sort" jdbcType="INTEGER" property="sort"/>
+ <result column="type" jdbcType="TINYINT" property="type"/>
+ <result column="remarks" jdbcType="VARCHAR" property="remarks"/>
+ <result column="deleted" jdbcType="BIGINT" property="deleted"/>
+ </resultMap>
+ <sql id="Base_Column_List">
+ <!--@mbg.generated-->
+ id,
+ default_value,
+ unit,
+ sort,
+ `type`,
+ remarks,
+ deleted
+ </sql>
+ <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+ <!--@mbg.generated-->
+ select
+ <include refid="Base_Column_List"/>
+ from rm_irrigate_profile
+ where id = #{id,jdbcType=BIGINT}
+ </select>
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+ <!--@mbg.generated-->
+ delete
+ from rm_irrigate_profile
+ where id = #{id,jdbcType=BIGINT}
+ </delete>
+ <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoRm.RmIrrigateProfile">
+ <!--@mbg.generated-->
+ insert into rm_irrigate_profile (id, default_value, unit,
+ sort, `type`, remarks,
+ deleted)
+ values (#{id,jdbcType=BIGINT}, #{defaultValue,jdbcType=INTEGER}, #{unit,jdbcType=TINYINT},
+ #{sort,jdbcType=INTEGER}, #{type,jdbcType=TINYINT}, #{remarks,jdbcType=VARCHAR},
+ #{deleted,jdbcType=BIGINT})
+ </insert>
+ <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmIrrigateProfile">
+ <!--@mbg.generated-->
+ insert into rm_irrigate_profile
+ <trim prefix="(" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ id,
+ </if>
+ <if test="defaultValue != null">
+ default_value,
+ </if>
+ <if test="unit != null">
+ unit,
+ </if>
+ <if test="sort != null">
+ sort,
+ </if>
+ <if test="type != null">
+ `type`,
+ </if>
+ <if test="remarks != null">
+ remarks,
+ </if>
+ <if test="deleted != null">
+ deleted,
+ </if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ #{id,jdbcType=BIGINT},
+ </if>
+ <if test="defaultValue != null">
+ #{defaultValue,jdbcType=INTEGER},
+ </if>
+ <if test="unit != null">
+ #{unit,jdbcType=TINYINT},
+ </if>
+ <if test="sort != null">
+ #{sort,jdbcType=INTEGER},
+ </if>
+ <if test="type != null">
+ #{type,jdbcType=TINYINT},
+ </if>
+ <if test="remarks != null">
+ #{remarks,jdbcType=VARCHAR},
+ </if>
+ <if test="deleted != null">
+ #{deleted,jdbcType=BIGINT},
+ </if>
+ </trim>
+ </insert>
+ <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmIrrigateProfile">
+ <!--@mbg.generated-->
+ update rm_irrigate_profile
+ <set>
+ <if test="defaultValue != null">
+ default_value = #{defaultValue,jdbcType=INTEGER},
+ </if>
+ <if test="unit != null">
+ unit = #{unit,jdbcType=TINYINT},
+ </if>
+ <if test="sort != null">
+ sort = #{sort,jdbcType=INTEGER},
+ </if>
+ <if test="type != null">
+ `type` = #{type,jdbcType=TINYINT},
+ </if>
+ <if test="remarks != null">
+ remarks = #{remarks,jdbcType=VARCHAR},
+ </if>
+ <if test="deleted != null">
+ deleted = #{deleted,jdbcType=BIGINT},
+ </if>
+ </set>
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+ <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoRm.RmIrrigateProfile">
+ <!--@mbg.generated-->
+ update rm_irrigate_profile
+ set default_value = #{defaultValue,jdbcType=INTEGER},
+ unit = #{unit,jdbcType=TINYINT},
+ sort = #{sort,jdbcType=INTEGER},
+ `type` = #{type,jdbcType=TINYINT},
+ remarks = #{remarks,jdbcType=VARCHAR},
+ deleted = #{deleted,jdbcType=BIGINT}
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+
+ <!--鏍规嵁閰嶇疆绫诲瀷鑾峰彇閰嶇疆鍊�-->
+ <select id="getIrrPro" resultType="com.dy.pipIrrGlobal.voRm.VoIrrigaterProfile">
+ SELECT id AS irrProId,
+ default_value AS defaultValue,
+ unit
+ FROM rm_irrigate_profile
+ WHERE type = #{type}
+ ORDER BY sort
+ </select>
+</mapper>
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/PipIrrBaseApplication.java b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/PipIrrBaseApplication.java
index 32edd0d..777bc6c 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/PipIrrBaseApplication.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/PipIrrBaseApplication.java
@@ -18,7 +18,7 @@
})
}
)
-@MapperScan(basePackages={"com.dy.pipIrrGlobal.daoBa","com.dy.pipIrrGlobal.daoSe"})
+@MapperScan(basePackages={"com.dy.pipIrrGlobal.daoBa","com.dy.pipIrrGlobal.daoSe","com.dy.pipIrrGlobal.daoRm"})
public class PipIrrBaseApplication {
public static void main(String[] args) {
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/util/InitListener.java b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/util/InitListener.java
index 11c4f8a..08dd62f 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/util/InitListener.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/util/InitListener.java
@@ -8,11 +8,13 @@
import com.dy.pipIrrGlobal.daoBa.BaDistrictMapper;
import com.dy.pipIrrGlobal.daoBa.BaSettingsMapper;
import com.dy.pipIrrGlobal.daoBa.BaUserMapper;
+import com.dy.pipIrrGlobal.daoRm.RmIrrigateProfileMapper;
import com.dy.pipIrrGlobal.daoSe.SePaymentMethodMapper;
import com.dy.pipIrrGlobal.daoSe.SeWaterTypeMapper;
import com.dy.pipIrrGlobal.pojoBa.BaDistrict;
import com.dy.pipIrrGlobal.pojoBa.BaSettings;
import com.dy.pipIrrGlobal.pojoBa.BaUser;
+import com.dy.pipIrrGlobal.pojoRm.RmIrrigateProfile;
import com.dy.pipIrrGlobal.pojoSe.SePaymentMethod;
import com.dy.pipIrrGlobal.pojoSe.SeWaterType;
import com.dy.pipIrrGlobal.util.DistrictLevel;
@@ -40,6 +42,7 @@
private SePaymentMethodMapper paymentMethodDao ;
private BaSettingsMapper settingsDao ;
private SeWaterTypeMapper waterTypeDao ;
+ private RmIrrigateProfileMapper rmIrrigateProfileDao;
@Autowired
public void setResourceLoader(ResourceLoader resourceLoader){
@@ -71,6 +74,10 @@
this.waterTypeDao = waterTypeDao ;
}
+ @Autowired
+ public void setRmIrrigateProfileDao(RmIrrigateProfileMapper rmIrrigateProfileDao) {
+ this.rmIrrigateProfileDao = rmIrrigateProfileDao;
+ }
/**
* SpringBoot瀹瑰櫒宸茬粡鍑嗗濂戒簡
@@ -167,12 +174,15 @@
}
}
}
- if(!this.existWaterTypes()){
- if(configXml.existElement(doc, "config.orgs.org" + num + ".waterTypes")){
+ if(!this.existIrrigateProfile()){
+ if(configXml.existElement(doc, "config.orgs.org" + num + ".irrigateProfile")){
for(int i = 1 ; i < 10000; i++){
- if(configXml.existElement(doc, "config.orgs.org" + num + ".waterTypes.item" + i)){
- String typeName = configXml.getSetAttrTxt(doc, "config.orgs.org" + num + ".waterTypes.item" + i,"typeName", null, false, null) ;
- this.saveWaterType(orgTag, typeName);
+ if(configXml.existElement(doc, "config.orgs.org" + num + ".irrigateProfile.item" + i)){
+ String default_value = configXml.getSetAttrTxt(doc, "config.orgs.org" + num + ".irrigateProfile.item" + i,"default_value", null, false, null) ;
+ String unit = configXml.getSetAttrTxt(doc, "config.orgs.org" + num + ".irrigateProfile.item" + i,"unit", null, false, null) ;
+ String sort = configXml.getSetAttrTxt(doc, "config.orgs.org" + num + ".irrigateProfile.item" + i,"sort", null, false, null) ;
+ String type = configXml.getSetAttrTxt(doc, "config.orgs.org" + num + ".irrigateProfile.item" + i,"type", null, false, null) ;
+ this.saveIrrigateProfile(orgTag, default_value, unit,sort,type);
}else{
break ;
}
@@ -229,6 +239,15 @@
*/
private boolean existWaterTypes(){
Long total = this.waterTypeDao.selectCount(null) ;
+ return (total != null && total > 0) ;
+ }
+
+ /**
+ * 鏁版嵁搴撲腑鏄惁瀛樺湪鐏屾簤閰嶇疆
+ * @return
+ */
+ private boolean existIrrigateProfile(){
+ Long total = this.rmIrrigateProfileDao.selectCount(null) ;
return (total != null && total > 0) ;
}
@@ -328,4 +347,27 @@
}
}
+ /**
+ * 淇濆瓨鐏屾簤閰嶇疆
+ * @param orgTag
+ * @param default_value
+ * @param unit
+ * @param sort
+ * @param type
+ * @throws Exception
+ */
+ private void saveIrrigateProfile(String orgTag, String default_value, String unit, String sort, String type) throws Exception{
+ if((default_value != null && !default_value.trim().equals("")) &&
+ (unit != null && !unit.trim().equals("")) &&
+ (sort != null && !sort.trim().equals("")) &&
+ (type != null && !type.trim().equals(""))){
+ RmIrrigateProfile po = new RmIrrigateProfile();
+ po.setDefaultValue(Integer.parseInt(default_value));
+ po.setUnit(Byte.valueOf(unit));
+ po.setSort(Integer.parseInt(sort));
+ po.setType(Byte.valueOf(type));
+ this.rmIrrigateProfileDao.insert(po);
+ }
+ }
+
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/CommandSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/CommandSv.java
index ae7601e..6703fde 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/CommandSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/CommandSv.java
@@ -11,11 +11,13 @@
import com.dy.pipIrrGlobal.daoPr.PrIntakeVcMapper;
import com.dy.pipIrrGlobal.daoPr.PrWaterPriceMapper;
import com.dy.pipIrrGlobal.daoRm.RmCommandHistoryMapper;
+import com.dy.pipIrrGlobal.daoRm.RmIrrigateProfileMapper;
import com.dy.pipIrrGlobal.daoSe.SeClientCardMapper;
import com.dy.pipIrrGlobal.daoSe.SeVirtualCardMapper;
import com.dy.pipIrrGlobal.pojoRm.RmCommandHistory;
import com.dy.pipIrrGlobal.pojoSe.SeClientCard;
import com.dy.pipIrrGlobal.voPr.VoOnLineIntake;
+import com.dy.pipIrrGlobal.voRm.VoIrrigaterProfile;
import com.dy.pipIrrGlobal.voRm.VoUnclosedValve;
import com.dy.pipIrrGlobal.voSe.VoVirtualCard;
import lombok.RequiredArgsConstructor;
@@ -46,6 +48,7 @@
private final PrWaterPriceMapper prWaterPriceMapper;
private final PrIntakeVcMapper prIntakeVcMapper;
private final SeClientCardMapper seClientCardMapper;
+ private final RmIrrigateProfileMapper rmIrrigateProfileMapper;
/**
* pro_mw锛氬睘鎬�
@@ -56,13 +59,14 @@
private String pro_mw = "mw";
private String key_mw = "comSendUrl";
@Autowired
- public CommandSv(RmCommandHistoryMapper rmCommandHistoryMapper, SeVirtualCardMapper seVirtualCardMapper, PrIntakeMapper prIntakeMapper, PrWaterPriceMapper prWaterPriceMapper, PrIntakeVcMapper prIntakeVcMapper, SeClientCardMapper seClientCardMapper, Environment env) {
+ public CommandSv(RmCommandHistoryMapper rmCommandHistoryMapper, SeVirtualCardMapper seVirtualCardMapper, PrIntakeMapper prIntakeMapper, PrWaterPriceMapper prWaterPriceMapper, PrIntakeVcMapper prIntakeVcMapper, SeClientCardMapper seClientCardMapper, RmIrrigateProfileMapper rmIrrigateProfileMapper, Environment env) {
this.rmCommandHistoryMapper = rmCommandHistoryMapper;
this.seVirtualCardMapper = seVirtualCardMapper;
this.prIntakeMapper = prIntakeMapper;
this.prWaterPriceMapper = prWaterPriceMapper;
this.prIntakeVcMapper = prIntakeVcMapper;
this.seClientCardMapper = seClientCardMapper;
+ this.rmIrrigateProfileMapper = rmIrrigateProfileMapper;
this.env = env;
}
/**
@@ -166,4 +170,15 @@
return prIntakeMapper.getIntakeIdByName(intakeName);
}
+ /**
+ * 鏍规嵁閰嶇疆绫诲瀷鑾峰彇閰嶇疆鍊�
+ * @param type
+ * @return
+ */
+ QueryResultVo<List<VoIrrigaterProfile>> getIrrPro(Integer type) {
+ QueryResultVo<List<VoIrrigaterProfile>> rsVo = new QueryResultVo<>() ;
+ rsVo.obj = rmIrrigateProfileMapper.getIrrPro(type);
+ return rsVo ;
+ }
+
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/ValveCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/ValveCtrl.java
index e534438..64acd6b 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/ValveCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/ValveCtrl.java
@@ -10,10 +10,12 @@
import com.dy.common.util.IDLongGenerator;
import com.dy.common.webUtil.BaseResponse;
import com.dy.common.webUtil.BaseResponseUtils;
+import com.dy.common.webUtil.QueryResultVo;
import com.dy.pipIrrGlobal.command.ComSupport;
import com.dy.pipIrrGlobal.command.dto.Param;
import com.dy.pipIrrGlobal.daoSe.SeVirtualCardMapper;
import com.dy.pipIrrGlobal.pojoSe.SeClientCard;
+import com.dy.pipIrrGlobal.voRm.VoIrrigaterProfile;
import com.dy.pipIrrGlobal.voRm.VoUnclosedValve;
import com.dy.pipIrrGlobal.voSe.VoVirtualCard;
import com.dy.pipIrrWechat.command.dto.AutomaticClose;
@@ -794,4 +796,18 @@
return BaseResponseUtils.buildFail("绯荤粺鏆備笉鏀寔璇ュ崗璁�");
}
}
+
+ /**
+ * 鏍规嵁閰嶇疆绫诲瀷鑾峰彇閰嶇疆鍊�
+ * @param type
+ * @return
+ */
+ @GetMapping(path = "/irrigate_profile")
+ public BaseResponse<QueryResultVo<List<VoIrrigaterProfile>>> getIrrPro(Integer type){
+ try {
+ return BaseResponseUtils.buildSuccess(commandSv.getIrrPro(type));
+ } catch (Exception e) {
+ return BaseResponseUtils.buildException(e.getMessage()) ;
+ }
+ }
}
--
Gitblit v1.8.0