From 1e83257581d24ae27b6e6567635a44e28305122e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=88=86=E7=B1=B3=E8=8A=B1?= <417727563@qq.com> Date: Sat, 8 Apr 2023 08:48:51 +0800 Subject: [PATCH] 2023-04-08 --- ant-design-vue-jeecg/package.json | 1 - .../src/views/device/modules/ZyDeviceForm.vue | 2 +- .../impl/HangerLocationServiceImpl.java | 86 ++----------------- .../service/impl/HangerMakerServiceImpl.java | 3 + 4 files changed, 10 insertions(+), 82 deletions(-) diff --git a/ant-design-vue-jeecg/package.json b/ant-design-vue-jeecg/package.json index 730bfbbc..430c5426 100644 --- a/ant-design-vue-jeecg/package.json +++ b/ant-design-vue-jeecg/package.json @@ -11,7 +11,6 @@ }, "dependencies": { "@antv/data-set": "^0.11.4", - "@jeecg/antd-online-mini": "2.4.5-RC", "@jiaminghi/data-view": "^2.10.0", "@tinymce/tinymce-vue": "2.1.0", "@toast-ui/editor": "^2.1.2", diff --git a/ant-design-vue-jeecg/src/views/device/modules/ZyDeviceForm.vue b/ant-design-vue-jeecg/src/views/device/modules/ZyDeviceForm.vue index 1584eb5a..37fd658a 100644 --- a/ant-design-vue-jeecg/src/views/device/modules/ZyDeviceForm.vue +++ b/ant-design-vue-jeecg/src/views/device/modules/ZyDeviceForm.vue @@ -139,7 +139,7 @@ validatorRules: { name:[ { required: true, message: '请输入设备名称!'}, - {min: 1, max: 50, message: '最多输入50字!', trigger: 'blur'}, + {min: 1, max: 200, message: '最多输入200字!', trigger: 'blur'}, ], }, url: { diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/hangerlocation/service/impl/HangerLocationServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/hangerlocation/service/impl/HangerLocationServiceImpl.java index fbcccaf0..0c78db0c 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/hangerlocation/service/impl/HangerLocationServiceImpl.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/hangerlocation/service/impl/HangerLocationServiceImpl.java @@ -1,6 +1,7 @@ package org.jeecg.modules.hangerlocation.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.jeecg.common.util.XJobUtils; import org.jeecg.modules.hangerlocation.entity.HangerLocation; import org.jeecg.modules.hangerlocation.mapper.HangerLocationMapper; import org.jeecg.modules.hangerlocation.service.IHangerLocationService; @@ -16,6 +17,8 @@ import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.*; +import static org.jeecg.common.util.XJobUtils.dateToLong; + /** * @Description: 衣架定位表 * @Author: jeecg-boot @@ -56,7 +59,7 @@ public class HangerLocationServiceImpl extends ServiceImpl qwhm=new QueryWrapper(); qwhm.eq("order_code",entry.getKey()); HangerMaker hm=hangerMakerMapper.selectOne(qwhm); @@ -86,13 +89,13 @@ public class HangerLocationServiceImpl extends ServiceImpl date - Date time = calendar.getTime(); - return time; - } - /** - * 获取间隔时间 - * @param start_Date - * @return - */ - private Date returnIntervaltime(Date start_Date) - { - //将时间转为long类型 - long start=start_Date.getTime(); - //获取30-180秒对应毫秒 - long intervalTime=randInt(30,180)*1000; - //总共花费时长 - long timeMillis =start+intervalTime; - - return longToDate(timeMillis); - } - - /** - * 其实这是基于一个公式 如果要取一个范围在[min,max]之间的随机整数那么公式如下 - * @param min - * @param max - * @return - */ - private int randInt(int min,int max) - { - Random rand = new Random(); - // nextInt通常不包含顶部值,因此加上1使其包含 - int randomNum = rand.nextInt((max - min) + 1) + min; - return randomNum; - } - - - - //将long转为日期 - private Date longToDate(long lo) - { - SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - //long转Date - Date date = null; - try { - date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(sd.format(new Date(lo))); - } catch (ParseException e) { - e.printStackTrace(); - } - return date; - } - - //将日期转为long - private long dateToLong(Date s,Date e) - { - - long sl=s.getTime(); - long el=e.getTime(); - long r=el-sl; - return (el-sl)/1000; - } } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/hangermaker/service/impl/HangerMakerServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/hangermaker/service/impl/HangerMakerServiceImpl.java index 86671a0b..1372a9dc 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/hangermaker/service/impl/HangerMakerServiceImpl.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/hangermaker/service/impl/HangerMakerServiceImpl.java @@ -30,6 +30,9 @@ public class HangerMakerServiceImpl extends ServiceImpl