Przeglądaj źródła

Merge remote-tracking branch 'origin/V0.0.2' into V0.0.2

# Conflicts:
#	soc-modules/soc-modules-core/src/main/java/com/xunmei/core/listener/WorkTimeChangeEventListener.java
jingyuanchao 2 lat temu
rodzic
commit
2047a7dc2f
15 zmienionych plików z 117 dodań i 18 usunięć
  1. 8 1
      project_data/sql/0.0.2/soc/soc.sql
  2. 3 2
      soc-api/soc-api-system/src/main/java/com/xunmei/system/api/RemoteResumptionTaskService.java
  3. 2 1
      soc-api/soc-api-system/src/main/java/com/xunmei/system/api/factory/RemoteResumptionTaskFallbackFactory.java
  4. 6 2
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/event/WorkTimeChangeEvent.java
  5. 0 1
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/access/service/impl/TMonitoringRetrievalPlanServiceImpl.java
  6. 4 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/listener/WorkTimeChangeEventListener.java
  7. 12 1
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/controller/ResumptionController.java
  8. 0 5
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/retrieval/service/impl/CoreMonitoringRetrievalTaskServiceImpl.java
  9. 21 0
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/controller/SysNfcBindController.java
  10. 3 2
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/domain/SysNfcBind.java
  11. 31 0
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/listener/WorkTimeChangeEventListener.java
  12. 2 2
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/mapper/SysNfcBindMapper.java
  13. 2 1
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/ISysNfcBindService.java
  14. 14 0
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysNfcBindServiceImpl.java
  15. 9 0
      soc-modules/soc-modules-system/src/main/resources/mapper/system/SysNfcBindMapper.xml

+ 8 - 1
project_data/sql/0.0.2/soc/soc.sql

@@ -989,6 +989,11 @@ IF
 
 	END IF;
 	IF
+NOT EXISTS ( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE  table_schema = DATABASE () and TABLE_NAME = 'sys_nfc_bind' AND COLUMN_NAME = 'source' ) THEN
+ALTER TABLE sys_nfc_bind ADD COLUMN source VARCHAR ( 2 ) COMMENT '来源1web端2app';
+
+END IF;
+	IF
 		EXISTS ( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE () and  TABLE_NAME = 'sys_area_check' AND COLUMN_NAME = 'area_id' ) THEN
 			ALTER TABLE sys_area_check DROP COLUMN area_id;
 
