Ver código fonte

Merge remote-tracking branch 'origin/master'

wzq 3 semanas atrás
pai
commit
08404aa142

+ 1 - 0
national-motion-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java

@@ -105,6 +105,7 @@ public class ShiroConfig {
 //        filterChainDefinitionMap.put("/app/home/getMsg", "anon");//APP首页接口
         filterChainDefinitionMap.put("/app/user/loginByCode", "anon");//APP首页接口
         filterChainDefinitionMap.put("/app/esign/signCallback", "anon");//APP首页接口
+        filterChainDefinitionMap.put("/com/AppDevice/notice", "anon");//APP首页接口
 
         filterChainDefinitionMap.put("/app/order/wechatPayNotify", "anon");//支付回调
         filterChainDefinitionMap.put("/app/order/refundOrderNotify", "anon");//退款回调

+ 16 - 6
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/service/impl/DetailServiceImpl.java

@@ -136,20 +136,30 @@ public class DetailServiceImpl implements IDetailService {
             List<PlaceInfoVO.PlaceInfoMsgVO> placeInfoMsgVOS = new ArrayList<>();
             appSitePlaceMapper.selectList(Wrappers.<AppSitePlace>lambdaQuery().eq(AppSitePlace::getSiteId, id)
                     .eq(AppSitePlace::getType,0)).forEach(appSitePlace -> {
+                AppSitePriceRules appSitePriceRules = appSitePriceRulesMapper.selectOne(Wrappers.<AppSitePriceRules>lambdaQuery()
+                        .eq(AppSitePriceRules::getSitePlaceId, appSitePlace.getId())
+                        .last("limit 1").orderByDesc(AppSitePriceRules::getOriginalPrice));
+                AppSitePriceRules appSitePriceRules1 = appSitePriceRulesMapper.selectOne(Wrappers.<AppSitePriceRules>lambdaQuery()
+                        .eq(AppSitePriceRules::getSitePlaceId, appSitePlace.getId())
+                        .last("limit 1").orderByDesc(AppSitePriceRules::getSellingPrice));
                 PlaceInfoVO.PlaceInfoMsgVO placeInfoMsgVO = new PlaceInfoVO.PlaceInfoMsgVO();
                 placeInfoMsgVO.setName(appSitePlace.getName())
                         .setSales(0)
                         .setId(appSitePlace.getId())
-                        .setOriginalPrice(appSitePriceRulesMapper.selectOne(Wrappers.<AppSitePriceRules>lambdaQuery()
-                                .eq(AppSitePriceRules::getSitePlaceId, appSitePlace.getId())
-                                .last("limit 1").orderByDesc(AppSitePriceRules::getOriginalPrice)).getOriginalPrice())
-                        .setSellingPrice(appSitePriceRulesMapper.selectOne(Wrappers.<AppSitePriceRules>lambdaQuery()
-                                .eq(AppSitePriceRules::getSitePlaceId, appSitePlace.getId())
-                                .last("limit 1").orderByDesc(AppSitePriceRules::getSellingPrice)).getSellingPrice())
                         .setCategory(getCategoryName(appSitePlace.getCategoryId()))
                         .setCover(appSitePlace.getCover().split(",")[0])
                         .setReminder(appSitePlace.getReminder())
                         .setRefundType(appSitePlace.getRefundType());
+                if(appSitePriceRules!=null){
+                    placeInfoMsgVO.setOriginalPrice(appSitePriceRules.getOriginalPrice());
+                }else {
+                    placeInfoMsgVO.setOriginalPrice(BigDecimal.ZERO);
+                }
+                if(appSitePriceRules1!=null){
+                    placeInfoMsgVO.setSellingPrice(appSitePriceRules1.getSellingPrice());
+                }else {
+                    placeInfoMsgVO.setSellingPrice(BigDecimal.ZERO);
+                }
                 placeInfoMsgVOS.add(placeInfoMsgVO);
             });
             placeInfo.setPlaceInfoMsgVO(placeInfoMsgVOS);

+ 10 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/vo/PlaceInfoVO.java

@@ -5,6 +5,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
+import org.springframework.format.annotation.DateTimeFormat;
 
 import java.math.BigDecimal;
 import java.util.Date;
@@ -19,6 +20,15 @@ public class PlaceInfoVO {
     private String id;
     @Schema(description = "单位名称(部门名称)")
     private String name;
+    @JsonFormat(timezone = "GMT+8",pattern = "HH:mm:ss")
+    @DateTimeFormat(pattern="HH:mm:ss")
+    @Schema(description = "开始营业时间")
+    private Date startTime;
+    /**结束营业时间*/
+    @JsonFormat(timezone = "GMT+8",pattern = "HH:mm:ss")
+    @DateTimeFormat(pattern="HH:mm:ss")
+    @Schema(description = "结束营业时间")
+    private Date endTime;
     @Schema(description = "好评率")
     private BigDecimal goodRate;
     @Schema(description = "是否营业")

+ 2 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/hikiot/HikiotConstant.java

@@ -53,5 +53,7 @@ public interface HikiotConstant {
     String CONFIG_DOOR_PLAN_TEMPLATE_URL2 = "https://open-api.hikiot.com/device/direct/v1/timePlanAdd/planTemplate";
     /**分页查询开门记录*/
     String QUERY_OPEN_DOOR_RECORD_URL = "https://open-api.hikiot.com/issue/v1/event/person/page";
+    /**批量删除人员*/
+    String BATCH_DELETE_USER_URL = "https://open-api.hikiot.com/device/direct/v1/userInfo/batchDeleteByKey";
 
 }

+ 13 - 4
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/hikiot/HikiotTool.java

@@ -282,13 +282,21 @@ public class HikiotTool {
      * @Description 人员信息查询
      * @Date 15:08 2025/8/15
      **/
-    public static String queryUserInfo(String deviceSerial) throws IOException, InterruptedException {
+    public static String queryUserInfo(String deviceSerial){
         Map<String, String> queryUserInfo = new HashMap<>();
-        queryUserInfo.put("deviceSerial", "FX0889961");
-        queryUserInfo.put("keyword", "0012");
+        queryUserInfo.put("deviceSerial", deviceSerial);
         return sendPostRequest(QUERY_USER_INFO_URL, gson.toJson(queryUserInfo),setHeaders());
     }
 
+    /**
+     * @Author SheepHy
+     * @Description 删除已过期的访客
+     * @Date 15:09 2025/8/15
+     **/
+    public static String deleteExpiredVisitors(String deviceSerial){
+        return sendPostRequest(QUERY_USER_INFO_URL, gson.toJson(queryUserInfo(deviceSerial)),setHeaders());
+    }
+
     /** 
      * @Author SheepHy
      * @Description 配置人员周计划
@@ -478,8 +486,9 @@ public class HikiotTool {
     }
 
     public static void main(String[] args) throws IOException, InterruptedException {
+        queryUserInfo("FX0889961");
 //        addUser(new Date(),"FX0889961","Sheep","1001");
-        addFace("FX0889961","1001","https://national-motion.oss-cn-beijing.aliyuncs.com/opt/upFiles/tmp_81fc8aa195d37dac70fd57221d82845e_1756361097600.jpg");
+//        addFace("FX0889961","1001","https://national-motion.oss-cn-beijing.aliyuncs.com/opt/upFiles/tmp_81fc8aa195d37dac70fd57221d82845e_1756361097600.jpg");
 //        addUser();
 //        addUserPlanTemplate();
 //        addFace();

+ 6 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/controller/AppDeviceController.java

@@ -13,6 +13,7 @@ import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.aspect.annotation.AutoLog;
 import org.jeecg.common.system.base.controller.JeecgController;
 import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.modules.system.app.dto.evaluate.EventRequestDTO;
 import org.jeecg.modules.system.app.entity.AppDevice;
 import org.jeecg.modules.system.app.mapper.AppSiteMapper;
 import org.jeecg.modules.system.app.service.IAppDeviceService;
@@ -194,4 +195,9 @@ public class AppDeviceController extends JeecgController<AppDevice, IAppDeviceSe
         return super.importExcel(request, response, AppDevice.class);
     }
 
+	@PostMapping(value = "/notice")
+	public Result<String> doorOpeningNotice(@RequestBody EventRequestDTO eventRequestDTO) {
+		return Result.OK(null);
+	}
+
 }

+ 50 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/dto/evaluate/EventRequestDTO.java

@@ -0,0 +1,50 @@
+package org.jeecg.modules.system.app.dto.evaluate;
+
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+@Data
+@Accessors(chain = true)
+public class EventRequestDTO {
+    private EventBaseDTO eventBase;
+    private EventInfoDTO eventInfo;
+    // eventBase部分
+    @Data
+    public static class EventBaseDTO {
+        private String eventId;
+        private String eventType;
+        private Long createTime;
+        private String teamNo;
+        private String appKey;
+    }
+
+    // eventInfo部分
+    @Data
+    public static class EventInfoDTO {
+        private Integer frontSerialNo;
+        private String idemKey;
+        private String employeeNo;
+        private String deviceName;
+        private Integer accessType;
+        private String originId;
+        private String subTitle;
+        private Integer secCategoryId;
+        private String authResultMsg;
+        private String personNo;
+        private Integer personType;
+        private Integer cardReaderNo;
+        private Integer picTag;
+        private String accessTypeMsg;
+        private String firstMsgCode;
+        private String secMsgCode;
+        private String receiverNo;
+        private String resourceName;
+        private String gmtCreate;
+        private Integer serialNo;
+        private String personName;
+        private String deviceSerial;
+        private Integer authResult;
+        private String detail;
+        private String originEvent;
+    }
+}

+ 9 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/xml/AppSiteMapper.xml

@@ -16,6 +16,13 @@
         nm_site b
         LEFT JOIN sys_depart c ON b.org_code = c.org_code
         WHERE 1 = 1 AND b.del_flag = 0
+        AND (
+        b.type != 0
+        OR (
+        b.teaching_day IS NOT NULL
+        AND b.no_teaching_day IS NOT NULL
+        )
+        )
         <if test="venueType != null and venueType == '0-1'">
             ORDER BY b.good_rate DESC
         </if>
@@ -76,6 +83,8 @@
             a.run_status AS runStatus,
             a.teaching_day,
             a.no_teaching_day,
+            a.start_time,
+            a.end_time,
             b.mobile AS phone,
             a.video,
             a.longitude,