瀏覽代碼

市燃气 思凯 四个接口

wangzhe 2 年之前
父節點
當前提交
57c8a6e2ba

+ 20 - 0
test-api/src/main/java/com/sooka/base/util/Generator.java

@@ -0,0 +1,20 @@
+package com.sooka.base.util;
+
+public class Generator {
+    public static void main(String[] args) {
+        String str = "userName, userPhone, userAddr, balance, userCode";
+
+        String[] arr = str.split(", ");
+        for (int i = 0; i < arr.length; i++) {
+            System.out.print("#{" + arr[i] + (i == arr.length-1?"}\n" : "}, "));
+        }
+        for (int i = 0; i < arr.length; i++) {
+            System.out.println("<if test=\"" + arr[i] + " != null and " + arr[i] + " != ''\">");
+            System.out.println("\t" + arr[i] + " = #{" + arr[i] + "},");
+            System.out.println("</if>");
+        }
+        for (int i = 0; i < arr.length; i++) {
+            System.out.println("bean.set" + arr[i].substring(0, 1).toUpperCase() + arr[i].substring(1, arr[i].length()) + "(Data.getString(\"" + arr[i] + "\"));");
+        }
+    }
+}

+ 6 - 1
test-api/src/main/java/com/sooka/model/bo/Guiji_gas10_SC_user_infor_Bean.java

@@ -10,6 +10,11 @@ public class Guiji_gas10_SC_user_infor_Bean extends BaseBean_Guiji {
 
     String str;
 
-//    String param;//GUID
+    String userName;//姓名
+    String userPhone;//电话
+    String userAddr;//地址
+    String balance;//账号余额
+    String userCode;//编号
 
+//    userName, userPhone, userAddr, balance, userCode
 }

+ 7 - 1
test-api/src/main/java/com/sooka/model/bo/Guiji_gas11_SC_gas_meter_infor_Bean.java

@@ -10,6 +10,12 @@ public class Guiji_gas11_SC_gas_meter_infor_Bean extends BaseBean_Guiji {
 
     String str;
 
-//    String param;//GUID
+    String trademark;//品牌
+    String productType;//型号
+    String obsolescence;//报废年限
+    String baseRead;//表底数
+    String barcode;//表具条码号
+    String userCode;//用户编号
 
+//    trademark, productType, obsolescence, baseRead, barcode, userCode
 }

+ 5 - 1
test-api/src/main/java/com/sooka/model/bo/Guiji_gas12_SC_gas_purchase_infor_Bean.java

@@ -10,6 +10,10 @@ public class Guiji_gas12_SC_gas_purchase_infor_Bean extends BaseBean_Guiji {
 
     String str;
 
-//    String param;//GUID
+    String tradeTime;//购气时间
+    String tradeAmount;//购气量
+    String tradeMoney;//购气金额
+    String userCode;//用户编号
 
+//    tradeTime, tradeAmount, tradeMoney, userCode
 }

+ 6 - 1
test-api/src/main/java/com/sooka/model/bo/Guiji_gas13_SC_meter_reading_infor_Bean.java

@@ -10,6 +10,11 @@ public class Guiji_gas13_SC_meter_reading_infor_Bean extends BaseBean_Guiji {
 
     String str;
 
-//    String param;//GUID
+    String readNow;//本期表底数
+    String readLast;//上期表底数
+    String useAmount;//使用量
+    String useMoney;//使用金额
+    String barCode;//表具条码号
 
+//    readNow, readLast, useAmount, useMoney, barCode
 }

+ 20 - 0
test-api/src/main/java/com/sooka/service/impl/Guiji_Gas_ServiceImpl.java

@@ -438,6 +438,11 @@ public class Guiji_Gas_ServiceImpl extends BaseService implements Guiji_Gas_Serv
             JSONObject Data = bean.getData();
             bean.setStr(str);
             bean.setId(Data.getString("id"));
