Преглед на файлове

1.注销掉自动打印定时任务2.完善标签修改方法,需要考虑跨段的情况

hill.liu преди 8 месеца
родител
ревизия
c90b702cbb

+ 1 - 1
src/main/java/com/sy/coinage/task/ScheduleTask.java

@@ -109,7 +109,7 @@ public class ScheduleTask {
         // log.debug("执行了定时任务={},结果={}", "每10秒执行", resp);
     }
 
-    @Scheduled(cron = five_minute)
+//    @Scheduled(cron = five_minute)
     private void printRfidBaseInfo(){
 
         if(type.equals("dev"))return;

+ 6 - 6
src/main/java/com/sy/coinage/workshop/controller/BaseInfoController.java

@@ -174,12 +174,12 @@ public class BaseInfoController extends BaseController {
     @PostMapping("/update")
     public Object update(@RequestBody @ApiParam(value = "修改请求bean") @Validated({Update.class}) BaseInfoReq req,
                     @CurrentUser CacheUserVO user) {
-        BaseInfo model = this.baseInfoService.getById(req.getId());
-        BeanUtils.copyProperties(req, model);
-        model.setCrownBetween(model.getCrownPrefix() +"-"+ model.getCrownFrom() + " 至 "
-                + model.getCrownPrefix() +"-"+ model.getCrownTo());
-        // model.setUpdateBy(user.getName());
-        this.baseInfoService.updateById(model);
+//        BaseInfo model = this.baseInfoService.getById(req.getId());
+//        BeanUtils.copyProperties(req, model);
+//        model.setCrownBetween(model.getCrownPrefix() +"-"+ model.getCrownFrom() + " 至 "
+//                + model.getCrownPrefix() +"-"+ model.getCrownTo());
+//        this.baseInfoService.updateById(model);
+        this.baseInfoService.updateRfidInfo(req);
         return "";
     }
     /**

+ 7 - 0
src/main/java/com/sy/coinage/workshop/service/IBaseInfoService.java

@@ -103,4 +103,11 @@ public interface IBaseInfoService extends IService<BaseInfo> {
     BaseInfo getByCrown(Integer securitiesId, String crown);
 
     BaseInfo getLast(Integer deptId);
+
+
+    /**
+     * 修改冠字号相关信息,主要是根据号段,顺序序号,来更新
+     * @param req
+     */
+    void updateRfidInfo(BaseInfoReq req);
 }