远程监控中开关阀记录查询重构,增加了水价信息,调整了显示内容,优化SQL语句,开闭阀类型改为通信协议中的Common*.*.java中的统一匹配。
| | |
| | | * 12:黑名单命令关阀; |
| | | * 13:远程定时关阀; |
| | | * 14:远程定量关阀; |
| | | * 16:管道无水自动关阀;(王江海协议) |
| | | * ) |
| | | * @param type 字节 |
| | | * @return 名称 |
| | |
| | | case 12 -> "黑名单命令关阀"; |
| | | case 13 -> "远程定时关阀"; |
| | | case 14 -> "远程定量关阀"; |
| | | case 16 -> "管道无水自动关阀"; |
| | | default -> "未知"; |
| | | }; |
| | | } |
| | |
| | | public Integer clThisTime; |
| | | |
| | | /** |
| | | * 关阀报中水价 |
| | | */ |
| | | @Schema(description = "关阀报中水价", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double clPrice ;//水价 |
| | | |
| | | /** |
| | | * 关阀报中的开阀时控制器时钟 |
| | | */ |
| | | @Schema(description = "关阀报中的开阀时控制器时钟", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | |
| | | this.clThisAmount = null; |
| | | this.clThisMoney = null; |
| | | this.clThisTime = null; |
| | | this.clPrice = null; |
| | | this.clOpenDt = null; |
| | | this.closeDt = null; |
| | | |
| | |
| | | this.clThisAmount = dataCd83CloseVo.thisAmount; |
| | | this.clThisMoney = dataCd83CloseVo.thisMoney; |
| | | this.clThisTime = dataCd83CloseVo.thisTime; |
| | | this.clPrice = dataCd83CloseVo.price; |
| | | this.clOpenDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dataCd83CloseVo.openDt); |
| | | this.closeDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dataCd83CloseVo.closeDt); |
| | | |
| | |
| | | this.clThisAmount = null; |
| | | this.clThisMoney = null; |
| | | this.clThisTime = null; |
| | | this.clPrice = null; |
| | | this.clOpenDt = null; |
| | | this.closeDt = null; |
| | | |
| | |
| | | this.clThisAmount = cdData.thisWater; |
| | | this.clThisMoney = cdData.thisMoney; |
| | | this.clThisTime = cdData.thisDuration; |
| | | this.clPrice = null; |
| | | this.clOrderNo = cdData.orderNo; |
| | | this.clEleTotalAmount = cdData.eleTotalAmount; |
| | | this.clWaterRemainUser = cdData.waterRemain; |
| | |
| | | this.clThisAmount = null; |
| | | this.clThisMoney = null; |
| | | this.clThisTime = null; |
| | | this.clPrice = null; |
| | | this.clOpenDt = null; |
| | | this.closeDt = null; |
| | | |
| | |
| | | this.clThisAmount = dataCd83CloseVo.thisAmount; |
| | | this.clThisMoney = dataCd83CloseVo.thisMoney; |
| | | this.clThisTime = dataCd83CloseVo.thisTime; |
| | | this.clPrice = dataCd83CloseVo.price; |
| | | this.clOpenDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dataCd83CloseVo.openDt); |
| | | this.closeDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dataCd83CloseVo.closeDt) ; |
| | | |
| | |
| | | public Integer clThisTime; |
| | | |
| | | /** |
| | | * 关阀报中水价 |
| | | */ |
| | | @Schema(description = "关阀报中水价", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double clPrice ;//水价 |
| | | /** |
| | | * 关阀报中的开阀时控制器时钟 |
| | | */ |
| | | @Schema(description = "关阀报中的开阀时控制器时钟", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | |
| | | this.clThisAmount = dataCd83CloseVo.thisAmount; |
| | | this.clThisMoney = dataCd83CloseVo.thisMoney; |
| | | this.clThisTime = dataCd83CloseVo.thisTime; |
| | | this.clPrice = dataCd83CloseVo.price; |
| | | this.clOpenDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dataCd83CloseVo.openDt); |
| | | this.closeDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dataCd83CloseVo.closeDt); |
| | | |
| | |
| | | this.clThisAmount = null; |
| | | this.clThisMoney = null; |
| | | this.clThisTime = null; |
| | | this.clPrice = null; |
| | | this.clOpenDt = null; |
| | | this.closeDt = null; |
| | | |
| | |
| | | this.clThisAmount = cdData.thisWater; |
| | | this.clThisMoney = cdData.thisMoney; |
| | | this.clThisTime = cdData.thisDuration; |
| | | this.clPrice = null; |
| | | this.clOrderNo = cdData.orderNo; |
| | | this.clEleTotalAmount = cdData.eleTotalAmount; |
| | | this.clWaterRemainUser = cdData.waterRemain; |
| | |
| | | this.clThisAmount = dataCd83CloseVo.thisAmount; |
| | | this.clThisMoney = dataCd83CloseVo.thisMoney; |
| | | this.clThisTime = dataCd83CloseVo.thisTime; |
| | | this.clPrice = dataCd83CloseVo.price; |
| | | this.clOpenDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dataCd83CloseVo.openDt); |
| | | this.closeDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dataCd83CloseVo.closeDt) ; |
| | | |
| | |
| | | this.clThisAmount = null; |
| | | this.clThisMoney = null; |
| | | this.clThisTime = null; |
| | | this.clPrice = null; |
| | | this.clOpenDt = null; |
| | | this.closeDt = null; |
| | | |
| | |
| | | } |
| | | return null ; |
| | | } |
| | | // |
| | | // // 1、刷卡开阀;2刷卡关阀;3、中心站开阀;4、中心站关阀;5、欠费关阀; |
| | | // // 6、流量计故障关阀;7、紧急关阀;8、用户远程开阀;9、用户远程关阀; |
| | | // // 16,用户开阀后管道内没有水,自动关阀。管道不出水自动关阀 |
| | | // public static final Integer valveOpenByIC = 1 ;//刷卡开阀 |
| | | // public static final Integer valveCloseByIC = 2 ;//刷卡关阀 |
| | | // public static final Integer valveOpenByCenter = 3 ;//中心站开阀 |
| | | // public static final Integer valveCloseByCenter = 4 ;//中心站关阀 |
| | | // public static final Integer valveCloseByFee = 5 ;//欠费关阀 |
| | | // public static final Integer valveCloseByFlowMeterFault = 6 ;//流量计故障关阀 |
| | | // public static final Integer valveCloseByEmergency = 7 ;//紧急关阀 |
| | | // public static final Integer valveOpenByRemoteUser = 8 ;//用户远程开阀 |
| | | // public static final Integer valveCloseByRemoteUser = 9 ;//用户远程关阀; |
| | | // public static final Integer valveCloseByNoWater = 16 ;//管道无水自动关阀; |
| | | // |
| | | // public static Map<Integer, String> openCloseValveTypes(){ |
| | | // Map<Integer, String> map = new HashMap<>() ; |
| | | // map.put(valveOpenByIC, "刷卡开阀"); |
| | | // map.put(valveCloseByIC , "刷卡关阀") ; |
| | | // map.put(valveOpenByCenter , "中心站开阀") ; |
| | | // map.put(valveCloseByCenter , "中心站关阀") ; |
| | | // map.put(valveCloseByFee , "欠费关阀") ; |
| | | // map.put(valveCloseByFlowMeterFault , "流量计故障关阀") ; |
| | | // map.put(valveCloseByEmergency , "紧急关阀") ; |
| | | // map.put(valveOpenByRemoteUser , "用户远程开阀") ; |
| | | // map.put(valveCloseByRemoteUser , "用户远程关阀") ; |
| | | // map.put(valveCloseByNoWater , "管道无水自动关阀") ; |
| | | // return map ; |
| | | // } |
| | | // public static String openCloseValveTypeName(Integer type){ |
| | | // if(type != null){ |
| | | // return switch (type.intValue()) { |
| | | // case 1 -> "刷卡开阀"; |
| | | // case 2 -> "刷卡关阀"; |
| | | // case 3 -> "中心站开阀"; |
| | | // case 4 -> "中心站关阀"; |
| | | // case 5 -> "欠费关阀"; |
| | | // case 6 -> "流量计故障关阀"; |
| | | // case 7 -> "紧急关阀"; |
| | | // case 8 -> "用户远程开阀"; |
| | | // case 9 -> "用户远程关阀"; |
| | | // case 16 -> "管道无水自动关阀"; |
| | | // default -> "未知"; |
| | | // }; |
| | | // } |
| | | // return null ; |
| | | // } |
| | | |
| | | // 1、刷卡开阀;2刷卡关阀;3、中心站开阀;4、中心站关阀;5、欠费关阀; |
| | | // 6、流量计故障关阀;7、紧急关阀;8、用户远程开阀;9、用户远程关阀; |
| | | // 16,用户开阀后管道内没有水,自动关阀。管道不出水自动关阀 |
| | | public static final Integer valveOpenByIC = 1 ;//刷卡开阀 |
| | | public static final Integer valveCloseByIC = 2 ;//刷卡关阀 |
| | | public static final Integer valveOpenByCenter = 3 ;//中心站开阀 |
| | | public static final Integer valveCloseByCenter = 4 ;//中心站关阀 |
| | | public static final Integer valveCloseByFee = 5 ;//欠费关阀 |
| | | public static final Integer valveCloseByFlowMeterFault = 6 ;//流量计故障关阀 |
| | | public static final Integer valveCloseByEmergency = 7 ;//紧急关阀 |
| | | public static final Integer valveOpenByRemoteUser = 8 ;//用户远程开阀 |
| | | public static final Integer valveCloseByRemoteUser = 9 ;//用户远程关阀; |
| | | public static final Integer valveCloseByNoWater = 16 ;//管道无水自动关阀; |
| | | |
| | | public static Map<Integer, String> openCloseValveTypes(){ |
| | | Map<Integer, String> map = new HashMap<>() ; |
| | | map.put(valveOpenByIC, "刷卡开阀"); |
| | | map.put(valveCloseByIC , "刷卡关阀") ; |
| | | map.put(valveOpenByCenter , "中心站开阀") ; |
| | | map.put(valveCloseByCenter , "中心站关阀") ; |
| | | map.put(valveCloseByFee , "欠费关阀") ; |
| | | map.put(valveCloseByFlowMeterFault , "流量计故障关阀") ; |
| | | map.put(valveCloseByEmergency , "紧急关阀") ; |
| | | map.put(valveOpenByRemoteUser , "用户远程开阀") ; |
| | | map.put(valveCloseByRemoteUser , "用户远程关阀") ; |
| | | map.put(valveCloseByNoWater , "管道无水自动关阀") ; |
| | | return map ; |
| | | } |
| | | public static String openCloseValveTypeName(Integer type){ |
| | | if(type != null){ |
| | | return switch (type.intValue()) { |
| | | case 1 -> "刷卡开阀"; |
| | | case 2 -> "刷卡关阀"; |
| | | case 3 -> "中心站开阀"; |
| | | case 4 -> "中心站关阀"; |
| | | case 5 -> "欠费关阀"; |
| | | case 6 -> "流量计故障关阀"; |
| | | case 7 -> "紧急关阀"; |
| | | case 8 -> "用户远程开阀"; |
| | | case 9 -> "用户远程关阀"; |
| | | case 16 -> "管道无水自动关阀"; |
| | | default -> "未知"; |
| | | }; |
| | | } |
| | | return null ; |
| | | } |
| | | |
| | | } |
| | |
| | | /** |
| | | * 开阀类型 |
| | | */ |
| | | //private Byte openType; |
| | | private Byte openType_; |
| | | private String openType; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 开阀时累计流量 |
| | | */ |
| | | @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" ) |
| | | private Double openTotalAmount; |
| | | |
| | | /** |
| | | * 开阀时剩余金额 |
| | | */ |
| | | @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" ) |
| | | private Double openRemainMoney; |
| | | |
| | | /** |
| | | * 开阀时用户剩余剩余水量 |
| | | */ |
| | | @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" ) |
| | | private Double openWaterRemain; |
| | | |
| | | /** |
| | | * 开阀电表累计电量 |
| | | */ |
| | | @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" ) |
| | | private Double openEleTotalAmount; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 关阀类型 |
| | | */ |
| | | //private Byte closeType; |
| | | private Byte closeType_; |
| | | private String closeType; |
| | | |
| | | /** |
| | | * 关阀报中本地用水量 |
| | | * 关阀报中本次用水量 |
| | | */ |
| | | @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" ) |
| | | private Double closeThisAmount; |
| | | |
| | | /** |
| | |
| | | private Integer thisTime; |
| | | |
| | | /** |
| | | * 关阀报中本地用水时长(分钟) |
| | | */ |
| | | @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" ) |
| | | private Double closePrice; |
| | | |
| | | /** |
| | | * 关阀报中本地消费金额 |
| | | */ |
| | | @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" ) |
| | | private Double thisMoney; |
| | | |
| | | /** |
| | | * 关阀时剩余金额 |
| | | */ |
| | | @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" ) |
| | | private Double closeRemainMoney; |
| | | |
| | | /** |
| | | * 关阀时累计流量 |
| | | */ |
| | | @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" ) |
| | | private Double closeTotalAmount; |
| | | } |
| | |
| | | id = #{id,jdbcType=VARCHAR} |
| | | </if> |
| | | <if test="rtuAddr != null and rtuAddr != ''"> |
| | | AND rtuAddr = #{rtuAddr,jdbcType=VARCHAR} |
| | | AND rtuAddr = #{rtuAddr,jdbcType=VARCHAR} |
| | | </if> |
| | | <if test="protocol != null and protocol != ''"> |
| | | AND protocol = #{protocol,jdbcType=VARCHAR} |
| | | AND protocol = #{protocol,jdbcType=VARCHAR} |
| | | </if> |
| | | </where> |
| | | order by rtuAddr desc |
| | | order by id desc |
| | | <trim prefix="limit " > |
| | | <if test="start != null and count != null"> |
| | | #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER} |
| | |
| | | <result column="cl_this_amount" jdbcType="DOUBLE" property="clThisAmount"/> |
| | | <result column="cl_this_money" jdbcType="DOUBLE" property="clThisMoney"/> |
| | | <result column="cl_this_time" jdbcType="INTEGER" property="clThisTime"/> |
| | | <result column="cl_price" jdbcType="DOUBLE" property="clPrice"/> |
| | | <result column="cl_open_dt" jdbcType="TIMESTAMP" property="clOpenDt"/> |
| | | <result column="close_dt" jdbcType="TIMESTAMP" property="closeDt"/> |
| | | <result column="cl_order_no" jdbcType="VARCHAR" property="clOrderNo"/> |
| | |
| | | cl_this_amount, |
| | | cl_this_money, |
| | | cl_this_time, |
| | | cl_price, |
| | | cl_open_dt, |
| | | close_dt, |
| | | cl_order_no, |
| | |
| | | op_ele_total_amount, op_water_remain_user, cl_dt, |
| | | cl_type, cl_total_amount, cl_ic_card_no, |
| | | cl_ic_card_addr, cl_remain_money, cl_this_amount, |
| | | cl_this_money, cl_this_time, cl_open_dt, |
| | | cl_this_money, cl_this_time, cl_price, cl_open_dt, |
| | | close_dt, cl_order_no, cl_ele_total_amount, |
| | | cl_water_remain_user, cl_this_ele) |
| | | values (#{id,jdbcType=BIGINT}, #{clientId,jdbcType=BIGINT}, #{clientName,jdbcType=VARCHAR}, |
| | |
| | | #{opEleTotalAmount,jdbcType=FLOAT}, #{opWaterRemainUser,jdbcType=FLOAT}, #{clDt,jdbcType=TIMESTAMP}, |
| | | #{clType,jdbcType=TINYINT}, #{clTotalAmount,jdbcType=DOUBLE}, #{clIcCardNo,jdbcType=VARCHAR}, |
| | | #{clIcCardAddr,jdbcType=VARCHAR}, #{clRemainMoney,jdbcType=DOUBLE}, #{clThisAmount,jdbcType=DOUBLE}, |
| | | #{clThisMoney,jdbcType=DOUBLE}, #{clThisTime,jdbcType=INTEGER}, #{clOpenDt,jdbcType=TIMESTAMP}, |
| | | #{closeDt,jdbcType=TIMESTAMP}, #{clOrderNo,jdbcType=VARCHAR}, #{clEleTotalAmount,jdbcType=FLOAT}, |
| | | #{clWaterRemainUser,jdbcType=FLOAT}, #{clThisEle,jdbcType=FLOAT}) |
| | | #{clThisMoney,jdbcType=DOUBLE}, #{clThisTime,jdbcType=INTEGER}, #{clPrice,jdbcType=INTEGER}, |
| | | #{clOpenDt,jdbcType=TIMESTAMP}, #{closeDt,jdbcType=TIMESTAMP}, #{clOrderNo,jdbcType=VARCHAR}, |
| | | #{clEleTotalAmount,jdbcType=FLOAT},#{clWaterRemainUser,jdbcType=FLOAT}, #{clThisEle,jdbcType=FLOAT}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveHistory"> |
| | | <!--@mbg.generated--> |
| | |
| | | </if> |
| | | <if test="clThisMoney != null"> |
| | | cl_this_money, |
| | | </if> |
| | | <if test="clPrice != null"> |
| | | cl_price, |
| | | </if> |
| | | <if test="clThisTime != null"> |
| | | cl_this_time, |
| | |
| | | <if test="clThisTime != null"> |
| | | #{clThisTime,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="clPrice != null"> |
| | | #{clPrice,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="clOpenDt != null"> |
| | | #{clOpenDt,jdbcType=TIMESTAMP}, |
| | | </if> |
| | |
| | | <if test="clThisTime != null"> |
| | | cl_this_time = #{clThisTime,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="clPrice != null"> |
| | | cl_price = #{clPrice,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="clOpenDt != null"> |
| | | cl_open_dt = #{clOpenDt,jdbcType=TIMESTAMP}, |
| | | </if> |
| | |
| | | cl_this_amount = #{clThisAmount,jdbcType=DOUBLE}, |
| | | cl_this_money = #{clThisMoney,jdbcType=DOUBLE}, |
| | | cl_this_time = #{clThisTime,jdbcType=INTEGER}, |
| | | cl_price = #{clPrice,jdbcType=DOUBLE}, |
| | | cl_open_dt = #{clOpenDt,jdbcType=TIMESTAMP}, |
| | | close_dt = #{closeDt,jdbcType=TIMESTAMP}, |
| | | cl_order_no = #{clOrderNo,jdbcType=VARCHAR}, |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <!--根据指定条件获取开关阀报历史记录--> |
| | | <select id="getOpenCloseValveReports_history" resultType="com.dy.pipIrrGlobal.voRm.VoOpenCloseValve"> |
| | | SELECT oh.intake_id AS intakeId, |
| | | inta.name AS intakenum, |
| | | oh.rtu_addr AS rtuAddr, |
| | | oh.client_name AS clientName, |
| | | oh.op_ic_card_no AS openIcNum, |
| | | oh.op_ic_card_addr AS openIcAddr, |
| | | oh.open_dt AS openTime, |
| | | CASE |
| | | <!--根据指定条件获取开关阀报历史记录 |
| | | CASE |
| | | WHEN oh.op_type = 1 THEN '刷卡开阀' |
| | | WHEN oh.op_type = 3 THEN '中心站开阀' |
| | | WHEN oh.op_type = 5 THEN '余额不足关阀' |
| | |
| | | WHEN oh.op_type = 11 THEN '巡检卡开阀' |
| | | ELSE '未知' |
| | | END AS openType, |
| | | oh.op_order_no AS openOrderNo, |
| | | oh.op_total_amount AS openTotalAmount, |
| | | oh.op_remain_money AS openRemainMoney, |
| | | oh.op_water_remain_user AS openWaterRemain, |
| | | oh.op_ele_total_amount AS openEleTotalAmount, |
| | | oh.cl_ic_card_no AS closeIcNum, |
| | | oh.cl_ic_card_addr AS closeIcAddr, |
| | | oh.close_dt AS closeTime, |
| | | CASE |
| | | |
| | | CASE |
| | | WHEN oh.cl_type = 2 THEN '刷卡关阀' |
| | | WHEN oh.cl_type = 4 THEN '中心站关阀' |
| | | WHEN oh.cl_type = 5 THEN '余额不足关阀' |
| | |
| | | WHEN oh.cl_type = 14 THEN '用户远程定量关阀' |
| | | ELSE '未知' |
| | | END AS closeType, |
| | | --> |
| | | <select id="getOpenCloseValveReports_history" resultType="com.dy.pipIrrGlobal.voRm.VoOpenCloseValve"> |
| | | SELECT oh.intake_id AS intakeId, |
| | | inta.name AS intakenum, |
| | | oh.rtu_addr AS rtuAddr, |
| | | cl.name AS clientName, |
| | | cl.address AS clientAddr, |
| | | oh.op_ic_card_no AS openIcNum, |
| | | oh.op_ic_card_addr AS openIcAddr, |
| | | oh.open_dt AS openTime, |
| | | oh.op_type AS openType_, |
| | | oh.op_order_no AS openOrderNo, |
| | | oh.op_total_amount AS openTotalAmount, |
| | | oh.op_remain_money AS openRemainMoney, |
| | | oh.op_water_remain_user AS openWaterRemain, |
| | | oh.op_ele_total_amount AS openEleTotalAmount, |
| | | oh.cl_ic_card_no AS closeIcNum, |
| | | oh.cl_ic_card_addr AS closeIcAddr, |
| | | oh.close_dt AS closeTime, |
| | | oh.cl_type AS closeType_, |
| | | oh.cl_this_amount AS closeThisAmount, |
| | | oh.cl_this_time AS thisTime, |
| | | oh.cl_price AS closePrice, |
| | | oh.cl_this_money AS thisMoney, |
| | | oh.cl_remain_money AS closeRemainMoney, |
| | | oh.cl_total_amount AS closeTotalAmount |
| | | FROM rm_open_close_valve_history oh |
| | | INNER JOIN pr_intake inta ON inta.id = oh.intake_id |
| | | LEFT JOIN pr_intake inta ON inta.id = oh.intake_id |
| | | LEFT JOIN ba_client cl ON cl.id = oh.client_id |
| | | <where> |
| | | <if test="intakeId != null and intakeId > 0"> |
| | | AND oh.intake_id = #{intakeId} |
| | |
| | | <result column="cl_this_amount" jdbcType="DOUBLE" property="clThisAmount"/> |
| | | <result column="cl_this_money" jdbcType="DOUBLE" property="clThisMoney"/> |
| | | <result column="cl_this_time" jdbcType="INTEGER" property="clThisTime"/> |
| | | <result column="cl_price" jdbcType="DOUBLE" property="clPrice"/> |
| | | <result column="cl_open_dt" jdbcType="TIMESTAMP" property="clOpenDt"/> |
| | | <result column="close_dt" jdbcType="TIMESTAMP" property="closeDt"/> |
| | | <result column="cl_order_no" jdbcType="VARCHAR" property="clOrderNo"/> |
| | |
| | | cl_this_amount, |
| | | cl_this_money, |
| | | cl_this_time, |
| | | cl_price, |
| | | cl_open_dt, |
| | | close_dt, |
| | | cl_order_no, |
| | |
| | | op_order_no, op_ele_total_amount, op_water_remain_user, |
| | | cl_dt, cl_type, cl_total_amount, |
| | | cl_ic_card_no, cl_ic_card_addr, cl_remain_money, |
| | | cl_this_amount, cl_this_money, cl_this_time, |
| | | cl_this_amount, cl_this_money, cl_this_time, cl_price, |
| | | cl_open_dt, close_dt, cl_order_no, |
| | | cl_ele_total_amount, cl_water_remain_user, cl_this_ele) |
| | | values (#{id,jdbcType=BIGINT}, #{lastHistoryId,jdbcType=BIGINT}, |
| | |
| | | #{clDt,jdbcType=TIMESTAMP}, #{clType,jdbcType=TINYINT}, #{clTotalAmount,jdbcType=DOUBLE}, |
| | | #{clIcCardNo,jdbcType=VARCHAR}, #{clIcCardAddr,jdbcType=VARCHAR}, #{clRemainMoney,jdbcType=DOUBLE}, |
| | | #{clThisAmount,jdbcType=DOUBLE}, #{clThisMoney,jdbcType=DOUBLE}, #{clThisTime,jdbcType=INTEGER}, |
| | | #{clOpenDt,jdbcType=TIMESTAMP}, #{closeDt,jdbcType=TIMESTAMP}, #{clOrderNo,jdbcType=VARCHAR}, |
| | | #{clEleTotalAmount,jdbcType=FLOAT}, #{clWaterRemainUser,jdbcType=FLOAT}, #{clThisEle,jdbcType=FLOAT}) |
| | | #{clPrice,jdbcType=DOUBLE},#{clOpenDt,jdbcType=TIMESTAMP}, #{closeDt,jdbcType=TIMESTAMP}, |
| | | #{clOrderNo,jdbcType=VARCHAR},#{clEleTotalAmount,jdbcType=FLOAT}, #{clWaterRemainUser,jdbcType=FLOAT}, |
| | | #{clThisEle,jdbcType=FLOAT}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveLast"> |
| | | <!--@mbg.generated--> |
| | |
| | | </if> |
| | | <if test="clThisTime != null"> |
| | | cl_this_time, |
| | | </if> |
| | | <if test="clPrice != null"> |
| | | cl_price, |
| | | </if> |
| | | <if test="clOpenDt != null"> |
| | | cl_open_dt, |
| | |
| | | </if> |
| | | <if test="clThisTime != null"> |
| | | #{clThisTime,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="clPrice != null"> |
| | | #{clPrice,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="clOpenDt != null"> |
| | | #{clOpenDt,jdbcType=TIMESTAMP}, |
| | |
| | | <if test="clThisTime != null"> |
| | | cl_this_time = #{clThisTime,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="clPrice != null"> |
| | | cl_price = #{clPrice,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="clOpenDt != null"> |
| | | cl_open_dt = #{clOpenDt,jdbcType=TIMESTAMP}, |
| | | </if> |
| | |
| | | cl_this_amount = #{clThisAmount,jdbcType=DOUBLE}, |
| | | cl_this_money = #{clThisMoney,jdbcType=DOUBLE}, |
| | | cl_this_time = #{clThisTime,jdbcType=INTEGER}, |
| | | cl_price = #{clPrice,jdbcType=DOUBLE}, |
| | | cl_open_dt = #{clOpenDt,jdbcType=TIMESTAMP}, |
| | | close_dt = #{closeDt,jdbcType=TIMESTAMP}, |
| | | cl_order_no = #{clOrderNo,jdbcType=VARCHAR}, |
| | |
| | | <!--根据指定条件获取开关阀报最新记录--> |
| | | <select id="getOpenCloseValveReports_last" resultType="com.dy.pipIrrGlobal.voRm.VoOpenCloseValve"> |
| | | SELECT oh.intake_id AS intakeId, |
| | | inta.name AS intakeNum, |
| | | oh.rtu_addr AS rtuAddr, |
| | | oh.client_name AS clientName, |
| | | oh.op_ic_card_no AS openIcNum, |
| | | oh.op_ic_card_addr AS openIcAddr, |
| | | oh.open_dt AS openTime, |
| | | CASE |
| | | WHEN oh.op_type = 1 THEN '刷卡开阀' |
| | | WHEN oh.op_type = 3 THEN '中心站开阀' |
| | | WHEN oh.op_type = 5 THEN '余额不足关阀' |
| | | WHEN oh.op_type = 8 THEN '用户远程开阀' |
| | | WHEN oh.op_type = 11 THEN '巡检卡开阀' |
| | | ELSE '未知' |
| | | END AS openType, |
| | | oh.op_order_no AS openOrderNo, |
| | | oh.op_total_amount AS openTotalAmount, |
| | | oh.op_remain_money AS openRemainMoney, |
| | | oh.op_water_remain_user AS openWaterRemain, |
| | | oh.op_ele_total_amount AS openEleTotalAmount, |
| | | oh.cl_ic_card_no AS closeIcNum, |
| | | oh.cl_ic_card_addr AS closeIcAddr, |
| | | oh.close_dt AS closeTime, |
| | | CASE |
| | | WHEN oh.cl_type = 2 THEN '刷卡关阀' |
| | | WHEN oh.cl_type = 4 THEN '中心站关阀' |
| | | WHEN oh.cl_type = 5 THEN '余额不足关阀' |
| | | WHEN oh.cl_type = 6 THEN '流量计故障关阀' |
| | | WHEN oh.cl_type = 7 THEN '紧急关闭' |
| | | WHEN oh.cl_type = 9 THEN '用户远程关阀' |
| | | WHEN oh.cl_type = 10 THEN '巡检卡关阀' |
| | | WHEN oh.cl_type = 12 THEN '黑名单命令关阀' |
| | | WHEN oh.cl_type = 13 THEN '用户远程定时关阀' |
| | | WHEN oh.cl_type = 14 THEN '用户远程定量关阀' |
| | | ELSE '未知' |
| | | END AS closeType, |
| | | oh.cl_this_amount AS closeThisAmount, |
| | | oh.cl_this_time AS thisTime, |
| | | oh.cl_this_money AS thisMoney, |
| | | oh.cl_remain_money AS closeRemainMoney, |
| | | oh.cl_total_amount AS closeTotalAmount |
| | | inta.name AS intakenum, |
| | | oh.rtu_addr AS rtuAddr, |
| | | cl.name AS clientName, |
| | | cl.address AS clientAddr, |
| | | oh.op_ic_card_no AS openIcNum, |
| | | oh.op_ic_card_addr AS openIcAddr, |
| | | oh.open_dt AS openTime, |
| | | oh.op_type AS openType_, |
| | | oh.op_order_no AS openOrderNo, |
| | | oh.op_total_amount AS openTotalAmount, |
| | | oh.op_remain_money AS openRemainMoney, |
| | | oh.op_water_remain_user AS openWaterRemain, |
| | | oh.op_ele_total_amount AS openEleTotalAmount, |
| | | oh.cl_ic_card_no AS closeIcNum, |
| | | oh.cl_ic_card_addr AS closeIcAddr, |
| | | oh.close_dt AS closeTime, |
| | | oh.cl_type AS closeType_, |
| | | oh.cl_this_amount AS closeThisAmount, |
| | | oh.cl_this_time AS thisTime, |
| | | oh.cl_price AS closePrice, |
| | | oh.cl_this_money AS thisMoney, |
| | | oh.cl_remain_money AS closeRemainMoney, |
| | | oh.cl_total_amount AS closeTotalAmount |
| | | FROM rm_open_close_valve_last oh |
| | | INNER JOIN pr_intake inta ON inta.id = oh.intake_id |
| | | LEFT JOIN pr_intake inta ON inta.id = oh.intake_id |
| | | LEFT JOIN ba_client cl ON cl.id = oh.client_id |
| | | <where> |
| | | <if test="intakeId != null and intakeId > 0"> |
| | | AND oh.intake_id = #{intakeId} |
| | |
| | | package com.dy.pipIrrRemote.report; |
| | | |
| | | import com.dy.common.mw.protocol.p206V1_0_0.CommonV1_0_1; |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.pipIrrGlobal.daoRm.*; |
| | | import com.dy.pipIrrGlobal.voRm.VoOnHour; |
| | |
| | | rsVo.pageCurr = qo.pageCurr ; |
| | | |
| | | rsVo.calculateAndSet(itemTotal, params); |
| | | rsVo.obj = rmOpenCloseValveHistoryMapper.getOpenCloseValveReports_history(params); |
| | | List<VoOpenCloseValve> list = rmOpenCloseValveHistoryMapper.getOpenCloseValveReports_history(params); |
| | | if (list != null && list.size() > 0) { |
| | | for (VoOpenCloseValve vo : list) { |
| | | vo.setOpenType(CommonV1_0_1.openCloseValveType(vo.getOpenType_()==null?(byte)100:vo.getOpenType_())); |
| | | vo.setCloseType(CommonV1_0_1.openCloseValveType(vo.getCloseType_()==null?(byte)100:vo.getCloseType_())); |
| | | } |
| | | } |
| | | rsVo.obj = list; |
| | | return rsVo ; |
| | | } |
| | | |
| | |
| | | rsVo.pageCurr = qo.pageCurr ; |
| | | |
| | | rsVo.calculateAndSet(itemTotal, params); |
| | | rsVo.obj = rmOpenCloseValveLastMapper.getOpenCloseValveReports_last(params); |
| | | List<VoOpenCloseValve> list = rmOpenCloseValveLastMapper.getOpenCloseValveReports_last(params); |
| | | if (list != null && list.size() > 0) { |
| | | for (VoOpenCloseValve vo : list) { |
| | | vo.setOpenType(CommonV1_0_1.openCloseValveType(vo.getOpenType_()==null?(byte)100:vo.getOpenType_())); |
| | | vo.setCloseType(CommonV1_0_1.openCloseValveType(vo.getCloseType_()==null?(byte)100:vo.getCloseType_())); |
| | | } |
| | | } |
| | | rsVo.obj = list; |
| | | return rsVo ; |
| | | } |
| | | |