Explorar o código

广告+心跳

李天标 %!s(int64=5) %!d(string=hai) anos
pai
achega
691e5e2cf5

+ 1 - 0
app-api/src/main/java/com/hboxs/control/api/equipment/AlarmRecordIndexController.java

@@ -83,6 +83,7 @@ public class AlarmRecordIndexController extends BaseController {
         alarmRecord.setAgencyId(agencyId);
         alarmRecord.setMerchantId(merchantId);
         alarmRecord.setAdminId(adminId);
+        alarmRecord.setSite(equipment.getSite());
         alarmRecord.setPersonageId(personageId);
         alarmRecord.setAdminUserName(adminUserName);
         String alarmContent = alarmRecordVo.getAlarmContent();

+ 10 - 75
app-api/src/main/java/com/hboxs/control/api/equipment/IndexController.java

@@ -65,6 +65,10 @@ public class IndexController extends BaseController {
         String furnaceTm = equipmentVo.getFurnaceTm();
         String gtClientId = equipmentVo.getGtClientId();
         String netWorkingMode = equipmentVo.getNetWorkingMode();
+        String odorConcentration = equipmentVo.getOdorConcentration();
+        String cleaner = equipmentVo.getCleaner();
+        String disinfectant = equipmentVo.getDisinfectant();
+        Long peopleCounting = equipmentVo.getPeopleCounting();
         //有记录,则进行修改
         Equipment _new = equipmentService.findByClientId(clientId);
         if (_new != null) {
@@ -77,6 +81,11 @@ public class IndexController extends BaseController {
             _new.setLongitude(longitude);
             _new.setLatitude(latitude);
             _new.setGtClientId(gtClientId);
+            _new.setOdorConcentration(odorConcentration);
+            _new.setOdorConcentration(odorConcentration);
+            _new.setCleaner(cleaner);
+            _new.setDisinfectant(disinfectant);
+            _new.setPeopleCounting(peopleCounting);
             equipmentService.update(_new);
             return JsonMessage.success("心跳成功");
         }
@@ -498,81 +507,7 @@ public class IndexController extends BaseController {
             IOUtils.closeQuietly(pw);
         }
     }
-//    public JsonMessage sendLog( HttpServletRequest request) throws Exception {
-//        //得到上传文件的保存目录,将上传的文件存放于WEB-INF目录下,不允许外界直接访问,保证上传文件的安全
-//        String savePath = "E:/log";
-//        File file = new File(savePath);
-//        //判断上传文件的保存目录是否存在
-//        if (!file.exists() && !file.isDirectory()) {
-////            System.out.println(savePath+"目录不存在,需要创建");
-//            //创建目录
-//            file.mkdir();
-//        }
-//        //消息提示
-//        String message = "";
-//        try{
-//            //使用Apache文件上传组件处理文件上传步骤:
-//            //1、创建一个DiskFileItemFactory工厂
-//            DiskFileItemFactory factory = new DiskFileItemFactory();
-//            //2、创建一个文件上传解析器
-//            ServletFileUpload upload = new ServletFileUpload(factory);
-//            //解决上传文件名的中文乱码
-//            upload.setHeaderEncoding("UTF-8");
-//            //3、判断提交上来的数据是否是上传表单的数据
-//            if(!ServletFileUpload.isMultipartContent(request)){
-//                //按照传统方式获取数据
-//                System.out.println("没有文件上传");
-//                return JsonMessage.success("没有文件上传");
-////                return "index.html";
-//            }
-//            //4、使用ServletFileUpload解析器解析上传数据,解析结果返回的是一个List<FileItem>集合,每一个FileItem对应一个Form表单的输入项
-//            List<FileItem> list = upload.parseRequest(request);
-//            for(FileItem item : list){
-//                //如果fileitem中封装的是普通输入项的数据
-//                if(item.isFormField()){
-//                    String name = item.getFieldName();
-//                    //解决普通输入项的数据的中文乱码问题
-//                    String value = item.getString("UTF-8");
-//                    //value = new String(value.getBytes("iso8859-1"),"UTF-8");
-//                    System.out.println(name + "=" + value);
-//                }else{//如果fileitem中封装的是上传文件
-//                    //得到上传的文件名称,
-//                    String filename = item.getName();
-//                    System.out.println(filename);
-//                    if(filename==null || filename.trim().equals("")){
-//                        continue;
-//                    }
-//                    //注意:不同的浏览器提交的文件名是不一样的,有些浏览器提交上来的文件名是带有路径的,如:  c:\a\b\1.txt,而有些只是单纯的文件名,如:1.txt
-//                    //处理获取到的上传文件的文件名的路径部分,只保留文件名部分
-//                    filename = filename.substring(filename.lastIndexOf("\\")+1);
-//                    //获取item中的上传文件的输入流
-//                    InputStream in = item.getInputStream();
-//                    //创建一个文件输出流
-//                    FileOutputStream out = new FileOutputStream(savePath + "\\" + filename);
-//                    //创建一个缓冲区
-//                    byte buffer[] = new byte[1024];
-//                    //判断输入流中的数据是否已经读完的标识
-//                    int len = 0;
-//                    //循环将输入流读入到缓冲区当中,(len=in.read(buffer))>0就表示in里面还有数据
-//                    while((len=in.read(buffer))>0){
-//                        //使用FileOutputStream输出流将缓冲区的数据写入到指定的目录(savePath + "\\" + filename)当中
-//                        out.write(buffer, 0, len);
-//                    }
-//                    //关闭输入流
-//                    in.close();
-//                    //关闭输出流
-//                    out.close();
-//                    //删除处理文件上传时生成的临时文件
-//                    item.delete();
-//                    message = "文件上传成功!";
-//                }
-//            }
-//        }catch (Exception e) {
-//            message= "文件上传失败!";
-//            e.printStackTrace();
-//        }
-//        return JsonMessage.success("文件上传成功");
-//    }
+
 
     /**
      * 脱离系统

+ 25 - 7
app-api/src/main/java/com/hboxs/control/api/order/OrderController.java

@@ -695,7 +695,7 @@ public class OrderController extends BaseController {
         String productDesc = "";
         String commonParameter = "";
         String returnUrl = null;
-        String notifyUrl = JoinpayConstant.Notify_Url;
+        String notifyUrl = JoinpayConstant.Card_Notify_Url;
         String isShowPic = "1";
         String openId = null;
         String authCode = null;
@@ -1123,18 +1123,18 @@ public class OrderController extends BaseController {
 
         JSONObject resultJson = JSONObject.parseObject(result);
         // 汇聚支付支付申请返回支付二维码图片
-        String rd_Pic = resultJson.getString("rd_Pic");
+//        String rd_Pic = resultJson.getString("rd_Pic");
 //        Map<String,String> map2 = new HashMap<>();
 //        map2.put("sn",sn);
 //        map2.put("rd_Pic",rd_Pic);
-        if (resultJson == null || StringUtils.isBlank(rd_Pic)) {
-            return JsonMessage.error("找不到支付图片");
-        }
+//        if (resultJson == null || StringUtils.isBlank(rd_Pic)) {
+//            return JsonMessage.error("找不到支付图片");
+//        }
 //        send(clientId,sn,productName);
 //        return JsonMessage.success(rd_Pic);
         JSONObject kindData = new JSONObject();
         kindData.put("sn" , sn);
-        kindData.put("rd_Pic",rd_Pic);
+//        kindData.put("rd_Pic",rd_Pic);
         return JsonMessage.success(kindData.toString());
     }
     /**
@@ -1527,7 +1527,25 @@ public class OrderController extends BaseController {
         Order.Status status = order.getStatus();
         return JsonMessage.success(status.toString());
     }
-
+    /**
+     * 删除订单
+     *
+     * @param
+     * @param
+     * @return
+     */
+    @RequestMapping(value = "/deleteOrder", method = RequestMethod.GET)
+    @ResponseBody
+    public JsonMessage deleteOrder(String sn ) {
+        Order order = orderService.findBySn(sn);
+        Order.Status status = order.getStatus();
+        String ss = status.toString();
+        if(ss.equals("unpay")){
+            orderService.delete(order.getId());
+            return JsonMessage.success(sn+"删除成功");
+        }
+        return JsonMessage.success(sn+"删除失败");
+    }
     /**
      * 优惠码做糖
      *

+ 3 - 2
app-backend-web/src/main/java/com/hboxs/control/admin/EquipmentController.java

@@ -96,8 +96,8 @@ public class EquipmentController extends BaseController {
             }
             model.addAttribute("rulesCkche", lis);
         }
-//        List<TimeRule> timeRules = timeRuleService.findAll();
-//        model.addAttribute("timeRules", timeRules);
+        List<TimeRule> timeRules = timeRuleService.findAll();
+        model.addAttribute("timeRules", timeRules);
         String type = adminService.getCurrent().getType().toValue();
         model.addAttribute("type", type);
         Long timeRuleId = equipment.getTimeRuleId();
@@ -126,6 +126,7 @@ public class EquipmentController extends BaseController {
         oldEquipment.setContactPhone(equipment.getContactPhone());
         oldEquipment.setOperator(equipment.getOperator());
         oldEquipment.setSimNo(equipment.getSimNo());
+        oldEquipment.setSite(equipment.getSite());
         oldEquipment.setTimeRuleId(equipment.getTimeRuleId());
         oldEquipment.setPayType(Equipment.PayType.onlinePayment);
         if (equipment.getAreaId() != null) {

+ 14 - 14
app-backend-web/src/main/webapp/WEB-INF/template/admin/common/main.ftl

@@ -271,20 +271,20 @@
                                 class="iconfont icon-weihu"></i> 维护历史</a>
                     </dd>
                 [/@shiro.hasPermission]
-                [#--[@shiro.hasPermission name="admin:ad"]--]
-                    [#--<dd>--]
-                        [#--<a href="javascript:void(0)" data-url="../ad/list.htm"--]
-                           [#--data-id="admin:ad"><i--]
-                                [#--class="iconfont icon-guanggao"></i> 广告管理</a>--]
-                    [#--</dd>--]
-                [#--[/@shiro.hasPermission]--]
-                [#--[@shiro.hasPermission name="admin:timeRule"]--]
-                    [#--<dd>--]
-                        [#--<a href="javascript:void(0)" data-url="../timeRule/list.htm"--]
-                           [#--data-id="admin:timeRule"><i--]
-                                [#--class="iconfont icon-guize"></i> 广告规则</a>--]
-                    [#--</dd>--]
-                [#--[/@shiro.hasPermission]--]
+                [@shiro.hasPermission name="admin:ad"]
+                    <dd>
+                        <a href="javascript:void(0)" data-url="../ad/list.htm"
+                           data-id="admin:ad"><i
+                                class="iconfont icon-guanggao"></i> 广告管理</a>
+                    </dd>
+                [/@shiro.hasPermission]
+                [@shiro.hasPermission name="admin:timeRule"]
+                    <dd>
+                        <a href="javascript:void(0)" data-url="../timeRule/list.htm"
+                           data-id="admin:timeRule"><i
+                                class="iconfont icon-guize"></i> 广告规则</a>
+                    </dd>
+                [/@shiro.hasPermission]
             </dl>
             <dl id="order">
                 <dt>订单管理</dt>

+ 44 - 31
app-backend-web/src/main/webapp/WEB-INF/template/admin/equipment/edit.ftl

@@ -94,26 +94,26 @@
                     <input type="text" value="${equipment.sn}" name="sn"  class="text" required/>
                 </td>
             </tr>
-            [#--<tr>--]
-                [#--<th>--]
-                    [#--<span class="requiredField">*</span>广告规则--]
-                [#--</th>--]
-                [#--<td>--]
-                     [#--[#if type!="管理员"]--]
-                         [#--<input type="hidden" name="timeRuleId" value="${equipment.timeRuleId}"/>--]
-                         [#--<input type="text" class="text" value="${ruleName}" readonly/>--]
-                     [#--[#else ]--]
-                        [#--<select name="timeRuleId">--]
-                        [#--[#list timeRules as timeRule]--]
-                            [#--<option value="${timeRule.id}"--]
-                                    [#--[#if timeRule.id == equipment.timeRuleId ]selected[/#if]>${timeRule.name}</option>--]
-                        [#--[/#list]--]
-                        [#--</select>--]
-                     [#--[/#if]--]
+            <tr>
+                <th>
+                    <span class="requiredField">*</span>广告规则
+                </th>
+                <td>
+                     [#if type!="管理员"]
+                         <input type="hidden" name="timeRuleId" value="${equipment.timeRuleId}"/>
+                         <input type="text" class="text" value="${ruleName}" readonly/>
+                     [#else ]
+                        <select name="timeRuleId">
+                        [#list timeRules as timeRule]
+                            <option value="${timeRule.id}"
+                                    [#if timeRule.id == equipment.timeRuleId ]selected[/#if]>${timeRule.name}</option>
+                        [/#list]
+                        </select>
+                     [/#if]
 
-                [#--</td>--]
+                </td>
 
-            [#--</tr>--]
+            </tr>
             <tr>
                 <th>
                     <span class="requiredField"></span>所属商家:
@@ -123,17 +123,17 @@
                 </td>
             </tr>
 
-            [#--<tr>--]
-                [#--<th>--]
-                    [#--<span class="requiredField"></span>经销商:--]
-                [#--</th>--]
-                [#--<td>--]
-                [#--${equipment.adminUserName}--]
-                    [#--[#if type=="管理员"]--]
-                        [#--&nbsp &nbsp <button type="button" id="touji" >系统脱机</button>--]
-                    [#--[/#if]--]
-                [#--</td>--]
-            [#--</tr>--]
+            <tr>
+                <th>
+                    <span class="requiredField"></span>经销商:
+                </th>
+                <td>
+                ${equipment.adminUserName}
+                    [#if type=="管理员"]
+                        &nbsp &nbsp <button type="button" id="touji" >系统脱机</button>
+                    [/#if]
+                </td>
+            </tr>
             <tr>
                 <th>
                     <span class="requiredField"></span>地区:
@@ -145,6 +145,15 @@
             </tr>
             <tr>
                 <th>
+                    <span class="requiredField"></span>小区域:
+                </th>
+                <td>
+                    <input type="text" name="site" class="text" maxlength="200" placeholder="xx大厦1楼" required
+                           value="${equipment.site}"/>
+                </td>
+            </tr>
+            <tr>
+                <th>
                     <span class="requiredField"></span>机器联系人:
                 </th>
                 <td>
@@ -185,7 +194,7 @@
                     <span class=""></span>到期时间
                 </th>
                 <td>
-                    <span class="green">${(equipment.overdueDate?string("yyyy-MM-dd HH:mm:ss"))!""}</span>
+                    <span class="green">${equipment.overdueDate}</span>
                 </td>
             </tr>
             <tr>
@@ -258,7 +267,7 @@
                     <span class="requiredField"></span>4G卡号码:
                 </th>
                 <td>
-                    <input type="text" name="simNo" class="text" maxlength="20"
+                    <input type="text" name="simNo" class="text" maxlength="25"
                            value="${equipment.simNo} "/>
                 </td>
             </tr>
@@ -282,6 +291,10 @@
                     &nbsp;&nbsp;
                     <span>机器温度:${equipment.furnaceTm}</span>
                     &nbsp;&nbsp;
+                    <span>气味浓度:${equipment.odorConcentration}</span>
+                    &nbsp;&nbsp;
+                    <span>人流量:${equipment.peopleCounting}</span>
+                    &nbsp;&nbsp;
                     [#--<span>炉头转速:${equipment.furnaceSp}</span>--]
                 </td>
             </tr>

+ 5 - 5
app-backend-web/src/main/webapp/resources/index/js/scanboard.js

@@ -534,7 +534,7 @@ $(function(){
             success: function(data){
                 number = data.allCleanNumber;
                 chart3(data.allCleanNumber);
-                console.log("allCleanNumber:",number);
+                // console.log("allCleanNumber:",number);
             }
         });
     };
@@ -557,7 +557,7 @@ $(function(){
                 water.innerHTML = data.water;
                 var electricity=window.document .getElementById ("electricity");
                 electricity.innerHTML = data.electricity;
-                console.log("consumedResources:",number);
+                // console.log("consumedResources:",number);
             }
         });
     };
@@ -577,7 +577,7 @@ $(function(){
             success: function(data){
                 number = data.alarmRecordType;
                 chart2(data.alarmRecordType);
-                console.log("alarmRecordType:",number);
+                // console.log("alarmRecordType:",number);
             }
         });
     };
@@ -594,7 +594,7 @@ $(function(){
             dataType: "json",
             success: function(data){
                 number = data;
-                console.log("alarmRecordLine:",number);
+                // console.log("alarmRecordLine:",number);
             }
         });
     };
@@ -626,7 +626,7 @@ $(function(){
                         '</li>';
                     ul.appendChild(li);
 				}
-                console.log("cleanLine:",number);
+                // console.log("cleanLine:",number);
             }
         });
     };

+ 52 - 3
app-entity/src/main/java/com/hboxs/ViewObject/EquipmentVo.java

@@ -17,17 +17,17 @@ public class EquipmentVo {
     private  String managerId;
 
     /**
-     * 内温度
+     * 内温度
      */
     private String cabinetTm;
 
     /**
-     * 内湿度
+     * 内湿度
      */
     private  String cabinetHd;
 
     /**
-     *炉头温度
+     *机器温度
      */
     private String furnaceTm;
 
@@ -37,6 +37,23 @@ public class EquipmentVo {
     private  String furnaceSp;
 
     /**
+     * 气味浓度
+     */
+    private  String odorConcentration;
+
+    /**
+     * 清洁剂余量
+     */
+    private String cleaner;
+    /**
+     * 消毒水余量
+     */
+    private String  disinfectant;
+    /**
+     * 人流量
+     */
+    private Long  peopleCounting;
+    /**
      * 联网方式
      *
      */
@@ -64,6 +81,38 @@ public class EquipmentVo {
      */
     private String gtClientId;
 
+    public String getOdorConcentration() {
+        return odorConcentration;
+    }
+
+    public void setOdorConcentration(String odorConcentration) {
+        this.odorConcentration = odorConcentration;
+    }
+
+    public String getCleaner() {
+        return cleaner;
+    }
+
+    public void setCleaner(String cleaner) {
+        this.cleaner = cleaner;
+    }
+
+    public String getDisinfectant() {
+        return disinfectant;
+    }
+
+    public void setDisinfectant(String disinfectant) {
+        this.disinfectant = disinfectant;
+    }
+
+    public Long getPeopleCounting() {
+        return peopleCounting;
+    }
+
+    public void setPeopleCounting(Long peopleCounting) {
+        this.peopleCounting = peopleCounting;
+    }
+
     public String getClientId() {
         return clientId;
     }