@@ -1760,7 +1765,7 @@ VALUES ( 4, '新任职保卫人员未参考', '4', 'post_no_pass', NULL, 'defaul
 INSERT INTO `sys_dict_data` (`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
 VALUES ( 5, '非必考对象', '5', 'post_no_pass', NULL, 'default', 'N', '0', '超级管理员', '2023-09-13 18:17:47', '', NULL, NULL);
 
-delete from `sys_menu` WHERE id in (01706851077007085569,01706851219965743105,01706854057534033922,01706854338376241153,2325,2326,2327,2328,2329,2330,2331,2332,2333,2334,2335,2336,2338,2339,2340,2341,2342,2344,2345,2346,2347,2348,2349,2350,2351,2352,2353,2354,2355,2356,2357,2317,2318,00000000000000002324,01706850786660585473,01706850961911189505,01706239529069875202);
+delete from `sys_menu` WHERE id in (01706851077007085569,01706851219965743105,01706854057534033922,01706854338376241153,2325,2326,2327,2328,2329,2330,2331,2332,2333,2334,2335,2336,2338,2339,2340,2341,2342,2344,2345,2346,2347,2348,2349,2350,2351,2352,2353,2354,2355,2356,2357,2317,2318,00000000000000002324,01706850786660585473,01706850961911189505,01706239529069875202,2214);
 INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (00000000000000002325, '安全检查登记', 2136, 4, '/securityCheckRegister', NULL, NULL, 1, 0, 'C', '0', '0', 'core:safetycheck:appregister', '0', 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFYAAABWCAMAAABiiJHFAAAAM1BMVEVHcEzYvXHYvXHYvXHYvXHYvXHYvXHYvXHYvXHYvXHYvXHYvXHYvXHYvXHYvXHYvXHYvXF4gE2CAAAAEHRSTlMAV5zcH/72wO9wPIf7z+evrVcrhwAAAAlwSFlzAAALEgAACxIB0t1+/AAAAuBJREFUWIXtmddu7CAQhode3Ob9nzYyNjaYYpZFOidS/qtkhb/FUxkW/tSmSVE73FRkRkRcRmMdFXEaSzWIzBqB61jshAgAC+qx2BVRgZ0RySgiWTGWWPj3VCswEetDKe1FYUmpiBz8Akabqex+XoHOYQ3cf8tGkxgMsSyH5Tz4pzE6QhfJ6Eu85j3gbrVFR+Qjm9muILFptiZshJAciIq1WaDRGvU5FmWmbG34NRZRrtFmF/2M5D7sq/6w/wW2bekna381li+VNt6PlbXK14O1xrqaTgG4eYp0YxXOfHOdi8s0rGgvdkOcj6aicuHai3XtUexvS0rtt89l9HxXmFQi3o8dufZXY4mqHFy6sXx4ljlpd7S3SZaZbizVjLPjqDAybpXLsnl0llnts2zLUEUvFoCKY7bhq07UXWr2Db9MeH9Z9g3WVkfHLiyZ9twV5NF0VG5tO1Yh0tUV8kc63Gvloqhpuw+4sNOVpNEEciTCx7pfzAg/dkVNp2/uDexF5FxnWPd9m/kMC/UJkV6eFOzVwK3enebI4uxlSE2weTskY6Co2+uBpSLXdHLHJ1Gd1mMsyWdZdsKu7vfCGjUBFyhsFGDOhLm6jkcnecXuWSbdJVWYDrJwJeLUcsI2IviCWwUTaHdhUI6z27b7VZ3zV+ig/RCdoTJ3EKxsN3AZP035UMay8nyyXC8CbEHPK6zTV+4lisHwjk0cdkSWe4niVcg7NtmsKzW0/uArlngveWPQ4NPi1dsr1lwwepP8Ma14vDx8kB5jTvn4cr7fQ3ANqeUIywRlKL/CYYFr1z74VSSLr1lKzFN2n1eDffE4XYr30dnihOFz5wrtUyVMwmL2FuvIZTxfeYRJNiJLVICpypX3BfxpyfD1apWcb+nQeOuK/MMQPKTOFWqDbmOKqFF++QMCway+/v2A5qitF8+fcQdQfUsKI28EdW8dIVi3nMMawdt5mT2zcdBD+zQ8GPkvBAA/0zOEJ7oqo7UAAAAASUVORK5CYII=', NULL, '超级管理员', '2023-09-21 11:27:50', '超级管理员', '2023-09-22 16:44:12', '');
 INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (00000000000000002326, '安全检查', 0, 7, 'safetycheck', NULL, NULL, 1, 0, 'M', '0', '0', '', '1', 'nested', NULL, '超级管理员', '2023-09-21 15:33:41', 'jwx', '2023-09-23 11:09:29', '');
 INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (00000000000000002327, '安全检查内容库定义', 2326, 1, 'rule', 'safetycheck/rule/index', NULL, 1, 0, 'C', '0', '0', 'safetycheck:rule', '1', 'excel', NULL, '超级管理员', '2023-09-21 15:35:12', 'jwx', '2023-09-23 12:23:07', '');
@@ -1795,6 +1800,7 @@ INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `order_num`, `path`, `co
 INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (00000000000000002317, '检查计划', 2326, 3, 'check/plan', 'check/index', NULL, 1, 0, 'C', '0', '0', '', '1', 'documentation', NULL, '超级管理员', '2023-09-21 10:35:38', '超级管理员', '2023-09-22 09:42:15', '');
 INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (00000000000000002318, '检查任务', 2326, 4, 'check/task/index', 'check/task/index', NULL, 1, 0, 'C', '0', '0', '', '1', 'documentation', NULL, '超级管理员', '2023-09-21 10:37:52', '超级管理员', '2023-09-22 09:42:43', '');
 INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (01706239529069875202, '下发', 2317, 6, '', NULL, NULL, 1, 0, 'F', '0', '0', 'core:checkplan:distribute', '1', '#', NULL, '超级管理员', '2023-09-26 09:56:04', '', NULL, '');
+INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (00000000000000002214, '隐患问题清单', 2136, 4, '/problemItem', NULL, NULL, 1, 0, 'M', '0', '0', '', '0', 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFcAAABWCAMAAACNSvr7AAAAM1BMVEVHcEzNmKXNmKXNmKXNmKXNmKXNmKXNmKXNmKXNmKXNmKXNmKXNmKXNmKXNmKXNmKXNmKXc/5sSAAAAEHRSTlMA4NAQ8DBgQIDAoHAgUJCwaDv5MQAAAAlwSFlzAAALEgAACxIB0t1+/AAAAltJREFUWIXtmN12qyAQRkf+FUx4/6c9C4QaZQYwC08v6neTNqm7hIHNKDx58uSXwlfzRXRrsEb4b2Ia2OUrapNrv8S2uJP3flJuHszVAcsBRnON917BPVx94moytpv78t7DiVuftT7ufBM3jFfewOWzn+8Yb84d3OCdaTy38M4YbumdIVxVYMdww8QKI0fXDfPOCC7mnVHc/+Wdvlz3zggu5p0RXDeV3hnB/ZyP4Vx99M4grn36HQAQ0TuaDeaGHS8u9TtsZh3c4Afbu86m18rjVU4t4rp3iMyxk47+cYHd5EIPl2mAdflZ5rOpc3u9YwDUae8sNfLS5R2hQJYrRlia6ybPmuMVEjtevfdvXp2MFlcRWO9ZFaxt1TuGxPrty+KxDZcxkJVPX7XKVaMB/cevpEHi/rDpnTmu8SIKpKjNRPSOqnhnRYcbeo4EXtGSbcuIXg8TrAQ2g98Yt3mftWAF2LDAt2+JrbWmdxSUU5SwLn2CVa7pHQ35J5HPwYSV+XfMmE3vcJexMoHOWJTb9E7uIUNxAyq8HrFbY3OKbHkncTecFAgW5X7OBxrH47sJ5xAsfdLJlfZOqttRXAcsxV2r3jFpnTG5X6GPHRJuiIZ33rGV9XvBylsoFEurNYVnS2bw+Qp0H0epsJp37I93NrA+/wE6De3nO9M+QKHOJSNXWcfzHfNhCFVgiap19DvCfZxDBZZYZD39DqsUl9prXf3Ocv2c7+t3KPBCtg9SbN6R9M1rCAdd7spaH9XqN/fw83MVerBXo957vewwaozU1ljdfFb95M/nSQoA/AN/gr7nzB2jDwAAAABJRU5ErkJggg==', NULL, '超级管理员', '2023-09-20 15:14:35', '超级管理员', '2023-09-20 17:47:12', '');
 
 
 DELETE FROM sys_menu WHERE id IN(2359,2360,2361,2362,2363,2364,2365,2207);
@@ -2001,6 +2007,7 @@ INSERT INTO sys_menu (id, menu_name, parent_id, order_num, path, component, quer
 INSERT INTO sys_menu (id, menu_name, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, perms, platform_type, icon, image_path, create_by, create_time, update_by, update_time, remark) VALUES (1714188002965626881, '综合评价规则列表查询', 1712278645189414914, 4, '', null, null, 1, 0, 'F', '0', '0', 'core:safetyIndexRule:list', '1', null, null, null, now(), '', null, '');
 INSERT INTO sys_menu (id, menu_name, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, perms, platform_type, icon, image_path, create_by, create_time, update_by, update_time, remark) VALUES (1714188131026116609, '综合评价规则删除', 1712278645189414914, 5, '', null, null, 1, 0, 'F', '0', '0', 'core:safetyIndexRule:remove', '1', null, null, null, now(), '', null, '');
 
+
 INSERT INTO sys_menu (id, menu_name, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, perms, platform_type, icon, image_path, create_by, create_time, update_by, update_time, remark)
  VALUES (1714247486990786561, '撤回计划', 2052, 9, '', null, null, 1, 0, 'F', '0', '0', 'core:accessPlan:add', '1', null, null, null, now(), '', null, '');
 delete from sys_role_menu where menu_id in (1712277074707779586,1712278645189414914,1714187591810588674,1714187748136493058,1714187851295399937,1714188002965626881,1714188131026116609);

+ 3 - 2
soc-api/soc-api-system/src/main/java/com/xunmei/system/api/RemoteResumptionTaskService.java

@@ -3,6 +3,7 @@ package com.xunmei.system.api;
 import com.xunmei.common.core.constant.SecurityConstants;
 import com.xunmei.common.core.constant.ServiceNameConstants;
 import com.xunmei.common.core.domain.R;
+import com.xunmei.common.core.event.WorkTimeChangeEvent;
 import com.xunmei.common.core.web.domain.AjaxResult;
 import com.xunmei.system.api.factory.RemoteEduTrainingFallbackFactory;
 import com.xunmei.system.api.factory.RemoteResumptionTaskFallbackFactory;
@@ -46,6 +47,6 @@ public interface RemoteResumptionTaskService {
 
     @GetMapping(value = "resumption/task/updatetaskstatus")
     R<Boolean> updateTaskStatus();
-    @PostMapping("resumption/task/dayTaskByWorkTime")
-    AjaxResult dayTaskByWorkTime(@RequestBody Map<String, Object> param,@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
+    @PostMapping("api/resumption/rebuild")
+    AjaxResult rebuild(@RequestBody String event, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
 }

+ 2 - 1
soc-api/soc-api-system/src/main/java/com/xunmei/system/api/factory/RemoteResumptionTaskFallbackFactory.java

@@ -1,6 +1,7 @@
 package com.xunmei.system.api.factory;
 
 import com.xunmei.common.core.domain.R;
+import com.xunmei.common.core.event.WorkTimeChangeEvent;
 import com.xunmei.common.core.web.domain.AjaxResult;
 import com.xunmei.system.api.RemoteEduTrainingService;
 import com.xunmei.system.api.RemoteOrgService;
@@ -61,7 +62,7 @@ public class RemoteResumptionTaskFallbackFactory implements FallbackFactory<Remo
             }
 
             @Override
-            public AjaxResult dayTaskByWorkTime(Map<String, Object> param,String source) {
+            public AjaxResult rebuild(String event, String source) {
                 return null;
             }
 

+ 6 - 2
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/event/WorkTimeChangeEvent.java

@@ -2,7 +2,9 @@ package com.xunmei.common.core.event;
 
 import com.xunmei.common.core.domain.worktime.domain.SysWorkTime;
 import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
 import lombok.Getter;
+import lombok.Setter;
 import org.springframework.context.ApplicationEvent;
 
 import java.util.Date;
@@ -10,12 +12,14 @@ import java.util.List;
 
 
 @Getter
+@Setter
 public class WorkTimeChangeEvent extends ApplicationEvent {
 
     @ApiModelProperty(value = "机构id数组", notes = "受影响的机构")
-    private final List<Long> orgIds;
+    private List<Long> orgIds;
+
+    private List<SysWorkTime> dataList;
 
-    private final List<SysWorkTime> dataList;
 
     public WorkTimeChangeEvent(Object source, List<Long> orgIds, List<SysWorkTime> dataList) {
         super(source);

+ 0 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/access/service/impl/TMonitoringRetrievalPlanServiceImpl.java

@@ -387,7 +387,6 @@ public class TMonitoringRetrievalPlanServiceImpl extends ServiceImpl<TMonitoring
             sysOrg.setPath(nowUserOrg.getPath());
             sysOrg.setType(Integer.valueOf(tMonitoringRetrievalPlan.getOrgType()));
             List<SysOrg> sysOrgs = remoteOrgService.listByParentIdAndType(sysOrg, SecurityConstants.INNER);
-            // List<TMonitoringRetrievalPlan> tMonitoringRetrievalPlans = new ArrayList<>();
             for (SysOrg s : sysOrgs) {
                 TMonitoringRetrievalPlan plan = new TMonitoringRetrievalPlan();
                 BeanUtils.copyProperties(tMonitoringRetrievalPlan, plan);

+ 4 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/listener/WorkTimeChangeEventListener.java

@@ -31,7 +31,9 @@ public class WorkTimeChangeEventListener implements ApplicationListener<WorkTime
 
     private void eduTask(WorkTimeChangeEvent event) {
         try {
+            log.info("教育培训开始处理机构作息变更");
             coreEduTrainingTaskService.taskChangeForTimeWorkChange(event);
+            log.info("教育培训结束处理机构作息变更");
         } catch (Exception e) {
             log.error(e.getMessage(), e);
         }
@@ -40,7 +42,9 @@ public class WorkTimeChangeEventListener implements ApplicationListener<WorkTime
 
     private void resumptionTask(WorkTimeChangeEvent event) {
         try {
+            log.info("履职开始处理机构作息变更");
             rebuildResumptionTaskBusiness.rebuildTask(event);
+            log.info("履职结束处理机构作息变更");
         } catch (Exception e) {
             log.error(e.getMessage(), e);
         }

+ 12 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/controller/ResumptionController.java

@@ -3,12 +3,17 @@ package com.xunmei.core.resumption.controller;
 import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.util.NumberUtil;
 import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.fastjson2.JSON;
 import com.alibaba.nacos.common.utils.CollectionUtils;
+import com.alibaba.nacos.shaded.com.google.gson.Gson;
 import com.xunmei.common.core.constant.SecurityConstants;
 import com.xunmei.common.core.constant.SystemParameterConstant;
+import com.xunmei.common.core.event.WorkTimeChangeEvent;
 import com.xunmei.common.core.web.domain.AjaxResult;
 import com.xunmei.common.redis.utils.RedisUtils;
+import com.xunmei.common.security.annotation.InnerAuth;
 import com.xunmei.common.security.utils.SecurityUtils;
+import com.xunmei.core.listener.WorkTimeChangeEventListener;
 import com.xunmei.core.resumption.domain.Resumption;
 import com.xunmei.core.resumption.dto.resumptionRegister.ResumptionTaskDataDto;
 import com.xunmei.core.resumption.dto.TaskDetailsDto;
@@ -46,7 +51,13 @@ public class ResumptionController {
     @Autowired
     ResumptionService resumptionService;
 
-
+    @Autowired
+    WorkTimeChangeEventListener workTimeChangeEventListener;
+    @PostMapping(value = "/rebuild")
+    @InnerAuth
+    void rebuildTask(@RequestBody String event){
+        workTimeChangeEventListener.onApplicationEvent(new Gson().fromJson(event,WorkTimeChangeEvent.class));
+    }
 
     @ApiOperation(value = "new所有")
     @PostMapping(value = "/newTaskList")

+ 0 - 5
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/retrieval/service/impl/CoreMonitoringRetrievalTaskServiceImpl.java

@@ -510,11 +510,6 @@ public class CoreMonitoringRetrievalTaskServiceImpl extends ServiceImpl<CoreMoni
             dateRange = DateUtils.getStartAndEnd(dateTime, EduTrainingPlanCycleEnum.toCommmonEnum(Integer.parseInt(plan.getPlanCycle())));
         }
         Map<Integer, DateRange> dateRanges = DateUtils.splitDateRange(dateRange.getStartTime(), dateRange.getEndTime(), plan.getPlanFrequency().intValue());
-        for (int i = 1; i <= plan.getPlanFrequency(); i++) {
-            DateRange dateRange1 = dateRanges.get(i);
-            CoreMonitoringRetrievalTask task = this.buildCoreMonitoringRetrievalTask(batchNum, i, plan, sysOrg, dateRange1, ymd);
-            taskList.add(task);
-        }
         //判断作息(无周期排开)
         if(!plan.getPlanCycle().equals(RetrievalTaskCycle.NOCYCLE.getCode().toString())){
             boolean flag = checkWorkTime(dateRange.getStartTime(), dateRange.getEndTime(), sysOrg.getId());

+ 21 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/controller/SysNfcBindController.java

@@ -1,6 +1,7 @@
 package com.xunmei.system.controller;
 
 import java.util.List;
+
 import com.xunmei.system.api.domain.SysArea;
 import com.xunmei.system.domain.SysAreaCheck;
 import com.xunmei.system.service.ISysAreaCheckService;
@@ -52,6 +53,15 @@ public class SysNfcBindController extends BaseController {
         return sysNfcBindService.selectPage(sysNfcBind);
     }
 
+    /**
+     * 获取【请填写功能名称】详细信息
+     */
+    @ApiOperation(value = "获取SysNfcBind详细信息")
+    @RequiresPermissions("system:bind:query")
+    @GetMapping(value = {"/appGetInfo", "/{code}"})
+    public AjaxResult appGetInfo(@PathVariable(value = "code", required = false) String code) {
+        return success(sysNfcBindService.selectSysNfcBindByCode(code));
+    }
 
     /**
      * 获取【请填写功能名称】详细信息
@@ -106,4 +116,15 @@ public class SysNfcBindController extends BaseController {
     public AjaxResult remove(@PathVariable Long[] ids) {
         return toAjax(sysNfcBindService.deleteSysNfcBindByIds(ids));
     }
+
+    /**
+     * 解绑【请填写功能名称】
+     */
+    @ApiOperation(value = "解绑")
+    @RequiresPermissions("system:bind:remove")
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
+    @DeleteMapping("/unbinding/{code}")
+    public AjaxResult unbinding(@PathVariable String code) {
+        return toAjax(sysNfcBindService.deleteSysNfcBindByCode(code));
+    }
 }

+ 3 - 2
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/domain/SysNfcBind.java

@@ -57,7 +57,7 @@ public class SysNfcBind extends BaseEntity {
      */
     @ApiModelProperty(value = "标签编号")
     private String code;
-    @ApiModelProperty(value = "标签名称")
+    @ApiModelProperty(value = "标签名称,app没有不传")
     private String labelName;
 
     /**
@@ -65,7 +65,8 @@ public class SysNfcBind extends BaseEntity {
      */
     @ApiModelProperty(value = "最后修改人id")
     private Long updateId;
-
+    @ApiModelProperty(value = "来源1web端2app")
+private String source;
     /**
      * 机构
      */

+ 31 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/listener/WorkTimeChangeEventListener.java

@@ -0,0 +1,31 @@
+package com.xunmei.system.listener;
+
+import com.alibaba.fastjson2.JSON;
+import com.xunmei.common.core.constant.SecurityConstants;
+import com.xunmei.common.core.event.WorkTimeChangeEvent;
+import com.xunmei.system.api.RemoteResumptionTaskService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.ApplicationListener;
+import org.springframework.context.event.EventListener;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.event.TransactionPhase;
+import org.springframework.transaction.event.TransactionalEventListener;
+import springfox.documentation.spring.web.json.Json;
+
+@Component
+@Slf4j
+public class WorkTimeChangeEventListener implements ApplicationListener<WorkTimeChangeEvent> {
+
+
+    @Autowired
+    RemoteResumptionTaskService remoteResumptionTaskService;
+
+    @Override
+    @EventListener(WorkTimeChangeEvent.class)
+    @TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT, fallbackExecution = true)
+    public void onApplicationEvent(WorkTimeChangeEvent event) {
+
+        remoteResumptionTaskService.rebuild(JSON.toJSONString(event), SecurityConstants.INNER);
+    }
+}

+ 2 - 2
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/mapper/SysNfcBindMapper.java

@@ -40,7 +40,7 @@ public interface SysNfcBindMapper extends BaseMapper<SysNfcBind> {
      * @return
      */
     Page<SysNfcBind> selectNFCPage(Page<SysNfcBind> page, @Param("info") SysNfcBind info);
-
+    SysNfcBind selectSysNfcBindByCode(String code);
     /**
      * 修改区域名称
      * @param sysNfcBind
@@ -69,7 +69,7 @@ public interface SysNfcBindMapper extends BaseMapper<SysNfcBind> {
      * @return 结果
      */
      int updateSysNfcBind(SysNfcBind sysNfcBind);
-
+    int deleteSysNfcBindByCode(String code);
     /**
      * 删除【请填写功能名称】
      *

+ 2 - 1
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/ISysNfcBindService.java

@@ -22,6 +22,7 @@ public interface ISysNfcBindService extends IService<SysNfcBind> {
      */
     SysNfcBind selectSysNfcBindById(Long id);
 
+    SysNfcBind selectSysNfcBindByCode(String code);
     /**
      * 查询【NFC管理】列表
      *
@@ -53,7 +54,7 @@ public interface ISysNfcBindService extends IService<SysNfcBind> {
      * @return 结果
      */
     int deleteSysNfcBindByIds(Long[] ids);
-
+int deleteSysNfcBindByCode(String code);
     /**
      * 删除【NFC管理】信息
      *

+ 14 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysNfcBindServiceImpl.java

@@ -91,6 +91,11 @@ public class SysNfcBindServiceImpl extends ServiceImpl<SysNfcBindMapper, SysNfcB
         return sysNfcBindMapper.selectById(id);
     }
 
+    @Override
+    public SysNfcBind selectSysNfcBindByCode(String code) {
+        return sysNfcBindMapper.selectSysNfcBindByCode(code);
+    }
+
     /**
      * 查询【请填写功能名称】列表
      *
@@ -123,6 +128,10 @@ public class SysNfcBindServiceImpl extends ServiceImpl<SysNfcBindMapper, SysNfcB
         sysNfcBind.setUpdateTime(DateUtils.getNowDate());
         sysNfcBind.setCreateTime(DateUtils.getNowDate());
         sysNfcBind.setDelFlag("0");
+        sysNfcBind.setSource("1");
+        if(null==sysNfcBind.getCode()){
+            sysNfcBind.setSource("2");
+        }
         SysOrg sysOrg = sysOrgService.selectSysOrgById(sysNfcBind.getOrgId());
         if (null != sysOrg) {
             sysNfcBind.setOrgName(sysOrg.getShortName());
@@ -194,6 +203,11 @@ public class SysNfcBindServiceImpl extends ServiceImpl<SysNfcBindMapper, SysNfcB
 
     }
 
+    @Override
+    public int deleteSysNfcBindByCode(String code) {
+        return sysNfcBindMapper.deleteSysNfcBindByCode(code);
+    }
+
     /**
      * 删除【请填写功能名称】信息
      *

+ 9 - 0
soc-modules/soc-modules-system/src/main/resources/mapper/system/SysNfcBindMapper.xml

@@ -122,6 +122,9 @@
         </if>
         order by a.org_id,a.area_id,code
     </select>
+    <select id="selectSysNfcBindByCode" resultType="com.xunmei.system.domain.SysNfcBind">
+        SELECT * FROM sys_nfc_bind WHERE source=2 AND code=#{code}
+    </select>
 
     <insert id="insertSysNfcBind" parameterType="com.xunmei.system.domain.SysNfcBind">
         insert into sys_nfc_bind
@@ -252,4 +255,10 @@
             #{id}
         </foreach>
     </delete>
+    <delete id="deleteSysNfcBindByCode">
+        delete
+        from sys_nfc_bind
+        where source = '2'
+          and code = #{code}
+    </delete>
 </mapper>