作者 shenhailong

Merge remote-tracking branch 'origin/master'

正在显示 31 个修改的文件 包含 1944 行增加64 行删除
@@ -12,7 +12,9 @@ target/ @@ -12,7 +12,9 @@ target/
12 .settings 12 .settings
13 .springBeans 13 .springBeans
14 .sts4-cache 14 .sts4-cache
15 - 15 +out/
  16 +logs/
  17 +log/
16 ### IntelliJ IDEA ### 18 ### IntelliJ IDEA ###
17 .idea 19 .idea
18 *.iws 20 *.iws
@@ -29,3 +31,5 @@ build/ @@ -29,3 +31,5 @@ build/
29 31
30 ### VS Code ### 32 ### VS Code ###
31 .vscode/ 33 .vscode/
  34 +### Docker ###
  35 +docker/*.jar
  1 +FROM java:8u111
  2 +
  3 +VOLUME /tmp
  4 +
  5 +ADD *.jar app.jar
  6 +
  7 +EXPOSE 10003
  8 +
  9 +ENTRYPOINT ["java","-jar","/app.jar"]
  10 +
  11 +# Ubuntu 时区
  12 +RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
@@ -84,6 +84,12 @@ @@ -84,6 +84,12 @@
84 <artifactId>util</artifactId> 84 <artifactId>util</artifactId>
85 <version>1.0-SNAPSHOT</version> 85 <version>1.0-SNAPSHOT</version>
86 </dependency> 86 </dependency>
  87 + <dependency>
  88 + <groupId>net.sf.json-lib</groupId>
  89 + <artifactId>json-lib</artifactId>
  90 + <version>2.4</version>
  91 + <classifier>jdk15</classifier>
  92 + </dependency>
87 <!--<dependency>--> 93 <!--<dependency>-->
88 <!--<groupId>com.fasterxml.jackson.core</groupId>--> 94 <!--<groupId>com.fasterxml.jackson.core</groupId>-->
89 <!--<artifactId>jackson-core</artifactId>--> 95 <!--<artifactId>jackson-core</artifactId>-->
@@ -191,6 +197,23 @@ @@ -191,6 +197,23 @@
191 </execution> 197 </execution>
192 </executions> 198 </executions>
193 </plugin> 199 </plugin>
  200 + <plugin>
  201 + <artifactId>maven-antrun-plugin</artifactId>
  202 + <executions>
  203 + <execution>
  204 + <id>gen-webadmin</id>
  205 + <phase>package</phase>
  206 + <configuration>
  207 + <tasks>
  208 + <copy todir="docker" file="target/${project.artifactId}-${project.version}.${project.packaging}" />
  209 + </tasks>
  210 + </configuration>
  211 + <goals>
  212 + <goal>run</goal>
  213 + </goals>
  214 + </execution>
  215 + </executions>
  216 + </plugin>
194 </plugins> 217 </plugins>
195 </build> 218 </build>
196 219
@@ -3,9 +3,13 @@ package com.sunyo.energy.location; @@ -3,9 +3,13 @@ package com.sunyo.energy.location;
3 import org.mybatis.spring.annotation.MapperScan; 3 import org.mybatis.spring.annotation.MapperScan;
4 import org.springframework.boot.SpringApplication; 4 import org.springframework.boot.SpringApplication;
5 import org.springframework.boot.autoconfigure.SpringBootApplication; 5 import org.springframework.boot.autoconfigure.SpringBootApplication;
  6 +import org.springframework.context.annotation.ComponentScan;
  7 +import org.springframework.scheduling.annotation.EnableScheduling;
6 8
7 @SpringBootApplication() 9 @SpringBootApplication()
  10 +@EnableScheduling
8 @MapperScan("com.sunyo.energy.location.dao") 11 @MapperScan("com.sunyo.energy.location.dao")
  12 +@ComponentScan("com.sunyo.energy.location")
9 public class BootApplication { 13 public class BootApplication {
10 14
11 public static void main(String[] args) { 15 public static void main(String[] args) {
1 -package com.sunyo.energy.location.controller;  
2 -  
3 -  
4 -import com.github.pagehelper.Page;  
5 -import com.github.pagehelper.PageHelper;  
6 -import com.github.pagehelper.PageInfo;  
7 -import com.sunyo.energy.location.controller.response.ResultJson;  
8 -import com.sunyo.energy.location.dao.LocationMapper;  
9 -import com.sunyo.energy.location.model.Location;  
10 -import org.springframework.beans.factory.annotation.Autowired;  
11 -import org.springframework.web.bind.annotation.RequestMapping;  
12 -import org.springframework.web.bind.annotation.RequestMethod;  
13 -import org.springframework.web.bind.annotation.RequestParam;  
14 -import org.springframework.web.bind.annotation.RestController;  
15 -  
16 -import java.util.List;  
17 -  
18 -@RestController  
19 -@RequestMapping("/location")  
20 -public class LocationController {  
21 -  
22 - @Autowired  
23 - private LocationMapper locationMapper;  
24 -  
25 - @RequestMapping(value="/list",method= RequestMethod.GET)  
26 - public ResultJson startActivityDemo(@RequestParam(value = "pageNum",required = false,defaultValue = "1")  
27 - int pageNum,  
28 - @RequestParam(value = "pageSize",required = false,defaultValue = "5")  
29 - int pageSize){  
30 - Page<Location> page = PageHelper.startPage(pageNum,pageSize);  
31 - List<Location> list= locationMapper.selectAll(0);  
32 - PageInfo<Location> result = new PageInfo<Location>(list);  
33 - return new ResultJson("200","success",result);  
34 - }  
35 -}  
  1 +package com.sunyo.energy.location.controller;
  2 +
  3 +import com.github.pagehelper.PageInfo;
  4 +import com.sunyo.energy.location.controller.response.ResultJson;
  5 +import com.sunyo.energy.location.model.PayRecords;
  6 +import com.sunyo.energy.location.service.PayOrderService;
  7 +import io.swagger.annotations.Api;
  8 +import io.swagger.annotations.ApiOperation;
  9 +import io.swagger.models.auth.In;
  10 +import org.springframework.beans.factory.annotation.Autowired;
  11 +import org.springframework.web.bind.annotation.*;
  12 +
  13 +/**
  14 + * Created by XYH on 2019/12/16.
  15 + * 订单查询,新增,更新,删除
  16 + */
  17 +@Api(description = "订单管理")
  18 +@RestController
  19 +@RequestMapping("/order")
  20 +public class PayOrderController {
  21 + @Autowired
  22 + PayOrderService payOrderService;
  23 +
  24 +
  25 + @ApiOperation(value = "查询缴费订单")
  26 + @RequestMapping("/list")
  27 + public PageInfo<PayRecords> getOrder(@RequestParam(value = "pageSize", required = false, defaultValue = "1") int pageSize,
  28 + @RequestParam(value = "pageNum", required = false, defaultValue = "5") int pageNum,
  29 + @RequestParam(value = "orderNumber",required = false) String orderNumber,
  30 + @RequestParam(value = "payTime", required = false) String payTime ){
  31 + return payOrderService.getOrder(pageSize, pageNum, orderNumber, payTime);
  32 + }
  33 +
  34 +
  35 + @ApiOperation(value = "新增缴费订单")
  36 + @PostMapping("/add")
  37 + public ResultJson addOrder(@RequestBody PayRecords records){
  38 + int mgs=0;
  39 + int result=payOrderService.addOrder(records);
  40 + if(result>0){
  41 + mgs=1;
  42 + }
  43 + return mgs==1?new ResultJson("200","新增订单成功"):new ResultJson("500","新增订单失败");
  44 + }
  45 +
  46 +
  47 + @ApiOperation(value = "更新缴费订单")
  48 + @PutMapping("/edi")
  49 + public ResultJson ediOrder(@RequestBody PayRecords records){
  50 + int mgs=0;
  51 + int result=payOrderService.ediOrder(records);
  52 + if(result>0){
  53 + mgs=1;
  54 + }
  55 + return mgs==1? new ResultJson("200","订单信息更新成功"):new ResultJson("500","订单信息更新失败");
  56 + }
  57 +
  58 +
  59 + @ApiOperation(value = "删除缴费订单")
  60 + @DeleteMapping("/del")
  61 + public ResultJson delOrder(@RequestBody PayRecords payRecords){
  62 + int mgs=0;
  63 + int result=payOrderService.delOrder(payRecords);
  64 + if(result>0){
  65 + mgs=1;
  66 + }
  67 + return mgs==1? new ResultJson("200","订单信息移出成功"):new ResultJson("500","订单信息删除失败");
  68 + }
  69 +}
  1 +package com.sunyo.energy.location.controller;
  2 +
  3 +import com.github.pagehelper.PageInfo;
  4 +import com.sunyo.energy.location.model.PayRecords;
  5 +import com.sunyo.energy.location.model.WaterElectricityParameter;
  6 +import com.sunyo.energy.location.service.WaterElectricityParameterService;
  7 +import io.swagger.annotations.Api;
  8 +import io.swagger.annotations.ApiOperation;
  9 +import org.springframework.beans.factory.annotation.Autowired;
  10 +import org.springframework.web.bind.annotation.RequestMapping;
  11 +import org.springframework.web.bind.annotation.RequestParam;
  12 +import org.springframework.web.bind.annotation.RestController;
  13 +
  14 +import java.util.List;
  15 +
  16 +@Api(description = "用户支付管理")
  17 +@RestController
  18 +@RequestMapping("/userPayOrder")
  19 +public class UserPayController {
  20 +
  21 + @Autowired
  22 + private WaterElectricityParameterService waterElectricityParameterService;
  23 +
  24 + @ApiOperation(value = "查询缴费订单")
  25 + @RequestMapping("/list")
  26 + public List userPayList(@RequestParam(value = "roomNumber", required = false) String roomNumber ){
  27 +
  28 +
  29 + return waterElectricityParameterService.userPayList(roomNumber);
  30 + }
  31 +
  32 +}
  1 +package com.sunyo.energy.location.controller;
  2 +
  3 +import com.sunyo.energy.location.controller.response.ResultJson;
  4 +import com.sunyo.energy.location.model.WaterElectricityParameter;
  5 +import com.sunyo.energy.location.service.WaterElectricityParameterService;
  6 +import org.springframework.beans.factory.annotation.Autowired;
  7 +import org.springframework.stereotype.Controller;
  8 +import org.springframework.web.bind.annotation.RequestMapping;
  9 +import org.springframework.web.bind.annotation.RequestParam;
  10 +import org.springframework.web.bind.annotation.ResponseBody;
  11 +
  12 +import java.util.Date;
  13 +
  14 +@RequestMapping("/electricity_meter")
  15 +@Controller
  16 +public class WaterElectricityParameterController {
  17 +
  18 + @Autowired
  19 + private WaterElectricityParameterService waterElectricityParameterService;
  20 +
  21 +
  22 + /**
  23 + * 电表参数配置
  24 + *
  25 + */
  26 + @RequestMapping("/add")
  27 + @ResponseBody
  28 + public ResultJson eetParam(ResultJson resultJson, WaterElectricityParameter waterElectricityParameter){
  29 +
  30 + try {
  31 + if (waterElectricityParameterService.countOne(waterElectricityParameter.getEeId())>0){
  32 + resultJson.setCode("200");
  33 + return resultJson;
  34 + }else {
  35 + int i = waterElectricityParameterService.insertSelective(waterElectricityParameter);
  36 +
  37 + if (i>0){
  38 + resultJson.setCode("200");
  39 + resultJson.setMsg("添加成功");
  40 + return resultJson;
  41 + }else {
  42 + resultJson.setCode("500");
  43 + resultJson.setMsg("网络异常");
  44 + return resultJson;
  45 + }
  46 + }
  47 + }catch (Exception e){
  48 + e.printStackTrace();
  49 + resultJson.setCode("500");
  50 + resultJson.setMsg("网络异常");
  51 + return resultJson;
  52 + }
  53 +
  54 + }
  55 +
  56 + /**
  57 + * 电表参数查询
  58 + */
  59 + @RequestMapping("/getEEModel")
  60 + @ResponseBody
  61 + public WaterElectricityParameter getEEModel(@RequestParam(value = "eeId", required = false) String eeId){
  62 + WaterElectricityParameter oneElectricity = waterElectricityParameterService.findOneElectricity(eeId);
  63 + System.out.println("111");
  64 + return oneElectricity;
  65 +
  66 + }
  67 +
  68 + /**
  69 + * 电表参数编辑
  70 + */
  71 + @RequestMapping("/edit")
  72 + @ResponseBody
  73 + public ResultJson edit(ResultJson resultJson, WaterElectricityParameter waterElectricityParameter){
  74 +
  75 + try {
  76 + if (waterElectricityParameterService.updateByPrimaryKeySelective(waterElectricityParameter)>0){
  77 + resultJson.setCode("200");
  78 + return resultJson;
  79 + }else {
  80 + resultJson.setCode("500");
  81 + resultJson.setMsg("网络异常");
  82 + return resultJson;
  83 + }
  84 + }catch (Exception e){
  85 + e.printStackTrace();
  86 + resultJson.setCode("500");
  87 + resultJson.setMsg("网络异常");
  88 + return resultJson;
  89 + }
  90 + }
  91 +
  92 +}
  1 +package com.sunyo.energy.location.controller;
  2 +
  3 +import com.sunyo.energy.location.controller.response.ResultJson;
  4 +import com.sunyo.energy.location.model.WaterElectricityParameter;
  5 +import com.sunyo.energy.location.model.WaterMeter;
  6 +import com.sunyo.energy.location.service.WaterMeterService;
  7 +import org.springframework.beans.factory.annotation.Autowired;
  8 +import org.springframework.stereotype.Controller;
  9 +import org.springframework.web.bind.annotation.RequestMapping;
  10 +import org.springframework.web.bind.annotation.RequestParam;
  11 +import org.springframework.web.bind.annotation.ResponseBody;
  12 +
  13 +@Controller
  14 +@RequestMapping("/water_meter")
  15 +public class WaterMeterController {
  16 +
  17 + @Autowired
  18 + private WaterMeterService waterMeterService;
  19 +
  20 +// /**
  21 +// * 水表实施信息入库
  22 +// * @param resultJson
  23 +// * @return
  24 +// */
  25 +// @RequestMapping("/realTime")
  26 +// @ResponseBody
  27 +// public ResultJson realTime(ResultJson resultJson){
  28 +// int i = waterMeterService.realTime();
  29 +// if (i>0){
  30 +// resultJson.setCode("200");
  31 +// resultJson.setMsg("操作成功");
  32 +// }else {
  33 +// resultJson.setCode("500");
  34 +// resultJson.setMsg("操作失败");
  35 +// }
  36 +//
  37 +// return resultJson;
  38 +// }
  39 +
  40 + /**
  41 + * 水表单个实施信息查询
  42 + */
  43 + @RequestMapping("/findRealTime")
  44 + @ResponseBody
  45 + public WaterMeter findRealTime(@RequestParam(value = "wmId", required = false) String wmId){
  46 +
  47 + return waterMeterService.findRealTime(wmId);
  48 + }
  49 +
  50 +}