+            bean.setUserName(Data.getString("userName"));
+            bean.setUserPhone(Data.getString("userPhone"));
+            bean.setUserAddr(Data.getString("userAddr"));
+            bean.setBalance(Data.getString("balance"));
+            bean.setUserCode(Data.getString("userCode"));
             if (bean.getCd_operation().equals("I")) {
                 guiji_gas_mapper.add_guiji_gas_SC_user_infor(bean);
                 guiji_gas_mapper2.add_guiji_gas_SC_user_infor(bean);
@@ -477,6 +482,12 @@ public class Guiji_Gas_ServiceImpl extends BaseService implements Guiji_Gas_Serv
             JSONObject Data = bean.getData();
             bean.setStr(str);
             bean.setId(Data.getString("id"));
+            bean.setTrademark(Data.getString("trademark"));
+            bean.setProductType(Data.getString("productType"));
+            bean.setObsolescence(Data.getString("obsolescence"));
+            bean.setBaseRead(Data.getString("baseRead"));
+            bean.setBarcode(Data.getString("barcode"));
+            bean.setUserCode(Data.getString("userCode"));
             if (bean.getCd_operation().equals("I")) {
                 guiji_gas_mapper.add_guiji_gas_SC_gas_meter_infor(bean);
                 guiji_gas_mapper2.add_guiji_gas_SC_gas_meter_infor(bean);
@@ -516,6 +527,10 @@ public class Guiji_Gas_ServiceImpl extends BaseService implements Guiji_Gas_Serv
             JSONObject Data = bean.getData();
             bean.setStr(str);
             bean.setId(Data.getString("id"));
+            bean.setTradeTime(Data.getString("tradeTime"));
+            bean.setTradeAmount(Data.getString("tradeAmount"));
+            bean.setTradeMoney(Data.getString("tradeMoney"));
+            bean.setUserCode(Data.getString("userCode"));
             if (bean.getCd_operation().equals("I")) {
                 guiji_gas_mapper.add_guiji_gas_SC_gas_purchase_infor(bean);
                 guiji_gas_mapper2.add_guiji_gas_SC_gas_purchase_infor(bean);
@@ -555,6 +570,11 @@ public class Guiji_Gas_ServiceImpl extends BaseService implements Guiji_Gas_Serv
             JSONObject Data = bean.getData();
             bean.setStr(str);
             bean.setId(Data.getString("id"));
+            bean.setReadNow(Data.getString("readNow"));
+            bean.setReadLast(Data.getString("readLast"));
+            bean.setUseAmount(Data.getString("useAmount"));
+            bean.setUseMoney(Data.getString("useMoney"));
+            bean.setBarCode(Data.getString("barCode"));
             if (bean.getCd_operation().equals("I")) {
                 guiji_gas_mapper.add_guiji_gas_SC_meter_reading_infor(bean);
                 guiji_gas_mapper2.add_guiji_gas_SC_meter_reading_infor(bean);

+ 55 - 73
test-api/src/main/resources/mapper/Guiji_Gas_Mapper.xml

@@ -390,35 +390,32 @@
 
     <!--思凯收费系统-->
     <insert id="add_guiji_gas_SC_user_infor" parameterType="com.sooka.model.bo.Guiji_gas10_SC_user_infor_Bean">
-        insert into t_guiji_medicine_plant (
+        insert into t_guiji_gas_sc_user_infor (
         <include refid="global_name"></include>
-        plantName, plantAddress, plantHectare, produceTons, produceValue, plantYear)
+        #{userName}, #{userPhone}, #{userAddr}, #{balance}, #{userCode})
         values (
         <include refid="global_value"></include>
         #{plantName}, #{plantAddress}, #{plantHectare}, #{produceTons}, #{produceValue}, #{plantYear})
     </insert>
 
     <update id="update_guiji_gas_SC_user_infor" parameterType="com.sooka.model.bo.Guiji_gas10_SC_user_infor_Bean">
-        update t_guiji_medicine_plant
+        update t_guiji_gas_sc_user_infor
         <trim prefix="SET" suffixOverrides=",">
             <include refid="update_sql"></include>
-            <if test="plantName != null and plantName != ''">
-                plantName = #{plantName},
+            <if test="userName != null and userName != ''">
+                userName = #{userName},
             </if>
-            <if test="plantAddress != null and plantAddress != ''">
-                plantAddress = #{plantAddress},
+            <if test="userPhone != null and userPhone != ''">
+                userPhone = #{userPhone},
             </if>
-            <if test="plantHectare != null and plantHectare != ''">
-                plantHectare = #{plantHectare},
+            <if test="userAddr != null and userAddr != ''">
+                userAddr = #{userAddr},
             </if>
-            <if test="produceTons != null and produceTons != ''">
-                produceTons = #{produceTons},
+            <if test="balance != null and balance != ''">
+                balance = #{balance},
             </if>
-            <if test="produceValue != null and produceValue != ''">
-                produceValue = #{produceValue},
-            </if>
-            <if test="plantYear != null and plantYear != ''">
-                plantYear = #{plantYear},
+            <if test="userCode != null and userCode != ''">
+                userCode = #{userCode},
             </if>
         </trim>
         where id = #{id}
@@ -426,38 +423,35 @@
 
 
     <insert id="add_guiji_gas_SC_gas_meter_infor" parameterType="com.sooka.model.bo.Guiji_gas11_SC_gas_meter_infor_Bean">
-        insert into t_guiji_medicine_platform (
+        insert into t_guiji_gas_sc_gas_meter_infor (
         <include refid="global_name"></include>
-        platformName, constructingUnit, constructingDate, platformAddress, platformAddressExt, platformLevel, platformType)
+        trademark, productType, obsolescence, baseRead, barcode, userCode)
         values (
         <include refid="global_value"></include>
-        #{platformName}, #{constructingUnit}, #{constructingDate}, #{platformAddress}, #{platformAddressExt}, #{platformLevel}, #{platformType})
+        #{trademark}, #{productType}, #{obsolescence}, #{baseRead}, #{barcode}, #{userCode})
     </insert>
 
     <update id="update_guiji_gas_SC_gas_meter_infor" parameterType="com.sooka.model.bo.Guiji_gas11_SC_gas_meter_infor_Bean">
-        update t_guiji_medicine_platform
+        update t_guiji_gas_sc_gas_meter_infor
         <trim prefix="SET" suffixOverrides=",">
             <include refid="update_sql"></include>
-            <if test="platformName != null and platformName != ''">
-                platformName = #{platformName},
+            <if test="trademark != null and trademark != ''">
+                trademark = #{trademark},
             </if>
-            <if test="constructingUnit != null and constructingUnit != ''">
-                constructingUnit = #{constructingUnit},
+            <if test="productType != null and productType != ''">
+                productType = #{productType},
             </if>
-            <if test="constructingDate != null and constructingDate != ''">
-                constructingDate = #{constructingDate},
-            </if>
-            <if test="platformAddress != null and platformAddress != ''">
-                platformAddress = #{platformAddress},
+            <if test="obsolescence != null and obsolescence != ''">
+                obsolescence = #{obsolescence},
             </if>
-            <if test="platformAddressExt != null and platformAddressExt != ''">
-                platformAddressExt = #{platformAddressExt},
+            <if test="baseRead != null and baseRead != ''">
+                baseRead = #{baseRead},
             </if>
-            <if test="platformLevel != null and platformLevel != ''">
-                platformLevel = #{platformLevel},
+            <if test="barcode != null and barcode != ''">
+                barcode = #{barcode},
             </if>
-            <if test="platformType != null and platformType != ''">
-                platformType = #{platformType},
+            <if test="userCode != null and userCode != ''">
+                userCode = #{userCode},
             </if>
         </trim>
         where id = #{id}
@@ -465,38 +459,29 @@
 
 
     <insert id="add_guiji_gas_SC_gas_purchase_infor" parameterType="com.sooka.model.bo.Guiji_gas12_SC_gas_purchase_infor_Bean">
-        insert into t_guiji_medicine_project (
+        insert into t_guiji_gas_sc_gas_purchase_infor (
         <include refid="global_name"></include>
-        projectName, projectOrgName, projectAddress, projectStatus, projectTotalInvestment, projectStart, projectEnd)
+        tradeTime, tradeAmount, tradeMoney, userCode)
         values (
         <include refid="global_value"></include>
-        #{projectName}, #{projectOrgName}, #{projectAddress}, #{projectStatus}, #{projectTotalInvestment}, #{projectStart}, #{projectEnd})
+        #{tradeTime}, #{tradeAmount}, #{tradeMoney}, #{userCode})
     </insert>
 
     <update id="update_guiji_gas_SC_gas_purchase_infor" parameterType="com.sooka.model.bo.Guiji_gas12_SC_gas_purchase_infor_Bean">
-        update t_guiji_medicine_project
+        update t_guiji_gas_sc_gas_purchase_infor
         <trim prefix="SET" suffixOverrides=",">
             <include refid="update_sql"></include>
-            <if test="projectName != null and projectName != ''">
-                projectName = #{projectName},
-            </if>
-            <if test="projectOrgName != null and projectOrgName != ''">
-                projectOrgName = #{projectOrgName},
-            </if>
-            <if test="projectAddress != null and projectAddress != ''">
-                projectAddress = #{projectAddress},
+            <if test="tradeTime != null and tradeTime != ''">
+                tradeTime = #{tradeTime},
             </if>
-            <if test="projectStatus != null and projectStatus != ''">
-                projectStatus = #{projectStatus},
+            <if test="tradeAmount != null and tradeAmount != ''">
+                tradeAmount = #{tradeAmount},
             </if>
-            <if test="projectTotalInvestment != null and projectTotalInvestment != ''">
-                projectTotalInvestment = #{projectTotalInvestment},
+            <if test="tradeMoney != null and tradeMoney != ''">
+                tradeMoney = #{tradeMoney},
             </if>
-            <if test="projectStart != null and projectStart != ''">
-                projectStart = #{projectStart},
-            </if>
-            <if test="projectEnd != null and projectEnd != ''">
-                projectEnd = #{projectEnd},
+            <if test="userCode != null and userCode != ''">
+                userCode = #{userCode},
             </if>
         </trim>
         where id = #{id}
@@ -504,35 +489,32 @@
 
 
     <insert id="add_guiji_gas_SC_meter_reading_infor" parameterType="com.sooka.model.bo.Guiji_gas13_SC_meter_reading_infor_Bean">
-        insert into t_guiji_medicine_industry (
+        insert into t_guiji_gas_sc_meter_reading_infor (
         <include refid="global_name"></include>
-        year, month, economyType, number, yearOnYear, cityProportion)
+        readNow, readLast, useAmount, useMoney, barCode)
         values (
         <include refid="global_value"></include>
-        #{year}, #{month}, #{economyType}, #{number}, #{yearOnYear}, #{cityProportion})
+        #{readNow}, #{readLast}, #{useAmount}, #{useMoney}, #{barCode})
     </insert>
 
     <update id="update_guiji_gas_SC_meter_reading_infor" parameterType="com.sooka.model.bo.Guiji_gas13_SC_meter_reading_infor_Bean">
-        update t_guiji_medicine_industry
+        update t_guiji_gas_sc_meter_reading_infor
         <trim prefix="SET" suffixOverrides=",">
             <include refid="update_sql"></include>
-            <if test="year != null and year != ''">
-                year = #{year},
-            </if>
-            <if test="month != null and month != ''">
-                month = #{month},
+            <if test="readNow != null and readNow != ''">
+                readNow = #{readNow},
             </if>
-            <if test="economyType != null and economyType != ''">
-                economyType = #{economyType},
+            <if test="readLast != null and readLast != ''">
+                readLast = #{readLast},
             </if>
-            <if test="number != null and number != ''">
-                number = #{number},
+            <if test="useAmount != null and useAmount != ''">
+                useAmount = #{useAmount},
             </if>
-            <if test="yearOnYear != null and yearOnYear != ''">
-                yearOnYear = #{yearOnYear},
+            <if test="useMoney != null and useMoney != ''">
+                useMoney = #{useMoney},
             </if>
-            <if test="cityProportion != null and cityProportion != ''">
-                cityProportion = #{cityProportion},
+            <if test="barCode != null and barCode != ''">
+                barCode = #{barCode},
             </if>
         </trim>
         where id = #{id}