package com.dy.pipIrrMwTestRtu.tcpClient.upData; import java.text.SimpleDateFormat; import java.util.Locale; /** * @Author: liurunyu * @Date: 2024/7/15 15:02 * @Description */ public class UpConstant { private static String openValveDt ; private static String closeValveDt ; public static Integer totalAmount = 1234567;//实为12345.67 public static Integer remainMoney = 56789;//实为567.89 public static Integer thisAmount = 1000;//实为10.00 public static Integer thisMoney = 1000;//实为10.00 public static Integer thisTime = 10;//实为10 public static Integer thisPrice = 100;//实为1.00 public static Integer perAmount = thisAmount; public static Integer perMoney = thisMoney; public static void clearOpenValveDt(){ openValveDt = null ; } public static String openValveDt(){ if(openValveDt == null){ openValveDt = new SimpleDateFormat("yyMMddHHmmss", Locale.CHINA).format(System.currentTimeMillis()); } return openValveDt ; } public static String closeValveDt(){ closeValveDt = new SimpleDateFormat("yyMMddHHmmss", Locale.CHINA).format(System.currentTimeMillis()); return closeValveDt ; } public static void closeValve(){ totalAmount = totalAmount + perAmount ; remainMoney = remainMoney - perMoney ; } }