1 -package com.sunyo.energy.location.dao;  
2 -  
3 -import com.sunyo.energy.location.model.Location;  
4 -  
5 -import java.util.List;  
6 -  
7 -public interface LocationMapper {  
8 - int deleteByPrimaryKey(Integer id);  
9 -  
10 - int insert(Location record);  
11 -  
12 - int insertSelective(Location record);  
13 -  
14 - List<Location> selectByPrimaryKey(Integer id);  
15 -  
16 - List<Location> selectAll(Integer id);  
17 -  
18 - int updateByPrimaryKeySelective(Location record);  
19 -  
20 - int updateByPrimaryKey(Location record);  
21 -}  
  1 +package com.sunyo.energy.location.dao;
  2 +
  3 +import com.sunyo.energy.location.model.PayRecords;
  4 +import org.apache.ibatis.annotations.Param;
  5 +
  6 +import java.util.List;
  7 +
  8 +public interface PayRecordsMapper {
  9 + int deleteByPrimaryKey(Integer id);
  10 +
  11 + int insert(PayRecords record);
  12 +
  13 + int insertSelective(PayRecords record);
  14 +
  15 + PayRecords selectByPrimaryKey(Integer id);
  16 +
  17 + int updateByPrimaryKeySelective(PayRecords record);
  18 +
  19 + int updateByPrimaryKey(PayRecords record);
  20 +
  21 + List<PayRecords> findAll(@Param(value = "orderNumber") String orderNumber,
  22 + @Param(value = "startTime") String startTime,
  23 + @Param(value = "endTime") String endTime);
  24 +}
  1 +package com.sunyo.energy.location.dao;
  2 +
  3 +import com.sunyo.energy.location.model.WaterElectricityParameter;
  4 +
  5 +import java.util.List;
  6 +
  7 +public interface WaterElectricityParameterMapper {
  8 + int deleteByPrimaryKey(Integer id);
  9 +
  10 + int insert(WaterElectricityParameter record);
  11 +
  12 + int insertSelective(WaterElectricityParameter record);
  13 +
  14 + WaterElectricityParameter selectByPrimaryKey(Integer id);
  15 +
  16 + int updateByPrimaryKeySelective(WaterElectricityParameter record);
  17 +
  18 + int updateByPrimaryKey(WaterElectricityParameter record);
  19 +
  20 + int countOne(String eeId);
  21 +
  22 + WaterElectricityParameter findOneElectricity(String eeId);
  23 +
  24 + List<WaterElectricityParameter> userPayList(String roomNumber);
  25 +}
  1 +package com.sunyo.energy.location.dao;
  2 +
  3 +import com.sunyo.energy.location.model.WaterMeter;
  4 +
  5 +public interface WaterMeterMapper {
  6 + int insert(WaterMeter record);
  7 +
  8 + int insertSelective(WaterMeter record);
  9 +}
