From 97fbba68b72955c3735645c0c4e0320eed6461b3 Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期一, 17 十月 2022 18:04:10 +0800
Subject: [PATCH] Merge branch 'master' of http://42.193.1.25:9521/r/sccg_server
---
ycl-platform/src/main/java/com/ycl/service/equipment/impl/EquipmentBayonetServiceImpl.java | 11 +
ycl-platform/src/main/java/com/ycl/service/region/ISccgRegionService.java | 2
ycl-platform/src/main/java/com/ycl/service/equipment/IEquipmentBayonetService.java | 4
ycl-common/src/main/java/com/ycl/aspect/LogAspect.java | 6
ycl-platform/src/main/java/com/ycl/service/message/impl/MessageScheduleServiceImpl.java | 35 +++
ycl-platform/src/main/java/com/ycl/entity/message/Message.java | 7
ycl-platform/src/main/java/com/ycl/dto/message/MessageParam.java | 5
ycl-platform/src/main/java/com/ycl/service/region/impl/SccgRegionServiceImpl.java | 9
ycl-platform/src/main/java/com/ycl/controller/region/SccgRegionController.java | 51 +++++
ycl-platform/src/main/java/com/ycl/entity/equipment/EquipmentBayonet.java | 16 +
ycl-platform/src/main/java/com/ycl/controller/epuipment/EquipmentBayonetController.java | 94 ++++++++++
ycl-platform/src/main/java/com/ycl/service/message/factory/InnerSender.java | 5
ycl-platform/src/main/java/com/ycl/common/constant/CheckResult.java | 32 +++
ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/CheckHandleServiceImpl.java | 48 ++++
ycl-platform/src/main/java/com/ycl/vo/equipment/EquipmentBayonetVO.java | 84 +++++++++
ycl-platform/src/main/java/com/ycl/scheduling/SchedulingConfiguration.java | 85 +++++++++
ycl-platform/src/main/java/com/ycl/service/message/MessageScheduleService.java | 13 +
ycl-platform/src/main/java/com/ycl/entity/region/SccgRegion.java | 10 +
ycl-common/src/main/java/com/ycl/controller/user/UmsAdminLogController.java | 8
19 files changed, 503 insertions(+), 22 deletions(-)
diff --git a/ycl-common/src/main/java/com/ycl/aspect/LogAspect.java b/ycl-common/src/main/java/com/ycl/aspect/LogAspect.java
index 85d7ba7..8db5b2a 100644
--- a/ycl-common/src/main/java/com/ycl/aspect/LogAspect.java
+++ b/ycl-common/src/main/java/com/ycl/aspect/LogAspect.java
@@ -57,7 +57,11 @@
}else {
loginLog.setUserAgent("Web绔�");
}
- loginLog.setOperationType(annotation.operationType());
+ if (annotation.operationType().equals("")){
+ loginLog.setOperationType("鍏朵粬鎿嶄綔");
+ }else {
+ loginLog.setOperationType(annotation.operationType());
+ }
loginLog.setContain(annotation.contain());
umsAdminLoginLogMapper.insert(loginLog);
}
diff --git a/ycl-common/src/main/java/com/ycl/controller/user/UmsAdminLogController.java b/ycl-common/src/main/java/com/ycl/controller/user/UmsAdminLogController.java
index a428b3f..40502f4 100644
--- a/ycl-common/src/main/java/com/ycl/controller/user/UmsAdminLogController.java
+++ b/ycl-common/src/main/java/com/ycl/controller/user/UmsAdminLogController.java
@@ -49,8 +49,8 @@
.eq(StringUtils.isNotBlank(logQueryParams.getPortEquipment()), UmsAdminLoginLog::getUserAgent, logQueryParams.getPortEquipment())
.eq(logQueryParams.getId() != null, UmsAdminLoginLog::getAdminId, logQueryParams.getId())
.between(logQueryParams.getStartTime() != null && logQueryParams.getEndTime() != null, UmsAdminLoginLog::getCreateTime, logQueryParams.getStartTime(), logQueryParams.getEndTime())
- .orderBy(logQueryParams.getSort() == 0, true, UmsAdminLoginLog::getCreateTime)
- .orderBy(logQueryParams.getSort() == 1, false, UmsAdminLoginLog::getCreateTime));
+ .orderBy(logQueryParams.getSort()!=null&&logQueryParams.getSort() == 0, true, UmsAdminLoginLog::getCreateTime)
+ .orderBy(logQueryParams.getSort()!=null&&logQueryParams.getSort() == 1, false, UmsAdminLoginLog::getCreateTime));
List<UmsAdminLogVO> umsAdminLogVOList = page.getRecords().stream()
.map(item -> {
UmsAdminLogVO umsAdminlogVO = new UmsAdminLogVO();
@@ -114,8 +114,8 @@
.like(StringUtils.isNotBlank(logQueryParams.getContent()), UmsAdminLoginLog::getContain, logQueryParams.getContent())
.eq(StringUtils.isNotBlank(logQueryParams.getOperationType()), UmsAdminLoginLog::getOperationType, logQueryParams.getOperationType())
.between(logQueryParams.getStartTime() != null && logQueryParams.getEndTime() != null, UmsAdminLoginLog::getCreateTime, logQueryParams.getStartTime(), logQueryParams.getEndTime())
- .orderBy(logQueryParams.getSort() == 0, true, UmsAdminLoginLog::getCreateTime)
- .orderBy(logQueryParams.getSort() == 1, false, UmsAdminLoginLog::getCreateTime))
+ .orderBy(logQueryParams.getSort()!=null&&logQueryParams.getSort() == 0, true, UmsAdminLoginLog::getCreateTime)
+ .orderBy(logQueryParams.getSort()!=null&&logQueryParams.getSort() == 1, false, UmsAdminLoginLog::getCreateTime))
.getRecords()
.stream()
.map(item -> {
diff --git a/ycl-platform/src/main/java/com/ycl/common/constant/CheckResult.java b/ycl-platform/src/main/java/com/ycl/common/constant/CheckResult.java
new file mode 100644
index 0000000..8d971ba
--- /dev/null
+++ b/ycl-platform/src/main/java/com/ycl/common/constant/CheckResult.java
@@ -0,0 +1,32 @@
+package com.ycl.common.constant;
+
+/**
+ * <p>
+ * 瀹℃牳缁撴灉
+ * </p>
+ *
+ * @author mg
+ * @since 2022-10-17
+ */
+public enum CheckResult {
+
+ PASS("01", "閫氳繃"),
+ REJECT("02", "椹冲洖");
+
+
+ private String code;
+ private String name;
+
+ CheckResult(String code, String name) {
+ this.code = code;
+ this.name = name;
+ }
+
+ public String getCode() {
+ return code;
+ }
+
+ public String getName() {
+ return name;
+ }
+}
diff --git a/ycl-platform/src/main/java/com/ycl/controller/epuipment/EquipmentBayonetController.java b/ycl-platform/src/main/java/com/ycl/controller/epuipment/EquipmentBayonetController.java
index 47d3e45..21ba024 100644
--- a/ycl-platform/src/main/java/com/ycl/controller/epuipment/EquipmentBayonetController.java
+++ b/ycl-platform/src/main/java/com/ycl/controller/epuipment/EquipmentBayonetController.java
@@ -1,15 +1,29 @@
package com.ycl.controller.epuipment;
+import com.alibaba.excel.EasyExcel;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ycl.annotation.LogSave;
import com.ycl.api.CommonResult;
import com.ycl.controller.BaseController;
-import com.ycl.entity.video.VideoPoint;
+import com.ycl.entity.dict.DataDictionary;
+import com.ycl.entity.equipment.EquipmentBayonet;
+import com.ycl.service.dict.IDataDictionaryService;
import com.ycl.service.equipment.IEquipmentBayonetService;
+import com.ycl.vo.equipment.EquipmentBayonetVO;
+import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
+import lombok.SneakyThrows;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.net.URLEncoder;
+import java.time.LocalDateTime;
+import java.util.stream.Collectors;
/**
* <p>
@@ -21,9 +35,87 @@
*/
@RestController
@RequestMapping("/equipment_bayonet")
+@Api(tags = "鍗″彛绠$悊")
public class EquipmentBayonetController extends BaseController {
@Autowired
IEquipmentBayonetService iEquipmentBayonetService;
+ @Autowired
+ IDataDictionaryService iDataDictionaryService;
+
+ @GetMapping("/query")
+ @ApiOperation("鏌ヨ")
+ @LogSave
+ public CommonResult search(@RequestParam(required = false) Integer size,
+ @RequestParam(required = false) Integer current,
+ @RequestParam(required = false) String bayonetName) {
+ Page<EquipmentBayonet> equipmentBayonetPage = new Page<>();
+ equipmentBayonetPage.setCurrent(current);
+ equipmentBayonetPage.setSize(size);
+ return CommonResult.success(iEquipmentBayonetService
+ .page(equipmentBayonetPage, new LambdaQueryWrapper<EquipmentBayonet>()
+ .like(StringUtils.isNotBlank(bayonetName), EquipmentBayonet::getBayonetName, bayonetName))
+ .getRecords()
+ .stream()
+ .map(item -> {
+ EquipmentBayonetVO equipmentBayonetVO = new EquipmentBayonetVO();
+ BeanUtils.copyProperties(item, equipmentBayonetVO);
+ equipmentBayonetVO.setFrontEndType(iDataDictionaryService.getOne(new LambdaQueryWrapper<DataDictionary>().eq(DataDictionary::getId, item.getFrontEndType())).getName());
+ equipmentBayonetVO.setInOutCityType(iDataDictionaryService.getOne(new LambdaQueryWrapper<DataDictionary>().eq(DataDictionary::getId, item.getInOutCityType())).getName());
+ return equipmentBayonetVO;
+ }).collect(Collectors.toList()));
+ }
+
+ @PostMapping("/addition")
+ @ApiOperation("娣诲姞")
+ @LogSave(operationType = "鍗″彛绠$悊",contain = "娣诲姞鍗″彛")
+ public CommonResult add(@RequestBody EquipmentBayonet equipmentBayonet) {
+ return CommonResult.success(iEquipmentBayonetService.save(equipmentBayonet));
+ }
+
+ @PutMapping("/modification")
+ @ApiOperation("淇敼")
+ @LogSave(operationType = "鍗″彛绠$悊",contain = "淇敼鍗″彛")
+ public CommonResult modify(@RequestBody EquipmentBayonet equipmentBayonet) {
+ return CommonResult.success(iEquipmentBayonetService.updateById(equipmentBayonet));
+ }
+
+ @GetMapping("/export")
+ @ApiOperation("瀵煎嚭")
+ @SneakyThrows
+ @LogSave(operationType = "鍗″彛绠$悊",contain = "鍒犻櫎鍗″彛")
+ public void export(HttpServletResponse response,
+ @RequestParam(required = false) Integer size,
+ @RequestParam(required = false) Integer current,
+ @RequestParam(required = false) String bayonetName) {
+ Page<EquipmentBayonet> equipmentBayonetPage = new Page<>();
+ equipmentBayonetPage.setCurrent(current);
+ equipmentBayonetPage.setSize(size);
+ StringBuilder fileName = new StringBuilder();
+ fileName.append(LocalDateTime.now().getYear())
+ .append("-")
+ .append(LocalDateTime.now().getMonthValue())
+ .append("-")
+ .append(LocalDateTime.now().getDayOfMonth())
+ .append("鍗″彛鏁版嵁");
+ response.setContentType("application/vnd.ms-excel");
+ response.setCharacterEncoding("utf-8");
+ String file = URLEncoder.encode(fileName.toString(), "UTF-8").replaceAll("\\+", "%20");
+ response.setHeader("Content-disposition", "attachment;filename=" + file + ".xlsx");
+ EasyExcel.write(response.getOutputStream(), EquipmentBayonetVO.class)
+ .sheet("鏁版嵁")
+ .doWrite(iEquipmentBayonetService
+ .page(equipmentBayonetPage, new LambdaQueryWrapper<EquipmentBayonet>()
+ .like(StringUtils.isNotBlank(bayonetName), EquipmentBayonet::getBayonetName, bayonetName))
+ .getRecords()
+ .stream()
+ .map(item -> {
+ EquipmentBayonetVO equipmentBayonetVO = new EquipmentBayonetVO();
+ BeanUtils.copyProperties(item, equipmentBayonetVO);
+ equipmentBayonetVO.setFrontEndType(iDataDictionaryService.getOne(new LambdaQueryWrapper<DataDictionary>().eq(DataDictionary::getId, item.getFrontEndType())).getName());
+ equipmentBayonetVO.setInOutCityType(iDataDictionaryService.getOne(new LambdaQueryWrapper<DataDictionary>().eq(DataDictionary::getId, item.getInOutCityType())).getName());
+ return equipmentBayonetVO;
+ }).collect(Collectors.toList()));
+ }
}
diff --git a/ycl-platform/src/main/java/com/ycl/controller/region/SccgRegionController.java b/ycl-platform/src/main/java/com/ycl/controller/region/SccgRegionController.java
index 3a22e82..b4d892f 100644
--- a/ycl-platform/src/main/java/com/ycl/controller/region/SccgRegionController.java
+++ b/ycl-platform/src/main/java/com/ycl/controller/region/SccgRegionController.java
@@ -1,15 +1,15 @@
package com.ycl.controller.region;
+import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ycl.api.CommonResult;
import com.ycl.controller.BaseController;
import com.ycl.entity.region.SccgRegion;
import com.ycl.service.region.ISccgRegionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
@@ -36,4 +36,49 @@
List<SccgRegion> treeList = iSccgRegionService.getTree();
return CommonResult.success(treeList);
}
+
+ @ApiOperation(value = "娣诲姞琛屾斂鍖哄煙")
+ @RequestMapping(value = "/addRegion", method = RequestMethod.POST)
+ @ResponseBody
+ public CommonResult addRegion(@Validated @RequestBody SccgRegion sccgRegion) {
+ return CommonResult.success(iSccgRegionService.save(sccgRegion));
+ }
+ @ApiOperation(value = "鑾峰彇琛屾斂鍖哄煙鍒嗛〉鏌ヨ")
+ @RequestMapping(value = "/list", method = RequestMethod.POST)
+ @ResponseBody
+ public CommonResult<IPage<SccgRegion>> list(@Validated @RequestBody SccgRegion sccgRegion) {
+ return CommonResult.success(iSccgRegionService.list(sccgRegion));
+ }
+
+
+ @ApiOperation("鑾峰彇鎸囧畾琛屾斂鍖哄煙")
+ @RequestMapping(value = "/getRegion/{id}", method = RequestMethod.GET)
+ @ResponseBody
+ public CommonResult<SccgRegion> getMessage(@PathVariable Long id) {
+ SccgRegion sccgRegion = iSccgRegionService.getById(id);
+ return CommonResult.success(sccgRegion);
+ }
+
+ @ApiOperation("淇敼鎸囧畾琛屾斂鍖哄煙")
+ @RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
+ @ResponseBody
+ public CommonResult update(@PathVariable Long id, @RequestBody SccgRegion sccgRegion) {
+ sccgRegion.setId(id);
+ boolean success = iSccgRegionService.updateById(sccgRegion);
+ if (success) {
+ return CommonResult.success(null);
+ }
+ return CommonResult.failed();
+ }
+
+ @ApiOperation("鎵归噺鍒犻櫎琛屾斂鍖哄煙")
+ @RequestMapping(value = "/delete", method = RequestMethod.POST)
+ @ResponseBody
+ public CommonResult delete(@RequestParam("ids") List<Long> ids) {
+ boolean success = iSccgRegionService.removeBatchByIds(ids);
+ if (success) {
+ return CommonResult.success(null);
+ }
+ return CommonResult.failed();
+ }
}
diff --git a/ycl-platform/src/main/java/com/ycl/dto/message/MessageParam.java b/ycl-platform/src/main/java/com/ycl/dto/message/MessageParam.java
index 806cc20..b1f84a4 100644
--- a/ycl-platform/src/main/java/com/ycl/dto/message/MessageParam.java
+++ b/ycl-platform/src/main/java/com/ycl/dto/message/MessageParam.java
@@ -82,4 +82,9 @@
*/
@ApiModelProperty(value = "鍒涘缓浜�")
private Long createUser;
+ /**
+ * 鏄惁鎵弿0-鏈壂鎻�1-宸叉壂鎻�
+ */
+ @ApiModelProperty(value = "鏄惁鎵弿0-鏈壂鎻�1-宸叉壂鎻�")
+ private Integer isScan;
}
\ No newline at end of file
diff --git a/ycl-platform/src/main/java/com/ycl/entity/equipment/EquipmentBayonet.java b/ycl-platform/src/main/java/com/ycl/entity/equipment/EquipmentBayonet.java
index 28ef0fd..4cf2da5 100644
--- a/ycl-platform/src/main/java/com/ycl/entity/equipment/EquipmentBayonet.java
+++ b/ycl-platform/src/main/java/com/ycl/entity/equipment/EquipmentBayonet.java
@@ -1,5 +1,6 @@
package com.ycl.entity.equipment;
+import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
@@ -35,18 +36,21 @@
* 鍗″彛鍚嶇О
*/
@TableField("bayonet_name")
+ @ExcelProperty(index = 1, value = "鍗″彛鍚嶇О")
private String bayonetName;
/**
* 鍗″彛缁忓害
*/
@TableField("longitude")
+ @ExcelProperty(index = 1, value = "鍗″彛鍚嶇О")
private BigDecimal longitude;
/**
* 鍗″彛绾害
*/
@TableField("latitude")
+ @ExcelProperty(index = 1, value = "鍗″彛鍚嶇О")
private BigDecimal latitude;
/**
@@ -66,4 +70,16 @@
*/
@TableField("description")
private String description;
+
+ /**
+ * 鍓嶇绫诲瀷
+ */
+ @TableField("front_end_type")
+ private Integer frontEndType;
+
+ /**
+ * 鍑哄叆鍩庣被鍨�
+ */
+ @TableField("in_out_city_type")
+ private Integer inOutCityType;
}
\ No newline at end of file
diff --git a/ycl-platform/src/main/java/com/ycl/entity/message/Message.java b/ycl-platform/src/main/java/com/ycl/entity/message/Message.java
index dcd5edc..1171542 100644
--- a/ycl-platform/src/main/java/com/ycl/entity/message/Message.java
+++ b/ycl-platform/src/main/java/com/ycl/entity/message/Message.java
@@ -119,6 +119,13 @@
@ApiModelProperty(value = "鐘舵��0-鏈彂甯�1-宸插彂甯�")
private Integer status;
/**
+ * 鏄惁鎵弿0-鏈壂鎻�1-宸叉壂鎻�
+ */
+ @TableField("is_scan")
+ @ApiModelProperty(value = "鏄惁鎵弿0-鏈壂鎻�1-宸叉壂鎻�")
+ private Integer isScan;
+
+ /**
* 鏄惁鏌ョ湅0-鏈煡鐪�1-宸叉煡鐪�
*/
@TableField("is_view")
diff --git a/ycl-platform/src/main/java/com/ycl/entity/region/SccgRegion.java b/ycl-platform/src/main/java/com/ycl/entity/region/SccgRegion.java
index 2800a93..8b9f4fc 100644
--- a/ycl-platform/src/main/java/com/ycl/entity/region/SccgRegion.java
+++ b/ycl-platform/src/main/java/com/ycl/entity/region/SccgRegion.java
@@ -4,6 +4,7 @@
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -35,14 +36,23 @@
* 鍦板煙鍚�
*/
@TableField("region_name")
+ @ApiModelProperty(value = "鍦板煙鍚�")
private String regionName;
/**
* 榛樿0
*/
@TableField("parent_id")
+ @ApiModelProperty(value = "榛樿0")
private Long parentId;
+ /**
+ * 绫诲瀷1-琛楅亾2-绀惧尯3-涔�4-闀�
+ */
+ @TableField("type")
+ @ApiModelProperty(value = "绫诲瀷0-甯�1-鍘�2-琛楅亾3-绀惧尯4-涔�5-闀�")
+ private Integer type;
+
@TableField(exist = false)
private List<SccgRegion> children;
}
diff --git a/ycl-platform/src/main/java/com/ycl/scheduling/SchedulingConfiguration.java b/ycl-platform/src/main/java/com/ycl/scheduling/SchedulingConfiguration.java
new file mode 100644
index 0000000..d6fb5bf
--- /dev/null
+++ b/ycl-platform/src/main/java/com/ycl/scheduling/SchedulingConfiguration.java
@@ -0,0 +1,85 @@
+package com.ycl.scheduling;
+
+import com.ycl.service.message.MessageScheduleService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.scheduling.annotation.Scheduled;
+
+@Configuration
+@EnableScheduling
+public class SchedulingConfiguration {
+
+ private Logger logger = LoggerFactory.getLogger(getClass());
+
+ //
+ //鍏朵腑姣忎釜鍏冪礌鍙互鏄竴涓��(濡�6),涓�涓繛缁尯闂�(9-12),涓�涓棿闅旀椂闂�(8-18/4)(/琛ㄧず姣忛殧4灏忔椂),涓�涓垪琛�(1,3,5),閫氶厤绗︺�傜敱浜�"鏈堜唤涓殑鏃ユ湡"鍜�"鏄熸湡涓殑鏃ユ湡"杩欎袱涓厓绱犱簰鏂ョ殑,蹇呴』瑕佸鍏朵腑涓�涓缃�?.
+ //0 0 10,14,16 * * ? 姣忓ぉ涓婂崍10鐐癸紝涓嬪崍2鐐癸紝4鐐�
+ //0 0/30 9-17 * * ? 鏈濅節鏅氫簲宸ヤ綔鏃堕棿鍐呮瘡鍗婂皬鏃�
+ //0 0 12 ? * WED 琛ㄧず姣忎釜鏄熸湡涓変腑鍗�12鐐�
+ //"0 0 12 * * ?" 姣忓ぉ涓崍12鐐硅Е鍙�
+ //"0 15 10 ? * *" 姣忓ぉ涓婂崍10:15瑙﹀彂
+ //"0 15 10 * * ?" 姣忓ぉ涓婂崍10:15瑙﹀彂
+ //"0 15 10 * * ? *" 姣忓ぉ涓婂崍10:15瑙﹀彂
+ //"0 15 10 * * ? 2005" 2005骞寸殑姣忓ぉ涓婂崍10:15瑙﹀彂
+ //"0 * 14 * * ?" 鍦ㄦ瘡澶╀笅鍗�2鐐瑰埌涓嬪崍2:59鏈熼棿鐨勬瘡1鍒嗛挓瑙﹀彂
+ //"0 0/5 14 * * ?" 鍦ㄦ瘡澶╀笅鍗�2鐐瑰埌涓嬪崍2:55鏈熼棿鐨勬瘡5鍒嗛挓瑙﹀彂
+ //"0 0/5 14,18 * * ?" 鍦ㄦ瘡澶╀笅鍗�2鐐瑰埌2:55鏈熼棿鍜屼笅鍗�6鐐瑰埌6:55鏈熼棿鐨勬瘡5鍒嗛挓瑙﹀彂
+ //"0 0-5 14 * * ?" 鍦ㄦ瘡澶╀笅鍗�2鐐瑰埌涓嬪崍2:05鏈熼棿鐨勬瘡1鍒嗛挓瑙﹀彂
+ //"0 10,44 14 ? 3 WED" 姣忓勾涓夋湀鐨勬槦鏈熶笁鐨勪笅鍗�2:10鍜�2:44瑙﹀彂
+ //"0 15 10 ? * MON-FRI" 鍛ㄤ竴鑷冲懆浜旂殑涓婂崍10:15瑙﹀彂
+ //"0 15 10 15 * ?" 姣忔湀15鏃ヤ笂鍗�10:15瑙﹀彂
+ //"0 15 10 L * ?" 姣忔湀鏈�鍚庝竴鏃ョ殑涓婂崍10:15瑙﹀彂
+ //"0 15 10 ? * 6L" 姣忔湀鐨勬渶鍚庝竴涓槦鏈熶簲涓婂崍10:15瑙﹀彂
+ //"0 15 10 ? * 6L 2002-2005" 2002骞磋嚦2005骞寸殑姣忔湀鐨勬渶鍚庝竴涓槦鏈熶簲涓婂崍10:15瑙﹀彂
+ //"0 15 10 ? * 6#3" 姣忔湀鐨勭涓変釜鏄熸湡浜斾笂鍗�10:15瑙﹀彂
+ //鏈変簺瀛愯〃杈惧紡鑳藉寘鍚竴浜涜寖鍥存垨鍒楄〃
+ //渚嬪锛氬瓙琛ㄨ揪寮忥紙澶╋紙鏄熸湡锛夛級鍙互涓� 鈥淢ON-FRI鈥濓紝鈥淢ON锛學ED锛孎RI鈥濓紝鈥淢ON-WED,SAT鈥�
+ //鈥�*鈥濆瓧绗︿唬琛ㄦ墍鏈夊彲鑳界殑鍊�
+ //鍥犳锛屸��*鈥濆湪瀛愯〃杈惧紡锛堟湀锛夐噷琛ㄧず姣忎釜鏈堢殑鍚箟锛屸��*鈥濆湪瀛愯〃杈惧紡锛堝ぉ锛堟槦鏈燂級锛夎〃绀烘槦鏈熺殑姣忎竴澶�
+ //
+ //鈥�/鈥濆瓧绗︾敤鏉ユ寚瀹氭暟鍊肩殑澧為噺
+ //渚嬪锛氬湪瀛愯〃杈惧紡锛堝垎閽燂級閲岀殑鈥�0/15鈥濊〃绀轰粠绗�0鍒嗛挓寮�濮嬶紝姣�15鍒嗛挓
+ // 鍦ㄥ瓙琛ㄨ揪寮忥紙鍒嗛挓锛夐噷鐨勨��3/20鈥濊〃绀轰粠绗�3鍒嗛挓寮�濮嬶紝姣�20鍒嗛挓锛堝畠鍜屸��3锛�23锛�43鈥濓級鐨勫惈涔変竴鏍�
+ //
+ //鈥滐紵鈥濆瓧绗︿粎琚敤浜庡ぉ锛堟湀锛夊拰澶╋紙鏄熸湡锛変袱涓瓙琛ㄨ揪寮忥紝琛ㄧず涓嶆寚瀹氬��
+ //褰�2涓瓙琛ㄨ揪寮忓叾涓箣涓�琚寚瀹氫簡鍊间互鍚庯紝涓轰簡閬垮厤鍐茬獊锛岄渶瑕佸皢鍙︿竴涓瓙琛ㄨ揪寮忕殑鍊艰涓衡�滐紵鈥�
+ //
+ //鈥淟鈥� 瀛楃浠呰鐢ㄤ簬澶╋紙鏈堬級鍜屽ぉ锛堟槦鏈燂級涓や釜瀛愯〃杈惧紡锛屽畠鏄崟璇嶁�渓ast鈥濈殑缂╁啓
+ //浣嗘槸瀹冨湪涓や釜瀛愯〃杈惧紡閲岀殑鍚箟鏄笉鍚岀殑銆�
+ //鍦ㄥぉ锛堟湀锛夊瓙琛ㄨ揪寮忎腑锛屸�淟鈥濊〃绀轰竴涓湀鐨勬渶鍚庝竴澶�
+ //鍦ㄥぉ锛堟槦鏈燂級鑷〃杈惧紡涓紝鈥淟鈥濊〃绀轰竴涓槦鏈熺殑鏈�鍚庝竴澶╋紝涔熷氨鏄疭AT
+ //濡傛灉鍦ㄢ�淟鈥濆墠鏈夊叿浣撶殑鍐呭锛屽畠灏卞叿鏈夊叾浠栫殑鍚箟浜�
+ //渚嬪锛氣��6L鈥濊〃绀鸿繖涓湀鐨勫�掓暟绗紪澶╋紝鈥滐鸡锛诧缉锛�濊〃绀鸿繖涓湀鐨勬渶涓�涓槦鏈熶簲
+ //娉ㄦ剰锛氬湪浣跨敤鈥淟鈥濆弬鏁版椂锛屼笉瑕佹寚瀹氬垪琛ㄦ垨鑼冨洿锛屽洜涓鸿繖浼氬鑷撮棶棰�
+ //
+ //
+ //瀛楁 鍏佽鍊� 鍏佽鐨勭壒娈婂瓧绗�
+ //绉� 0-59 , - * /
+ //鍒� 0-59 , - * /
+ //灏忔椂 0-23 , - * /
+ //鏃ユ湡 1-31 , - * ? / L W C
+ //鏈堜唤 1-12 鎴栬�� JAN-DEC , - * /
+ //鏄熸湡 1-7 鎴栬�� SUN-SAT , - * ? / L C #
+ //骞达紙鍙�夛級 鐣欑┖, 1970-2099 , -
+
+ //鎸夐『搴忎緷娆′负
+ //绉掞紙0~59锛�
+ //鍒嗛挓锛�0~59锛�
+ //灏忔椂锛�0~23锛�
+ //澶╋紙鏈堬級锛�0~31锛屼絾鏄綘闇�瑕佽�冭檻浣犳湀鐨勫ぉ鏁帮級
+ //鏈堬紙0~11锛�
+ //澶╋紙鏄熸湡锛夛紙1~7 1=SUN 鎴� SUN锛孧ON锛孴UE锛學ED锛孴HU锛孎RI锛孲AT锛�
+ //7.骞翠唤锛�1970锛�2099锛�
+ @Autowired
+ private MessageScheduleService messageScheduleService;
+
+ @Scheduled(cron = "0/50 * * * * ?") // 姣�50绉掓墽琛屼竴娆�
+ public void scheduler() {
+ //瀹氭椂鎵弿鍙戦�佺煭淇�
+ messageScheduleService.sendSmsSchedule();
+ }
+}
+
diff --git a/ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/CheckHandleServiceImpl.java b/ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/CheckHandleServiceImpl.java
index ccf530a..1a4d0c4 100644
--- a/ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/CheckHandleServiceImpl.java
+++ b/ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/CheckHandleServiceImpl.java
@@ -4,6 +4,7 @@
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ycl.common.constant.BaseCaseStatus;
+import com.ycl.common.constant.CheckResult;
import com.ycl.common.constant.StepName;
import com.ycl.dto.caseHandler.ChechParam;
import com.ycl.entity.caseHandler.BaseCase;
@@ -42,17 +43,50 @@
@Override
public Boolean check(ChechParam chechParam) {
- //淇敼妗堜欢鐘舵�佷负瀹℃牳
- BaseCase baseCase = new BaseCase();
- baseCase.setId(chechParam.getBaseCaseId());
- baseCase.setState(BaseCaseStatus.CHECK);
- baseCase.setAuditOpinion(chechParam.getCheckOpinion());
- baseCaseMapper.updateById(baseCase);
QueryWrapper<WorkflowConfigStep> stepQurey = new QueryWrapper<>();
stepQurey.eq("name", StepName.CHECK.getName());
WorkflowConfigStep workflowConfigStep = workflowConfigStepMapper.selectOne(stepQurey);
+ //淇敼妗堜欢鐘舵�佷负瀹℃牳
+ BaseCase baseCase = new BaseCase();
+ baseCase.setId(chechParam.getBaseCaseId());
+ baseCase.setAuditOpinion(chechParam.getCheckOpinion());
+ //淇敼鏍告煡璁板綍
+ DisposeRecord disposeRecord = new DisposeRecord();
+ //椹冲洖澶勭悊
+ if (CheckResult.REJECT.getName().equals(chechParam.getResult())) {
+ QueryWrapper<WorkflowConfigStep> lastNextqurey = new QueryWrapper<>();
+ lastNextqurey.eq("workflow_config_id", workflowConfigStep.getWorkflowConfigId());
+ lastNextqurey.eq("seq", workflowConfigStep.getSeq()-1);
+ WorkflowConfigStep lastStep = workflowConfigStepMapper.selectOne(lastNextqurey);
+ //鍒犻櫎涓婁竴姝ユ暟鎹�
+ UpdateWrapper<DisposeRecord> deleteWrapper = new UpdateWrapper<>();
+ deleteWrapper.eq("base_case_id", chechParam.getBaseCaseId()).eq("workflow_config_step_id",lastStep.getId());
+ disposeRecordMapper.delete(deleteWrapper);
+ //淇敼鐘舵�佷负涓婁笂涓�姝ョ姸鎬�
+ QueryWrapper<WorkflowConfigStep> lastLastNextqurey = new QueryWrapper<>();
+ lastLastNextqurey.eq("workflow_config_id", workflowConfigStep.getWorkflowConfigId());
+ lastLastNextqurey.eq("seq", workflowConfigStep.getSeq()-2);
+ WorkflowConfigStep lastLastStep = workflowConfigStepMapper.selectOne(lastLastNextqurey);
+
+ UpdateWrapper<DisposeRecord> updateWrapper = new UpdateWrapper<>();
+ updateWrapper.eq("base_case_id", chechParam.getBaseCaseId()).eq("workflow_config_step_id",lastLastStep.getId());
+
+ disposeRecord.setHandlerId(chechParam.getCurrentUser());
+ //鏍告煡宸茬粨鏉�
+ disposeRecord.setState(0);
+ disposeRecord.setEndTime(LocalDateTime.now());
+ disposeRecordMapper.update(disposeRecord, updateWrapper);
+ //璋冨害
+ baseCase.setState(BaseCaseStatus.DISPATCH);
+ baseCaseMapper.updateById(baseCase);
+ return true;
+ }
+ //鏍告煡
+ baseCase.setState(BaseCaseStatus.CHECK);
+ baseCaseMapper.updateById(baseCase);
+
if (workflowConfigStep == null) {
throw new ApiException("鏈煡璇㈠埌璇ユ祦绋嬬幆鑺�");
@@ -61,8 +95,6 @@
UpdateWrapper<DisposeRecord> updateWrapper = new UpdateWrapper<>();
updateWrapper.eq("base_case_id", baseCase.getId()).eq("workflow_config_step_id",workflowConfigStep.getId());
- //淇敼鏍告煡璁板綍
- DisposeRecord disposeRecord = new DisposeRecord();
disposeRecord.setHandlerId(chechParam.getCurrentUser());
//鏍告煡宸茬粨鏉�
disposeRecord.setState(1);
diff --git a/ycl-platform/src/main/java/com/ycl/service/equipment/IEquipmentBayonetService.java b/ycl-platform/src/main/java/com/ycl/service/equipment/IEquipmentBayonetService.java
index fe3ad71..1354ce8 100644
--- a/ycl-platform/src/main/java/com/ycl/service/equipment/IEquipmentBayonetService.java
+++ b/ycl-platform/src/main/java/com/ycl/service/equipment/IEquipmentBayonetService.java
@@ -2,6 +2,9 @@
import com.baomidou.mybatisplus.extension.service.IService;
import com.ycl.entity.equipment.EquipmentBayonet;
+import com.ycl.vo.equipment.EquipmentBayonetVO;
+
+import java.util.List;
/**
* <p>
@@ -12,5 +15,4 @@
* @since 2022-10-14
*/
public interface IEquipmentBayonetService extends IService<EquipmentBayonet> {
-
}
diff --git a/ycl-platform/src/main/java/com/ycl/service/equipment/impl/EquipmentBayonetServiceImpl.java b/ycl-platform/src/main/java/com/ycl/service/equipment/impl/EquipmentBayonetServiceImpl.java
index 82ff304..148f835 100644
--- a/ycl-platform/src/main/java/com/ycl/service/equipment/impl/EquipmentBayonetServiceImpl.java
+++ b/ycl-platform/src/main/java/com/ycl/service/equipment/impl/EquipmentBayonetServiceImpl.java
@@ -1,10 +1,20 @@
package com.ycl.service.equipment.impl;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ycl.entity.dict.DataDictionary;
import com.ycl.entity.equipment.EquipmentBayonet;
import com.ycl.mapper.equipment.EquipmentBayonetMapper;
import com.ycl.service.equipment.IEquipmentBayonetService;
+import com.ycl.vo.equipment.EquipmentBayonetVO;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+import java.util.stream.Collectors;
/**
* <p>
@@ -16,5 +26,4 @@
*/
@Service
public class EquipmentBayonetServiceImpl extends ServiceImpl<EquipmentBayonetMapper, EquipmentBayonet> implements IEquipmentBayonetService {
-
}
diff --git a/ycl-platform/src/main/java/com/ycl/service/message/MessageScheduleService.java b/ycl-platform/src/main/java/com/ycl/service/message/MessageScheduleService.java
new file mode 100644
index 0000000..0e14643
--- /dev/null
+++ b/ycl-platform/src/main/java/com/ycl/service/message/MessageScheduleService.java
@@ -0,0 +1,13 @@
+package com.ycl.service.message;
+
+/**
+ * <p>
+ * 绫昏鏄�
+ * </p>
+ *
+ * @author mg
+ * @since 2022-10-17
+ */
+public interface MessageScheduleService {
+ void sendSmsSchedule();
+}
diff --git a/ycl-platform/src/main/java/com/ycl/service/message/factory/InnerSender.java b/ycl-platform/src/main/java/com/ycl/service/message/factory/InnerSender.java
index 76639dc..2da8edd 100644
--- a/ycl-platform/src/main/java/com/ycl/service/message/factory/InnerSender.java
+++ b/ycl-platform/src/main/java/com/ycl/service/message/factory/InnerSender.java
@@ -46,7 +46,9 @@
//鐢熸垚8浣嶉殢鏈烘暟娑堟伅缂栫爜
messageAdd.setMessageNumber(messageNumber);
//鍙戦�佹椂闂�
- messageAdd.setSendTime(new Date());
+ if (messageAdd.getSendTime() == null) {
+ messageAdd.setSendTime(new Date());
+ }
//鐢熸垚榛樿鍙傛暟
messageAdd.setCreateTime(new Date());
messageAdd.setUpdateTime(new Date());
@@ -54,6 +56,7 @@
messageAdd.setUpdateUser(messageParam.getCreateUser());
messageAdd.setIsView(0);
messageAdd.setVersion(0);
+ messageAdd.setIsScan(1);
messages.add(messageAdd);
}
BeanUtils.copyProperties(messageParam, message);
diff --git a/ycl-platform/src/main/java/com/ycl/service/message/impl/MessageScheduleServiceImpl.java b/ycl-platform/src/main/java/com/ycl/service/message/impl/MessageScheduleServiceImpl.java
new file mode 100644
index 0000000..0ee9501
--- /dev/null
+++ b/ycl-platform/src/main/java/com/ycl/service/message/impl/MessageScheduleServiceImpl.java
@@ -0,0 +1,35 @@
+package com.ycl.service.message.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.ycl.entity.message.Message;
+import com.ycl.mapper.message.MessageMapper;
+import com.ycl.service.message.MessageScheduleService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * <p>
+ * 绫昏鏄�
+ * </p>
+ *
+ * @author mg
+ * @since 2022-10-17
+ */
+@Service
+public class MessageScheduleServiceImpl implements MessageScheduleService {
+
+
+ @Resource
+ MessageMapper messageMapper;
+
+ @Override
+ public void sendSmsSchedule() {
+ QueryWrapper<Message> wrapper = new QueryWrapper<>();
+ wrapper.lambda().eq(Message::getIsScan, 0).le(Message::getSendTime,new Date());
+ List<Message> messages = messageMapper.selectList(wrapper);
+ System.out.println("--------------------寮�濮嬫壂鎻忕煭淇′俊鎭�-------------------澶у皬涓�"+messages.size());
+ }
+}
diff --git a/ycl-platform/src/main/java/com/ycl/service/region/ISccgRegionService.java b/ycl-platform/src/main/java/com/ycl/service/region/ISccgRegionService.java
index 98aff41..7ba1682 100644
--- a/ycl-platform/src/main/java/com/ycl/service/region/ISccgRegionService.java
+++ b/ycl-platform/src/main/java/com/ycl/service/region/ISccgRegionService.java
@@ -1,5 +1,6 @@
package com.ycl.service.region;
+import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ycl.entity.region.SccgRegion;
@@ -19,4 +20,5 @@
* @return
*/
List<SccgRegion> getTree();
+ IPage<SccgRegion> list(SccgRegion sccgRegion);
}
diff --git a/ycl-platform/src/main/java/com/ycl/service/region/impl/SccgRegionServiceImpl.java b/ycl-platform/src/main/java/com/ycl/service/region/impl/SccgRegionServiceImpl.java
index b0ddd36..e077eec 100644
--- a/ycl-platform/src/main/java/com/ycl/service/region/impl/SccgRegionServiceImpl.java
+++ b/ycl-platform/src/main/java/com/ycl/service/region/impl/SccgRegionServiceImpl.java
@@ -1,12 +1,12 @@
package com.ycl.service.region.impl;
import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ycl.entity.depart.UmsDepart;
import com.ycl.entity.region.SccgRegion;
import com.ycl.mapper.region.SccgRegionMapper;
-import com.ycl.service.region.ISccgRegionService;
import com.ycl.service.redis.RedisService;
+import com.ycl.service.region.ISccgRegionService;
import com.ycl.utils.common.LiveTimeMillisecond;
import com.ycl.utils.redis.RedisKey;
import org.apache.commons.lang3.StringUtils;
@@ -84,4 +84,9 @@
}
return e;
}
+
+ @Override
+ public IPage<SccgRegion> list(SccgRegion sccgRegion) {
+ return null;
+ }
}
diff --git a/ycl-platform/src/main/java/com/ycl/vo/equipment/EquipmentBayonetVO.java b/ycl-platform/src/main/java/com/ycl/vo/equipment/EquipmentBayonetVO.java
new file mode 100644
index 0000000..7e9ed3e
--- /dev/null
+++ b/ycl-platform/src/main/java/com/ycl/vo/equipment/EquipmentBayonetVO.java
@@ -0,0 +1,84 @@
+package com.ycl.vo.equipment;
+
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * <p>
+ * 鍗″彛绠$悊
+ * </p>
+ *
+ * @author zhanghua
+ * @since 2022-10-14
+ */
+@Data
+@ApiModel(value = "鍗″彛绠$悊VO")
+public class EquipmentBayonetVO {
+
+ /**
+ * 涓婚敭
+ */
+ @ExcelIgnore
+ private Integer id;
+
+ /**
+ * 鍗″彛鍚嶇О
+ */
+ @ApiModelProperty(value = "鍗″彛鍚嶇О")
+ @ExcelProperty(index = 0, value = "鍗″彛鍚嶇О")
+ private String bayonetName;
+
+ /**
+ * 鍗″彛缁忓害
+ */
+ @ApiModelProperty(value = "鍗″彛缁忓害")
+ @ExcelProperty(index = 1, value = "鍗″彛缁忓害")
+ private BigDecimal longitude;
+
+ /**
+ * 鍗″彛绾害
+ */
+ @ApiModelProperty(value = "鍗″彛绾害")
+ @ExcelProperty(index = 2, value = "鍗″彛绾害")
+ private BigDecimal latitude;
+
+ /**
+ * ip鍦板潃
+ */
+ @ApiModelProperty(value = "ip鍦板潃")
+ @ExcelProperty(index = 3, value = "ip鍦板潃")
+ private String ipAddress;
+
+ /**
+ * 绔彛鍙�
+ */
+ @ApiModelProperty(value = "绔彛鍙�")
+ @ExcelProperty(index = 4, value = "绔彛鍙�")
+ private String port;
+
+ /**
+ * 鎻忚堪
+ */
+ @ApiModelProperty(value = "鎻忚堪")
+ @ExcelProperty(index = 7, value = "鎻忚堪")
+ private String description;
+
+ /**
+ * 鍓嶇绫诲瀷
+ */
+ @ApiModelProperty(value = "鍓嶇绫诲瀷")
+ @ExcelProperty(index = 5, value = "鍓嶇绫诲瀷")
+ private String frontEndType;
+
+ /**
+ * 鍑哄叆鍩庣被鍨�
+ */
+ @ApiModelProperty(value = "鍑哄叆鍩庣被鍨�")
+ @ExcelProperty(index = 6, value = "鍑哄叆鍩庣被鍨�")
+ private String inOutCityType;
+}
\ No newline at end of file
--
Gitblit v1.8.0