浏览代码

修改打印查询编号

jk-GitHub-coder 4 年之前
父节点
当前提交
66f57bbea1

+ 1 - 1
YijiaRestful/src/main/java/com/platform/yijia/controller/PayController.java

@@ -553,7 +553,7 @@ public class PayController {
                             params.put("stationId", listUp.get(0).getStationId());
                             params.put("oilGunNo", listUp.get(0).getOilGun());
                             Map m = stationOilGunService.getPrinterSnByStationIdAndOilGunNo(params);
-                            if(m.containsKey("") && m.get("printerSn").toString()!= null && m.get("printerSn").toString()!=""){
+                            if(m.containsKey("printerSn") && m.get("printerSn").toString()!= null && m.get("printerSn").toString()!=""){
                                 sn = m.get("printerSn").toString();
                                 FeiEPrinterUtil.printReceipt(sn, content1 + content2);
                             }else {

+ 7 - 7
YijiaRestful/src/main/resources/mapper/StationOilGunMapper.xml

@@ -111,7 +111,7 @@
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
     -->
-    select 
+    select
     <include refid="Base_Column_List" />
     from station_oil_gun
     where oil_gun_id = #{oilGunId,jdbcType=INTEGER}
@@ -139,11 +139,11 @@
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
     -->
-    insert into station_oil_gun (oil_gun_id, oil_gun_no, oil_name, 
-      oil_price, station_id, station_name, 
+    insert into station_oil_gun (oil_gun_id, oil_gun_no, oil_name,
+      oil_price, station_id, station_name,
       date, status)
-    values (#{oilGunId,jdbcType=INTEGER}, #{oilGunNo,jdbcType=VARCHAR}, #{oilName,jdbcType=VARCHAR}, 
-      #{oilPrice,jdbcType=DECIMAL}, #{stationId,jdbcType=INTEGER}, #{stationName,jdbcType=VARCHAR}, 
+    values (#{oilGunId,jdbcType=INTEGER}, #{oilGunNo,jdbcType=VARCHAR}, #{oilName,jdbcType=VARCHAR},
+      #{oilPrice,jdbcType=DECIMAL}, #{stationId,jdbcType=INTEGER}, #{stationName,jdbcType=VARCHAR},
       #{date,jdbcType=TIMESTAMP}, #{status,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.platform.yijia.pojo.StationOilGun">
@@ -324,7 +324,7 @@
         device_no    AS printerSn
     FROM  station_device_manage
     <where>
-        <if test="oilGunNo != null oilGunNo !=''">
+        <if test="oilGunNo != null and oilGunNo !=''">
           gun_no = #{oilGunNo}
         </if>
         <if test="stationId != null and stationId !=''">
@@ -334,4 +334,4 @@
 
   </select>
 
-</mapper>
+</mapper>