@@ -10,6 +10,10 @@ public class Location { @@ -10,6 +10,10 @@ public class Location {
10 10
11 private String adrname; 11 private String adrname;
12 12
  13 + private String eeid;
  14 +
  15 + private String wmid;
  16 +
13 private Integer parent; 17 private Integer parent;
14 18
15 private Integer type; 19 private Integer type;
  1 +package com.sunyo.energy.location.model;
  2 +
  3 +import java.util.Date;
  4 +
  5 +public class PayRecords {
  6 + private Integer id;
  7 +
  8 + private Long payfees;
  9 +
  10 + private Integer payuserid;
  11 +
  12 + private Date paytime;
  13 +
  14 + private Integer paylocationid;
  15 +
  16 + private Boolean paystatus;
  17 +
  18 + private Boolean paytype;
  19 +
  20 + private Boolean payfesstype;
  21 +
  22 + private String ordernumber;
  23 +
  24 + private String reamke1;
  25 +
  26 + private String reamke2;
  27 +
  28 + private String reamke3;
  29 +
  30 + private String reamke4;
  31 +
  32 + private String payusername;
  33 +
  34 + private String paylocationname;
  35 +
  36 + private String paytypeaddress;
  37 +
  38 + public Integer getId() {
  39 + return id;
  40 + }
  41 +
  42 + public void setId(Integer id) {
  43 + this.id = id;
  44 + }
  45 +
  46 + public Long getPayfees() {
  47 + return payfees;
  48 + }
  49 +
  50 + public void setPayfees(Long payfees) {
  51 + this.payfees = payfees;
  52 + }
  53 +
  54 + public Integer getPayuserid() {
  55 + return payuserid;
  56 + }
  57 +
  58 + public void setPayuserid(Integer payuserid) {
  59 + this.payuserid = payuserid;
  60 + }
  61 +
  62 + public Date getPaytime() {
  63 + return paytime;
  64 + }
  65 +
  66 + public void setPaytime(Date paytime) {
  67 + this.paytime = paytime;
  68 + }
  69 +
  70 + public Integer getPaylocationid() {
  71 + return paylocationid;
  72 + }
  73 +
  74 + public void setPaylocationid(Integer paylocationid) {
  75 + this.paylocationid = paylocationid;
  76 + }
  77 +
  78 + public Boolean getPaystatus() {
  79 + return paystatus;
  80 + }
  81 +
  82 + public void setPaystatus(Boolean paystatus) {
  83 + this.paystatus = paystatus;
  84 + }
  85 +
  86 + public Boolean getPaytype() {
  87 + return paytype;
  88 + }
  89 +
  90 + public void setPaytype(Boolean paytype) {
  91 + this.paytype = paytype;
  92 + }
  93 +
  94 + public Boolean getPayfesstype() {
  95 + return payfesstype;
  96 + }
  97 +
  98 + public void setPayfesstype(Boolean payfesstype) {
  99 + this.payfesstype = payfesstype;
  100 + }
  101 +
  102 + public String getOrdernumber() {
  103 + return ordernumber;
  104 + }
  105 +
  106 + public void setOrdernumber(String ordernumber) {
  107 + this.ordernumber = ordernumber == null ? null : ordernumber.trim();
  108 + }
  109 +
  110 + public String getReamke1() {
  111 + return reamke1;
  112 + }
  113 +
  114 + public void setReamke1(String reamke1) {
  115 + this.reamke1 = reamke1 == null ? null : reamke1.trim();
  116 + }
  117 +
  118 + public String getReamke2() {
  119 + return reamke2;
  120 + }
  121 +
  122 + public void setReamke2(String reamke2) {
  123 + this.reamke2 = reamke2 == null ? null : reamke2.trim();
  124 + }
  125 +
  126 + public String getReamke3() {
  127 + return reamke3;
  128 + }
  129 +
  130 + public void setReamke3(String reamke3) {
  131 + this.reamke3 = reamke3 == null ? null : reamke3.trim();
  132 + }
  133 +
  134 + public String getReamke4() {
  135 + return reamke4;
  136 + }
  137 +
  138 + public void setReamke4(String reamke4) {
  139 + this.reamke4 = reamke4 == null ? null : reamke4.trim();
  140 + }
  141 +
  142 + public String getPayusername() {
  143 + return payusername;
  144 + }
  145 +
  146 + public void setPayusername(String payusername) {
  147 + this.payusername = payusername == null ? null : payusername.trim();
  148 + }
  149 +
  150 + public String getPaylocationname() {
  151 + return paylocationname;
  152 + }
  153 +
  154 + public void setPaylocationname(String paylocationname) {
  155 + this.paylocationname = paylocationname == null ? null : paylocationname.trim();
  156 + }
  157 +
  158 + public String getPaytypeaddress() {
  159 + return paytypeaddress;
  160 + }
  161 +
  162 + public void setPaytypeaddress(String paytypeaddress) {
  163 + this.paytypeaddress = paytypeaddress == null ? null : paytypeaddress.trim();
  164 + }
  165 +}
  1 +package com.sunyo.energy.location.model;
  2 +
  3 +import java.util.Date;
  4 +
  5 +public class WaterElectricityParameter {
  6 + private Integer id;
  7 +
  8 + private Boolean prepaid;
  9 +
  10 + private Boolean warningtrip;
  11 +
  12 + private Long warningthreshold;
  13 +
  14 + private Boolean overdraft;
  15 +
  16 + private Long overdraftthreshold;
  17 +
  18 + private Boolean waterload;
  19 +
  20 + private Long water;
  21 +
  22 + private Long power;
  23 +
  24 + private String powerfactor;
  25 +
  26 + private Boolean free;
  27 +
  28 + private Long freeelectricitylimit;
  29 +
  30 + private String freewater;
  31 +
  32 + private String wmId;
  33 +
  34 + private Date creattime;
  35 +
  36 + private String eeId;
  37 +
  38 + private String reamke2;
  39 +
  40 + private String reamke3;
  41 +
  42 + public Integer getId() {
  43 + return id;
  44 + }
  45 +
  46 + public void setId(Integer id) {
  47 + this.id = id;
  48 + }
  49 +
  50 + public Boolean getPrepaid() {
  51 + return prepaid;
  52 + }
  53 +
  54 + public void setPrepaid(Boolean prepaid) {
  55 + this.prepaid = prepaid;
  56 + }
  57 +
  58 + public Boolean getWarningtrip() {
  59 + return warningtrip;
  60 + }
  61 +
  62 + public void setWarningtrip(Boolean warningtrip) {
  63 + this.warningtrip = warningtrip;
  64 + }
  65 +
  66 + public Long getWarningthreshold() {
  67 + return warningthreshold;
  68 + }
  69 +
  70 + public void setWarningthreshold(Long warningthreshold) {
  71 + this.warningthreshold = warningthreshold;
  72 + }
  73 +
  74 + public Boolean getOverdraft() {
  75 + return overdraft;
  76 + }
  77 +
  78 + public void setOverdraft(Boolean overdraft) {
  79 + this.overdraft = overdraft;
  80 + }
  81 +
  82 + public Long getOverdraftthreshold() {
  83 + return overdraftthreshold;
  84 + }
  85 +
  86 + public void setOverdraftthreshold(Long overdraftthreshold) {
  87 + this.overdraftthreshold = overdraftthreshold;
  88 + }
  89 +
  90 + public Boolean getWaterload() {
  91 + return waterload;
  92 + }
  93 +
  94 + public void setWaterload(Boolean waterload) {
  95 + this.waterload = waterload;
  96 + }
  97 +
  98 + public Long getWater() {
  99 + return water;
  100 + }
  101 +
  102 + public void setWater(Long water) {
  103 + this.water = water;
  104 + }
  105 +
  106 + public Long getPower() {
  107 + return power;
  108 + }
  109 +
  110 + public void setPower(Long power) {
  111 + this.power = power;
  112 + }
  113 +
  114 + public String getPowerfactor() {
  115 + return powerfactor;
  116 + }
  117 +
  118 + public void setPowerfactor(String powerfactor) {
  119 + this.powerfactor = powerfactor == null ? null : powerfactor.trim();
  120 + }
  121 +
  122 + public Boolean getFree() {
  123 + return free;
  124 + }
  125 +
  126 + public void setFree(Boolean free) {
  127 + this.free = free;
  128 + }
  129 +
  130 + public Long getFreeelectricitylimit() {
  131 + return freeelectricitylimit;
  132 + }
  133 +
  134 + public void setFreeelectricitylimit(Long freeelectricitylimit) {
  135 + this.freeelectricitylimit = freeelectricitylimit;
  136 + }
  137 +
  138 + public String getFreewater() {
  139 + return freewater;
  140 + }
  141 +
  142 + public void setFreewater(String freewater) {
  143 + this.freewater = freewater == null ? null : freewater.trim();
  144 + }
  145 +
  146 + public String getWmId() {
  147 + return wmId;
  148 + }
  149 +
  150 + public void setWmId(String wmId) {
  151 + this.wmId = wmId == null ? null : wmId.trim();
  152 + }
  153 +
  154 + public Date getCreattime() {
  155 + return creattime;
  156 + }
  157 +
  158 + public void setCreattime(Date creattime) {
  159 + this.creattime = creattime;
  160 + }
  161 +
  162 + public String getEeId() {
  163 + return eeId;
  164 + }
  165 +
  166 + public void setEeId(String eeId) {
  167 + this.eeId = eeId == null ? null : eeId.trim();
  168 + }
  169 +
  170 + public String getReamke2() {
  171 + return reamke2;
  172 + }
  173 +
  174 + public void setReamke2(String reamke2) {
  175 + this.reamke2 = reamke2 == null ? null : reamke2.trim();
  176 + }
  177 +
  178 + public String getReamke3() {
  179 + return reamke3;
  180 + }
  181 +
  182 + public void setReamke3(String reamke3) {
  183 + this.reamke3 = reamke3 == null ? null : reamke3.trim();
  184 + }
  185 +}
  1 +package com.sunyo.energy.location.model;
  2 +
  3 +import java.util.Date;
  4 +
  5 +public class WaterMeter {
  6 + private String wmId;
  7 +
  8 + private String wmSacc;
  9 +
  10 + private String wmLacc;
  11 +
  12 + private String wmRdtime;
  13 +
  14 + private String wmFmstate;
  15 +
  16 + private String wmErrmessage;
  17 +
  18 + private String wmVoltage;
  19 +
  20 + private String wmSignalpower;
  21 +
  22 + private Date creattime;
  23 +
  24 + private Date updatetime;
  25 +
  26 + private String reamke1;
  27 +
  28 + private String reamke2;
  29 +
  30 + private String reamke3;
  31 +
  32 + private String reamke4;
  33 +
  34 + public String getWmId() {
  35 + return wmId;
  36 + }
  37 +
  38 + public void setWmId(String wmId) {
  39 + this.wmId = wmId == null ? null : wmId.trim();
  40 + }
  41 +
  42 + public String getWmSacc() {
  43 + return wmSacc;
  44 + }
  45 +
  46 + public void setWmSacc(String wmSacc) {
  47 + this.wmSacc = wmSacc == null ? null : wmSacc.trim();
  48 + }
  49 +
  50 + public String getWmLacc() {
  51 + return wmLacc;
  52 + }
  53 +
  54 + public void setWmLacc(String wmLacc) {
  55 + this.wmLacc = wmLacc == null ? null : wmLacc.trim();
  56 + }
  57 +
  58 + public String getWmRdtime() {
  59 + return wmRdtime;
  60 + }
  61 +
  62 + public void setWmRdtime(String wmRdtime) {
  63 + this.wmRdtime = wmRdtime == null ? null : wmRdtime.trim();
  64 + }
  65 +
  66 + public String getWmFmstate() {
  67 + return wmFmstate;
  68 + }
  69 +
  70 + public void setWmFmstate(String wmFmstate) {
  71 + this.wmFmstate = wmFmstate == null ? null : wmFmstate.trim();
  72 + }
  73 +
  74 + public String getWmErrmessage() {
  75 + return wmErrmessage;
  76 + }
  77 +
  78 + public void setWmErrmessage(String wmErrmessage) {
  79 + this.wmErrmessage = wmErrmessage == null ? null : wmErrmessage.trim();
  80 + }
  81 +
  82 + public String getWmVoltage() {
  83 + return wmVoltage;
  84 + }
  85 +
  86 + public void setWmVoltage(String wmVoltage) {
  87 + this.wmVoltage = wmVoltage == null ? null : wmVoltage.trim();
  88 + }
  89 +
  90 + public String getWmSignalpower() {
  91 + return wmSignalpower;
  92 + }
  93 +
  94 + public void setWmSignalpower(String wmSignalpower) {
  95 + this.wmSignalpower = wmSignalpower == null ? null : wmSignalpower.trim();
  96 + }
  97 +
  98 + public Date getCreattime() {
  99 + return creattime;
  100 + }
  101 +
  102 + public void setCreattime(Date creattime) {
  103 + this.creattime = creattime;
  104 + }
  105 +
  106 + public Date getUpdatetime() {
  107 + return updatetime;
  108 + }
  109 +
  110 + public void setUpdatetime(Date updatetime) {
  111 + this.updatetime = updatetime;
  112 + }
  113 +
  114 + public String getReamke1() {
  115 + return reamke1;
  116 + }
  117 +
  118 + public void setReamke1(String reamke1) {
  119 + this.reamke1 = reamke1 == null ? null : reamke1.trim();
  120 + }
  121 +
  122 + public String getReamke2() {
  123 + return reamke2;
  124 + }
  125 +
  126 + public void setReamke2(String reamke2) {
  127 + this.reamke2 = reamke2 == null ? null : reamke2.trim();
  128 + }
  129 +
  130 + public String getReamke3() {
  131 + return reamke3;
  132 + }
  133 +
  134 + public void setReamke3(String reamke3) {
  135 + this.reamke3 = reamke3 == null ? null : reamke3.trim();
  136 + }
  137 +
  138 + public String getReamke4() {
  139 + return reamke4;
  140 + }
  141 +
  142 + public void setReamke4(String reamke4) {
  143 + this.reamke4 = reamke4 == null ? null : reamke4.trim();
  144 + }
  145 +}
  1 +package com.sunyo.energy.location.service;
  2 +
  3 +import com.github.pagehelper.PageInfo;
  4 +import com.sunyo.energy.location.model.PayRecords;
  5 +
  6 +/**
  7 + * Created by XYH on 2019/12/16.
  8 + */
  9 +public interface PayOrderService {
  10 + PageInfo<PayRecords> getOrder(int pageSize, int pageNum, String orderNumber, String payTime);
  11 +
  12 + int addOrder(PayRecords payRecords);
  13 +
  14 + int ediOrder(PayRecords payRecords);
  15 +
  16 + int delOrder(PayRecords payRecords);
  17 +}
  1 +package com.sunyo.energy.location.service;
  2 +
  3 +import com.sunyo.energy.location.model.WaterElectricityParameter;
  4 +
  5 +import java.util.List;
  6 +
  7 +public interface WaterElectricityParameterService {
  8 +
  9 + int insertSelective(WaterElectricityParameter record);
  10 +
  11 + int updateByPrimaryKeySelective(WaterElectricityParameter record);
  12 +
  13 + int countOne(String eeId);
  14 +
  15 + WaterElectricityParameter findOneElectricity(String eeId);
  16 +
  17 + List userPayList(String roomNumber);
  18 +
  19 +}
  1 +package com.sunyo.energy.location.service;
  2 +
  3 +
  4 +import com.sunyo.energy.location.model.WaterMeter;
  5 +
  6 +public interface WaterMeterService {
  7 +
  8 + int realTime();
  9 +
  10 + WaterMeter findRealTime(String wmId);
  11 +
  12 +
  13 +}
  1 +package com.sunyo.energy.location.service.imp;
  2 +
  3 +import com.github.pagehelper.Page;
  4 +import com.github.pagehelper.PageHelper;
  5 +import com.github.pagehelper.PageInfo;
  6 +import com.sunyo.energy.location.dao.PayRecordsMapper;
  7 +import com.sunyo.energy.location.model.PayRecords;
  8 +import com.sunyo.energy.location.service.PayOrderService;
  9 +import org.springframework.beans.factory.annotation.Autowired;
  10 +import org.springframework.stereotype.Service;
  11 +import org.springframework.util.StringUtils;
  12 +
  13 +import java.util.List;
  14 +
  15 +/**
  16 + * Created by XYH on 2019/12/16.
  17 + */
  18 +@Service
  19 +public class PayOrderImpl implements PayOrderService {
  20 + @Autowired
  21 + PayRecordsMapper recordsMapper;
  22 +
  23 +
  24 + @Override
  25 + public PageInfo<PayRecords> getOrder(int pageSize, int pageNum, String orderNumber, String payTime) {
  26 +
  27 + // 开始时间
  28 + String startTime = "";
  29 + // 结束时间
  30 + String endTime = "";
  31 +
  32 + Page<PayRecords> page = PageHelper.startPage(pageNum,pageSize);
  33 +
  34 + if (StringUtils.isEmpty(orderNumber)){
  35 +
  36 + }else if (!orderNumber.contains("-")){
  37 + StringBuffer stringBuffer = new StringBuffer(orderNumber);
  38 + orderNumber = stringBuffer.insert(3, "-").toString();
  39 + }
  40 +
  41 + if (!StringUtils.isEmpty(payTime) && !payTime.contains("undefined")){
  42 + String[] split = payTime.split(",");
  43 + startTime = split[0].toString();
  44 + endTime = split[1].toString();
  45 + }
  46 +
  47 + List<PayRecords> list = recordsMapper.findAll(orderNumber, startTime, endTime);
  48 +
  49 + PageInfo<PayRecords> result = new PageInfo<>(list);
  50 + return result;
  51 + }
  52 +
  53 + @Override
  54 + public int addOrder(PayRecords payRecords) {
  55 + return recordsMapper.insert(payRecords);
  56 + }
  57 +
  58 + @Override
  59 + public int ediOrder(PayRecords payRecords) {
  60 + return recordsMapper.updateByPrimaryKey(payRecords);
  61 + }
  62 +
  63 + @Override
  64 + public int delOrder(PayRecords payRecords) {
  65 + return recordsMapper.deleteByPrimaryKey(payRecords.getId());
  66 + }
  67 +}
  1 +package com.sunyo.energy.location.service.imp;
  2 +
  3 +import com.sunyo.energy.location.controller.response.ResultJson;
  4 +import com.sunyo.energy.location.dao.WaterElectricityParameterMapper;
  5 +import com.sunyo.energy.location.model.WaterElectricityParameter;
  6 +import com.sunyo.energy.location.service.WaterElectricityParameterService;
  7 +import org.springframework.beans.factory.annotation.Autowired;
  8 +import org.springframework.stereotype.Service;
  9 +import org.springframework.util.StringUtils;
  10 +
  11 +import java.util.Date;
  12 +import java.util.List;
  13 +
  14 +@Service
  15 +public class WaterElectricityParameterServiceImp implements WaterElectricityParameterService {
  16 +
  17 + @Autowired
  18 + private WaterElectricityParameterMapper waterElectricityParameterMapper;
  19 +
  20 + @Override
  21 + public int insertSelective(WaterElectricityParameter record) {
  22 +
  23 +
  24 + record.setCreattime(new Date());
  25 + return waterElectricityParameterMapper.insertSelective(record);
  26 + }
  27 +
  28 + @Override
  29 + public int updateByPrimaryKeySelective(WaterElectricityParameter record) {
  30 +
  31 + return waterElectricityParameterMapper.updateByPrimaryKeySelective(record);
  32 + }
  33 +
  34 + @Override
  35 + public int countOne(String eeId) {
  36 + return waterElectricityParameterMapper.countOne(eeId);
  37 + }
  38 +
  39 + @Override
  40 + public WaterElectricityParameter findOneElectricity(String eeId) {
  41 + try {
  42 + return waterElectricityParameterMapper.findOneElectricity(eeId);
  43 + }catch (Exception e){
  44 + return null;
  45 + }
  46 + }
  47 +
  48 + @Override
  49 + public List userPayList(String roomNumber) {
  50 +
  51 + return waterElectricityParameterMapper.userPayList(roomNumber);
  52 + }
  53 +}
  1 +package com.sunyo.energy.location.service.imp;
  2 +
  3 +import com.alibaba.fastjson.JSON;
  4 +import com.alibaba.fastjson.JSONArray;
  5 +import com.sunyo.energy.location.dao.WaterMeterMapper;
  6 +import com.sunyo.energy.location.model.WaterMeter;
  7 +import com.sunyo.energy.location.service.WaterMeterService;
  8 +import com.sunyo.energy.location.utils.HttpsUtils;
  9 +import org.springframework.beans.factory.annotation.Autowired;
  10 +import org.springframework.scheduling.annotation.Scheduled;
  11 +import org.springframework.stereotype.Service;
  12 +import java.util.Date;
  13 +import java.util.HashMap;
  14 +import java.util.Map;
  15 +
  16 +
  17 +@Service
  18 +public class WaterMeterServiceImp implements WaterMeterService {
  19 +
  20 + @Autowired
  21 + private WaterMeterMapper waterMeterMapper;
  22 +
  23 +
  24 + @Override
  25 + @Scheduled(cron = "0 0 10 * * ?" )
  26 + public int realTime() {
  27 +
  28 + try {
  29 + // 调用远程接口
  30 + String url = "http://123.56.159.203:8023/nowwmrd/getSelectNowwmrdbyProjectID";
  31 + Map<String, Object> datas = new HashMap<>();
  32 + datas.put("ProjectID", "33-99-00-00-00-00-01");
  33 + String s = HttpsUtils.httpRequest(url, datas);
  34 + JSONArray jsonArray = JSON.parseArray(s);
  35 + for (Object jsonObject:jsonArray){
  36 + WaterMeter waterMeter= new WaterMeter();
  37 + Map<String,Object> map = (Map)jsonObject;
  38 + if (!map.containsKey("state")){
  39 + waterMeter.setWmId(map.get("wm_id").toString());
  40 + waterMeter.setWmErrmessage(map.get("wm_errmessage").toString());
  41 + waterMeter.setWmFmstate(map.get("wm_fmstate").toString());
  42 + waterMeter.setWmSacc(map.get("wm_sacc").toString());
  43 + waterMeter.setWmLacc(map.get("wm_lacc").toString());
  44 + waterMeter.setWmRdtime(map.get("wm_rdtime").toString());
  45 + waterMeter.setWmSignalpower(map.get("wm_signalpower").toString());
  46 + waterMeter.setWmVoltage(map.get("wm_voltage").toString());
  47 + waterMeter.setCreattime(new Date());
  48 + waterMeterMapper.insertSelective(waterMeter);
  49 + }else {
  50 + if ("0".equals(map.get("state").toString())){
  51 + return 1;
  52 + }
  53 + return 0;
  54 + }
  55 + }
  56 + return 1;
  57 + }catch (Exception e){
  58 + e.printStackTrace();
  59 + return 0;
  60 + }
  61 + }
  62 +
  63 + @Override
  64 + public WaterMeter findRealTime(String wmId) {
  65 + try {
  66 + // 调用远程接口http://123.56.159.203:8023/nowwmrd/getSelectNowwmrdbyMtId?MtId=68-74-40-34-05-29-55
  67 + String url = "http://123.56.159.203:8023/nowwmrd/getSelectNowwmrdbyMtId";
  68 + Map<String, Object> datas = new HashMap<>();
  69 + datas.put("MtId", wmId);
  70 +
  71 + String s = HttpsUtils.httpRequest(url, datas);
  72 + JSONArray jsonArray = JSON.parseArray(s);
  73 + WaterMeter waterMeter= new WaterMeter();
  74 + for (Object jsonObject:jsonArray){
  75 +
  76 + Map<String,Object> map = (Map)jsonObject;
  77 + if (!map.containsKey("state")){
  78 + waterMeter.setWmId(map.get("wm_id").toString());
  79 + waterMeter.setWmErrmessage(map.get("wm_errmessage").toString());
  80 + waterMeter.setWmFmstate(map.get("wm_fmstate").toString());
  81 + waterMeter.setWmSacc(map.get("wm_sacc").toString());
  82 + waterMeter.setWmLacc(map.get("wm_lacc").toString());
  83 + waterMeter.setWmRdtime(map.get("wm_rdtime").toString());
  84 + waterMeter.setWmSignalpower(map.get("wm_signalpower").toString());
  85 + waterMeter.setWmVoltage(map.get("wm_voltage").toString());
  86 + }
  87 + }
  88 + return waterMeter;
  89 + }catch (Exception e){
  90 + e.printStackTrace();
  91 + return new WaterMeter();
  92 + }
  93 + }
  94 +}
  1 +package com.sunyo.energy.location.utils;
  2 +
  3 +import java.io.*;
  4 +import java.net.HttpURLConnection;
  5 +import java.net.URL;
  6 +import java.net.URLConnection;
  7 +import java.net.URLEncoder;
  8 +import java.util.Map;
  9 +
  10 +public class HttpsUtils {
  11 +
  12 + /**
  13 + * java调用运程api公共方法
  14 + *
  15 + * @param requestUrl
  16 + * @param params
  17 + * @return
  18 + */
  19 + @SuppressWarnings({"unchecked", "rawtypes"})
  20 + public static String httpRequest(String requestUrl, Map params) throws Exception {
  21 + // buffer用于接受返回的字符
  22 + StringBuffer buffer = new StringBuffer();
  23 +
  24 + // 建立URL,把请求地址给补全,其中urlencode()方法用于把params里的参数给取出来
  25 + URL url = new URL(requestUrl + "?" + urlencode(params));
  26 + // 打开http连接
  27 + HttpURLConnection httpUrlConn = (HttpURLConnection) url
  28 + .openConnection();
  29 + httpUrlConn.setDoInput(true);
  30 + httpUrlConn.setRequestMethod("GET");
  31 + httpUrlConn.connect();
  32 +
  33 + // 获得输入
  34 + InputStream inputStream = httpUrlConn.getInputStream();
  35 + InputStreamReader inputStreamReader = new InputStreamReader(
  36 + inputStream, "utf-8");
  37 + BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
  38 +
  39 + // 将bufferReader的值给放到buffer里
  40 + String str = null;
  41 + while ((str = bufferedReader.readLine()) != null) {
  42 + buffer.append(str);
  43 + }
  44 + // 关闭bufferReader和输入流
  45 + bufferedReader.close();
  46 + inputStreamReader.close();
  47 + inputStream.close();
  48 + inputStream = null;
  49 + // 断开连接
  50 + httpUrlConn.disconnect();
  51 +
  52 + // 返回字符串
  53 + return buffer.toString();
  54 + }
  55 +
  56 + /**
  57 + * 请求参数拼接(组装)
  58 + *
  59 + * @param data
  60 + * @return
  61 + */
  62 + @SuppressWarnings("rawtypes")
  63 + public static String urlencode(Map<String, Object> data) {
  64 + // 将map里的参数变成像 showapi_appid=###&showapi_sign=###&的样子
  65 + StringBuilder sb = new StringBuilder();
  66 + for (Map.Entry i : data.entrySet()) {
  67 + try {
  68 + sb.append(i.getKey()).append("=")
  69 + .append(URLEncoder.encode(i.getValue() + "", "UTF-8"))
  70 + .append("&");
  71 + } catch (UnsupportedEncodingException e) {
  72 + e.printStackTrace();
  73 + }
  74 + }
  75 + return sb.toString();
  76 + }
  77 +
  78 + /**
  79 + * 向指定 URL 发送POST方法的请求
  80 + *
  81 + * @param url 发送请求的 URL
  82 + * @param param 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。
  83 + * @return 所代表远程资源的响应结果
  84 + */
  85 + public static String sendPostHttpRequest(String url, String param) {
  86 + PrintWriter out = null;
  87 + BufferedReader in = null;
  88 + String result = "";
  89 + try {
  90 + URL realUrl = new URL(url);
  91 + // 打开和URL之间的连接
  92 + URLConnection conn = realUrl.openConnection();
  93 + // 设置通用的请求属性
  94 + conn.setRequestProperty("accept", "*/*");
  95 + conn.setRequestProperty("connection", "Keep-Alive");
  96 + conn.setRequestProperty("user-agent",
  97 + "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
  98 + // 发送POST请求必须设置如下两行
  99 + conn.setDoOutput(true);
  100 + conn.setDoInput(true);
  101 + // 1.获取URLConnection对象对应的输出流
  102 + out = new PrintWriter(conn.getOutputStream());
  103 + // 2.中文有乱码的需要将PrintWriter改为如下
  104 + // out=new OutputStreamWriter(conn.getOutputStream(),"UTF-8")
  105 + // 发送请求参数
  106 + out.print(param);
  107 + // flush输出流的缓冲
  108 + out.flush();
  109 + // 定义BufferedReader输入流来读取URL的响应
  110 + in = new BufferedReader(
  111 + new InputStreamReader(conn.getInputStream()));
  112 + String line;
  113 + while ((line = in.readLine()) != null) {
  114 + result += line;
  115 + }
  116 + } catch (Exception e) {
  117 + System.out.println("发送 POST 请求出现异常!" + e);
  118 + e.printStackTrace();
  119 + }
  120 + // 使用finally块来关闭输出流、输入流
  121 + finally {
  122 + try {
  123 + if (out != null) {
  124 + out.close();
  125 + }
  126 + if (in != null) {
  127 + in.close();
  128 + }
  129 + } catch (IOException ex) {
  130 + ex.printStackTrace();
  131 + }
  132 + }
  133 + return result;
  134 + }
  135 +
  136 + // 测试是否有效
  137 +// public static void main(String[] args) {
  138 +// // 接口地址
  139 +// String requestUrl = "http://localhost:8080/manifest/f5f5669bbdecefd3dacfaba194647c35";
  140 +// try {
  141 +//
  142 +// Map<String, Object> datas = new HashMap<>();
  143 +// datas.put("de_size", "dcdf38d9a5d6411985e49155481882f5");
  144 +// datas.put("waybillnomaster", "66611111111");
  145 +// datas.put("de_type", "001");
  146 +// datas.put("delivery_station", "001");
  147 +// datas.put("flightno", "CA9999");
  148 +// datas.put("flightdate", "2019-9-21 00:00:00");
  149 +// datas.put("originatingstation", "CGO");
  150 +// datas.put("destinationstation", "CGO");
  151 +// datas.put("totalpiece", "19");
  152 +// datas.put("totalweight", "19");
  153 +// datas.put("paymode", "PP");
  154 +// datas.put("customsstatus", "001");
  155 +// datas.put("customscode", "4604");
  156 +// datas.put("productname", "SHOUJI");
  157 +// datas.put("co_company", "测试");
  158 +// datas.put("co_address", "测试");
  159 +// datas.put("co_telephone", "00000000");
  160 +// datas.put("co_country", "CN");
  161 +// datas.put("sh_company", "测试");
  162 +// datas.put("sh_address", "测试");
  163 +// datas.put("sh_country", "CN");
  164 +// datas.put("sh_telephone", "0000000");
  165 +// datas.put("sh_city", "测试");
  166 +// datas.put("USER_ID", "1");
  167 +// datas.put("reach_station", "CGO");
  168 +// datas.put("de_volume", "000100003_MMM");
  169 +// datas.put("de_trstation", "APL,111");
  170 +//
  171 +// String param ="waybillnomaster=666-11111111&de_volume=66611111111_MMM&de_type=001&delivery_station=001&flightno=CV9765&flightdate=2019-12-20&originatingstation=CGO&destinationstation=ORD&totalpiece=1&totalweight=136.00&paymode=PP&customsstatus=001&customscode=4604&productname=CONSOL&co_company=DSV+AIR+%26+SEA+CO.%2c+LTD&co_address=8%269F%2c+RAFFLES+CITY+CHANGNING+OFFI.+TOWER+3%2c+NO.+1193+CHANGNING+RDSHANG&co_zipcode=200051&shpcusid=&shpaeo=&co_telephone=%2b86+21+33259800&co_country=CN&sh_company=ORD-DSV+AIR++SEA+INC&sh_address=1300+N+ARLINGTON+HEIGHTS+ROAD+SUITE+US&sh_zipcode=60143&cnecusid=&cneaeo=&sh_country=US&sh_telephone=8479568855&sh_fax=&sh_city=CHICAGO&USER_ID=1640&reach_station=ORD&de_trstation=BDX%2c111&de_packing=BDX%2c222&de_remarks=BDX%2c333&de_size=dcdf38d9a5d6411985e49155481882f5";
  172 +// String ss = HttpsUtils.sendPostHttpRequest(requestUrl, param);
  173 +// JSONArray jsonArray = JSON.parseArray(ss);
  174 +// } catch (Exception e) {
  175 +// e.printStackTrace();
  176 +// }
  177 +// }
  178 +}
1 #上传文件的路径,要带斜杠 1 #上传文件的路径,要带斜杠
2 web: 2 web:
3 upload-path: upload/ 3 upload-path: upload/
  4 +docker:
  5 + server:
  6 + ip: 192.168.1.63
4 server: 7 server:
5 port: 10003 8 port: 10003
6 servlet: 9 servlet:
@@ -67,7 +70,7 @@ spring: @@ -67,7 +70,7 @@ spring:
67 # password: vmvnv1v2 70 # password: vmvnv1v2
68 #spring datasource mysql,注意编码配置,缺少数据库编码配置容易引起中文入库乱码 71 #spring datasource mysql,注意编码配置,缺少数据库编码配置容易引起中文入库乱码
69 #url: jdbc:mysql://127.0.0.1:3307/statistics?useUnicode=true&characterEncoding=utf8&nullCatalogMeansCurrent=true 72 #url: jdbc:mysql://127.0.0.1:3307/statistics?useUnicode=true&characterEncoding=utf8&nullCatalogMeansCurrent=true
70 - url: jdbc:mysql://118.31.66.166:3306/EMPT?useUnicode=true&characterEncoding=utf8&nullCatalogMeansCurrent=true 73 + url: jdbc:mysql://118.31.66.166:3306/EMPT?useUnicode=true&characterEncoding=utf8&nullCatalogMeansCurrent=true&serverTimezone=Asia/Shanghai
71 username: 110 74 username: 110
72 password: QAHqCJf2kFYCLirM 75 password: QAHqCJf2kFYCLirM
73 driver-class-name: com.mysql.cj.jdbc.Driver 76 driver-class-name: com.mysql.cj.jdbc.Driver
@@ -103,14 +106,15 @@ eureka: @@ -103,14 +106,15 @@ eureka:
103 prefer-ip-address: true 106 prefer-ip-address: true
104 instance-id: ${spring.cloud.client.ip-address}:${server.port} 107 instance-id: ${spring.cloud.client.ip-address}:${server.port}
105 hostname: ${spring.cloud.client.ip-address} 108 hostname: ${spring.cloud.client.ip-address}
  109 + lease-renewal-interval-in-seconds: 15
  110 + lease-expiration-duration-in-seconds: 45
106 client: 111 client:
107 #eureka注册中心服务器地址 112 #eureka注册中心服务器地址
108 service-url: 113 service-url:
109 # defaultZone: http://127.0.0.1:12345/eureka/ 114 # defaultZone: http://127.0.0.1:12345/eureka/
110 defaultZone: http://192.168.1.53:12345/eureka/ 115 defaultZone: http://192.168.1.53:12345/eureka/
111 registry-fetch-interval-seconds: 30 116 registry-fetch-interval-seconds: 30
112 - lease-renewal-interval-in-seconds: 15  
113 - lease-expiration-duration-in-seconds: 45 117 +
114 118
115 119
116 120
@@ -133,7 +137,7 @@ logging: @@ -133,7 +137,7 @@ logging:
133 file: 137 file:
134 path: ./logs/ 138 path: ./logs/
135 name: system.log 139 name: system.log
136 - config: config/logback-dev.xml 140 + config: classpath:logback-dev.xml
137 #转移到logback配置文件中 141 #转移到logback配置文件中
138 #level: 142 #level:
139 #org.apache.tomcat: info 143 #org.apache.tomcat: info
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd"> 4 "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
5 <generatorConfiguration> 5 <generatorConfiguration>
6 <!-- 数据库驱动:选择你的本地硬盘上面的数据库驱动包--> 6 <!-- 数据库驱动:选择你的本地硬盘上面的数据库驱动包-->
7 - <classPathEntry location="/Users/mrz/Downloads/mybatis-generator-core-1.3.2/lib/mysql-connector-java-5.1.25-bin.jar"/> 7 + <classPathEntry location="/Users/shenhailong/.m2/repository/mysql/mysql-connector-java/5.1.30/mysql-connector-java-5.1.30.jar"/>
8 <!--<classPathEntry location="/Users/mrz/Documents/maven/ojdbc6.jar"/>--> 8 <!--<classPathEntry location="/Users/mrz/Documents/maven/ojdbc6.jar"/>-->
9 <context id="DB2Tables" targetRuntime="MyBatis3"> 9 <context id="DB2Tables" targetRuntime="MyBatis3">
10 <commentGenerator> 10 <commentGenerator>
@@ -45,6 +45,6 @@ @@ -45,6 +45,6 @@
45 <property name="enableSubPackages" value="true"/> 45 <property name="enableSubPackages" value="true"/>
46 </javaClientGenerator> 46 </javaClientGenerator>
47 <!-- 要生成的表 tableName是数据库中的表名或视图名 domainObjectName是实体类名--> 47 <!-- 要生成的表 tableName是数据库中的表名或视图名 domainObjectName是实体类名-->
48 - <table tableName="location" domainObjectName="Location" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table> 48 + <table tableName="pay_records" domainObjectName="PayRecords" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="true"></table>
49 </context> 49 </context>
50 </generatorConfiguration> 50 </generatorConfiguration>
@@ -3,13 +3,15 @@ @@ -3,13 +3,15 @@
3 <mapper namespace="com.sunyo.energy.location.dao.LocationMapper" > 3 <mapper namespace="com.sunyo.energy.location.dao.LocationMapper" >
4 <resultMap id="BaseResultMap" type="com.sunyo.energy.location.model.Location" > 4 <resultMap id="BaseResultMap" type="com.sunyo.energy.location.model.Location" >
5 <id column="id" property="id" jdbcType="INTEGER" /> 5 <id column="id" property="id" jdbcType="INTEGER" />
  6 + <id column="wm_id" property="wmid" jdbcType="VARCHAR" />
  7 + <id column="ee_id" property="eeid" jdbcType="VARCHAR" />
6 <result column="adrName" property="adrname" jdbcType="VARCHAR" /> 8 <result column="adrName" property="adrname" jdbcType="VARCHAR" />
7 <result column="parent" property="parent" jdbcType="INTEGER" /> 9 <result column="parent" property="parent" jdbcType="INTEGER" />
8 <result column="type" property="type" jdbcType="INTEGER" /> 10 <result column="type" property="type" jdbcType="INTEGER" />
9 <collection property="children" select="selectAll" column="id"></collection> 11 <collection property="children" select="selectAll" column="id"></collection>
10 </resultMap> 12 </resultMap>
11 <sql id="Base_Column_List" > 13 <sql id="Base_Column_List" >
12 - id, adrName, parent, type 14 + id, adrName, parent, type, wm_id, ee_id
13 </sql> 15 </sql>
14 <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" > 16 <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
15 select 17 select
  1 +<?xml version="1.0" encoding="UTF-8" ?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3 +<mapper namespace="com.sunyo.energy.location.dao.PayRecordsMapper" >
  4 + <resultMap id="BaseResultMap" type="com.sunyo.energy.location.model.PayRecords" >
  5 + <id column="id" property="id" jdbcType="INTEGER" />
  6 + <result column="payFees" property="payfees" jdbcType="DECIMAL" />
  7 + <result column="payUserId" property="payuserid" jdbcType="INTEGER" />
  8 + <result column="payTime" property="paytime" jdbcType="TIMESTAMP" />
  9 + <result column="payLocationId" property="paylocationid" jdbcType="INTEGER" />
  10 + <result column="payStatus" property="paystatus" jdbcType="BIT" />
  11 + <result column="payType" property="paytype" jdbcType="BIT" />
  12 + <result column="payFessType" property="payfesstype" jdbcType="BIT" />
  13 + <result column="orderNumber" property="ordernumber" jdbcType="VARCHAR" />
  14 + <result column="reamke1" property="reamke1" jdbcType="VARCHAR" />
  15 + <result column="reamke2" property="reamke2" jdbcType="VARCHAR" />
  16 + <result column="reamke3" property="reamke3" jdbcType="VARCHAR" />
  17 + <result column="reamke4" property="reamke4" jdbcType="VARCHAR" />
  18 + <result column="payUserName" property="payusername" jdbcType="VARCHAR" />
  19 + <result column="payLocationName" property="paylocationname" jdbcType="VARCHAR" />
  20 + <result column="payTypeAddress" property="paytypeaddress" jdbcType="VARCHAR" />
  21 + </resultMap>
  22 + <sql id="Base_Column_List" >
  23 + id, payFees, payUserId, payTime, payLocationId, payStatus, payType, payFessType,
  24 + orderNumber, reamke1, reamke2, reamke3, reamke4, payUserName, payLocationName, payTypeAddress
  25 + </sql>
  26 + <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  27 + select
  28 + <include refid="Base_Column_List" />
  29 + from pay_records
  30 + where id = #{id,jdbcType=INTEGER}
  31 + </select>
  32 +
  33 + <select id="findAll" resultMap="BaseResultMap">
  34 + select
  35 + <include refid="Base_Column_List" />
  36 + from pay_records
  37 + where reamke1 = '0'
  38 + <if test="orderNumber != '' and orderNumber != null">
  39 + and orderNumber = #{orderNumber,jdbcType=VARCHAR}
  40 + </if>
  41 + <if test="startTime != '' and startTime != null">
  42 + and payTime &gt; #{startTime,jdbcType=VARCHAR}
  43 + </if>
  44 + <if test="endTime != '' and endTime != null">
  45 + and payTime &lt; #{endTime,jdbcType=VARCHAR}
  46 + </if>
  47 + order by payTime desc
  48 + </select>
  49 +
  50 + <update id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  51 + UPDATE pay_records
  52 + SET reamke1 = '1'
  53 + where id = #{id,jdbcType=INTEGER}
  54 + </update>
  55 +
  56 + <insert id="insert" parameterType="com.sunyo.energy.location.model.PayRecords" >
  57 + insert into pay_records (id, payFees, payUserId,
  58 + payTime, payLocationId, payStatus,
  59 + payType, payFessType, orderNumber,
  60 + reamke1, reamke2, reamke3,
  61 + reamke4, payUserName, payLocationName,
  62 + payTypeAddress)
  63 + values (#{id,jdbcType=INTEGER}, #{payfees,jdbcType=DECIMAL}, #{payuserid,jdbcType=INTEGER},
  64 + #{paytime,jdbcType=TIMESTAMP}, #{paylocationid,jdbcType=INTEGER}, #{paystatus,jdbcType=BIT},
  65 + #{paytype,jdbcType=BIT}, #{payfesstype,jdbcType=BIT}, #{ordernumber,jdbcType=VARCHAR},
  66 + #{reamke1,jdbcType=VARCHAR}, #{reamke2,jdbcType=VARCHAR}, #{reamke3,jdbcType=VARCHAR},
  67 + #{reamke4,jdbcType=VARCHAR}, #{payusername,jdbcType=VARCHAR}, #{paylocationname,jdbcType=VARCHAR},
  68 + #{paytypeaddress,jdbcType=VARCHAR})
  69 + </insert>
  70 + <insert id="insertSelective" parameterType="com.sunyo.energy.location.model.PayRecords" >
  71 + insert into pay_records
  72 + <trim prefix="(" suffix=")" suffixOverrides="," >
  73 + <if test="id != null" >
  74 + id,
  75 + </if>
  76 + <if test="payfees != null" >
  77 + payFees,
  78 + </if>
  79 + <if test="payuserid != null" >
  80 + payUserId,
  81 + </if>
  82 + <if test="paytime != null" >
  83 + payTime,
  84 + </if>
  85 + <if test="paylocationid != null" >
  86 + payLocationId,
  87 + </if>
  88 + <if test="paystatus != null" >
  89 + payStatus,
  90 + </if>
  91 + <if test="paytype != null" >
  92 + payType,
  93 + </if>
  94 + <if test="payfesstype != null" >
  95 + payFessType,
  96 + </if>
  97 + <if test="ordernumber != null" >
  98 + orderNumber,
  99 + </if>
  100 + <if test="reamke1 != null" >
  101 + reamke1,
  102 + </if>
  103 + <if test="reamke2 != null" >
  104 + reamke2,
  105 + </if>
  106 + <if test="reamke3 != null" >
  107 + reamke3,
  108 + </if>
  109 + <if test="reamke4 != null" >
  110 + reamke4,
  111 + </if>
  112 + <if test="payusername != null" >
  113 + payUserName,
  114 + </if>
  115 + <if test="paylocationname != null" >
  116 + payLocationName,
  117 + </if>
  118 + <if test="paytypeaddress != null" >
  119 + payTypeAddress,
  120 + </if>
  121 + </trim>
  122 + <trim prefix="values (" suffix=")" suffixOverrides="," >
  123 + <if test="id != null" >
  124 + #{id,jdbcType=INTEGER},
  125 + </if>
  126 + <if test="payfees != null" >
  127 + #{payfees,jdbcType=DECIMAL},
  128 + </if>
  129 + <if test="payuserid != null" >
  130 + #{payuserid,jdbcType=INTEGER},
  131 + </if>
  132 + <if test="paytime != null" >
  133 + #{paytime,jdbcType=TIMESTAMP},
  134 + </if>
  135 + <if test="paylocationid != null" >
  136 + #{paylocationid,jdbcType=INTEGER},
  137 + </if>
  138 + <if test="paystatus != null" >
  139 + #{paystatus,jdbcType=BIT},
  140 + </if>
  141 + <if test="paytype != null" >
  142 + #{paytype,jdbcType=BIT},
  143 + </if>
  144 + <if test="payfesstype != null" >
  145 + #{payfesstype,jdbcType=BIT},
  146 + </if>
  147 + <if test="ordernumber != null" >
  148 + #{ordernumber,jdbcType=VARCHAR},
  149 + </if>
  150 + <if test="reamke1 != null" >
  151 + #{reamke1,jdbcType=VARCHAR},
  152 + </if>
  153 + <if test="reamke2 != null" >
  154 + #{reamke2,jdbcType=VARCHAR},
  155 + </if>
  156 + <if test="reamke3 != null" >
  157 + #{reamke3,jdbcType=VARCHAR},
  158 + </if>
  159 + <if test="reamke4 != null" >
  160 + #{reamke4,jdbcType=VARCHAR},
  161 + </if>
  162 + <if test="payusername != null" >
  163 + #{payusername,jdbcType=VARCHAR},
  164 + </if>
  165 + <if test="paylocationname != null" >
  166 + #{paylocationname,jdbcType=VARCHAR},
  167 + </if>
  168 + <if test="paytypeaddress != null" >
  169 + #{paytypeaddress,jdbcType=VARCHAR},
  170 + </if>
  171 + </trim>
  172 + </insert>
  173 + <update id="updateByPrimaryKeySelective" parameterType="com.sunyo.energy.location.model.PayRecords" >
  174 + update pay_records
  175 + <set >
  176 + <if test="payfees != null" >
  177 + payFees = #{payfees,jdbcType=DECIMAL},
  178 + </if>
  179 + <if test="payuserid != null" >
  180 + payUserId = #{payuserid,jdbcType=INTEGER},
  181 + </if>
  182 + <if test="paytime != null" >
  183 + payTime = #{paytime,jdbcType=TIMESTAMP},
  184 + </if>
  185 + <if test="paylocationid != null" >
  186 + payLocationId = #{paylocationid,jdbcType=INTEGER},
  187 + </if>
  188 + <if test="paystatus != null" >
  189 + payStatus = #{paystatus,jdbcType=BIT},
  190 + </if>
  191 + <if test="paytype != null" >
  192 + payType = #{paytype,jdbcType=BIT},
  193 + </if>
  194 + <if test="payfesstype != null" >
  195 + payFessType = #{payfesstype,jdbcType=BIT},
  196 + </if>
  197 + <if test="ordernumber != null" >
  198 + orderNumber = #{ordernumber,jdbcType=VARCHAR},
  199 + </if>
  200 + <if test="reamke1 != null" >
  201 + reamke1 = #{reamke1,jdbcType=VARCHAR},
  202 + </if>
  203 + <if test="reamke2 != null" >
  204 + reamke2 = #{reamke2,jdbcType=VARCHAR},
  205 + </if>
  206 + <if test="reamke3 != null" >
  207 + reamke3 = #{reamke3,jdbcType=VARCHAR},
  208 + </if>
  209 + <if test="reamke4 != null" >
  210 + reamke4 = #{reamke4,jdbcType=VARCHAR},
  211 + </if>
  212 + <if test="payusername != null" >
  213 + payUserName = #{payusername,jdbcType=VARCHAR},
  214 + </if>
  215 + <if test="paylocationname != null" >
  216 + payLocationName = #{paylocationname,jdbcType=VARCHAR},
  217 + </if>
  218 + <if test="paytypeaddress != null" >
  219 + payTypeAddress = #{paytypeaddress,jdbcType=VARCHAR},
  220 + </if>
  221 + </set>
  222 + where id = #{id,jdbcType=INTEGER}
  223 + </update>
  224 + <update id="updateByPrimaryKey" parameterType="com.sunyo.energy.location.model.PayRecords" >
  225 + update pay_records
  226 + set payFees = #{payfees,jdbcType=DECIMAL},
  227 + payUserId = #{payuserid,jdbcType=INTEGER},
  228 + payTime = #{paytime,jdbcType=TIMESTAMP},
  229 + payLocationId = #{paylocationid,jdbcType=INTEGER},
  230 + payStatus = #{paystatus,jdbcType=BIT},
  231 + payType = #{paytype,jdbcType=BIT},
  232 + payFessType = #{payfesstype,jdbcType=BIT},
  233 + orderNumber = #{ordernumber,jdbcType=VARCHAR},
  234 + reamke1 = #{reamke1,jdbcType=VARCHAR},
  235 + reamke2 = #{reamke2,jdbcType=VARCHAR},
  236 + reamke3 = #{reamke3,jdbcType=VARCHAR},
  237 + reamke4 = #{reamke4,jdbcType=VARCHAR},
  238 + payUserName = #{payusername,jdbcType=VARCHAR},
  239 + payLocationName = #{paylocationname,jdbcType=VARCHAR},
  240 + payTypeAddress = #{paytypeaddress,jdbcType=VARCHAR}
  241 + where id = #{id,jdbcType=INTEGER}
  242 + </update>
  243 +</mapper>
  1 +<?xml version="1.0" encoding="UTF-8" ?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3 +<mapper namespace="com.sunyo.energy.location.dao.WaterElectricityParameterMapper" >
  4 + <resultMap id="BaseResultMap" type="com.sunyo.energy.location.model.WaterElectricityParameter" >
  5 + <id column="id" property="id" jdbcType="INTEGER" />
  6 + <result column="prepaid" property="prepaid" jdbcType="BIT" />
  7 + <result column="warningTrip" property="warningtrip" jdbcType="BIT" />
  8 + <result column="warningThreshold" property="warningthreshold" jdbcType="DECIMAL" />
  9 + <result column="overdraft" property="overdraft" jdbcType="BIT" />
  10 + <result column="overdraftThreshold" property="overdraftthreshold" jdbcType="DECIMAL" />
  11 + <result column="waterLoad" property="waterload" jdbcType="BIT" />
  12 + <result column="water" property="water" jdbcType="DECIMAL" />
  13 + <result column="power" property="power" jdbcType="DECIMAL" />
  14 + <result column="powerFactor" property="powerfactor" jdbcType="VARCHAR" />
  15 + <result column="free" property="free" jdbcType="BIT" />
  16 + <result column="freeElectricityLimit" property="freeelectricitylimit" jdbcType="DECIMAL" />
  17 + <result column="freeWater" property="freewater" jdbcType="VARCHAR" />
  18 + <result column="wm_id" property="wmId" jdbcType="VARCHAR" />
  19 + <result column="creatTime" property="creattime" jdbcType="TIMESTAMP" />
  20 + <result column="ee_id" property="eeId" jdbcType="VARCHAR" />
  21 + <result column="reamke2" property="reamke2" jdbcType="VARCHAR" />
  22 + <result column="reamke3" property="reamke3" jdbcType="VARCHAR" />
  23 + </resultMap>
  24 + <sql id="Base_Column_List" >
  25 + id, prepaid, warningTrip, warningThreshold, overdraft, overdraftThreshold, waterLoad,
  26 + water, power, powerFactor, free, freeElectricityLimit, freeWater, wm_id, creatTime,
  27 + ee_id, reamke2, reamke3
  28 + </sql>
  29 + <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  30 + select
  31 + <include refid="Base_Column_List" />
  32 + from water_electricity_parameter
  33 + where id = #{id,jdbcType=INTEGER}
  34 + </select>
  35 +
  36 + <select id="countOne" parameterType="java.lang.String" resultType="int">
  37 + select count(*) from water_electricity_parameter where ee_id=#{value, jdbcType=VARCHAR}
  38 + </select>
  39 + <select id="findOneElectricity" resultMap="BaseResultMap" parameterType="java.lang.String">
  40 + select
  41 + <include refid="Base_Column_List"/>
  42 + from water_electricity_parameter where ee_id = #{value,jdbcType=VARCHAR}
  43 + </select>
  44 +
  45 + <select id="userPayList" parameterType="java.lang.String" resultMap="BaseResultMap">
  46 + select
  47 + <include refid="Base_Column_List" />
  48 + from water_electricity_parameter
  49 + where reamke2 = #{value,jdbcType=INTEGER}
  50 + </select>
  51 +
  52 + <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  53 + delete from water_electricity_parameter
  54 + where id = #{id,jdbcType=INTEGER}
  55 + </delete>
  56 + <insert id="insert" parameterType="com.sunyo.energy.location.model.WaterElectricityParameter" >
  57 + insert into water_electricity_parameter (id, prepaid, warningTrip,
  58 + warningThreshold, overdraft, overdraftThreshold,
  59 + waterLoad, water, power,
  60 + powerFactor, free, freeElectricityLimit,
  61 + freeWater, wm_id, creatTime,
  62 + ee_id, reamke2, reamke3
  63 + )
  64 + values (#{id,jdbcType=INTEGER}, #{prepaid,jdbcType=BIT}, #{warningtrip,jdbcType=BIT},
  65 + #{warningthreshold,jdbcType=DECIMAL}, #{overdraft,jdbcType=BIT}, #{overdraftthreshold,jdbcType=DECIMAL},
  66 + #{waterload,jdbcType=BIT}, #{water,jdbcType=DECIMAL}, #{power,jdbcType=DECIMAL},
  67 + #{powerfactor,jdbcType=VARCHAR}, #{free,jdbcType=BIT}, #{freeelectricitylimit,jdbcType=DECIMAL},
  68 + #{freewater,jdbcType=VARCHAR}, #{wmId,jdbcType=VARCHAR}, #{creattime,jdbcType=TIMESTAMP},
  69 + #{eeId,jdbcType=VARCHAR}, #{reamke2,jdbcType=VARCHAR}, #{reamke3,jdbcType=VARCHAR}
  70 + )
  71 + </insert>
  72 + <insert id="insertSelective" parameterType="com.sunyo.energy.location.model.WaterElectricityParameter" >
  73 + insert into water_electricity_parameter
  74 + <trim prefix="(" suffix=")" suffixOverrides="," >
  75 + <if test="id != null" >
  76 + id,
  77 + </if>
  78 + <if test="prepaid != null" >
  79 + prepaid,
  80 + </if>
  81 + <if test="warningtrip != null" >
  82 + warningTrip,
  83 + </if>
  84 + <if test="warningthreshold != null" >
  85 + warningThreshold,
  86 + </if>
  87 + <if test="overdraft != null" >
  88 + overdraft,
  89 + </if>
  90 + <if test="overdraftthreshold != null" >
  91 + overdraftThreshold,
  92 + </if>
  93 + <if test="waterload != null" >
  94 + waterLoad,
  95 + </if>
  96 + <if test="water != null" >
  97 + water,
  98 + </if>
  99 + <if test="power != null" >
  100 + power,
  101 + </if>
  102 + <if test="powerfactor != null" >
  103 + powerFactor,
  104 + </if>
  105 + <if test="free != null" >
  106 + free,
  107 + </if>
  108 + <if test="freeelectricitylimit != null" >
  109 + freeElectricityLimit,
  110 + </if>
  111 + <if test="freewater != null" >
  112 + freeWater,
  113 + </if>
  114 + <if test="wmId != null" >
  115 + wm_id,
  116 + </if>
  117 + <if test="creattime != null" >
  118 + creatTime,
  119 + </if>
  120 + <if test="eeId != null" >
  121 + ee_id,
  122 + </if>
  123 + <if test="reamke2 != null" >
  124 + reamke2,
  125 + </if>
  126 + <if test="reamke3 != null" >
  127 + reamke3,
  128 + </if>
  129 + </trim>
  130 + <trim prefix="values (" suffix=")" suffixOverrides="," >
  131 + <if test="id != null" >
  132 + #{id,jdbcType=INTEGER},
  133 + </if>
  134 + <if test="prepaid != null" >
  135 + #{prepaid,jdbcType=BIT},
  136 + </if>
  137 + <if test="warningtrip != null" >
  138 + #{warningtrip,jdbcType=BIT},
  139 + </if>
  140 + <if test="warningthreshold != null" >
  141 + #{warningthreshold,jdbcType=DECIMAL},
  142 + </if>
  143 + <if test="overdraft != null" >
  144 + #{overdraft,jdbcType=BIT},
  145 + </if>
  146 + <if test="overdraftthreshold != null" >
  147 + #{overdraftthreshold,jdbcType=DECIMAL},
  148 + </if>
  149 + <if test="waterload != null" >
  150 + #{waterload,jdbcType=BIT},
  151 + </if>
  152 + <if test="water != null" >
  153 + #{water,jdbcType=DECIMAL},
  154 + </if>
  155 + <if test="power != null" >
  156 + #{power,jdbcType=DECIMAL},
  157 + </if>
  158 + <if test="powerfactor != null" >
  159 + #{powerfactor,jdbcType=VARCHAR},
  160 + </if>
  161 + <if test="free != null" >
  162 + #{free,jdbcType=BIT},
  163 + </if>
  164 + <if test="freeelectricitylimit != null" >
  165 + #{freeelectricitylimit,jdbcType=DECIMAL},
  166 + </if>
  167 + <if test="freewater != null" >
  168 + #{freewater,jdbcType=VARCHAR},
  169 + </if>
  170 + <if test="wmId != null" >
  171 + #{wmId,jdbcType=VARCHAR},
  172 + </if>
  173 + <if test="creattime != null" >
  174 + #{creattime,jdbcType=TIMESTAMP},
  175 + </if>
  176 + <if test="eeId != null" >
  177 + #{eeId,jdbcType=VARCHAR},
  178 + </if>
  179 + <if test="reamke2 != null" >
  180 + #{reamke2,jdbcType=VARCHAR},
  181 + </if>
  182 + <if test="reamke3 != null" >
  183 + #{reamke3,jdbcType=VARCHAR},
  184 + </if>
  185 + </trim>
  186 + </insert>
  187 + <update id="updateByPrimaryKeySelective" parameterType="com.sunyo.energy.location.model.WaterElectricityParameter" >
  188 + update water_electricity_parameter
  189 + <set >
  190 + <if test="prepaid != null" >
  191 + prepaid = #{prepaid,jdbcType=BIT},
  192 + </if>
  193 + <if test="warningtrip != null" >
  194 + warningTrip = #{warningtrip,jdbcType=BIT},
  195 + </if>
  196 + <if test="warningthreshold != null" >
  197 + warningThreshold = #{warningthreshold,jdbcType=DECIMAL},
  198 + </if>
  199 + <if test="overdraft != null" >
  200 + overdraft = #{overdraft,jdbcType=BIT},
  201 + </if>
  202 + <if test="overdraftthreshold != null" >
  203 + overdraftThreshold = #{overdraftthreshold,jdbcType=DECIMAL},
  204 + </if>
  205 + <if test="waterload != null" >
  206 + waterLoad = #{waterload,jdbcType=BIT},
  207 + </if>
  208 + <if test="water != null" >
  209 + water = #{water,jdbcType=DECIMAL},
  210 + </if>
  211 + <if test="power != null" >
  212 + power = #{power,jdbcType=DECIMAL},
  213 + </if>
  214 + <if test="powerfactor != null" >
  215 + powerFactor = #{powerfactor,jdbcType=VARCHAR},
  216 + </if>
  217 + <if test="free != null" >
  218 + free = #{free,jdbcType=BIT},
  219 + </if>
  220 + <if test="freeelectricitylimit != null" >
  221 + freeElectricityLimit = #{freeelectricitylimit,jdbcType=DECIMAL},
  222 + </if>
  223 + <if test="freewater != null" >
  224 + freeWater = #{freewater,jdbcType=VARCHAR},
  225 + </if>
  226 + <if test="wmId != null" >
  227 + wm_id = #{wmId,jdbcType=VARCHAR},
  228 + </if>
  229 + <if test="creattime != null" >
  230 + creatTime = #{creattime,jdbcType=TIMESTAMP},
  231 + </if>
  232 + <if test="eeId != null" >
  233 + ee_id = #{eeId,jdbcType=VARCHAR},
  234 + </if>
  235 + <if test="reamke2 != null" >
  236 + reamke2 = #{reamke2,jdbcType=VARCHAR},
  237 + </if>
  238 + <if test="reamke3 != null" >
  239 + reamke3 = #{reamke3,jdbcType=VARCHAR},
  240 + </if>
  241 + </set>
  242 + where ee_id = #{eeId,jdbcType=INTEGER}
  243 + </update>
  244 + <update id="updateByPrimaryKey" parameterType="com.sunyo.energy.location.model.WaterElectricityParameter" >
  245 + update water_electricity_parameter
  246 + set prepaid = #{prepaid,jdbcType=BIT},
  247 + warningTrip = #{warningtrip,jdbcType=BIT},
  248 + warningThreshold = #{warningthreshold,jdbcType=DECIMAL},
  249 + overdraft = #{overdraft,jdbcType=BIT},
  250 + overdraftThreshold = #{overdraftthreshold,jdbcType=DECIMAL},
  251 + waterLoad = #{waterload,jdbcType=BIT},
  252 + water = #{water,jdbcType=DECIMAL},
  253 + power = #{power,jdbcType=DECIMAL},
  254 + powerFactor = #{powerfactor,jdbcType=VARCHAR},
  255 + free = #{free,jdbcType=BIT},
  256 + freeElectricityLimit = #{freeelectricitylimit,jdbcType=DECIMAL},
  257 + freeWater = #{freewater,jdbcType=VARCHAR},
  258 + wm_id = #{wmId,jdbcType=VARCHAR},
  259 + creatTime = #{creattime,jdbcType=TIMESTAMP},
  260 + ee_id = #{eeId,jdbcType=VARCHAR},
  261 + reamke2 = #{reamke2,jdbcType=VARCHAR},
  262 + reamke3 = #{reamke3,jdbcType=VARCHAR}
  263 + where id = #{id,jdbcType=INTEGER}
  264 + </update>
  265 +</mapper>
  1 +<?xml version="1.0" encoding="UTF-8" ?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3 +<mapper namespace="com.sunyo.energy.location.dao.WaterMeterMapper" >
  4 + <resultMap id="BaseResultMap" type="com.sunyo.energy.location.model.WaterMeter" >
  5 + <result column="wm_id" property="wmId" jdbcType="VARCHAR" />
  6 + <result column="wm_sacc" property="wmSacc" jdbcType="VARCHAR" />
  7 + <result column="wm_lacc" property="wmLacc" jdbcType="VARCHAR" />
  8 + <result column="wm_rdtime" property="wmRdtime" jdbcType="VARCHAR" />
  9 + <result column="wm_fmstate" property="wmFmstate" jdbcType="VARCHAR" />
  10 + <result column="wm_errmessage" property="wmErrmessage" jdbcType="VARCHAR" />
  11 + <result column="wm_voltage" property="wmVoltage" jdbcType="VARCHAR" />
  12 + <result column="wm_signalpower" property="wmSignalpower" jdbcType="VARCHAR" />
  13 + <result column="creatTime" property="creattime" jdbcType="TIMESTAMP" />
  14 + <result column="updateTime" property="updatetime" jdbcType="TIMESTAMP" />
  15 + <result column="reamke1" property="reamke1" jdbcType="VARCHAR" />
  16 + <result column="reamke2" property="reamke2" jdbcType="VARCHAR" />
  17 + <result column="reamke3" property="reamke3" jdbcType="VARCHAR" />
  18 + <result column="reamke4" property="reamke4" jdbcType="VARCHAR" />
  19 + </resultMap>
  20 + <insert id="insert" parameterType="com.sunyo.energy.location.model.WaterMeter" >
  21 + insert into water_meter (wm_id, wm_sacc, wm_lacc,
  22 + wm_rdtime, wm_fmstate, wm_errmessage,
  23 + wm_voltage, wm_signalpower, creatTime,
  24 + updateTime, reamke1, reamke2,
  25 + reamke3, reamke4)
  26 + values (#{wmId,jdbcType=VARCHAR}, #{wmSacc,jdbcType=VARCHAR}, #{wmLacc,jdbcType=VARCHAR},
  27 + #{wmRdtime,jdbcType=VARCHAR}, #{wmFmstate,jdbcType=VARCHAR}, #{wmErrmessage,jdbcType=VARCHAR},
  28 + #{wmVoltage,jdbcType=VARCHAR}, #{wmSignalpower,jdbcType=VARCHAR}, #{creattime,jdbcType=TIMESTAMP},
  29 + #{updatetime,jdbcType=TIMESTAMP}, #{reamke1,jdbcType=VARCHAR}, #{reamke2,jdbcType=VARCHAR},
  30 + #{reamke3,jdbcType=VARCHAR}, #{reamke4,jdbcType=VARCHAR})
  31 + </insert>
  32 + <insert id="insertSelective" parameterType="com.sunyo.energy.location.model.WaterMeter" >
  33 + insert into water_meter
  34 + <trim prefix="(" suffix=")" suffixOverrides="," >
  35 + <if test="wmId != null" >
  36 + wm_id,
  37 + </if>
  38 + <if test="wmSacc != null" >
  39 + wm_sacc,
  40 + </if>
  41 + <if test="wmLacc != null" >
  42 + wm_lacc,
  43 + </if>
  44 + <if test="wmRdtime != null" >
  45 + wm_rdtime,
  46 + </if>
  47 + <if test="wmFmstate != null" >
  48 + wm_fmstate,
  49 + </if>
  50 + <if test="wmErrmessage != null" >
  51 + wm_errmessage,
  52 + </if>
  53 + <if test="wmVoltage != null" >
  54 + wm_voltage,
  55 + </if>
  56 + <if test="wmSignalpower != null" >
  57 + wm_signalpower,
  58 + </if>
  59 + <if test="creattime != null" >
  60 + creatTime,
  61 + </if>
  62 + <if test="updatetime != null" >
  63 + updateTime,
  64 + </if>
  65 + <if test="reamke1 != null" >
  66 + reamke1,
  67 + </if>
  68 + <if test="reamke2 != null" >
  69 + reamke2,
  70 + </if>
  71 + <if test="reamke3 != null" >
  72 + reamke3,
  73 + </if>
  74 + <if test="reamke4 != null" >
  75 + reamke4,
  76 + </if>
  77 + </trim>
  78 + <trim prefix="values (" suffix=")" suffixOverrides="," >
  79 + <if test="wmId != null" >
  80 + #{wmId,jdbcType=VARCHAR},
  81 + </if>
  82 + <if test="wmSacc != null" >
  83 + #{wmSacc,jdbcType=VARCHAR},
  84 + </if>
  85 + <if test="wmLacc != null" >
  86 + #{wmLacc,jdbcType=VARCHAR},
  87 + </if>
  88 + <if test="wmRdtime != null" >
  89 + #{wmRdtime,jdbcType=VARCHAR},
  90 + </if>
  91 + <if test="wmFmstate != null" >
  92 + #{wmFmstate,jdbcType=VARCHAR},
  93 + </if>
  94 + <if test="wmErrmessage != null" >
  95 + #{wmErrmessage,jdbcType=VARCHAR},
  96 + </if>
  97 + <if test="wmVoltage != null" >
  98 + #{wmVoltage,jdbcType=VARCHAR},
  99 + </if>
  100 + <if test="wmSignalpower != null" >
  101 + #{wmSignalpower,jdbcType=VARCHAR},
  102 + </if>
  103 + <if test="creattime != null" >
  104 + #{creattime,jdbcType=TIMESTAMP},
  105 + </if>
  106 + <if test="updatetime != null" >
  107 + #{updatetime,jdbcType=TIMESTAMP},
  108 + </if>
  109 + <if test="reamke1 != null" >
  110 + #{reamke1,jdbcType=VARCHAR},
  111 + </if>
  112 + <if test="reamke2 != null" >
  113 + #{reamke2,jdbcType=VARCHAR},
  114 + </if>
  115 + <if test="reamke3 != null" >
  116 + #{reamke3,jdbcType=VARCHAR},
  117 + </if>
  118 + <if test="reamke4 != null" >
  119 + #{reamke4,jdbcType=VARCHAR},
  120 + </if>
  121 + </trim>
  122 + ON DUPLICATE KEY
  123 + UPDATE
  124 + wm_sacc = #{wmSacc,jdbcType=VARCHAR},
  125 + wm_lacc = #{wmLacc,jdbcType=VARCHAR},
  126 + wm_rdtime = #{wmRdtime,jdbcType=VARCHAR},
  127 + wm_fmstate = #{wmFmstate,jdbcType=VARCHAR},
  128 + wm_errmessage = #{wmErrmessage,jdbcType=VARCHAR},
  129 + wm_voltage = #{wmVoltage,jdbcType=VARCHAR},
  130 + wm_signalpower = #{wmSignalpower,jdbcType=VARCHAR},
  131 + creatTime = #{creattime,jdbcType=TIMESTAMP},
  132 + updateTime = #{updatetime,jdbcType=TIMESTAMP},
  133 + reamke1 = #{reamke1,jdbcType=VARCHAR},
  134 + reamke2 = #{reamke2,jdbcType=VARCHAR},
  135 + reamke3 = #{reamke3,jdbcType=VARCHAR},
  136 + reamke4 = #{reamke4,jdbcType=VARCHAR}
  137 + </insert>
  138 +</mapper>