Commit 18c97b41 authored by 刘林's avatar 刘林

Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register

parents c422cd79 87fcd234
......@@ -186,6 +186,12 @@
<artifactId>tablesaw-excel</artifactId>
<version>0.43.1</version>
</dependency>
<dependency>
<groupId>com.amosframework.boot</groupId>
<artifactId>amos-boot-module-cylinder-api</artifactId>
<version>1.0.1</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<plugins>
......
......@@ -16,6 +16,7 @@ import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;
import org.springframework.core.env.Environment;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
......@@ -40,9 +41,15 @@ import org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler;
@EnableAsync
@EnableEurekaClient
@EnableScheduling
@MapperScan(value = { "org.typroject.tyboot.*.*.face.orm.dao", "com.yeejoin.amos.api.*.face.orm.dao", "org.typroject.tyboot.face.*.orm.dao*",
@MapperScan(value = { "org.typroject.tyboot.*.*.face.orm.dao",
"com.yeejoin.amos.api.*.face.orm.dao",
"org.typroject.tyboot.face.*.orm.dao*",
"com.yeejoin.amos.boot.module.cylinder.api.mapper",
"com.yeejoin.amos.boot.biz.common.dao.mapper" })
@ComponentScan({ "org.typroject", "com.yeejoin.amos" })
@ComponentScan(basePackages = { "org.typroject", "com.yeejoin.amos" }, excludeFilters = @ComponentScan.Filter(
type = FilterType.REGEX,
pattern = "com.yeejoin.amos.boot.biz.common.controller.*|com.yeejoin.amos.boot.module.common.api.core.framework.*"
))
public class OpenapiApplication {
private static final Logger logger = LogManager.getLogger(OpenapiApplication.class);
......
......@@ -25,8 +25,8 @@ import javax.servlet.http.HttpServletRequest;
@Aspect
@Component
@Order(value = 0)
public class ControllerAop {
private static final Logger logger = LogManager.getLogger(ControllerAop.class);
public class OpenApiControllerAop {
private static final Logger logger = LogManager.getLogger(OpenApiControllerAop.class);
@Autowired
private RedisTemplate redisTemplate;
......
package com.yeejoin.amos.api.openapi.config;
import feign.codec.Encoder;
import feign.form.spring.SpringFormEncoder;
import org.springframework.beans.factory.ObjectFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
import org.springframework.cloud.openfeign.support.SpringEncoder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @author DELL
*/
@Configuration
public class FeignConfiguration {
/**
* 创建Feign请求拦截器,在发送请求前设置认证的token,各个微服务将token设置到环境变量中来达到通用
* @return
*/
@Bean
public FeignAuthRequestInterceptor basicAuthRequestInterceptor() {
return new FeignAuthRequestInterceptor();
}
@Autowired
private ObjectFactory<HttpMessageConverters> messageConverters;
@Bean
public Encoder feignComFormEncoder() {
return new SpringFormEncoder(new SpringEncoder(messageConverters));
}
}
//package com.yeejoin.amos.api.openapi.config;
//
//import feign.codec.Encoder;
//import feign.form.spring.SpringFormEncoder;
//import org.springframework.beans.factory.ObjectFactory;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
//import org.springframework.cloud.openfeign.support.SpringEncoder;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
///**
// * @author DELL
// */
//@Configuration
//public class FeignConfiguration {
//
// /**
// * 创建Feign请求拦截器,在发送请求前设置认证的token,各个微服务将token设置到环境变量中来达到通用
// * @return
// */
// @Bean
// public FeignAuthRequestInterceptor basicAuthRequestInterceptor() {
// return new FeignAuthRequestInterceptor();
// }
//
// @Autowired
// private ObjectFactory<HttpMessageConverters> messageConverters;
//
// @Bean
// public Encoder feignComFormEncoder() {
// return new SpringFormEncoder(new SpringEncoder(messageConverters));
// }
//
//
//}
......@@ -15,7 +15,7 @@ import org.springframework.web.context.request.RequestContextListener;
* @Description:
* @Date: 2020/3/30 16:26
*/
@Configuration
//@Configuration
public class MultipartSupportConfig {
@Autowired
......
......@@ -4,6 +4,8 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.yeejoin.amos.api.openapi.face.model.*;
import com.yeejoin.amos.api.openapi.face.service.*;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -20,28 +22,6 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import com.yeejoin.amos.api.common.restful.utils.ResponseHelper;
import com.yeejoin.amos.api.common.restful.utils.ResponseModel;
import com.yeejoin.amos.api.openapi.face.model.CylinderFillingCheckModel;
import com.yeejoin.amos.api.openapi.face.model.CylinderFillingExamineModel;
import com.yeejoin.amos.api.openapi.face.model.CylinderFillingExamineModelList;
import com.yeejoin.amos.api.openapi.face.model.CylinderFillingModel;
import com.yeejoin.amos.api.openapi.face.model.CylinderFillingModelList;
import com.yeejoin.amos.api.openapi.face.model.CylinderFillingRecordModel;
import com.yeejoin.amos.api.openapi.face.model.CylinderInfoModel;
import com.yeejoin.amos.api.openapi.face.model.CylinderInfoModelList;
import com.yeejoin.amos.api.openapi.face.model.CylinderInspectionModel;
import com.yeejoin.amos.api.openapi.face.model.CylinderInspectionModelList;
import com.yeejoin.amos.api.openapi.face.model.CylinderTagsModel;
import com.yeejoin.amos.api.openapi.face.model.CylinderTagsModelList;
import com.yeejoin.amos.api.openapi.face.model.CylinderUnitModel;
import com.yeejoin.amos.api.openapi.face.model.CylinderUnitModelList;
import com.yeejoin.amos.api.openapi.face.service.CylinderFillingCheckService;
import com.yeejoin.amos.api.openapi.face.service.CylinderFillingExamineService;
import com.yeejoin.amos.api.openapi.face.service.CylinderFillingRecordService;
import com.yeejoin.amos.api.openapi.face.service.CylinderFillingService;
import com.yeejoin.amos.api.openapi.face.service.CylinderInfoService;
import com.yeejoin.amos.api.openapi.face.service.CylinderInspectionService;
import com.yeejoin.amos.api.openapi.face.service.CylinderTagsService;
import com.yeejoin.amos.api.openapi.face.service.CylinderUnitService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -53,27 +33,27 @@ import net.sf.json.JSONObject;
public class CylinderController {
private static final Logger logger = LogManager.getLogger(CylinderController.class);
@Autowired
private CylinderUnitService cylinderUnitService;
private TmCylinderUnitService cylinderUnitService;
@Autowired
private CylinderFillingCheckService cylinderFillingCheckService;
private TmCylinderFillingCheckService cylinderFillingCheckService;
@Autowired
private CylinderFillingExamineService cylinderFillingExamineService;
private TmCylinderFillingExamineService cylinderFillingExamineService;
@Autowired
private CylinderFillingRecordService cylinderFillingRecordService;
private TmCylinderFillingRecordService cylinderFillingRecordService;
@Autowired
private CylinderFillingService cylinderFillingService;
private TmCylinderFillingService cylinderFillingService;
@Autowired
private CylinderInfoService cylinderInfoService;
private TmCylinderInfoService cylinderInfoService;
@Autowired
private CylinderInspectionService cylinderInspectionService;
private TmCylinderInspectionService cylinderInspectionService;
@Autowired
private CylinderTagsService cylinderTagsService;
private TmCylinderTagsService cylinderTagsService;
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(value = "气瓶企业信息")
@PostMapping(value = "/unit")
@RestEventTrigger(value = "openapiLogEventHandler")
public ResponseModel<String> cylinderUnit(@RequestBody List<CylinderUnitModel> unitData) throws Exception {
public ResponseModel<String> cylinderUnit(@RequestBody List<TmCylinderUnitModel> unitData) throws Exception {
return ResponseHelper.buildResponse(cylinderUnitService.createCylinderUnit(unitData));
}
......@@ -81,7 +61,7 @@ public class CylinderController {
@ApiOperation(value = "气瓶基础数据")
@PostMapping(value = "/info")
@RestEventTrigger(value = "openapiLogEventHandler")
public ResponseModel<String> cylinderInfo(@RequestBody List<CylinderInfoModel> infoData) throws Exception {
public ResponseModel<String> cylinderInfo(@RequestBody List<TmCylinderInfoModel> infoData) throws Exception {
return ResponseHelper.buildResponse(cylinderInfoService.createCylinderInfo(infoData));
}
......@@ -89,7 +69,7 @@ public class CylinderController {
@ApiOperation(value = "气瓶标签数据")
@PostMapping(value = "/tag")
@RestEventTrigger(value = "openapiLogEventHandler")
public ResponseModel<String> cylinderTagInfo(@RequestBody List<CylinderTagsModel> tagData) throws Exception {
public ResponseModel<String> cylinderTagInfo(@RequestBody List<TmCylinderTagsModel> tagData) throws Exception {
return ResponseHelper.buildResponse(cylinderTagsService.createCylinderTag(tagData));
}
......@@ -97,7 +77,7 @@ public class CylinderController {
@ApiOperation(value = "气瓶检验数据")
@PostMapping(value = "/inspection")
@RestEventTrigger(value = "openapiLogEventHandler")
public ResponseModel<String> cylinderInspectionInfo(@RequestBody List<CylinderInspectionModel> inspectionData) throws Exception {
public ResponseModel<String> cylinderInspectionInfo(@RequestBody List<TmCylinderInspectionModel> inspectionData) throws Exception {
return ResponseHelper.buildResponse(cylinderInspectionService.createCylinderInspection(inspectionData));
}
......@@ -111,15 +91,15 @@ public class CylinderController {
logger.info("气瓶充装数据"+fillingData);
JSONObject jsonobject = JSONObject.fromObject(fillingData);
Map<String, Class> classMap = new HashMap<String, Class>();
classMap.put("fillingBefore", CylinderFillingModel.class);
classMap.put("filling", CylinderFillingRecordModel.class);
classMap.put("fillingAfter", CylinderFillingCheckModel.class);
CylinderFillingModelList cylinderFillingModelList = (CylinderFillingModelList) JSONObject.toBean(jsonobject,
CylinderFillingModelList.class, classMap);
classMap.put("fillingBefore", TmCylinderFillingModel.class);
classMap.put("filling", TmCylinderFillingRecordModel.class);
classMap.put("fillingAfter", TmCylinderFillingCheckModel.class);
TmCylinderFillingModelList cylinderFillingModelList = (TmCylinderFillingModelList) JSONObject.toBean(jsonobject,
TmCylinderFillingModelList.class, classMap);
List<CylinderFillingModel> fillingBefores = cylinderFillingModelList.getFillingBefore();
List<CylinderFillingRecordModel> fillings = cylinderFillingModelList.getFilling();
List<CylinderFillingCheckModel> fillingAfters = cylinderFillingModelList.getFillingAfter();
List<TmCylinderFillingModel> fillingBefores = cylinderFillingModelList.getFillingBefore();
List<TmCylinderFillingRecordModel> fillings = cylinderFillingModelList.getFilling();
List<TmCylinderFillingCheckModel> fillingAfters = cylinderFillingModelList.getFillingAfter();
if (ValidationUtil.isEmpty(fillingBefores) && ValidationUtil.isEmpty(fillings) && ValidationUtil.isEmpty(fillingAfters)) {
throw new BadRequest("液化气体气瓶充装信息-充装前检查信息、液化气体气瓶充装信息-充装记录信息、液化气体气瓶充装信息-充装后复查信息为空.");
}
......@@ -141,7 +121,7 @@ public class CylinderController {
@ApiOperation(value = "气瓶充装审核数据")
@PostMapping(value = "/fillingAudit")
@RestEventTrigger(value = "openapiLogEventHandler")
public ResponseModel<String> cylinderFillingAudit(@RequestBody List<CylinderFillingExamineModel> fillingAuditData) throws Exception {
public ResponseModel<String> cylinderFillingAudit(@RequestBody List<TmCylinderFillingExamineModel> fillingAuditData) throws Exception {
return ResponseHelper.buildResponse(cylinderFillingExamineService.createCylinderFillingExamine(fillingAuditData));
}
......
......@@ -28,21 +28,21 @@ import java.util.List;
public class CylinderPageController {
private static final Logger logger = LogManager.getLogger(CylinderPageController.class);
@Autowired
private CylinderUnitService cylinderUnitService;
private TmCylinderUnitService cylinderUnitService;
@Autowired
private CylinderFillingCheckService cylinderFillingCheckService;
private TmCylinderFillingCheckService cylinderFillingCheckService;
@Autowired
private CylinderFillingExamineService cylinderFillingExamineService;
private TmCylinderFillingExamineService cylinderFillingExamineService;
@Autowired
private CylinderFillingRecordService cylinderFillingRecordService;
private TmCylinderFillingRecordService cylinderFillingRecordService;
@Autowired
private CylinderFillingService cylinderFillingService;
private TmCylinderFillingService cylinderFillingService;
@Autowired
private CylinderInfoService cylinderInfoService;
private TmCylinderInfoService cylinderInfoService;
@Autowired
private CylinderInspectionService cylinderInspectionService;
private TmCylinderInspectionService cylinderInspectionService;
@Autowired
private CylinderTagsService cylinderTagsService;
private TmCylinderTagsService cylinderTagsService;
@Autowired
private OpenapiBizTokenService openapiBizTokenService;
@Autowired
......
package com.yeejoin.amos.api.openapi.controller;
import java.util.HashMap;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.component.event.RestEventTrigger;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.doc.TycloudResource;
import com.yeejoin.amos.api.common.restful.utils.ResponseHelper;
import com.yeejoin.amos.api.common.restful.utils.ResponseModel;
import com.yeejoin.amos.api.openapi.face.model.ElevatorAlarmModel;
import com.yeejoin.amos.api.openapi.face.model.ElevatorAlarmModelList;
import com.yeejoin.amos.api.openapi.face.model.ElevatorStatusModel;
import com.yeejoin.amos.api.openapi.face.model.ElevatorStatusModelList;
import com.yeejoin.amos.api.openapi.face.model.ElevatorVideoModel;
import com.yeejoin.amos.api.openapi.face.service.ElevatorAlarmService;
import com.yeejoin.amos.api.openapi.face.service.ElevatorStatusService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import net.sf.json.JSONObject;
/**
*
* <pre>
* 电梯物联对接
* </pre>
*
* @author gwb
* @version $Id: ElevatorStatusController.java, v 0.1 2021年9月28日 上午9:11:38 gwb Exp $
*/
@RestController
@RequestMapping(value = "/lift")
@Api(tags = "lift-电梯物联对接")
public class LiftController
{
@Autowired
private ElevatorStatusService elevatorStatusService;
@Autowired
private ElevatorAlarmService elevatorAlarmService;
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(value = "电梯运行状态数据高频上传请求")
@RequestMapping(value = "upload/{registerCode}", method = RequestMethod.GET)
@RestEventTrigger(value = "openapiLogEventHandler")
public ResponseModel<String> highUpload (
@PathVariable(value = "registerCode") String registerCode) throws Exception
{
elevatorStatusService.highUpload(registerCode);
return ResponseHelper.buildResponse("");
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(value = "获取最近一次电梯运行状态数据")
@RequestMapping(value = "status/{registerCode}", method = RequestMethod.GET)
@RestEventTrigger(value = "openapiLogEventHandler")
public ResponseModel<ElevatorStatusModel> getLatelyStatus (
@PathVariable(value = "registerCode") String registerCode,
@RequestParam(value = "highUpload", required = false) Boolean highUpload) throws Exception
{
//默认状态数据不进行高频上传
if (ValidationUtil.isEmpty(highUpload))
{
highUpload = false;
}
return ResponseHelper.buildResponse(elevatorStatusService.getLatelyStatus(registerCode, highUpload));
}
@SuppressWarnings("rawtypes")
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(value = "电梯运行状态数据上传")
@RequestMapping(value = "run", method = RequestMethod.POST)
@RestEventTrigger(value = "openapiLogEventHandler")
public ResponseModel<String> multUploadRunData (
@RequestParam(value = "access_token", required = false) String access_token,
@RequestBody String runStatusData) throws Exception
{
JSONObject jsonobject = JSONObject.fromObject(runStatusData);
Map<String, Class> classMap = new HashMap<String, Class>();
classMap.put("lift", ElevatorStatusModel.class);
ElevatorStatusModelList elevatorStatusModelList = (ElevatorStatusModelList)JSONObject.toBean(jsonobject,ElevatorStatusModelList.class,classMap);
elevatorStatusService.multCreateElevatorStatus(elevatorStatusModelList.getLift());
return ResponseHelper.buildResponse("");
}
@SuppressWarnings("rawtypes")
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(value = "电梯故障数据上传")
@RequestMapping(value = "fault", method = RequestMethod.POST)
@RestEventTrigger(value = "openapiLogEventHandler")
public ResponseModel<String> multUploadAlarmData (
@RequestParam(value = "access_token", required = false) String access_token,
@RequestBody String faultData) throws Exception
{
JSONObject jsonobject = JSONObject.fromObject(faultData);
Map<String, Class> classMap = new HashMap<String, Class>();
classMap.put("lift", ElevatorAlarmModel.class);
ElevatorAlarmModelList elevatorAlarmModelList = (ElevatorAlarmModelList)JSONObject.toBean(jsonobject,ElevatorAlarmModelList.class,classMap);
elevatorAlarmService.multCreateElevatorAlarm(elevatorAlarmModelList.getLift());
return ResponseHelper.buildResponse("");
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(value = "获取电梯视频预览地址")
@RequestMapping(value = "video/preview/{registerCode}", method = RequestMethod.GET)
@RestEventTrigger(value = "openapiLogEventHandler")
public ResponseModel<ElevatorVideoModel> videoPreview (
@PathVariable(value = "registerCode") String registerCode) throws Exception
{
ElevatorVideoModel elevatorVideoModel = elevatorStatusService.videoPreview(registerCode);
return ResponseHelper.buildResponse(elevatorVideoModel);
}
}
//package com.yeejoin.amos.api.openapi.controller;
//
//import java.util.HashMap;
//import java.util.Map;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestMethod;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.RestController;
//import org.typroject.tyboot.component.event.RestEventTrigger;
//import org.typroject.tyboot.core.foundation.enumeration.UserType;
//import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
//import org.typroject.tyboot.core.restful.doc.TycloudOperation;
//
//import com.yeejoin.amos.api.common.restful.utils.ResponseHelper;
//import com.yeejoin.amos.api.common.restful.utils.ResponseModel;
//import com.yeejoin.amos.api.openapi.face.model.ElevatorAlarmModel;
//import com.yeejoin.amos.api.openapi.face.model.ElevatorAlarmModelList;
//import com.yeejoin.amos.api.openapi.face.model.ElevatorStatusModel;
//import com.yeejoin.amos.api.openapi.face.model.ElevatorStatusModelList;
//import com.yeejoin.amos.api.openapi.face.model.ElevatorVideoModel;
//
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import net.sf.json.JSONObject;
//
///**
// *
// * <pre>
// * 电梯物联对接
// * </pre>
// *
// * @author gwb
// * @version $Id: ElevatorStatusController.java, v 0.1 2021年9月28日 上午9:11:38 gwb Exp $
// */
//@RestController
//@RequestMapping(value = "/lift")
//@Api(tags = "lift-电梯物联对接")
//public class LiftController
//{
//
// @Autowired
// private ElevatorStatusService elevatorStatusService;
//
// @Autowired
// private ElevatorAlarmService elevatorAlarmService;
//
// @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
// @ApiOperation(value = "电梯运行状态数据高频上传请求")
// @RequestMapping(value = "upload/{registerCode}", method = RequestMethod.GET)
// @RestEventTrigger(value = "openapiLogEventHandler")
// public ResponseModel<String> highUpload (
// @PathVariable(value = "registerCode") String registerCode) throws Exception
// {
// elevatorStatusService.highUpload(registerCode);
// return ResponseHelper.buildResponse("");
// }
//
// @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
// @ApiOperation(value = "获取最近一次电梯运行状态数据")
// @RequestMapping(value = "status/{registerCode}", method = RequestMethod.GET)
// @RestEventTrigger(value = "openapiLogEventHandler")
// public ResponseModel<ElevatorStatusModel> getLatelyStatus (
// @PathVariable(value = "registerCode") String registerCode,
// @RequestParam(value = "highUpload", required = false) Boolean highUpload) throws Exception
// {
// //默认状态数据不进行高频上传
// if (ValidationUtil.isEmpty(highUpload))
// {
// highUpload = false;
// }
// return ResponseHelper.buildResponse(elevatorStatusService.getLatelyStatus(registerCode, highUpload));
// }
//
//
// @SuppressWarnings("rawtypes")
// @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
// @ApiOperation(value = "电梯运行状态数据上传")
// @RequestMapping(value = "run", method = RequestMethod.POST)
// @RestEventTrigger(value = "openapiLogEventHandler")
// public ResponseModel<String> multUploadRunData (
// @RequestParam(value = "access_token", required = false) String access_token,
// @RequestBody String runStatusData) throws Exception
// {
// JSONObject jsonobject = JSONObject.fromObject(runStatusData);
//
// Map<String, Class> classMap = new HashMap<String, Class>();
// classMap.put("lift", ElevatorStatusModel.class);
//
// ElevatorStatusModelList elevatorStatusModelList = (ElevatorStatusModelList)JSONObject.toBean(jsonobject,ElevatorStatusModelList.class,classMap);
// elevatorStatusService.multCreateElevatorStatus(elevatorStatusModelList.getLift());
// return ResponseHelper.buildResponse("");
// }
//
//
// @SuppressWarnings("rawtypes")
// @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
// @ApiOperation(value = "电梯故障数据上传")
// @RequestMapping(value = "fault", method = RequestMethod.POST)
// @RestEventTrigger(value = "openapiLogEventHandler")
// public ResponseModel<String> multUploadAlarmData (
// @RequestParam(value = "access_token", required = false) String access_token,
// @RequestBody String faultData) throws Exception
// {
// JSONObject jsonobject = JSONObject.fromObject(faultData);
//
// Map<String, Class> classMap = new HashMap<String, Class>();
// classMap.put("lift", ElevatorAlarmModel.class);
//
// ElevatorAlarmModelList elevatorAlarmModelList = (ElevatorAlarmModelList)JSONObject.toBean(jsonobject,ElevatorAlarmModelList.class,classMap);
// elevatorAlarmService.multCreateElevatorAlarm(elevatorAlarmModelList.getLift());
// return ResponseHelper.buildResponse("");
// }
//
//
// @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
// @ApiOperation(value = "获取电梯视频预览地址")
// @RequestMapping(value = "video/preview/{registerCode}", method = RequestMethod.GET)
// @RestEventTrigger(value = "openapiLogEventHandler")
// public ResponseModel<ElevatorVideoModel> videoPreview (
// @PathVariable(value = "registerCode") String registerCode) throws Exception
// {
//
// ElevatorVideoModel elevatorVideoModel = elevatorStatusService.videoPreview(registerCode);
// return ResponseHelper.buildResponse(elevatorVideoModel);
// }
//}
package com.yeejoin.amos.api.openapi.controller;
import java.util.HashMap;
import java.util.Map;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.component.event.RestEventTrigger;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.doc.TycloudResource;
import com.yeejoin.amos.api.common.restful.utils.ResponseHelper;
import com.yeejoin.amos.api.common.restful.utils.ResponseModel;
import com.yeejoin.amos.api.openapi.constant.Constant;
import com.yeejoin.amos.api.openapi.face.model.InspectionModel;
import com.yeejoin.amos.api.openapi.face.model.InspectionModelList;
import com.yeejoin.amos.api.openapi.face.service.ElevatorStatusService;
import com.yeejoin.amos.api.openapi.face.service.OpenapiBizTokenService;
import com.yeejoin.amos.feign.privilege.util.DesUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import net.sf.json.JSONObject;
/**
*
......
......@@ -3,7 +3,6 @@ package com.yeejoin.amos.api.openapi.controller;
import com.yeejoin.amos.api.common.restful.utils.ResponseHelper;
import com.yeejoin.amos.api.common.restful.utils.ResponseModel;
import com.yeejoin.amos.api.openapi.face.dto.EquipmentInfoDto;
import com.yeejoin.amos.api.openapi.face.model.ElevatorTechInfoModel;
import com.yeejoin.amos.api.openapi.face.model.EnterpriseInfoModel;
import com.yeejoin.amos.api.openapi.face.model.InspectionDetectionInfoModel;
import com.yeejoin.amos.api.openapi.face.model.InspectionInfoModel;
......@@ -11,18 +10,17 @@ import com.yeejoin.amos.api.openapi.face.model.ProduceInfoModel;
import com.yeejoin.amos.api.openapi.face.model.RegistrationInfoModel;
import com.yeejoin.amos.api.openapi.face.model.StaffQualifInfoModel;
import com.yeejoin.amos.api.openapi.face.model.UnitLicenceModel;
import com.yeejoin.amos.api.openapi.face.orm.entity.ConstructionInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidConstructionInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.DesignInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.EnclosureInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.MaintenanceInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.OtherInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.StaffBaseInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.SuperviseInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.UseInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidMaintenanceInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidEquipOtherInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidStaffBaseInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.MiddEquipSuperviseInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.MiddEquipUseInfo;
import com.yeejoin.amos.api.openapi.face.service.ConstructionInfoService;
import com.yeejoin.amos.api.openapi.face.service.CreateCodeService;
import com.yeejoin.amos.api.openapi.face.service.DesignInfoService;
import com.yeejoin.amos.api.openapi.face.service.ElevatorTechInfoService;
import com.yeejoin.amos.api.openapi.face.service.EnclosureInfoService;
import com.yeejoin.amos.api.openapi.face.service.EnterpriseInfoService;
import com.yeejoin.amos.api.openapi.face.service.InspectionInfoService;
......@@ -84,8 +82,8 @@ public class SuperviseController {
@Autowired
private OtherInfoService otherInfoService;
@Autowired
private ElevatorTechInfoService evatorTechInfoService;
// @Autowired
// private ElevatorTechInfoService evatorTechInfoService;
@Autowired
private EnclosureInfoService enclosureInfoService;
......@@ -131,7 +129,7 @@ public class SuperviseController {
@ApiOperation(value = "新增施工信息")
@PostMapping(value = "/constructionInfo")
@RestEventTrigger(value = "openapiLogEventHandler")
public ResponseModel<String> saveConstructionInfo(@RequestBody List<ConstructionInfo> constructionInfoList) {
public ResponseModel<String> saveConstructionInfo(@RequestBody List<MidConstructionInfo> constructionInfoList) {
if (ValidationUtil.isEmpty(constructionInfoList)) {
throw new BadRequest("上送数据为空");
}
......@@ -150,7 +148,7 @@ public class SuperviseController {
@ApiOperation(value = "新增使用信息")
@PostMapping(value = "/useInfo")
@RestEventTrigger(value = "openapiLogEventHandler")
public ResponseModel<String> saveUseInfo(@RequestBody List<UseInfo> useInfo) throws Exception {
public ResponseModel<String> saveUseInfo(@RequestBody List<MiddEquipUseInfo> useInfo) throws Exception {
return ResponseHelper.buildResponse(useInfoService.saveUseInfo(useInfo));
}
......@@ -158,7 +156,7 @@ public class SuperviseController {
@ApiOperation(value = "新增维保单位信息")
@PostMapping(value = "/maintenanceInfo")
@RestEventTrigger(value = "openapiLogEventHandler")
public ResponseModel<String> saveMaintenanceInfo(@RequestBody List<MaintenanceInfo> maintenanceInfoList) {
public ResponseModel<String> saveMaintenanceInfo(@RequestBody List<MidMaintenanceInfo> maintenanceInfoList) {
if (ValidationUtil.isEmpty(maintenanceInfoList)) {
throw new BadRequest("上送数据为空");
}
......@@ -169,7 +167,7 @@ public class SuperviseController {
@ApiOperation(value = "新增监督管理信息")
@PostMapping(value = "/superviseInfo")
@RestEventTrigger(value = "openapiLogEventHandler")
public ResponseModel<String> saveSuperviseInfo(@RequestBody List<SuperviseInfo> superviseInfo) throws Exception {
public ResponseModel<String> saveSuperviseInfo(@RequestBody List<MiddEquipSuperviseInfo> superviseInfo) throws Exception {
return ResponseHelper.buildResponse(superviseInfoService.saveSuperviseInfo(superviseInfo));
}
......@@ -177,17 +175,17 @@ public class SuperviseController {
@ApiOperation(value = "新增其他信息")
@PostMapping(value = "/otherInfo")
@RestEventTrigger(value = "openapiLogEventHandler")
public ResponseModel<String> saveOtherInfo(@RequestBody List<OtherInfo> otherInfo) throws Exception {
public ResponseModel<String> saveOtherInfo(@RequestBody List<MidEquipOtherInfo> otherInfo) throws Exception {
return ResponseHelper.buildResponse(otherInfoService.saveOtherInfo(otherInfo));
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(value = "新增电梯技术参数")
@PostMapping(value = "/elevatorTechInfo")
@RestEventTrigger(value = "openapiLogEventHandler")
public ResponseModel<String> saveElevatorTechInfo(@RequestBody List<ElevatorTechInfoModel> elevatorTechInfo) throws Exception {
return ResponseHelper.buildResponse(evatorTechInfoService.saveElevatorTechInfo(elevatorTechInfo));
}
// @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
// @ApiOperation(value = "新增电梯技术参数")
// @PostMapping(value = "/elevatorTechInfo")
// @RestEventTrigger(value = "openapiLogEventHandler")
// public ResponseModel<String> saveElevatorTechInfo(@RequestBody List<ElevatorTechInfoModel> elevatorTechInfo) throws Exception {
// return ResponseHelper.buildResponse(evatorTechInfoService.saveElevatorTechInfo(elevatorTechInfo));
// }
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(value = "新增特种设备附件资料信息")
......@@ -209,7 +207,7 @@ public class SuperviseController {
@ApiOperation(value = "新增人员基本信息")
@PostMapping(value = "/staffBaseInfo")
@RestEventTrigger(value = "openapiLogEventHandler")
public ResponseModel<String> saveStaffBaseInfo(@RequestBody List<StaffBaseInfo> staffBaseInfo) throws Exception {
public ResponseModel<String> saveStaffBaseInfo(@RequestBody List<MidStaffBaseInfo> staffBaseInfo) throws Exception {
return ResponseHelper.buildResponse(staffBaseInfoService.saveStaffBaseInfo(staffBaseInfo));
}
......
package com.yeejoin.amos.api.openapi.enums;
import com.yeejoin.amos.api.openapi.face.orm.entity.EquipTechParamBoiler;
import lombok.AllArgsConstructor;
import lombok.Getter;
......
package com.yeejoin.amos.api.openapi.face.dto;
import com.yeejoin.amos.api.openapi.face.orm.entity.DesignInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.MainParts;
import com.yeejoin.amos.api.openapi.face.orm.entity.MaintenanceInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.OtherInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.ProduceInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.ProtectionDevices;
import com.yeejoin.amos.api.openapi.face.orm.entity.RegistrationInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.SuperviseInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.UseInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.MiddMainParts;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidMaintenanceInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidEquipOtherInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidEquipProduceInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidEquipProtectionDevices;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidEquipRegistrationInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.MiddEquipSuperviseInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.MiddEquipUseInfo;
import lombok.Data;
import java.util.List;
......@@ -23,7 +23,7 @@ public class EquipmentInfoDto {
/**
* 使用信息
*/
private UseInfo useInfo;
private MiddEquipUseInfo useInfo;
/**
* 设计制造
......@@ -33,36 +33,36 @@ public class EquipmentInfoDto {
/**
* 制造信息
*/
private ProduceInfo factoryInfo;
private MidEquipProduceInfo factoryInfo;
/**
* 监管信息
*/
private SuperviseInfo supervisionInfo;
private MiddEquipSuperviseInfo supervisionInfo;
/**
* 注册登记
*/
private RegistrationInfo registerInfo;
private MidEquipRegistrationInfo registerInfo;
/**
* 维保备案
*/
private MaintenanceInfo maintenanceRecordInfo;
private MidMaintenanceInfo maintenanceRecordInfo;
/**
* 其他信息
*/
private OtherInfo otherInfo;
private MidEquipOtherInfo otherInfo;
/**
* 主要零部件
*/
private List<MainParts> mainParts;
private List<MiddMainParts> mainParts;
/**
* 保护装置
*/
private List<ProtectionDevices> protectionDevices;
private List<MidEquipProtectionDevices> protectionDevices;
/**
* 设备参数信息
......
package com.yeejoin.amos.api.openapi.face.model;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
*
* <pre>
* 装备分类 model
* </pre>
*
* @author gwb
* @version $Id: EquipmentCategory.java, v 0.1 2021年10月15日 上午11:23:03 gwb Exp $
*/
@Data
public class EquipmentCategoryModel implements Serializable {
/**
* <pre>
*
* </pre>
*/
private static final long serialVersionUID = 8586846201861760731L;
/**
* 主键
*/
private Long id;
/**
*
*/
private String parentId;
/**
* 装备分类编码
*/
private String code;
/**
* 装备分类名称
*/
private String name;
/**
* 描述
*/
private String description;
/**
* 备注
*/
private String remark;
/**
*
*/
private Date createDate;
/**
* 行业编码
*/
private String industryCode;
}
//package com.yeejoin.amos.api.openapi.face.model;
//
//import java.io.Serializable;
//import java.util.Date;
//
//import lombok.Data;
//
///**
// *
// * <pre>
// * 装备分类 model
// * </pre>
// *
// * @author gwb
// * @version $Id: EquipmentCategory.java, v 0.1 2021年10月15日 上午11:23:03 gwb Exp $
// */
//@Data
//public class EquipmentCategoryModel implements Serializable {
//
// /**
// * <pre>
// *
// * </pre>
// */
// private static final long serialVersionUID = 8586846201861760731L;
//
// /**
// * 主键
// */
// private Long id;
// /**
// *
// */
// private String parentId;
// /**
// * 装备分类编码
// */
// private String code;
// /**
// * 装备分类名称
// */
// private String name;
// /**
// * 描述
// */
// private String description;
// /**
// * 备注
// */
// private String remark;
// /**
// *
// */
// private Date createDate;
// /**
// * 行业编码
// */
// private String industryCode;
//
//}
//
......@@ -7,8 +7,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.util.Date;
import com.yeejoin.amos.api.openapi.face.model.AbstractBaseModel;
/**
* 安全追溯-锅炉
*
......@@ -18,7 +17,7 @@ import com.yeejoin.amos.api.openapi.face.model.AbstractBaseModel;
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="MidEquipTechParamBoilerDto", description="安全追溯-锅炉Dto")
public class EquipTechParamBoilerModel extends AbstractBaseModel {
public class MidEquipTechParamBoilerModel extends AbstractBaseModel {
private static final long serialVersionUID = 1L;
......
......@@ -7,8 +7,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.util.Date;
import com.yeejoin.amos.api.openapi.face.model.AbstractBaseModel;
/**
* 安全追溯-电梯
*
......@@ -18,7 +17,7 @@ import com.yeejoin.amos.api.openapi.face.model.AbstractBaseModel;
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="MidEquipTechParamElevatorDto", description="安全追溯-电梯Dto")
public class EquipTechParamElevatorModel extends AbstractBaseModel {
public class MidEquipTechParamElevatorModel extends AbstractBaseModel {
private static final long serialVersionUID = 1L;
......
......@@ -7,8 +7,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.util.Date;
import com.yeejoin.amos.api.openapi.face.model.AbstractBaseModel;
/**
* 安全追溯-起重机械
*
......@@ -18,7 +17,7 @@ import com.yeejoin.amos.api.openapi.face.model.AbstractBaseModel;
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="MidEquipTechParamLiftingDto", description="安全追溯-起重机械Dto")
public class EquipTechParamLiftingModel extends AbstractBaseModel {
public class MidEquipTechParamLiftingModel extends AbstractBaseModel {
private static final long serialVersionUID = 1L;
......
......@@ -7,8 +7,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.util.Date;
import com.yeejoin.amos.api.openapi.face.model.AbstractBaseModel;
/**
* 安全追溯-压力管道
*
......@@ -18,7 +17,7 @@ import com.yeejoin.amos.api.openapi.face.model.AbstractBaseModel;
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="MidEquipTechParamPipelineDto", description="安全追溯-压力管道Dto")
public class EquipTechParamPipelineModel extends AbstractBaseModel {
public class MidEquipTechParamPipelineModel extends AbstractBaseModel {
private static final long serialVersionUID = 1L;
......
......@@ -7,8 +7,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.util.Date;
import com.yeejoin.amos.api.openapi.face.model.AbstractBaseModel;
/**
* 安全追溯-游乐设施
*
......@@ -18,7 +17,7 @@ import com.yeejoin.amos.api.openapi.face.model.AbstractBaseModel;
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="MidEquipTechParamRidesDto", description="安全追溯-游乐设施Dto")
public class EquipTechParamRidesModel extends AbstractBaseModel {
public class MidEquipTechParamRidesModel extends AbstractBaseModel {
private static final long serialVersionUID = 1L;
......
......@@ -7,8 +7,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.util.Date;
import com.yeejoin.amos.api.openapi.face.model.AbstractBaseModel;
/**
* 安全追溯-索道
*
......@@ -18,7 +17,7 @@ import com.yeejoin.amos.api.openapi.face.model.AbstractBaseModel;
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="MidEquipTechParamRopewayDto", description="安全追溯-索道Dto")
public class EquipTechParamRopewayModel extends AbstractBaseModel {
public class MidEquipTechParamRopewayModel extends AbstractBaseModel {
private static final long serialVersionUID = 1L;
......
......@@ -7,8 +7,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.util.Date;
import com.yeejoin.amos.api.openapi.face.model.AbstractBaseModel;
/**
* 安全追溯-场内车辆
*
......@@ -18,7 +17,7 @@ import com.yeejoin.amos.api.openapi.face.model.AbstractBaseModel;
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="MidEquipTechParamVehicleDto", description="安全追溯-场内车辆Dto")
public class EquipTechParamVehicleModel extends AbstractBaseModel {
public class MidEquipTechParamVehicleModel extends AbstractBaseModel {
private static final long serialVersionUID = 1L;
......
......@@ -7,8 +7,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.util.Date;
import com.yeejoin.amos.api.openapi.face.model.AbstractBaseModel;
/**
* 安全追溯-压力容器
*
......@@ -18,7 +17,7 @@ import com.yeejoin.amos.api.openapi.face.model.AbstractBaseModel;
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="MidEquipTechParamVesselDto", description="安全追溯-压力容器Dto")
public class EquipTechParamVesselModel extends AbstractBaseModel {
public class MidEquipTechParamVesselModel extends AbstractBaseModel {
private static final long serialVersionUID = 1L;
......
......@@ -6,7 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
import com.yeejoin.amos.api.openapi.face.model.AbstractBaseModel;
/**
* 安全追溯-维保备案信息表
*
......@@ -16,7 +16,7 @@ import com.yeejoin.amos.api.openapi.face.model.AbstractBaseModel;
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="MidEquipMaintenanceRecordInfoDto", description="安全追溯-维保备案信息表Dto")
public class MaintenanceInfoModel extends AbstractBaseModel {
public class MidMaintenanceInfoModel extends AbstractBaseModel {
private static final long serialVersionUID = 1L;
......
package com.yeejoin.amos.api.openapi.face.model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
public class CylinderFillingCheckModel extends AbstractBaseModel{
public class TmCylinderFillingCheckModel extends AbstractBaseModel{
/**
*
*/
......
package com.yeejoin.amos.api.openapi.face.model;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
public class CylinderFillingExamineModel extends AbstractBaseModel{
public class TmCylinderFillingExamineModel extends AbstractBaseModel{
/**
*
*/
......
......@@ -8,11 +8,11 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
public class CylinderFillingExamineModelList extends AbstractBaseModel{
public class TmCylinderFillingExamineModelList extends AbstractBaseModel{
/**
*
*/
private static final long serialVersionUID = 1L;
private List<CylinderFillingExamineModel> fillingAudit;
private List<TmCylinderFillingExamineModel> fillingAudit;
}
package com.yeejoin.amos.api.openapi.face.model;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
public class CylinderFillingModel extends AbstractBaseModel{
public class TmCylinderFillingModel extends AbstractBaseModel{
/**
*
*/
......
......@@ -8,14 +8,14 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
public class CylinderFillingModelList extends AbstractBaseModel{
public class TmCylinderFillingModelList extends AbstractBaseModel{
/**
*
*/
private static final long serialVersionUID = 1L;
private String type;
private List<CylinderFillingModel> fillingBefore;
private List<CylinderFillingRecordModel> filling;
private List<CylinderFillingCheckModel> fillingAfter;
private List<TmCylinderFillingModel> fillingBefore;
private List<TmCylinderFillingRecordModel> filling;
private List<TmCylinderFillingCheckModel> fillingAfter;
}
package com.yeejoin.amos.api.openapi.face.model;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
public class CylinderFillingRecordModel extends AbstractBaseModel{
public class TmCylinderFillingRecordModel extends AbstractBaseModel{
/**
*
*/
......
package com.yeejoin.amos.api.openapi.face.model;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
public class CylinderInfoModel extends AbstractBaseModel{
public class TmCylinderInfoModel extends AbstractBaseModel{
/**
*
*/
......
......@@ -8,11 +8,11 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
public class CylinderInfoModelList extends AbstractBaseModel{
public class TmCylinderInfoModelList extends AbstractBaseModel{
/**
*
*/
private static final long serialVersionUID = 1L;
private List<CylinderInfoModel> info;
private List<TmCylinderInfoModel> info;
}
package com.yeejoin.amos.api.openapi.face.model;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
public class CylinderInspectionModel extends AbstractBaseModel{
public class TmCylinderInspectionModel extends AbstractBaseModel{
/**
*
*/
......
......@@ -8,11 +8,11 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
public class CylinderInspectionModelList extends AbstractBaseModel{
public class TmCylinderInspectionModelList extends AbstractBaseModel{
/**
*
*/
private static final long serialVersionUID = 1L;
private List<CylinderInspectionModel> inspection;
private List<TmCylinderInspectionModel> inspection;
}
......@@ -6,7 +6,7 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
public class CylinderTagsModel extends AbstractBaseModel{
public class TmCylinderTagsModel extends AbstractBaseModel{
/**
*
*/
......
......@@ -8,11 +8,11 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
public class CylinderTagsModelList extends AbstractBaseModel{
public class TmCylinderTagsModelList extends AbstractBaseModel{
/**
*
*/
private static final long serialVersionUID = 1L;
private List<CylinderTagsModel> tag;
private List<TmCylinderTagsModel> tag;
}
package com.yeejoin.amos.api.openapi.face.model;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
public class CylinderUnitModel extends AbstractBaseModel{
public class TmCylinderUnitModel extends AbstractBaseModel{
/**
*
*/
......
......@@ -6,7 +6,7 @@ import java.util.List;
import lombok.Data;
@Data
public class CylinderUnitModelList implements Serializable{
public class TmCylinderUnitModelList implements Serializable{
/**
* <pre>
*
......@@ -14,5 +14,5 @@ public class CylinderUnitModelList implements Serializable{
*/
private static final long serialVersionUID = -8502490582467436049L;
private List<CylinderUnitModel> unit;
private List<TmCylinderUnitModel> unit;
}
package com.yeejoin.amos.api.openapi.face.orm.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.ElevatorAlarm;
/**
* <p>
* 电梯故障表 Mapper 接口
* </p>
*
* @author 子杨
* @since 2021-09-27
*/
public interface ElevatorAlarmMapper extends BaseMapper<ElevatorAlarm> {
}
\ No newline at end of file
//package com.yeejoin.amos.api.openapi.face.orm.dao;
//
//import com.baomidou.mybatisplus.core.mapper.BaseMapper;
//import com.yeejoin.amos.api.openapi.face.orm.entity.ElevatorAlarm;
//
///**
// * <p>
// * 电梯故障表 Mapper 接口
// * </p>
// *
// * @author 子杨
// * @since 2021-09-27
// */
//public interface ElevatorAlarmMapper extends BaseMapper<ElevatorAlarm> {
//
//}
\ No newline at end of file
package com.yeejoin.amos.api.openapi.face.orm.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.ElevatorAlarmType;
/**
*
* <pre>
* 电梯故障类型表 Mapper 接口
* </pre>
*
* @author gwb
* @version $Id: ElevatorAlarmTypeMapper.java, v 0.1 2021年10月15日 下午2:23:32 gwb Exp $
*/
public interface ElevatorAlarmTypeMapper extends BaseMapper<ElevatorAlarmType> {
}
\ No newline at end of file
//package com.yeejoin.amos.api.openapi.face.orm.dao;
//
//import com.baomidou.mybatisplus.core.mapper.BaseMapper;
//import com.yeejoin.amos.api.openapi.face.orm.entity.ElevatorAlarmType;
//
///**
// *
// * <pre>
// * 电梯故障类型表 Mapper 接口
// * </pre>
// *
// * @author gwb
// * @version $Id: ElevatorAlarmTypeMapper.java, v 0.1 2021年10月15日 下午2:23:32 gwb Exp $
// */
//public interface ElevatorAlarmTypeMapper extends BaseMapper<ElevatorAlarmType> {
//
//}
\ No newline at end of file
package com.yeejoin.amos.api.openapi.face.orm.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.Elevator;
/**
*
* <pre>
* 电梯 Mapper 接口
* </pre>
*
* @author gwb
* @version $Id: ElevatorMapper.java, v 0.1 2021年9月30日 下午3:28:31 gwb Exp $
*/
public interface ElevatorMapper extends BaseMapper<Elevator> {
}
\ No newline at end of file
//package com.yeejoin.amos.api.openapi.face.orm.dao;
//
//import com.baomidou.mybatisplus.core.mapper.BaseMapper;
//import com.yeejoin.amos.api.openapi.face.orm.entity.Elevator;
//
///**
// *
// * <pre>
// * 电梯 Mapper 接口
// * </pre>
// *
// * @author gwb
// * @version $Id: ElevatorMapper.java, v 0.1 2021年9月30日 下午3:28:31 gwb Exp $
// */
//public interface ElevatorMapper extends BaseMapper<Elevator> {
//
//}
\ No newline at end of file
package com.yeejoin.amos.api.openapi.face.orm.dao;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.ElevatorStatus;
/**
* <p>
* 电梯运行状态表 Mapper 接口
* </p>
*
* @author 子杨
* @since 2021-09-27
*/
public interface ElevatorStatusMapper extends BaseMapper<ElevatorStatus> {
@Select("SELECT " +
" * " +
" FROM " +
" tz_elevator_status c " +
" WHERE " +
" c.register_code = '${registerCode}' ORDER BY upload_date DESC LIMIT 1")
ElevatorStatus getLatelyStatus(@Param("registerCode") String registerCode);
}
\ No newline at end of file
//package com.yeejoin.amos.api.openapi.face.orm.dao;
//
//import org.apache.ibatis.annotations.Param;
//import org.apache.ibatis.annotations.Select;
//
//import com.baomidou.mybatisplus.core.mapper.BaseMapper;
//import com.yeejoin.amos.api.openapi.face.orm.entity.ElevatorStatus;
//
///**
// * <p>
// * 电梯运行状态表 Mapper 接口
// * </p>
// *
// * @author 子杨
// * @since 2021-09-27
// */
//public interface ElevatorStatusMapper extends BaseMapper<ElevatorStatus> {
//
//
// @Select("SELECT " +
// " * " +
// " FROM " +
// " tz_elevator_status c " +
// " WHERE " +
// " c.register_code = '${registerCode}' ORDER BY upload_date DESC LIMIT 1")
// ElevatorStatus getLatelyStatus(@Param("registerCode") String registerCode);
//}
\ No newline at end of file
package com.yeejoin.amos.api.openapi.face.orm.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.ElevatorTechInfo;
/**
* 电梯技术参数 Mapper 接口
*
* @author Zhang Yingbin
* @date 2022-07-19
*/
public interface ElevatorTechInfoMapper extends BaseMapper<ElevatorTechInfo> {
}
//package com.yeejoin.amos.api.openapi.face.orm.dao;
//
//import com.baomidou.mybatisplus.core.mapper.BaseMapper;
//import com.yeejoin.amos.api.openapi.face.orm.entity.ElevatorTechInfo;
//
///**
// * 电梯技术参数 Mapper 接口
// *
// * @author Zhang Yingbin
// * @date 2022-07-19
// */
//public interface ElevatorTechInfoMapper extends BaseMapper<ElevatorTechInfo> {
//
//}
package com.yeejoin.amos.api.openapi.face.orm.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.EquipmentCategory;
/**
*
* <pre>
* 装备分类 Mapper 接口
* </pre>
*
* @author gwb
* @version $Id: EquipmentCategoryMapper.java, v 0.1 2021年10月15日 下午2:24:49 gwb Exp $
*/
public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> {
}
\ No newline at end of file
//package com.yeejoin.amos.api.openapi.face.orm.dao;
//
//import com.baomidou.mybatisplus.core.mapper.BaseMapper;
//import com.yeejoin.amos.api.openapi.face.orm.entity.EquipmentCategory;
//
///**
// *
// * <pre>
// * 装备分类 Mapper 接口
// * </pre>
// *
// * @author gwb
// * @version $Id: EquipmentCategoryMapper.java, v 0.1 2021年10月15日 下午2:24:49 gwb Exp $
// */
//public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> {
//
//}
\ No newline at end of file
package com.yeejoin.amos.api.openapi.face.orm.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.ConstructionInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidConstructionInfo;
/**
* 特种设备基本信息-施工信息 Mapper 接口
......@@ -9,6 +9,6 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.ConstructionInfo;
* @author Zhang Yingbin
* @date 2022-07-19
*/
public interface ConstructionInfoMapper extends BaseMapper<ConstructionInfo> {
public interface MidConstructionInfoMapper extends BaseMapper<MidConstructionInfo> {
}
......@@ -9,6 +9,6 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.DesignInfo;
* @author Zhang Yingbin
* @date 2022-07-19
*/
public interface DesignInfoMapper extends BaseMapper<DesignInfo> {
public interface MidDesignInfoMapper extends BaseMapper<DesignInfo> {
}
package com.yeejoin.amos.api.openapi.face.orm.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.OtherInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidEquipOtherInfo;
/**
* 特种设备基本信息-其他信息 Mapper 接口
......@@ -9,6 +9,6 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.OtherInfo;
* @author Zhang Yingbin
* @date 2022-07-19
*/
public interface OtherInfoMapper extends BaseMapper<OtherInfo> {
public interface MidEquipOtherInfoMapper extends BaseMapper<MidEquipOtherInfo> {
}
package com.yeejoin.amos.api.openapi.face.orm.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.ProduceInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidEquipProduceInfo;
/**
* 特种设备基本信息-制造信息 Mapper 接口
......@@ -9,6 +9,6 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.ProduceInfo;
* @author Zhang Yingbin
* @date 2022-07-19
*/
public interface ProduceInfoMapper extends BaseMapper<ProduceInfo> {
public interface MidEquipProduceInfoMapper extends BaseMapper<MidEquipProduceInfo> {
}
......@@ -2,7 +2,7 @@ package com.yeejoin.amos.api.openapi.face.orm.dao;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.RegistrationInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidEquipRegistrationInfo;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
......@@ -15,9 +15,9 @@ import java.util.Set;
* @author Zhang Yingbin
* @date 2022-07-19
*/
public interface RegistrationInfoMapper extends BaseMapper<RegistrationInfo> {
public interface MidEquipRegistrationInfoMapper extends BaseMapper<MidEquipRegistrationInfo> {
@DS("tzs")
@Query("SELECT DISTINCT r.* FROM idx_biz_jg_use_info i, idx_biz_jg_register_info r WHERE i.data_source = 'jg' AND i.RECORD = r.RECORD AND r.EQU_CODE IN :values")
List<RegistrationInfo> getUseInfoByEquipCode(@Param("values") Set<String> sequenceCodes);
List<MidEquipRegistrationInfo> getUseInfoByEquipCode(@Param("values") Set<String> sequenceCodes);
}
package com.yeejoin.amos.api.openapi.face.orm.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.EquipTechParamBoiler;
import lombok.Data;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidEquipTechParamBoiler;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface EquipTechParamBoilerMapper extends BaseMapper<EquipTechParamBoiler> {
public interface MidEquipTechParamBoilerMapper extends BaseMapper<MidEquipTechParamBoiler> {
}
package com.yeejoin.amos.api.openapi.face.orm.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.EquipTechParamElevator;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidEquipTechParamElevator;
public interface EquipTechParamElevatorMapper extends BaseMapper<EquipTechParamElevator> {
public interface MidEquipTechParamElevatorMapper extends BaseMapper<MidEquipTechParamElevator> {
}
package com.yeejoin.amos.api.openapi.face.orm.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.EquipTechParamLifting;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidEquipTechParamLifting;
public interface EquipTechParamLiftingMapper extends BaseMapper<EquipTechParamLifting> {
public interface MidEquipTechParamLiftingMapper extends BaseMapper<MidEquipTechParamLifting> {
}
package com.yeejoin.amos.api.openapi.face.orm.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.EquipTechParamPipeline;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidEquipTechParamPipeline;
public interface EquipTechParamPipelineMapper extends BaseMapper<EquipTechParamPipeline> {
public interface MidEquipTechParamPipelineMapper extends BaseMapper<MidEquipTechParamPipeline> {
}
package com.yeejoin.amos.api.openapi.face.orm.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.EquipTechParamRides;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidEquipTechParamRides;
public interface EquipTechParamRidesMapper extends BaseMapper<EquipTechParamRides> {
public interface MidEquipTechParamRidesMapper extends BaseMapper<MidEquipTechParamRides> {
}
package com.yeejoin.amos.api.openapi.face.orm.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.EquipTechParamRopeway;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidEquipTechParamRopeway;
public interface EquipTechParamRopewayMapper extends BaseMapper<EquipTechParamRopeway> {
public interface MidEquipTechParamRopewayMapper extends BaseMapper<MidEquipTechParamRopeway> {
}
package com.yeejoin.amos.api.openapi.face.orm.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.EquipTechParamVehicle;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidEquipTechParamVehicle;
public interface EquipTechParamVehicleMapper extends BaseMapper<EquipTechParamVehicle> {
public interface MidEquipTechParamVehicleMapper extends BaseMapper<MidEquipTechParamVehicle> {
}
package com.yeejoin.amos.api.openapi.face.orm.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.EquipTechParamVessel;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidEquipTechParamVessel;
public interface EquipTechParamVesselMapper extends BaseMapper<EquipTechParamVessel> {
public interface MidEquipTechParamVesselMapper extends BaseMapper<MidEquipTechParamVessel> {
}
package com.yeejoin.amos.api.openapi.face.orm.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.MaintenanceInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidMaintenanceInfo;
/**
* 特种设备基本信息-维保备案信息 Mapper 接口
......@@ -9,6 +9,6 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.MaintenanceInfo;
* @author Zhang Yingbin
* @date 2022-07-19
*/
public interface MaintenanceInfoMapper extends BaseMapper<MaintenanceInfo> {
public interface MidMaintenanceInfoMapper extends BaseMapper<MidMaintenanceInfo> {
}
package com.yeejoin.amos.api.openapi.face.orm.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.StaffBaseInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidStaffBaseInfo;
/**
* 人员数据信息-基本信息 Mapper 接口
......@@ -9,6 +9,6 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.StaffBaseInfo;
* @author Zhang Yingbin
* @date 2022-07-19
*/
public interface StaffBaseInfoMapper extends BaseMapper<StaffBaseInfo> {
public interface MidStaffBaseInfoMapper extends BaseMapper<MidStaffBaseInfo> {
}
package com.yeejoin.amos.api.openapi.face.orm.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.StaffQualifInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidStaffQualifInfo;
/**
* 人员数据信息-资质信息 Mapper 接口
......@@ -9,6 +9,6 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.StaffQualifInfo;
* @author Zhang Yingbin
* @date 2022-07-19
*/
public interface StaffQualifInfoMapper extends BaseMapper<StaffQualifInfo> {
public interface MidStaffQualifInfoMapper extends BaseMapper<MidStaffQualifInfo> {
}
package com.yeejoin.amos.api.openapi.face.orm.dao;
import com.yeejoin.amos.api.openapi.face.orm.entity.MainParts;
import com.yeejoin.amos.api.openapi.face.orm.entity.MiddMainParts;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
......@@ -9,6 +9,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @author duanwei
* @date 2023-04-10
*/
public interface MidEquipMainPartsMapper extends BaseMapper<MainParts> {
public interface MiddEquipMainPartsMapper extends BaseMapper<MiddMainParts> {
}
package com.yeejoin.amos.api.openapi.face.orm.dao;
import com.yeejoin.amos.api.openapi.face.orm.entity.ProtectionDevices;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidEquipProtectionDevices;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
......@@ -9,6 +9,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @author duanwei
* @date 2023-04-10
*/
public interface MidEquipProtectionDevicesMapper extends BaseMapper<ProtectionDevices> {
public interface MiddEquipProtectionDevicesMapper extends BaseMapper<MidEquipProtectionDevices> {
}
package com.yeejoin.amos.api.openapi.face.orm.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.SuperviseInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.MiddEquipSuperviseInfo;
/**
* 特种设备基本信息-监督管理信息 Mapper 接口
......@@ -9,6 +9,6 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.SuperviseInfo;
* @author Zhang Yingbin
* @date 2022-07-19
*/
public interface SuperviseInfoMapper extends BaseMapper<SuperviseInfo> {
public interface MiddEquipSuperviseInfoMapper extends BaseMapper<MiddEquipSuperviseInfo> {
}
package com.yeejoin.amos.api.openapi.face.orm.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.UseInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.MiddEquipUseInfo;
/**
* 特种设备基本信息-使用信息 Mapper 接口
......@@ -9,6 +9,6 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.UseInfo;
* @author Zhang Yingbin
* @date 2022-07-19
*/
public interface UseInfoMapper extends BaseMapper<UseInfo> {
public interface MiddEquipUseInfoMapper extends BaseMapper<MiddEquipUseInfo> {
}
package com.yeejoin.amos.api.openapi.face.orm.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderFillingCheck;
import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderFillingCheck;
/**
*
......@@ -12,6 +12,6 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderFillingCheck;
* @author gwb
* @version $Id: ElevatorMapper.java, v 0.1 2021年9月30日 下午3:28:31 gwb Exp $
*/
public interface CylinderFillingCheckMapper extends BaseMapper<CylinderFillingCheck> {
public interface TmCylinderFillingCheckMapper extends BaseMapper<TmCylinderFillingCheck> {
}
\ No newline at end of file
package com.yeejoin.amos.api.openapi.face.orm.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderFillingExamine;
import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderFillingExamine;
/**
*
......@@ -12,6 +12,6 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderFillingExamine;
* @author gwb
* @version $Id: ElevatorMapper.java, v 0.1 2021年9月30日 下午3:28:31 gwb Exp $
*/
public interface CylinderFillingExamineMapper extends BaseMapper<CylinderFillingExamine> {
public interface TmCylinderFillingExamineMapper extends BaseMapper<TmCylinderFillingExamine> {
}
\ No newline at end of file
package com.yeejoin.amos.api.openapi.face.orm.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderFilling;
import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderFilling;
/**
*
......@@ -12,6 +12,6 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderFilling;
* @author gwb
* @version $Id: ElevatorMapper.java, v 0.1 2021年9月30日 下午3:28:31 gwb Exp $
*/
public interface CylinderFillingMapper extends BaseMapper<CylinderFilling> {
public interface TmCylinderFillingMapper extends BaseMapper<TmCylinderFilling> {
}
\ No newline at end of file
package com.yeejoin.amos.api.openapi.face.orm.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderFillingRecord;
import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderFillingRecord;
import org.apache.ibatis.annotations.Select;
import java.util.List;
......@@ -15,7 +15,7 @@ import java.util.List;
* @author gwb
* @version $Id: ElevatorMapper.java, v 0.1 2021年9月30日 下午3:28:31 gwb Exp $
*/
public interface CylinderFillingRecordMapper extends BaseMapper<CylinderFillingRecord> {
public interface TmCylinderFillingRecordMapper extends BaseMapper<TmCylinderFillingRecord> {
@Select("select date_format(`t`.`sync_date`,'%Y-%m-%d') AS `sync_time` from tm_cylinder_filling_record t GROUP BY date_format(`t`.`sync_date`,'%Y-%m-%d') ")
......
package com.yeejoin.amos.api.openapi.face.orm.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderInfo;
/**
*
......@@ -12,6 +12,6 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderInfo;
* @author gwb
* @version $Id: ElevatorMapper.java, v 0.1 2021年9月30日 下午3:28:31 gwb Exp $
*/
public interface CylinderInfoMapper extends BaseMapper<CylinderInfo> {
public interface TmCylinderInfoMapper extends BaseMapper<TmCylinderInfo> {
}
\ No newline at end of file
package com.yeejoin.amos.api.openapi.face.orm.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderInspection;
import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderInspection;
/**
*
......@@ -12,6 +12,6 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderInspection;
* @author gwb
* @version $Id: ElevatorMapper.java, v 0.1 2021年9月30日 下午3:28:31 gwb Exp $
*/
public interface CylinderInspectionMapper extends BaseMapper<CylinderInspection> {
public interface TmCylinderInspectionMapper extends BaseMapper<TmCylinderInspection> {
}
\ No newline at end of file
package com.yeejoin.amos.api.openapi.face.orm.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderTags;
import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderTags;
/**
*
......@@ -12,6 +12,6 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderTags;
* @author gwb
* @version $Id: ElevatorMapper.java, v 0.1 2021年9月30日 下午3:28:31 gwb Exp $
*/
public interface CylinderTagsMapper extends BaseMapper<CylinderTags> {
public interface TmCylinderTagsMapper extends BaseMapper<TmCylinderTags> {
}
\ No newline at end of file
package com.yeejoin.amos.api.openapi.face.orm.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderUnit;
import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderUnit;
/**
*
......@@ -12,6 +12,7 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderUnit;
* @author gwb
* @version $Id: ElevatorMapper.java, v 0.1 2021年9月30日 下午3:28:31 gwb Exp $
*/
public interface CylinderUnitMapper extends BaseMapper<CylinderUnit> {
public interface TmCylinderUnitMapper extends BaseMapper<TmCylinderUnit>
{
}
\ No newline at end of file
package com.yeejoin.amos.api.openapi.face.orm.entity;
import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
/**
*
* <pre>
* 装备分类
* </pre>
*
* @author gwb
* @version $Id: EquipmentCategory.java, v 0.1 2021年10月15日 上午11:23:03 gwb Exp $
*/
@Data
@TableName("tz_equipment_category")
public class EquipmentCategory implements Serializable {
/**
* <pre>
*
* </pre>
*/
private static final long serialVersionUID = 5715164115243510569L;
/**
* 主键
*/
@TableField("id")
private Long id;
/**
*
*/
@TableField("parent_id")
private String parentId;
/**
* 装备分类编码
*/
@TableField("code")
private String code;
/**
* 装备分类名称
*/
@TableField("name")
private String name;
/**
* 描述
*/
@TableField("description")
private String description;
/**
* 备注
*/
@TableField("remark")
private String remark;
/**
*
*/
@TableField("create_date")
private Date createDate;
/**
* 行业编码
*/
@TableField("industry_code")
private String industryCode;
}
//package com.yeejoin.amos.api.openapi.face.orm.entity;
//
//import java.io.Serializable;
//import java.util.Date;
//
//import com.baomidou.mybatisplus.annotation.TableField;
//import com.baomidou.mybatisplus.annotation.TableName;
//
//import lombok.Data;
//
///**
// *
// * <pre>
// * 装备分类
// * </pre>
// *
// * @author gwb
// * @version $Id: EquipmentCategory.java, v 0.1 2021年10月15日 上午11:23:03 gwb Exp $
// */
//@Data
//@TableName("tz_equipment_category")
//public class EquipmentCategory implements Serializable {
//
//
// /**
// * <pre>
// *
// * </pre>
// */
// private static final long serialVersionUID = 5715164115243510569L;
// /**
// * 主键
// */
// @TableField("id")
// private Long id;
// /**
// *
// */
// @TableField("parent_id")
// private String parentId;
// /**
// * 装备分类编码
// */
// @TableField("code")
// private String code;
// /**
// * 装备分类名称
// */
// @TableField("name")
// private String name;
// /**
// * 描述
// */
// @TableField("description")
// private String description;
// /**
// * 备注
// */
// @TableField("remark")
// private String remark;
// /**
// *
// */
// @TableField("create_date")
// private Date createDate;
// /**
// * 行业编码
// */
// @TableField("industry_code")
// private String industryCode;
//
//}
//
......@@ -17,7 +17,7 @@ import java.util.Date;
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("mid_equip_construction_info")
public class ConstructionInfo extends AbstractEquipBaseEntity {
public class MidConstructionInfo extends AbstractEquipBaseEntity {
private static final long serialVersionUID = 1L;
......
......@@ -15,7 +15,7 @@ import lombok.experimental.Accessors;
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("mid_equip_other_info")
public class OtherInfo extends AbstractEquipBaseEntity {
public class MidEquipOtherInfo extends AbstractEquipBaseEntity {
private static final long serialVersionUID = 1L;
private String record;
......
......@@ -17,7 +17,7 @@ import java.util.Date;
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("mid_equip_factory_info")
public class ProduceInfo extends AbstractEquipBaseEntity {
public class MidEquipProduceInfo extends AbstractEquipBaseEntity {
private static final long serialVersionUID = 1L;
private String record;
......
......@@ -19,7 +19,7 @@ import java.util.Date;
@Accessors(chain = true)
@ApiModel(value="MidEquipProtectionDevices对象", description="")
@TableName(value = "mid_equip_protection_devices")
public class ProtectionDevices extends AbstractEquipBaseEntity {
public class MidEquipProtectionDevices extends AbstractEquipBaseEntity {
private static final long serialVersionUID = 1L;
......
......@@ -17,7 +17,7 @@ import java.math.BigDecimal;
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("mid_equip_register_info")
public class RegistrationInfo extends AbstractEquipBaseEntity {
public class MidEquipRegistrationInfo extends AbstractEquipBaseEntity {
private static final long serialVersionUID = 1L;
private String record;
......
......@@ -18,7 +18,7 @@ import java.math.BigDecimal;
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("mid_equip_tech_param_boiler")
public class EquipTechParamBoiler extends AbstractEquipBaseEntity {
public class MidEquipTechParamBoiler extends AbstractEquipBaseEntity {
private static final long serialVersionUID = 1L;
......
......@@ -17,7 +17,7 @@ import java.math.BigDecimal;
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("mid_equip_tech_param_elevator")
public class EquipTechParamElevator extends AbstractEquipBaseEntity {
public class MidEquipTechParamElevator extends AbstractEquipBaseEntity {
private static final long serialVersionUID = 1L;
private String record;
......
package com.yeejoin.amos.api.openapi.face.orm.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity;
import com.yeejoin.amos.api.openapi.face.orm.entity.AbstractBaseEntity;
/**
* 安全追溯-起重机械
*
......@@ -22,7 +19,7 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.AbstractBaseEntity;
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("mid_equip_tech_param_lifting")
public class EquipTechParamLifting extends AbstractEquipBaseEntity {
public class MidEquipTechParamLifting extends AbstractEquipBaseEntity {
private static final long serialVersionUID = 1L;
......
package com.yeejoin.amos.api.openapi.face.orm.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity;
import com.yeejoin.amos.api.openapi.face.orm.entity.AbstractBaseEntity;
/**
* 安全追溯-压力管道
*
......@@ -22,7 +19,7 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.AbstractBaseEntity;
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("mid_equip_tech_param_pipeline")
public class EquipTechParamPipeline extends AbstractEquipBaseEntity {
public class MidEquipTechParamPipeline extends AbstractEquipBaseEntity {
private static final long serialVersionUID = 1L;
......
package com.yeejoin.amos.api.openapi.face.orm.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity;
import com.yeejoin.amos.api.openapi.face.orm.entity.AbstractBaseEntity;
/**
* 安全追溯-游乐设施
*
......@@ -22,7 +19,7 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.AbstractBaseEntity;
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("mid_equip_tech_param_rides")
public class EquipTechParamRides extends AbstractEquipBaseEntity {
public class MidEquipTechParamRides extends AbstractEquipBaseEntity {
private static final long serialVersionUID = 1L;
......
package com.yeejoin.amos.api.openapi.face.orm.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity;
import com.yeejoin.amos.api.openapi.face.orm.entity.AbstractBaseEntity;
/**
* 安全追溯-索道
*
......@@ -22,7 +17,7 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.AbstractBaseEntity;
@Data
@Accessors(chain = true)
@TableName(value = "mid_equip_tech_param_ropeway")
public class EquipTechParamRopeway extends AbstractEquipBaseEntity{
public class MidEquipTechParamRopeway extends AbstractEquipBaseEntity{
private static final long serialVersionUID = 1L;
/**
......
package com.yeejoin.amos.api.openapi.face.orm.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity;
import com.yeejoin.amos.api.openapi.face.orm.entity.AbstractBaseEntity;
/**
* 安全追溯-场内车辆
*
......@@ -22,7 +19,7 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.AbstractBaseEntity;
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("mid_equip_tech_param_vehicle")
public class EquipTechParamVehicle extends AbstractEquipBaseEntity {
public class MidEquipTechParamVehicle extends AbstractEquipBaseEntity {
private static final long serialVersionUID = 1L;
......
package com.yeejoin.amos.api.openapi.face.orm.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity;
import com.yeejoin.amos.api.openapi.face.orm.entity.AbstractBaseEntity;
/**
* 安全追溯-压力容器
*
......@@ -22,7 +19,7 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.AbstractBaseEntity;
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("mid_equip_tech_param_vessel")
public class EquipTechParamVessel extends AbstractEquipBaseEntity {
public class MidEquipTechParamVessel extends AbstractEquipBaseEntity {
private static final long serialVersionUID = 1L;
......
......@@ -17,7 +17,7 @@ import java.util.Date;
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("mid_equip_maintenance_record_info")
public class MaintenanceInfo extends AbstractEquipBaseEntity {
public class MidMaintenanceInfo extends AbstractEquipBaseEntity {
private static final long serialVersionUID = 1L;
private String record;
......
package com.yeejoin.amos.api.openapi.face.orm.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity;
import com.yeejoin.amos.api.openapi.face.orm.entity.AbstractBaseEntity;
/**
* 人员数据信息-基本信息
*
......@@ -21,7 +18,7 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.AbstractBaseEntity;
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("mid_staff_base_info")
public class StaffBaseInfo extends AbstractEquipBaseEntity {
public class MidStaffBaseInfo extends AbstractEquipBaseEntity {
private static final long serialVersionUID = 1L;
......
package com.yeejoin.amos.api.openapi.face.orm.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity;
import com.yeejoin.amos.api.openapi.face.orm.entity.AbstractBaseEntity;
/**
* 人员数据信息-资质信息
*
......@@ -21,7 +18,7 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.AbstractBaseEntity;
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("mid_staff_qualif_info")
public class StaffQualifInfo extends AbstractEquipBaseEntity {
public class MidStaffQualifInfo extends AbstractEquipBaseEntity {
private static final long serialVersionUID = 1L;
......
......@@ -15,7 +15,7 @@ import lombok.experimental.Accessors;
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("mid_equip_supervision_info")
public class SuperviseInfo extends AbstractEquipBaseEntity {
public class MiddEquipSuperviseInfo extends AbstractEquipBaseEntity {
private static final long serialVersionUID = 1L;
private String record;
......
......@@ -18,7 +18,7 @@ import java.util.Date;
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("mid_equip_use_info")
public class UseInfo extends AbstractEquipBaseEntity {
public class MiddEquipUseInfo extends AbstractEquipBaseEntity {
private static final long serialVersionUID = 1L;
......
......@@ -20,7 +20,7 @@ import java.util.Date;
@Accessors(chain = true)
@ApiModel(value="MidEquipMainParts对象", description="")
@TableName(value = "mid_equip_main_parts")
public class MainParts extends AbstractEquipBaseEntity {
public class MiddMainParts extends AbstractEquipBaseEntity {
private static final long serialVersionUID = 1L;
......
package com.yeejoin.amos.api.openapi.face.orm.entity;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
......@@ -15,7 +13,7 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("tm_cylinder_filling")
public class CylinderFilling extends AbstractBaseEntity{/**
public class TmCylinderFilling extends AbstractBaseEntity{/**
*
*/
private static final long serialVersionUID = 1L;
......
package com.yeejoin.amos.api.openapi.face.orm.entity;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
......@@ -15,7 +13,7 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("tm_cylinder_filling_check")
public class CylinderFillingCheck extends AbstractBaseEntity{/**
public class TmCylinderFillingCheck extends AbstractBaseEntity{/**
*
*/
private static final long serialVersionUID = 1L;
......
package com.yeejoin.amos.api.openapi.face.orm.entity;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
......@@ -15,7 +13,7 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("tm_cylinder_filling_examine")
public class CylinderFillingExamine extends AbstractBaseEntity{/**
public class TmCylinderFillingExamine extends AbstractBaseEntity{/**
*
*/
private static final long serialVersionUID = 1L;
......
package com.yeejoin.amos.api.openapi.face.orm.entity;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
......@@ -15,7 +13,7 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("tm_cylinder_filling_record")
public class CylinderFillingRecord extends AbstractBaseEntity{/**
public class TmCylinderFillingRecord extends AbstractBaseEntity{/**
*
*/
private static final long serialVersionUID = 1L;
......
package com.yeejoin.amos.api.openapi.face.orm.entity;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
......@@ -16,7 +13,7 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("tm_cylinder_info")
public class CylinderInfo extends AbstractBaseEntity{
public class TmCylinderInfo extends AbstractBaseEntity{
/**
*
*/
......
package com.yeejoin.amos.api.openapi.face.orm.entity;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
......@@ -15,7 +13,7 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("tm_cylinder_inspection")
public class CylinderInspection extends AbstractBaseEntity{/**
public class TmCylinderInspection extends AbstractBaseEntity{/**
*
*/
private static final long serialVersionUID = 1L;
......
......@@ -13,7 +13,7 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("tm_cylinder_tags")
public class CylinderTags extends AbstractBaseEntity{/**
public class TmCylinderTags extends AbstractBaseEntity{/**
*
*/
private static final long serialVersionUID = 1L;
......
package com.yeejoin.amos.api.openapi.face.orm.entity;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
......@@ -15,7 +13,7 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("tm_cylinder_unit")
public class CylinderUnit extends AbstractBaseEntity{/**
public class TmCylinderUnit extends AbstractBaseEntity{/**
*
*/
private static final long serialVersionUID = 1L;
......
package com.yeejoin.amos.api.openapi.face.service;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.yeejoin.amos.boot.module.cylinder.api.dto.TzBaseEnterpriseInfoDto;
import com.yeejoin.amos.boot.module.cylinder.api.entity.TzBaseEnterpriseInfo;
import com.yeejoin.amos.boot.module.cylinder.api.mapper.TzBaseEnterpriseInfoMapper;
import org.springframework.stereotype.Component;
import org.typroject.tyboot.core.rdbms.annotation.Condition;
import org.typroject.tyboot.core.rdbms.annotation.Operator;
import java.util.List;
import java.util.Set;
@DS("tzs")
@Component
public class BaseEnterpriseInfoService extends AppBaseService<TzBaseEnterpriseInfoDto, TzBaseEnterpriseInfo, TzBaseEnterpriseInfoMapper> {
public List<TzBaseEnterpriseInfoDto> getEnterpriseInfoByCreditCode(@Condition(Operator.in) Set<String> useCode) {
return this.queryForList("", false, useCode);
}
}
package com.yeejoin.amos.api.openapi.face.service;
import com.yeejoin.amos.api.openapi.face.model.ConstructionInfoModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.ConstructionInfoMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.ConstructionInfo;
import com.yeejoin.amos.api.openapi.face.orm.dao.MidConstructionInfoMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidConstructionInfo;
import com.yeejoin.amos.api.openapi.feign.TzsServiceFeignClient;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
......@@ -22,7 +22,7 @@ import java.util.List;
* @date 2022-07-19
*/
@Component
public class ConstructionInfoService extends AppBaseService<ConstructionInfoModel, ConstructionInfo, ConstructionInfoMapper> {
public class ConstructionInfoService extends AppBaseService<ConstructionInfoModel, MidConstructionInfo, MidConstructionInfoMapper> {
private static final Logger logger = LogManager.getLogger(ConstructionInfoService.class);
@Autowired
......@@ -32,7 +32,7 @@ public class ConstructionInfoService extends AppBaseService<ConstructionInfoMode
* @param constructionInfo 施工信息
* @return "OK"
*/
public String saveConstructionInfo(ConstructionInfo constructionInfo) {
public String saveConstructionInfo(MidConstructionInfo constructionInfo) {
try {
tzsServiceFeignClient.saveConstructionInfo(constructionInfo);
} catch (Exception e) {
......@@ -51,12 +51,12 @@ public class ConstructionInfoService extends AppBaseService<ConstructionInfoMode
* @return 成功返回“OK”
*/
@Transactional(rollbackFor= {Exception.class})
public String saveConstructionInfo(List<ConstructionInfo> model) {
public String saveConstructionInfo(List<MidConstructionInfo> model) {
//TODO Auto-generated method stub
if (ValidationUtil.isEmpty(model)) {
throw new BadRequest("施工信息为空.");
}
for (ConstructionInfo models : model) {
for (MidConstructionInfo models : model) {
// checkModel(models);
models.setRecDate(new Date());
models.setAppId(getAppId());
......
......@@ -8,15 +8,16 @@ import com.yeejoin.amos.api.openapi.face.model.CylinderDateInfoModel;
import com.yeejoin.amos.api.openapi.face.model.CylinderTableModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.CylinderDateInfoMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderDateInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderFilling;
import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderFillingCheck;
import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderFillingExamine;
import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderFillingRecord;
import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderInspection;
import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderTags;
import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderUnit;
import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderFilling;
import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderFillingCheck;
import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderFillingExamine;
import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderFillingRecord;
import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderInspection;
import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderTags;
import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderUnit;
import com.yeejoin.amos.api.openapi.face.orm.entity.OpenapiBizToken;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
......@@ -48,21 +49,21 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
@Autowired
private RedisTemplate redisTemplate;
@Autowired
private CylinderUnitService cylinderUnitService;
private TmCylinderUnitService cylinderUnitService;
@Autowired
private CylinderFillingCheckService cylinderFillingCheckService;
private TmCylinderFillingCheckService cylinderFillingCheckService;
@Autowired
private CylinderFillingExamineService cylinderFillingExamineService;
private TmCylinderFillingExamineService cylinderFillingExamineService;
@Autowired
private CylinderFillingRecordService cylinderFillingRecordService;
private TmCylinderFillingRecordService cylinderFillingRecordService;
@Autowired
private CylinderFillingService cylinderFillingService;
private TmCylinderFillingService cylinderFillingService;
@Autowired
private CylinderInfoService cylinderInfoService;
private TmCylinderInfoService cylinderInfoService;
@Autowired
private CylinderInspectionService cylinderInspectionService;
private TmCylinderInspectionService cylinderInspectionService;
@Autowired
private CylinderTagsService cylinderTagsService;
private TmCylinderTagsService cylinderTagsService;
@Autowired
private OpenapiBizTokenService openapiBizTokenService;
......@@ -98,14 +99,22 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
temp.setAppId(appid);
temp.setDeveloperAgency(s);
// 获取气瓶基本信息
Integer cylinder = cylinderInfoService.count(new LambdaQueryWrapper<CylinderInfo>().eq(CylinderInfo::getAppId,appid).between(CylinderInfo::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer cylinderUnit = cylinderUnitService.count(new LambdaQueryWrapper<CylinderUnit>().eq(CylinderUnit::getAppId,appid).between(CylinderUnit::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer tags = cylinderTagsService.count(new LambdaQueryWrapper<CylinderTags>().eq(CylinderTags::getAppId,appid).between(CylinderTags::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer inspection = cylinderInspectionService.count(new LambdaQueryWrapper<CylinderInspection>().eq(CylinderInspection::getAppId,appid).between(CylinderInspection::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer filling = cylinderFillingService.count(new LambdaQueryWrapper<CylinderFilling>().eq(CylinderFilling::getAppId,appid).between(CylinderFilling::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer fillingRecord = cylinderFillingRecordService.count(new LambdaQueryWrapper<CylinderFillingRecord>().eq(CylinderFillingRecord::getAppId,appid).between(CylinderFillingRecord::getSyncDate,todayStr+ " 00:00:00",todayStr + " 23:59:59"));
Integer fillingCheck = cylinderFillingCheckService.count(new LambdaQueryWrapper<CylinderFillingCheck>().eq(CylinderFillingCheck::getAppId,appid).between(CylinderFillingCheck::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer examine = cylinderFillingExamineService.count(new LambdaQueryWrapper<CylinderFillingExamine>().eq(CylinderFillingExamine::getAppId,appid).between(CylinderFillingExamine::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer cylinder = cylinderInfoService.count(new LambdaQueryWrapper<TmCylinderInfo>().eq(TmCylinderInfo::getAppId,appid).between(
TmCylinderInfo::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer cylinderUnit = cylinderUnitService.count(new LambdaQueryWrapper<TmCylinderUnit>().eq(
TmCylinderUnit::getAppId,appid).between(TmCylinderUnit::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer tags = cylinderTagsService.count(new LambdaQueryWrapper<TmCylinderTags>().eq(TmCylinderTags::getAppId,appid).between(
TmCylinderTags::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer inspection = cylinderInspectionService.count(new LambdaQueryWrapper<TmCylinderInspection>().eq(
TmCylinderInspection::getAppId,appid).between(TmCylinderInspection::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer filling = cylinderFillingService.count(new LambdaQueryWrapper<TmCylinderFilling>().eq(
TmCylinderFilling::getAppId,appid).between(TmCylinderFilling::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer fillingRecord = cylinderFillingRecordService.count(new LambdaQueryWrapper<TmCylinderFillingRecord>().eq(
TmCylinderFillingRecord::getAppId,appid).between(TmCylinderFillingRecord::getSyncDate,todayStr+ " 00:00:00",todayStr + " 23:59:59"));
Integer fillingCheck = cylinderFillingCheckService.count(new LambdaQueryWrapper<TmCylinderFillingCheck>().eq(
TmCylinderFillingCheck::getAppId,appid).between(TmCylinderFillingCheck::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer examine = cylinderFillingExamineService.count(new LambdaQueryWrapper<TmCylinderFillingExamine>().eq(
TmCylinderFillingExamine::getAppId,appid).between(TmCylinderFillingExamine::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer total = cylinder + cylinderUnit + tags + inspection+filling+fillingRecord+fillingCheck+examine;
temp.setCylinderExamineInfo(examine);
temp.setCylinderUnit(cylinderUnit);
......@@ -121,14 +130,22 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
list.forEach( info -> {
String appid = token.getAppId();
// 获取气瓶基本信息
Integer cylinder = cylinderInfoService.count(new LambdaQueryWrapper<CylinderInfo>().eq(CylinderInfo::getAppId,appid).between(CylinderInfo::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer cylinderUnit = cylinderUnitService.count(new LambdaQueryWrapper<CylinderUnit>().eq(CylinderUnit::getAppId,appid).between(CylinderUnit::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer tags = cylinderTagsService.count(new LambdaQueryWrapper<CylinderTags>().eq(CylinderTags::getAppId,appid).between(CylinderTags::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer inspection = cylinderInspectionService.count(new LambdaQueryWrapper<CylinderInspection>().eq(CylinderInspection::getAppId,appid).between(CylinderInspection::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer filling = cylinderFillingService.count(new LambdaQueryWrapper<CylinderFilling>().eq(CylinderFilling::getAppId,appid).between(CylinderFilling::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer fillingRecord = cylinderFillingRecordService.count(new LambdaQueryWrapper<CylinderFillingRecord>().eq(CylinderFillingRecord::getAppId,appid).between(CylinderFillingRecord::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer fillingCheck = cylinderFillingCheckService.count(new LambdaQueryWrapper<CylinderFillingCheck>().eq(CylinderFillingCheck::getAppId,appid).between(CylinderFillingCheck::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer examine = cylinderFillingExamineService.count(new LambdaQueryWrapper<CylinderFillingExamine>().eq(CylinderFillingExamine::getAppId,appid).between(CylinderFillingExamine::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer cylinder = cylinderInfoService.count(new LambdaQueryWrapper<TmCylinderInfo>().eq(TmCylinderInfo::getAppId,appid).between(
TmCylinderInfo::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer cylinderUnit = cylinderUnitService.count(new LambdaQueryWrapper<TmCylinderUnit>().eq(
TmCylinderUnit::getAppId,appid).between(TmCylinderUnit::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer tags = cylinderTagsService.count(new LambdaQueryWrapper<TmCylinderTags>().eq(TmCylinderTags::getAppId,appid).between(
TmCylinderTags::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer inspection = cylinderInspectionService.count(new LambdaQueryWrapper<TmCylinderInspection>().eq(
TmCylinderInspection::getAppId,appid).between(TmCylinderInspection::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer filling = cylinderFillingService.count(new LambdaQueryWrapper<TmCylinderFilling>().eq(
TmCylinderFilling::getAppId,appid).between(TmCylinderFilling::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer fillingRecord = cylinderFillingRecordService.count(new LambdaQueryWrapper<TmCylinderFillingRecord>().eq(
TmCylinderFillingRecord::getAppId,appid).between(TmCylinderFillingRecord::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer fillingCheck = cylinderFillingCheckService.count(new LambdaQueryWrapper<TmCylinderFillingCheck>().eq(
TmCylinderFillingCheck::getAppId,appid).between(TmCylinderFillingCheck::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer examine = cylinderFillingExamineService.count(new LambdaQueryWrapper<TmCylinderFillingExamine>().eq(
TmCylinderFillingExamine::getAppId,appid).between(TmCylinderFillingExamine::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer total = cylinder + cylinderUnit + tags + inspection+filling+fillingRecord+fillingCheck+examine;
info.setCylinderExamineInfo(examine);
info.setCylinderUnit(cylinderUnit);
......@@ -362,14 +379,23 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
temp.setAppId(appid);
temp.setDeveloperAgency(s);
// 获取气瓶基本信息
Integer cylinder = cylinderInfoService.count(new LambdaQueryWrapper<CylinderInfo>().eq(CylinderInfo::getAppId,appid).between(CylinderInfo::getSyncDate,d + " 00:00:00",d + " 23:59:59"));
Integer cylinderUnit = cylinderUnitService.count(new LambdaQueryWrapper<CylinderUnit>().eq(CylinderUnit::getAppId,appid).between(CylinderUnit::getSyncDate,d + " 00:00:00",d + " 23:59:59"));
Integer tags = cylinderTagsService.count(new LambdaQueryWrapper<CylinderTags>().eq(CylinderTags::getAppId,appid).between(CylinderTags::getSyncDate,d + " 00:00:00",d + " 23:59:59"));
Integer inspection = cylinderInspectionService.count(new LambdaQueryWrapper<CylinderInspection>().eq(CylinderInspection::getAppId,appid).between(CylinderInspection::getSyncDate,d + " 00:00:00",d + " 23:59:59"));
Integer filling = cylinderFillingService.count(new LambdaQueryWrapper<CylinderFilling>().eq(CylinderFilling::getAppId,appid).between(CylinderFilling::getSyncDate,d + " 00:00:00",d + " 23:59:59"));
Integer fillingRecord = cylinderFillingRecordService.count(new LambdaQueryWrapper<CylinderFillingRecord>().eq(CylinderFillingRecord::getAppId,appid).between(CylinderFillingRecord::getSyncDate,d + " 00:00:00",d + " 23:59:59"));
Integer fillingCheck = cylinderFillingCheckService.count(new LambdaQueryWrapper<CylinderFillingCheck>().eq(CylinderFillingCheck::getAppId,appid).between(CylinderFillingCheck::getSyncDate,d + " 00:00:00",d + " 23:59:59"));
Integer examine = cylinderFillingExamineService.count(new LambdaQueryWrapper<CylinderFillingExamine>().eq(CylinderFillingExamine::getAppId,appid).between(CylinderFillingExamine::getSyncDate,d + " 00:00:00",d + " 23:59:59"));
Integer cylinder = cylinderInfoService.count(new LambdaQueryWrapper<TmCylinderInfo>().eq(TmCylinderInfo::getAppId,appid).between(
TmCylinderInfo::getSyncDate,d + " 00:00:00",d + " 23:59:59"));
Integer cylinderUnit = cylinderUnitService.count(new LambdaQueryWrapper<TmCylinderUnit>().eq(TmCylinderUnit::getAppId,appid).between(
TmCylinderUnit::getSyncDate,d + " 00:00:00",d + " 23:59:59"));
Integer tags = cylinderTagsService.count(new LambdaQueryWrapper<TmCylinderTags>().eq(TmCylinderTags::getAppId,appid).between(
TmCylinderTags::getSyncDate,d + " 00:00:00",d + " 23:59:59"));
Integer inspection = cylinderInspectionService.count(new LambdaQueryWrapper<TmCylinderInspection>().eq(
TmCylinderInspection::getAppId,appid).between(TmCylinderInspection::getSyncDate,d + " 00:00:00",d + " 23:59:59"));
Integer filling = cylinderFillingService.count(new LambdaQueryWrapper<TmCylinderFilling>().eq(
TmCylinderFilling::getAppId,appid).between(TmCylinderFilling::getSyncDate,d + " 00:00:00",d + " 23:59:59"));
Integer fillingRecord = cylinderFillingRecordService.count(new LambdaQueryWrapper<TmCylinderFillingRecord>().eq(
TmCylinderFillingRecord::getAppId,appid).between(TmCylinderFillingRecord::getSyncDate,d + " 00:00:00",d + " 23:59:59"));
Integer fillingCheck = cylinderFillingCheckService.count(new LambdaQueryWrapper<TmCylinderFillingCheck>().eq(
TmCylinderFillingCheck::getAppId,appid).between(TmCylinderFillingCheck::getSyncDate,d + " 00:00:00",d + " 23:59:59"));
Integer examine = cylinderFillingExamineService.count(new LambdaQueryWrapper<TmCylinderFillingExamine>().eq(
TmCylinderFillingExamine::getAppId,appid).between(
TmCylinderFillingExamine::getSyncDate,d + " 00:00:00",d + " 23:59:59"));
Integer total = cylinder + cylinderUnit + tags + inspection+filling+fillingRecord+fillingCheck+examine;
temp.setCylinderExamineInfo(examine);
temp.setCylinderUnit(cylinderUnit);
......@@ -417,14 +443,22 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
temp.setAppId(appid);
temp.setDeveloperAgency(s);
// 获取气瓶基本信息
Integer cylinder = cylinderInfoService.count(new LambdaQueryWrapper<CylinderInfo>().eq(CylinderInfo::getAppId,appid).between(CylinderInfo::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer cylinderUnit = cylinderUnitService.count(new LambdaQueryWrapper<CylinderUnit>().eq(CylinderUnit::getAppId,appid).between(CylinderUnit::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer tags = cylinderTagsService.count(new LambdaQueryWrapper<CylinderTags>().eq(CylinderTags::getAppId,appid).between(CylinderTags::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer inspection = cylinderInspectionService.count(new LambdaQueryWrapper<CylinderInspection>().eq(CylinderInspection::getAppId,appid).between(CylinderInspection::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer filling = cylinderFillingService.count(new LambdaQueryWrapper<CylinderFilling>().eq(CylinderFilling::getAppId,appid).between(CylinderFilling::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer fillingRecord = cylinderFillingRecordService.count(new LambdaQueryWrapper<CylinderFillingRecord>().eq(CylinderFillingRecord::getAppId,appid).between(CylinderFillingRecord::getSyncDate,todayStr+ " 00:00:00",todayStr + " 23:59:59"));
Integer fillingCheck = cylinderFillingCheckService.count(new LambdaQueryWrapper<CylinderFillingCheck>().eq(CylinderFillingCheck::getAppId,appid).between(CylinderFillingCheck::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer examine = cylinderFillingExamineService.count(new LambdaQueryWrapper<CylinderFillingExamine>().eq(CylinderFillingExamine::getAppId,appid).between(CylinderFillingExamine::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer cylinder = cylinderInfoService.count(new LambdaQueryWrapper<TmCylinderInfo>().eq(TmCylinderInfo::getAppId,appid).between(
TmCylinderInfo::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer cylinderUnit = cylinderUnitService.count(new LambdaQueryWrapper<TmCylinderUnit>().eq(
TmCylinderUnit::getAppId,appid).between(TmCylinderUnit::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer tags = cylinderTagsService.count(new LambdaQueryWrapper<TmCylinderTags>().eq(TmCylinderTags::getAppId,appid).between(
TmCylinderTags::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer inspection = cylinderInspectionService.count(new LambdaQueryWrapper<TmCylinderInspection>().eq(
TmCylinderInspection::getAppId,appid).between(TmCylinderInspection::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer filling = cylinderFillingService.count(new LambdaQueryWrapper<TmCylinderFilling>().eq(
TmCylinderFilling::getAppId,appid).between(TmCylinderFilling::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer fillingRecord = cylinderFillingRecordService.count(new LambdaQueryWrapper<TmCylinderFillingRecord>().eq(
TmCylinderFillingRecord::getAppId,appid).between(TmCylinderFillingRecord::getSyncDate,todayStr+ " 00:00:00",todayStr + " 23:59:59"));
Integer fillingCheck = cylinderFillingCheckService.count(new LambdaQueryWrapper<TmCylinderFillingCheck>().eq(
TmCylinderFillingCheck::getAppId,appid).between(TmCylinderFillingCheck::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer examine = cylinderFillingExamineService.count(new LambdaQueryWrapper<TmCylinderFillingExamine>().eq(
TmCylinderFillingExamine::getAppId,appid).between(TmCylinderFillingExamine::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer total = cylinder + cylinderUnit + tags + inspection+filling+fillingRecord+fillingCheck+examine;
temp.setCylinderExamineInfo(examine);
temp.setCylinderUnit(cylinderUnit);
......@@ -440,14 +474,22 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
list.forEach( info -> {
String appid = token.getAppId();
// 获取气瓶基本信息
Integer cylinder = cylinderInfoService.count(new LambdaQueryWrapper<CylinderInfo>().eq(CylinderInfo::getAppId,appid).between(CylinderInfo::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer cylinderUnit = cylinderUnitService.count(new LambdaQueryWrapper<CylinderUnit>().eq(CylinderUnit::getAppId,appid).between(CylinderUnit::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer tags = cylinderTagsService.count(new LambdaQueryWrapper<CylinderTags>().eq(CylinderTags::getAppId,appid).between(CylinderTags::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer inspection = cylinderInspectionService.count(new LambdaQueryWrapper<CylinderInspection>().eq(CylinderInspection::getAppId,appid).between(CylinderInspection::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer filling = cylinderFillingService.count(new LambdaQueryWrapper<CylinderFilling>().eq(CylinderFilling::getAppId,appid).between(CylinderFilling::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer fillingRecord = cylinderFillingRecordService.count(new LambdaQueryWrapper<CylinderFillingRecord>().eq(CylinderFillingRecord::getAppId,appid).between(CylinderFillingRecord::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer fillingCheck = cylinderFillingCheckService.count(new LambdaQueryWrapper<CylinderFillingCheck>().eq(CylinderFillingCheck::getAppId,appid).between(CylinderFillingCheck::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer examine = cylinderFillingExamineService.count(new LambdaQueryWrapper<CylinderFillingExamine>().eq(CylinderFillingExamine::getAppId,appid).between(CylinderFillingExamine::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer cylinder = cylinderInfoService.count(new LambdaQueryWrapper<TmCylinderInfo>().eq(TmCylinderInfo::getAppId,appid).between(
TmCylinderInfo::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer cylinderUnit = cylinderUnitService.count(new LambdaQueryWrapper<TmCylinderUnit>().eq(
TmCylinderUnit::getAppId,appid).between(TmCylinderUnit::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer tags = cylinderTagsService.count(new LambdaQueryWrapper<TmCylinderTags>().eq(TmCylinderTags::getAppId,appid).between(
TmCylinderTags::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer inspection = cylinderInspectionService.count(new LambdaQueryWrapper<TmCylinderInspection>().eq(
TmCylinderInspection::getAppId,appid).between(TmCylinderInspection::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer filling = cylinderFillingService.count(new LambdaQueryWrapper<TmCylinderFilling>().eq(
TmCylinderFilling::getAppId,appid).between(TmCylinderFilling::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer fillingRecord = cylinderFillingRecordService.count(new LambdaQueryWrapper<TmCylinderFillingRecord>().eq(
TmCylinderFillingRecord::getAppId,appid).between(TmCylinderFillingRecord::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer fillingCheck = cylinderFillingCheckService.count(new LambdaQueryWrapper<TmCylinderFillingCheck>().eq(
TmCylinderFillingCheck::getAppId,appid).between(TmCylinderFillingCheck::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer examine = cylinderFillingExamineService.count(new LambdaQueryWrapper<TmCylinderFillingExamine>().eq(
TmCylinderFillingExamine::getAppId,appid).between(TmCylinderFillingExamine::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer total = cylinder + cylinderUnit + tags + inspection+filling+fillingRecord+fillingCheck+examine;
info.setCylinderExamineInfo(examine);
info.setCylinderUnit(cylinderUnit);
......
......@@ -3,8 +3,9 @@ package com.yeejoin.amos.api.openapi.face.service;
import com.yeejoin.amos.api.openapi.enums.*;
import com.yeejoin.amos.api.openapi.face.model.*;
import com.yeejoin.amos.api.openapi.face.orm.dao.RegistrationInfoMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.RegistrationInfo;
import com.yeejoin.amos.api.openapi.face.orm.dao.MidEquipRegistrationInfoMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidEquipRegistrationInfo;
import com.yeejoin.amos.boot.module.cylinder.api.dto.TzBaseEnterpriseInfoDto;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -24,16 +25,16 @@ import java.util.stream.Collectors;
public class CylinderFillingDataValidationService {
@Autowired
EnterpriseInfoService enterpriseInfoService;
BaseEnterpriseInfoService enterpriseInfoService;
@Autowired
RegistrationInfoMapper registrationInfoMapper;
MidEquipRegistrationInfoMapper registrationInfoMapper;
/**
* 企业信息校验
* @param unitData
* @return
*/
public boolean validatEcylinderUnit(List<CylinderUnitModel> unitData) {
public boolean validatEcylinderUnit(List<TmCylinderUnitModel> unitData) {
JSONArray jsonArray = JSONArray.fromObject(unitData);
// 1.必填校验
List<String> errorRows = validateRequired(CylinderUnitFieldEnum.getAllRequireKeys(), jsonArray);
......@@ -60,7 +61,7 @@ public class CylinderFillingDataValidationService {
* @param infoData
* @return
*/
public boolean validateCylinderInfo(List<CylinderInfoModel> infoData) {
public boolean validateCylinderInfo(List<TmCylinderInfoModel> infoData) {
JSONArray jsonArray = JSONArray.fromObject(infoData);
// 1.必填校验
List<String> errorRows = validateRequired(CylinderInfoFieldEnum.getAllRequireKeys(), jsonArray);
......@@ -92,7 +93,7 @@ public class CylinderFillingDataValidationService {
* @param tagData
* @return
*/
public boolean validateCylinderTag(List<CylinderTagsModel> tagData) {
public boolean validateCylinderTag(List<TmCylinderTagsModel> tagData) {
JSONArray jsonArray = JSONArray.fromObject(tagData);
// 1.必填校验
List<String> errorRows = validateRequired(CylinderTagFieldEnum.getAllRequireKeys(), jsonArray);
......@@ -119,7 +120,7 @@ public class CylinderFillingDataValidationService {
* @param inspectionData
* @return
*/
boolean validateCylinderInspection(List<CylinderInspectionModel> inspectionData) {
boolean validateCylinderInspection(List<TmCylinderInspectionModel> inspectionData) {
JSONArray jsonArray = JSONArray.fromObject(inspectionData);
// 1.必填校验
List<String> errorRows = validateRequired(CylinderInspectionFieldEnum.getAllRequireKeys(), jsonArray);
......@@ -147,7 +148,7 @@ public class CylinderFillingDataValidationService {
* @param inspectionData
* @return
*/
boolean validateCylinderFillingExamineModel(List<CylinderFillingExamineModel> inspectionData) {
boolean validateCylinderFillingExamineModel(List<TmCylinderFillingExamineModel> inspectionData) {
JSONArray jsonArray = JSONArray.fromObject(inspectionData);
// 1.必填校验
List<String> errorRows = validateRequired(CylinderFillingAuditFieldEnum.getAllRequireKeys(), jsonArray);
......@@ -360,7 +361,7 @@ public class CylinderFillingDataValidationService {
* @return
*/
public List<String> getNotExistEnterpriseInfoByCreditCode(Set<String> creditCodes) {
List<EnterpriseInfoModel> enterpriseInfos = enterpriseInfoService.getEnterpriseInfoByCreditCode(creditCodes);
List<TzBaseEnterpriseInfoDto> enterpriseInfos = enterpriseInfoService.getEnterpriseInfoByCreditCode(creditCodes);
if (enterpriseInfos.size() < creditCodes.size()) {
List<String> userCodes = enterpriseInfos.stream().map(e -> e.getUseCode()).collect(Collectors.toList());
return creditCodes.stream().filter(c -> !userCodes.contains(c)).collect(Collectors.toList());
......@@ -374,7 +375,7 @@ public class CylinderFillingDataValidationService {
* @return
*/
public List<String> getNotExistSequenceCodes(Set<String> sequenceCodes) {
List<RegistrationInfo> useInfos = registrationInfoMapper.getUseInfoByEquipCode(sequenceCodes);
List<MidEquipRegistrationInfo> useInfos = registrationInfoMapper.getUseInfoByEquipCode(sequenceCodes);
if (useInfos.size() < sequenceCodes.size()) {
List<String> equipCodes = useInfos.stream().map(e -> e.getEquCode()).collect(Collectors.toList());
return sequenceCodes.stream().filter(c -> !equipCodes.contains(c)).collect(Collectors.toList());
......
package com.yeejoin.amos.api.openapi.face.service;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.api.openapi.enums.JgFileAttributeEnum;
import com.yeejoin.amos.api.openapi.enums.JgFileObjectEnum;
import com.yeejoin.amos.api.openapi.face.model.DesignInfoModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.DesignInfoMapper;
import com.yeejoin.amos.api.openapi.face.orm.dao.MidDesignInfoMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.DesignInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.JgFile;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
......@@ -24,7 +19,7 @@ import java.util.List;
* @date 2022-07-19
*/
@Component
public class DesignInfoService extends AppBaseService<DesignInfoModel, DesignInfo, DesignInfoMapper>{
public class DesignInfoService extends AppBaseService<DesignInfoModel, DesignInfo, MidDesignInfoMapper>{
@Autowired
private JgFileService fileService;
......
package com.yeejoin.amos.api.openapi.face.service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.yeejoin.amos.api.openapi.face.model.ElevatorAlarmModel;
import com.yeejoin.amos.api.openapi.face.model.ElevatorAlarmTypeModel;
import com.yeejoin.amos.api.openapi.face.model.ElevatorModel;
import com.yeejoin.amos.api.openapi.face.model.EquipmentCategoryModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.ElevatorAlarmMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.ElevatorAlarm;
import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* <p>
* 电梯故障表 服务类
* </p>
*
* @author 子杨
* @since 2021-09-27
*/
@Component
public class ElevatorAlarmService extends
BaseService<ElevatorAlarmModel, ElevatorAlarm, ElevatorAlarmMapper>
{
@Autowired
private ElevatorService elevatorService;
@Autowired
private ElevatorAlarmTypeService elevatorAlarmTypeService;
@Autowired
private EquipmentCategoryService equipmentCategoryService;
public Map<String, String> equipmentCategoryMap = null;
public Map<String, String> alarmTypeMap = null;
/**
*
* <pre>
* 批量保存电梯故障信息
* </pre>
*
* @param models
* @return
* @throws Exception
*/
public String multCreateElevatorAlarm(List<ElevatorAlarmModel> models) throws Exception
{
if (ValidationUtil.isEmpty(models))
throw new BadRequest("参数校验失败.");
for (ElevatorAlarmModel elevatorAlarmModel : models)
{
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
elevatorAlarmModel.setStartDate(
elevatorAlarmModel.getStartTime()!=null? sdf.parse(elevatorAlarmModel.getStartTime()): null);
elevatorAlarmModel.setDealDate(
elevatorAlarmModel.getDealTime()!=null? sdf.parse(elevatorAlarmModel.getDealTime()): null);
ElevatorAlarmModel oldModel = queryModelByCodeAndFaultId(elevatorAlarmModel.getRegisterCode(), elevatorAlarmModel.getFaultId());
//如果存在该故障编码则进行更新
if (ValidationUtil.isEmpty(oldModel))
{
ElevatorModel elevatorModel = elevatorService.queryByRegisterCode(elevatorAlarmModel.getRegisterCode());
//只保存现有维护电梯的告警信息
if (!ValidationUtil.isEmpty(elevatorModel))
{
elevatorAlarmModel.setRescueCode(elevatorModel.getRescueCode());
elevatorAlarmModel.setProvince(elevatorModel.getProvince());
elevatorAlarmModel.setCity(elevatorModel.getCity());
elevatorAlarmModel.setDistrict(elevatorModel.getDistrict());
elevatorAlarmModel.setAddress(elevatorModel.getAddress());
//填充电梯分类
if (ValidationUtil.isEmpty(equipmentCategoryMap))
{
equipmentCategoryMap = new HashMap<String, String>();
List<EquipmentCategoryModel> allEquipmentCategory = equipmentCategoryService.queryAllForlist();
for (EquipmentCategoryModel equipmentCategoryModel : allEquipmentCategory)
{
equipmentCategoryMap.put(equipmentCategoryModel.getCode(), equipmentCategoryModel.getName());
}
}
String category = equipmentCategoryMap.get(elevatorModel.getCategory());
elevatorAlarmModel.setDeviceCategory(category!=null? category:elevatorModel.getCategory());
//填充告警类型
if (ValidationUtil.isEmpty(alarmTypeMap))
{
alarmTypeMap = new HashMap<String, String>();
List<ElevatorAlarmTypeModel> allAlarmType = elevatorAlarmTypeService.queryAllForlist();
for (ElevatorAlarmTypeModel elevatorAlarmTypeModel : allAlarmType)
{
alarmTypeMap.put(String.valueOf(elevatorAlarmTypeModel.getAlarmCode()), elevatorAlarmTypeModel.getAlarmName());
}
}
String alarmType = alarmTypeMap.get(elevatorAlarmModel.getType());
elevatorAlarmModel.setTypeName(alarmType!= null? alarmType: elevatorAlarmModel.getType());
this.createWithModel(elevatorAlarmModel);
}
}else
{
Bean.copyExistPropertis(elevatorAlarmModel, oldModel);
this.updateWithModel(oldModel);
}
}
return "OK";
}
/**
*
* <pre>
* 根据电梯注册编码和故障编码查询电梯故障信息
* </pre>
*
* @param registerCode
* @param faultId
*/
private ElevatorAlarmModel queryModelByCodeAndFaultId(String registerCode, String faultId)
{
return this.queryModelByParams(registerCode, faultId);
}
}
//package com.yeejoin.amos.api.openapi.face.service;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//import com.yeejoin.amos.api.openapi.face.model.ElevatorAlarmModel;
//import com.yeejoin.amos.api.openapi.face.model.ElevatorAlarmTypeModel;
//import com.yeejoin.amos.api.openapi.face.model.ElevatorModel;
//import com.yeejoin.amos.api.openapi.face.model.EquipmentCategoryModel;
//import com.yeejoin.amos.api.openapi.face.orm.dao.ElevatorAlarmMapper;
//import com.yeejoin.amos.api.openapi.face.orm.entity.ElevatorAlarm;
//
//import org.typroject.tyboot.core.foundation.utils.Bean;
//import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
//import org.typroject.tyboot.core.rdbms.service.BaseService;
//import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
//
//import java.text.SimpleDateFormat;
//import java.util.HashMap;
//import java.util.List;
//import java.util.Map;
//
///**
// * <p>
// * 电梯故障表 服务类
// * </p>
// *
// * @author 子杨
// * @since 2021-09-27
// */
//@Component
//public class ElevatorAlarmService extends
// BaseService<ElevatorAlarmModel, ElevatorAlarm, ElevatorAlarmMapper>
//{
//
// @Autowired
// private ElevatorService elevatorService;
//
// @Autowired
// private ElevatorAlarmTypeService elevatorAlarmTypeService;
//
// @Autowired
// private EquipmentCategoryService equipmentCategoryService;
//
// public Map<String, String> equipmentCategoryMap = null;
//
// public Map<String, String> alarmTypeMap = null;
//
// /**
// *
// * <pre>
// * 批量保存电梯故障信息
// * </pre>
// *
// * @param models
// * @return
// * @throws Exception
// */
// public String multCreateElevatorAlarm(List<ElevatorAlarmModel> models) throws Exception
// {
//
// if (ValidationUtil.isEmpty(models))
// throw new BadRequest("参数校验失败.");
//
// for (ElevatorAlarmModel elevatorAlarmModel : models)
// {
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// elevatorAlarmModel.setStartDate(
// elevatorAlarmModel.getStartTime()!=null? sdf.parse(elevatorAlarmModel.getStartTime()): null);
// elevatorAlarmModel.setDealDate(
// elevatorAlarmModel.getDealTime()!=null? sdf.parse(elevatorAlarmModel.getDealTime()): null);
//
// ElevatorAlarmModel oldModel = queryModelByCodeAndFaultId(elevatorAlarmModel.getRegisterCode(), elevatorAlarmModel.getFaultId());
// //如果存在该故障编码则进行更新
// if (ValidationUtil.isEmpty(oldModel))
// {
// ElevatorModel elevatorModel = elevatorService.queryByRegisterCode(elevatorAlarmModel.getRegisterCode());
// //只保存现有维护电梯的告警信息
// if (!ValidationUtil.isEmpty(elevatorModel))
// {
// elevatorAlarmModel.setRescueCode(elevatorModel.getRescueCode());
// elevatorAlarmModel.setProvince(elevatorModel.getProvince());
// elevatorAlarmModel.setCity(elevatorModel.getCity());
// elevatorAlarmModel.setDistrict(elevatorModel.getDistrict());
// elevatorAlarmModel.setAddress(elevatorModel.getAddress());
// //填充电梯分类
// if (ValidationUtil.isEmpty(equipmentCategoryMap))
// {
// equipmentCategoryMap = new HashMap<String, String>();
// List<EquipmentCategoryModel> allEquipmentCategory = equipmentCategoryService.queryAllForlist();
// for (EquipmentCategoryModel equipmentCategoryModel : allEquipmentCategory)
// {
// equipmentCategoryMap.put(equipmentCategoryModel.getCode(), equipmentCategoryModel.getName());
// }
// }
// String category = equipmentCategoryMap.get(elevatorModel.getCategory());
// elevatorAlarmModel.setDeviceCategory(category!=null? category:elevatorModel.getCategory());
// //填充告警类型
// if (ValidationUtil.isEmpty(alarmTypeMap))
// {
// alarmTypeMap = new HashMap<String, String>();
// List<ElevatorAlarmTypeModel> allAlarmType = elevatorAlarmTypeService.queryAllForlist();
// for (ElevatorAlarmTypeModel elevatorAlarmTypeModel : allAlarmType)
// {
// alarmTypeMap.put(String.valueOf(elevatorAlarmTypeModel.getAlarmCode()), elevatorAlarmTypeModel.getAlarmName());
// }
// }
// String alarmType = alarmTypeMap.get(elevatorAlarmModel.getType());
// elevatorAlarmModel.setTypeName(alarmType!= null? alarmType: elevatorAlarmModel.getType());
//
// this.createWithModel(elevatorAlarmModel);
// }
// }else
// {
// Bean.copyExistPropertis(elevatorAlarmModel, oldModel);
// this.updateWithModel(oldModel);
// }
// }
//
// return "OK";
// }
//
// /**
// *
// * <pre>
// * 根据电梯注册编码和故障编码查询电梯故障信息
// * </pre>
// *
// * @param registerCode
// * @param faultId
// */
// private ElevatorAlarmModel queryModelByCodeAndFaultId(String registerCode, String faultId)
// {
// return this.queryModelByParams(registerCode, faultId);
// }
//
//}
package com.yeejoin.amos.api.openapi.face.service;
import java.util.List;
import org.springframework.stereotype.Component;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import com.yeejoin.amos.api.openapi.face.model.ElevatorAlarmTypeModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.ElevatorAlarmTypeMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.ElevatorAlarmType;
/**
*
* <pre>
* 电梯故障类型表 服务类
* </pre>
*
* @author gwb
* @version $Id: ElevatorAlarmTypeService.java, v 0.1 2021年10月15日 下午2:27:54 gwb Exp $
*/
@Component
public class ElevatorAlarmTypeService extends
BaseService<ElevatorAlarmTypeModel, ElevatorAlarmType, ElevatorAlarmTypeMapper>
{
/**
*
* <pre>
* 查询所有告警类型
* </pre>
*
* @return
*/
public List<ElevatorAlarmTypeModel> queryAllForlist()
{
return this.queryForList("sequence_nbr", true);
}
}
//package com.yeejoin.amos.api.openapi.face.service;
//
//import java.util.List;
//
//import org.springframework.stereotype.Component;
//import org.typroject.tyboot.core.rdbms.service.BaseService;
//
//import com.yeejoin.amos.api.openapi.face.model.ElevatorAlarmTypeModel;
//import com.yeejoin.amos.api.openapi.face.orm.dao.ElevatorAlarmTypeMapper;
//import com.yeejoin.amos.api.openapi.face.orm.entity.ElevatorAlarmType;
//
///**
// *
// * <pre>
// * 电梯故障类型表 服务类
// * </pre>
// *
// * @author gwb
// * @version $Id: ElevatorAlarmTypeService.java, v 0.1 2021年10月15日 下午2:27:54 gwb Exp $
// */
//@Component
//public class ElevatorAlarmTypeService extends
// BaseService<ElevatorAlarmTypeModel, ElevatorAlarmType, ElevatorAlarmTypeMapper>
//{
//
// /**
// *
// * <pre>
// * 查询所有告警类型
// * </pre>
// *
// * @return
// */
// public List<ElevatorAlarmTypeModel> queryAllForlist()
// {
// return this.queryForList("sequence_nbr", true);
// }
//}
package com.yeejoin.amos.api.openapi.face.service;
import org.springframework.stereotype.Component;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import com.yeejoin.amos.api.openapi.face.model.ElevatorModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.ElevatorMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.Elevator;
/**
*
* <pre>
* 电梯 服务类
* </pre>
*
* @author gwb
* @version $Id: ElevatorService.java, v 0.1 2021年9月30日 下午3:28:55 gwb Exp $
*/
@Component
public class ElevatorService extends BaseService<ElevatorModel,Elevator,ElevatorMapper> {
public ElevatorModel queryByRegisterCode(String registerCode)
{
return this.queryModelByParams(registerCode);
}
}
//package com.yeejoin.amos.api.openapi.face.service;
//
//
//import org.springframework.stereotype.Component;
//import org.typroject.tyboot.core.rdbms.service.BaseService;
//
//import com.yeejoin.amos.api.openapi.face.model.ElevatorModel;
//import com.yeejoin.amos.api.openapi.face.orm.dao.ElevatorMapper;
//import com.yeejoin.amos.api.openapi.face.orm.entity.Elevator;
//
//
///**
// *
// * <pre>
// * 电梯 服务类
// * </pre>
// *
// * @author gwb
// * @version $Id: ElevatorService.java, v 0.1 2021年9月30日 下午3:28:55 gwb Exp $
// */
//@Component
//public class ElevatorService extends BaseService<ElevatorModel,Elevator,ElevatorMapper> {
//
//
// public ElevatorModel queryByRegisterCode(String registerCode)
// {
// return this.queryModelByParams(registerCode);
// }
//
//
//}
package com.yeejoin.amos.api.openapi.face.service;
import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Lazy;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.client.SimpleClientHttpRequestFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;
import org.typroject.tyboot.component.emq.EmqKeeper;
import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yeejoin.amos.api.common.restful.utils.ResponseModel;
import com.yeejoin.amos.api.openapi.enums.LiftCircuitStatusEnum;
import com.yeejoin.amos.api.openapi.enums.LiftContactorStatusEnum;
import com.yeejoin.amos.api.openapi.enums.LiftDirectionEnum;
import com.yeejoin.amos.api.openapi.enums.LiftDoorStatusEnum;
import com.yeejoin.amos.api.openapi.enums.LiftPersonFlagEnum;
import com.yeejoin.amos.api.openapi.enums.LiftServiceModelEnum;
import com.yeejoin.amos.api.openapi.enums.LiftStatusEnum;
import com.yeejoin.amos.api.openapi.face.model.ElevatorStatusModel;
import com.yeejoin.amos.api.openapi.face.model.ElevatorVideoModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.ElevatorStatusMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.ElevatorStatus;
import net.sf.json.JSONObject;
/**
*
* <pre>
* 电梯运行状态表 服务类
* </pre>
*
* @author gwb
* @version $Id: ElevatorStatusService.java, v 0.1 2021年9月28日 下午7:55:18 gwb Exp $
*/
@Component
public class ElevatorStatusService extends
BaseService<ElevatorStatusModel, ElevatorStatus, ElevatorStatusMapper>
{
private static final Logger logger = LoggerFactory.getLogger(ElevatorStatusService.class);
@Autowired
private RestTemplate restTemplate;
@Lazy
@Autowired
private EmqKeeper emqKeeper;
@Value("${biz.lxyd.lift.url}")
private String lxydLiftUrl;
/**
*
* <pre>
* 批量保存电梯运行状态信息
* </pre>
*
* @param models
* @return
* @throws Exception
*/
public String multCreateElevatorStatus(List<ElevatorStatusModel> models) throws Exception
{
if (ValidationUtil.isEmpty(models))
throw new BadRequest("上报电梯状态数据为空.");
for (ElevatorStatusModel elevatorStatusModel : models)
{
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
elevatorStatusModel.setUploadDate(
elevatorStatusModel.getUploadTime()!= null? sdf.parse(elevatorStatusModel.getUploadTime()): null);
List<ElevatorStatusModel> oldModel = queryModelByCodeAndStatusId(elevatorStatusModel.getRegisterCode(), elevatorStatusModel.getStatusId());
//如果存在该状态编码则不进行发送
if (ValidationUtil.isEmpty(oldModel))
{
//实时消息发送
ObjectMapper mapper = new ObjectMapper();
String resultJson = mapper.writeValueAsString(builEnumName(elevatorStatusModel));
emqKeeper.getMqttClient().publish("openapi/lift/runStatusData" ,resultJson.getBytes(), 2 ,false);
}
elevatorStatusModel = this.createWithModel(elevatorStatusModel);
}
return "OK";
}
/**
*
* <pre>
* 查询电梯最新一条状态数据
* </pre>
*
* @param registerCode 电梯注册码
* @param highUpload 是否开启高频上传
* @return
* @throws Exception
*/
public ElevatorStatusModel getLatelyStatus(String registerCode, Boolean highUpload) throws Exception
{
ElevatorStatusModel elevatorStatusModel = null;
ElevatorStatus elevatorStatus = baseMapper.getLatelyStatus(registerCode);
if (!ValidationUtil.isEmpty(elevatorStatus))
{
elevatorStatusModel = Bean.toModel(elevatorStatus, new ElevatorStatusModel());
elevatorStatusModel = builEnumName(elevatorStatusModel);
//开启高频上传
if (highUpload)
{
this.highUpload(registerCode);
}
}else
{
elevatorStatusModel = new ElevatorStatusModel();
}
return elevatorStatusModel;
}
/**
*
* <pre>
* 高频上传状态数据请求
* </pre>
*
* @throws Exception
*/
public void highUpload(String registerCode) throws Exception
{
HttpHeaders headers = new HttpHeaders();
headers.add("Content-Type", "application/json");
SimpleClientHttpRequestFactory factory = new SimpleClientHttpRequestFactory();
factory.setConnectTimeout(30000);
factory.setReadTimeout(30000);
restTemplate.setRequestFactory(factory);
HttpEntity<String> request = new HttpEntity<String>(headers);
logger.info("发起电梯运行状态高频请求,电梯注册码:" + registerCode);
restTemplate.exchange(lxydLiftUrl + "/lift/runstatus?registerCode=" + registerCode, HttpMethod.GET, request, String.class);
}
/**
*
* <pre>
* 获取电梯视频播放地址
* </pre>
*
* @throws Exception
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
public ElevatorVideoModel videoPreview(String registerCode) throws Exception
{
HttpHeaders headers = new HttpHeaders();
MediaType type = MediaType.parseMediaType("application/json; charset=UTF-8");
headers.setContentType(type);
headers.add("Content-Type", "application/json");
SimpleClientHttpRequestFactory factory = new SimpleClientHttpRequestFactory();
factory.setConnectTimeout(30000);
factory.setReadTimeout(30000);
restTemplate.setRequestFactory(factory);
HttpEntity<String> request = new HttpEntity<String>(headers);
logger.info("获取电梯视频播放地址,电梯注册码:" + registerCode);
String responseJson = restTemplate.exchange(lxydLiftUrl + "/lift/video/preview?registerCode=" + registerCode, HttpMethod.GET, request, String.class).getBody();
JSONObject jsonobject = JSONObject.fromObject(responseJson);
Map<String, Class> classMap = new HashMap<String, Class>();
classMap.put("result", ElevatorVideoModel.class);
ResponseModel<ElevatorVideoModel> responseModel = (ResponseModel<ElevatorVideoModel>)JSONObject.toBean(jsonobject,ResponseModel.class,classMap);
ElevatorVideoModel elevatorVideoModel = new ElevatorVideoModel();
elevatorVideoModel.setRegisterCode(registerCode);
if (responseModel.getStatus() == HttpStatus.OK.value())
{
elevatorVideoModel = responseModel.getResult();
}
return elevatorVideoModel;
}
/**
*
* <pre>
* 根据电梯注册编码和故障编码查询电梯故障信息
* </pre>
*
* @param registerCode
* @param faultId
*/
private List<ElevatorStatusModel> queryModelByCodeAndStatusId(String registerCode, String statusId)
{
return this.queryForList("upload_date", false,registerCode, statusId);
}
private ElevatorStatusModel builEnumName(ElevatorStatusModel elevatorStatusModel)
{
//总接触器吸合或是断开
elevatorStatusModel.setMainContactorName(String.valueOf(elevatorStatusModel.getMainContactor()));
if (!ValidationUtil.isEmpty(elevatorStatusModel.getMainContactor()) &&
!ValidationUtil.isEmpty(LiftContactorStatusEnum.getEnum(elevatorStatusModel.getMainContactor())))
{
elevatorStatusModel.setMainContactorName(LiftContactorStatusEnum.getEnum(elevatorStatusModel.getMainContactor()).getName());
}
//运行接触器吸合或是断开
elevatorStatusModel.setRunContactorName(String.valueOf(elevatorStatusModel.getRunContactor()));
if (!ValidationUtil.isEmpty(elevatorStatusModel.getRunContactor()) &&
!ValidationUtil.isEmpty(LiftContactorStatusEnum.getEnum(elevatorStatusModel.getRunContactor())))
{
elevatorStatusModel.setRunContactorName(LiftContactorStatusEnum.getEnum(elevatorStatusModel.getRunContactor()).getName());
}
//安全回路是否断开
elevatorStatusModel.setCircuitName(String.valueOf(elevatorStatusModel.getCircuit()));
if (!ValidationUtil.isEmpty(elevatorStatusModel.getCircuit()) &&
!ValidationUtil.isEmpty(LiftCircuitStatusEnum.getEnum(elevatorStatusModel.getCircuit())))
{
elevatorStatusModel.setCircuitName(LiftCircuitStatusEnum.getEnum(elevatorStatusModel.getCircuit()).getName());
}
//当前电梯运行模式
elevatorStatusModel.setServiceModelName(String.valueOf(elevatorStatusModel.getServiceModel()));
if (!ValidationUtil.isEmpty(elevatorStatusModel.getServiceModel()) &&
!ValidationUtil.isEmpty(LiftServiceModelEnum.getEnum(elevatorStatusModel.getServiceModel())))
{
elevatorStatusModel.setServiceModelName(LiftServiceModelEnum.getEnum(elevatorStatusModel.getServiceModel()).getName());
}
//轿厢运行状态
elevatorStatusModel.setLiftStatusName(String.valueOf(elevatorStatusModel.getLiftStatus()));
if (!ValidationUtil.isEmpty(elevatorStatusModel.getLiftStatus()) &&
!ValidationUtil.isEmpty(LiftStatusEnum.getEnum(elevatorStatusModel.getLiftStatus())))
{
elevatorStatusModel.setLiftStatusName(LiftStatusEnum.getEnum(elevatorStatusModel.getLiftStatus()).getName());
}
//轿厢运行方向
elevatorStatusModel.setLiftDirectionName(String.valueOf(elevatorStatusModel.getLiftDirection()));
if (!ValidationUtil.isEmpty(elevatorStatusModel.getLiftDirection()) &&
!ValidationUtil.isEmpty(LiftDirectionEnum.getEnum(elevatorStatusModel.getLiftDirection())))
{
elevatorStatusModel.setLiftDirectionName(LiftDirectionEnum.getEnum(elevatorStatusModel.getLiftDirection()).getName());
}
//关门到位
elevatorStatusModel.setDoorStatusName(String.valueOf(elevatorStatusModel.getDoorStatus()));
if (!ValidationUtil.isEmpty(elevatorStatusModel.getDoorStatus()) &&
!ValidationUtil.isEmpty(LiftDoorStatusEnum.getEnum(elevatorStatusModel.getDoorStatus())))
{
elevatorStatusModel.setDoorStatusName(LiftDoorStatusEnum.getEnum(elevatorStatusModel.getDoorStatus()).getName());
}
//轿厢内是否有人
elevatorStatusModel.setPersonFlagName(String.valueOf(elevatorStatusModel.getPersonFlag()));
if (!ValidationUtil.isEmpty(elevatorStatusModel.getPersonFlag()) &&
!ValidationUtil.isEmpty(LiftPersonFlagEnum.getEnum(elevatorStatusModel.getPersonFlag())))
{
elevatorStatusModel.setPersonFlagName(LiftPersonFlagEnum.getEnum(elevatorStatusModel.getPersonFlag()).getName());
}
return elevatorStatusModel;
}
}
//package com.yeejoin.amos.api.openapi.face.service;
//
//import java.text.SimpleDateFormat;
//import java.util.HashMap;
//import java.util.List;
//import java.util.Map;
//
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.context.annotation.Lazy;
//import org.springframework.http.HttpEntity;
//import org.springframework.http.HttpHeaders;
//import org.springframework.http.HttpMethod;
//import org.springframework.http.HttpStatus;
//import org.springframework.http.MediaType;
//import org.springframework.http.client.SimpleClientHttpRequestFactory;
//import org.springframework.stereotype.Component;
//import org.springframework.web.client.RestTemplate;
//import org.typroject.tyboot.component.emq.EmqKeeper;
//import org.typroject.tyboot.core.foundation.utils.Bean;
//import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
//import org.typroject.tyboot.core.rdbms.service.BaseService;
//import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
//
//import com.fasterxml.jackson.databind.ObjectMapper;
//import com.yeejoin.amos.api.common.restful.utils.ResponseModel;
//import com.yeejoin.amos.api.openapi.enums.LiftCircuitStatusEnum;
//import com.yeejoin.amos.api.openapi.enums.LiftContactorStatusEnum;
//import com.yeejoin.amos.api.openapi.enums.LiftDirectionEnum;
//import com.yeejoin.amos.api.openapi.enums.LiftDoorStatusEnum;
//import com.yeejoin.amos.api.openapi.enums.LiftPersonFlagEnum;
//import com.yeejoin.amos.api.openapi.enums.LiftServiceModelEnum;
//import com.yeejoin.amos.api.openapi.enums.LiftStatusEnum;
//import com.yeejoin.amos.api.openapi.face.model.ElevatorStatusModel;
//import com.yeejoin.amos.api.openapi.face.model.ElevatorVideoModel;
//import com.yeejoin.amos.api.openapi.face.orm.dao.ElevatorStatusMapper;
//import com.yeejoin.amos.api.openapi.face.orm.entity.ElevatorStatus;
//
//import net.sf.json.JSONObject;
//
///**
// *
// * <pre>
// * 电梯运行状态表 服务类
// * </pre>
// *
// * @author gwb
// * @version $Id: ElevatorStatusService.java, v 0.1 2021年9月28日 下午7:55:18 gwb Exp $
// */
//@Component
//public class ElevatorStatusService extends
// BaseService<ElevatorStatusModel, ElevatorStatus, ElevatorStatusMapper>
//{
//
// private static final Logger logger = LoggerFactory.getLogger(ElevatorStatusService.class);
//
// @Autowired
// private RestTemplate restTemplate;
//
// @Lazy
// @Autowired
// private EmqKeeper emqKeeper;
//
// @Value("${biz.lxyd.lift.url}")
// private String lxydLiftUrl;
//
// /**
// *
// * <pre>
// * 批量保存电梯运行状态信息
// * </pre>
// *
// * @param models
// * @return
// * @throws Exception
// */
// public String multCreateElevatorStatus(List<ElevatorStatusModel> models) throws Exception
// {
//
// if (ValidationUtil.isEmpty(models))
// throw new BadRequest("上报电梯状态数据为空.");
//
// for (ElevatorStatusModel elevatorStatusModel : models)
// {
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// elevatorStatusModel.setUploadDate(
// elevatorStatusModel.getUploadTime()!= null? sdf.parse(elevatorStatusModel.getUploadTime()): null);
//
// List<ElevatorStatusModel> oldModel = queryModelByCodeAndStatusId(elevatorStatusModel.getRegisterCode(), elevatorStatusModel.getStatusId());
// //如果存在该状态编码则不进行发送
// if (ValidationUtil.isEmpty(oldModel))
// {
// //实时消息发送
// ObjectMapper mapper = new ObjectMapper();
// String resultJson = mapper.writeValueAsString(builEnumName(elevatorStatusModel));
// emqKeeper.getMqttClient().publish("openapi/lift/runStatusData" ,resultJson.getBytes(), 2 ,false);
// }
// elevatorStatusModel = this.createWithModel(elevatorStatusModel);
// }
//
// return "OK";
// }
//
// /**
// *
// * <pre>
// * 查询电梯最新一条状态数据
// * </pre>
// *
// * @param registerCode 电梯注册码
// * @param highUpload 是否开启高频上传
// * @return
// * @throws Exception
// */
// public ElevatorStatusModel getLatelyStatus(String registerCode, Boolean highUpload) throws Exception
// {
// ElevatorStatusModel elevatorStatusModel = null;
// ElevatorStatus elevatorStatus = baseMapper.getLatelyStatus(registerCode);
// if (!ValidationUtil.isEmpty(elevatorStatus))
// {
// elevatorStatusModel = Bean.toModel(elevatorStatus, new ElevatorStatusModel());
// elevatorStatusModel = builEnumName(elevatorStatusModel);
// //开启高频上传
// if (highUpload)
// {
// this.highUpload(registerCode);
// }
// }else
// {
// elevatorStatusModel = new ElevatorStatusModel();
// }
// return elevatorStatusModel;
// }
//
//
//
// /**
// *
// * <pre>
// * 高频上传状态数据请求
// * </pre>
// *
// * @throws Exception
// */
// public void highUpload(String registerCode) throws Exception
// {
// HttpHeaders headers = new HttpHeaders();
// headers.add("Content-Type", "application/json");
// SimpleClientHttpRequestFactory factory = new SimpleClientHttpRequestFactory();
// factory.setConnectTimeout(30000);
// factory.setReadTimeout(30000);
// restTemplate.setRequestFactory(factory);
//
// HttpEntity<String> request = new HttpEntity<String>(headers);
// logger.info("发起电梯运行状态高频请求,电梯注册码:" + registerCode);
// restTemplate.exchange(lxydLiftUrl + "/lift/runstatus?registerCode=" + registerCode, HttpMethod.GET, request, String.class);
//
// }
//
// /**
// *
// * <pre>
// * 获取电梯视频播放地址
// * </pre>
// *
// * @throws Exception
// */
// @SuppressWarnings({ "unchecked", "rawtypes" })
// public ElevatorVideoModel videoPreview(String registerCode) throws Exception
// {
// HttpHeaders headers = new HttpHeaders();
// MediaType type = MediaType.parseMediaType("application/json; charset=UTF-8");
// headers.setContentType(type);
// headers.add("Content-Type", "application/json");
// SimpleClientHttpRequestFactory factory = new SimpleClientHttpRequestFactory();
// factory.setConnectTimeout(30000);
// factory.setReadTimeout(30000);
// restTemplate.setRequestFactory(factory);
//
// HttpEntity<String> request = new HttpEntity<String>(headers);
// logger.info("获取电梯视频播放地址,电梯注册码:" + registerCode);
// String responseJson = restTemplate.exchange(lxydLiftUrl + "/lift/video/preview?registerCode=" + registerCode, HttpMethod.GET, request, String.class).getBody();
// JSONObject jsonobject = JSONObject.fromObject(responseJson);
// Map<String, Class> classMap = new HashMap<String, Class>();
// classMap.put("result", ElevatorVideoModel.class);
// ResponseModel<ElevatorVideoModel> responseModel = (ResponseModel<ElevatorVideoModel>)JSONObject.toBean(jsonobject,ResponseModel.class,classMap);
// ElevatorVideoModel elevatorVideoModel = new ElevatorVideoModel();
// elevatorVideoModel.setRegisterCode(registerCode);
// if (responseModel.getStatus() == HttpStatus.OK.value())
// {
// elevatorVideoModel = responseModel.getResult();
// }
// return elevatorVideoModel;
// }
//
// /**
// *
// * <pre>
// * 根据电梯注册编码和故障编码查询电梯故障信息
// * </pre>
// *
// * @param registerCode
// * @param faultId
// */
// private List<ElevatorStatusModel> queryModelByCodeAndStatusId(String registerCode, String statusId)
// {
// return this.queryForList("upload_date", false,registerCode, statusId);
// }
//
// private ElevatorStatusModel builEnumName(ElevatorStatusModel elevatorStatusModel)
// {
// //总接触器吸合或是断开
// elevatorStatusModel.setMainContactorName(String.valueOf(elevatorStatusModel.getMainContactor()));
// if (!ValidationUtil.isEmpty(elevatorStatusModel.getMainContactor()) &&
// !ValidationUtil.isEmpty(LiftContactorStatusEnum.getEnum(elevatorStatusModel.getMainContactor())))
// {
// elevatorStatusModel.setMainContactorName(LiftContactorStatusEnum.getEnum(elevatorStatusModel.getMainContactor()).getName());
// }
// //运行接触器吸合或是断开
// elevatorStatusModel.setRunContactorName(String.valueOf(elevatorStatusModel.getRunContactor()));
// if (!ValidationUtil.isEmpty(elevatorStatusModel.getRunContactor()) &&
// !ValidationUtil.isEmpty(LiftContactorStatusEnum.getEnum(elevatorStatusModel.getRunContactor())))
// {
// elevatorStatusModel.setRunContactorName(LiftContactorStatusEnum.getEnum(elevatorStatusModel.getRunContactor()).getName());
// }
// //安全回路是否断开
// elevatorStatusModel.setCircuitName(String.valueOf(elevatorStatusModel.getCircuit()));
// if (!ValidationUtil.isEmpty(elevatorStatusModel.getCircuit()) &&
// !ValidationUtil.isEmpty(LiftCircuitStatusEnum.getEnum(elevatorStatusModel.getCircuit())))
// {
// elevatorStatusModel.setCircuitName(LiftCircuitStatusEnum.getEnum(elevatorStatusModel.getCircuit()).getName());
// }
// //当前电梯运行模式
// elevatorStatusModel.setServiceModelName(String.valueOf(elevatorStatusModel.getServiceModel()));
// if (!ValidationUtil.isEmpty(elevatorStatusModel.getServiceModel()) &&
// !ValidationUtil.isEmpty(LiftServiceModelEnum.getEnum(elevatorStatusModel.getServiceModel())))
// {
// elevatorStatusModel.setServiceModelName(LiftServiceModelEnum.getEnum(elevatorStatusModel.getServiceModel()).getName());
// }
// //轿厢运行状态
// elevatorStatusModel.setLiftStatusName(String.valueOf(elevatorStatusModel.getLiftStatus()));
// if (!ValidationUtil.isEmpty(elevatorStatusModel.getLiftStatus()) &&
// !ValidationUtil.isEmpty(LiftStatusEnum.getEnum(elevatorStatusModel.getLiftStatus())))
// {
// elevatorStatusModel.setLiftStatusName(LiftStatusEnum.getEnum(elevatorStatusModel.getLiftStatus()).getName());
// }
// //轿厢运行方向
// elevatorStatusModel.setLiftDirectionName(String.valueOf(elevatorStatusModel.getLiftDirection()));
// if (!ValidationUtil.isEmpty(elevatorStatusModel.getLiftDirection()) &&
// !ValidationUtil.isEmpty(LiftDirectionEnum.getEnum(elevatorStatusModel.getLiftDirection())))
// {
// elevatorStatusModel.setLiftDirectionName(LiftDirectionEnum.getEnum(elevatorStatusModel.getLiftDirection()).getName());
// }
// //关门到位
// elevatorStatusModel.setDoorStatusName(String.valueOf(elevatorStatusModel.getDoorStatus()));
// if (!ValidationUtil.isEmpty(elevatorStatusModel.getDoorStatus()) &&
// !ValidationUtil.isEmpty(LiftDoorStatusEnum.getEnum(elevatorStatusModel.getDoorStatus())))
// {
// elevatorStatusModel.setDoorStatusName(LiftDoorStatusEnum.getEnum(elevatorStatusModel.getDoorStatus()).getName());
// }
// //轿厢内是否有人
// elevatorStatusModel.setPersonFlagName(String.valueOf(elevatorStatusModel.getPersonFlag()));
// if (!ValidationUtil.isEmpty(elevatorStatusModel.getPersonFlag()) &&
// !ValidationUtil.isEmpty(LiftPersonFlagEnum.getEnum(elevatorStatusModel.getPersonFlag())))
// {
// elevatorStatusModel.setPersonFlagName(LiftPersonFlagEnum.getEnum(elevatorStatusModel.getPersonFlag()).getName());
// }
// return elevatorStatusModel;
// }
//}
package com.yeejoin.amos.api.openapi.face.service;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.api.openapi.enums.JgFileAttributeEnum;
import com.yeejoin.amos.api.openapi.enums.JgFileObjectEnum;
import com.yeejoin.amos.api.openapi.face.model.ElevatorTechInfoModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.ElevatorTechInfoMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.ElevatorTechInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.JgFile;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* 电梯技术参数 服务类
*
* @author duanwei
* @date 2022-07-19
*/
@Component
public class ElevatorTechInfoService extends AppBaseService<ElevatorTechInfoModel, ElevatorTechInfo, ElevatorTechInfoMapper> {
@Autowired
private JgFileService fileService;
/**
*
* 新增电梯技术参数
*
* @param model 电梯技术参数实体类集合
* @return 成功返回“OK”
*/
@Transactional(rollbackFor= {Exception.class})
public String saveElevatorTechInfo(List<ElevatorTechInfoModel> model) {
// TODO Auto-generated method stub
if (ValidationUtil.isEmpty(model)) {
throw new BadRequest("电梯技术参数为空.");
}
List<JgFile> fileList = new ArrayList<>();
List<JgFile> governorEffiReportList;
for (ElevatorTechInfoModel models : model) {
checkModel(models);
models.setRecDate(new Date());
models.setAppId(getAppId());
ElevatorTechInfoModel elevatorTechInfoModel = this.createWithModel(models);
governorEffiReportList = JSONObject.parseArray(JSONObject.toJSONString(models.getGovernorEffiReport()), JgFile.class);
for (JgFile files : governorEffiReportList) {
JgFile file = new JgFile();
file.setSequenceCode(models.getSequenceCode());
file.setAppId(getAppId());
file.setObjectType(JgFileObjectEnum.ELEVATOR_TECH_INFO.getObject());
file.setAttributeType(JgFileAttributeEnum.GOVERNOR_EFFI_REPORT.getAttribute());
file.setSyncDate(models.getSyncDate());
file.setFileUrl(files.getFileUrl());
file.setFileName(files.getFileName());
file.setRecDate(new Date());
file.setSquNbr(elevatorTechInfoModel.getSequenceNbr());
fileList.add(file);
}
}
fileService.saveBatch(fileList);
return "OK";
}
/**
* 信息校验
*
* @param models
*/
private static void checkModel(ElevatorTechInfoModel models) {
if(ValidationUtil.isEmpty(models.getSequenceCode())) {
throw new BadRequest("设备唯一标识码不能为空!");
}
if(ValidationUtil.isEmpty(models.getSuperviseCode())) {
throw new BadRequest("设备标识码为:"+models.getSequenceCode()+"的设备,"+"监管系统唯一编码不能为空!");
}
if(ValidationUtil.isEmpty(models.getRatedSpeed())) {
throw new BadRequest("设备标识码为:"+models.getSequenceCode()+"的设备,"+"额定速度不能为空!");
}
if(ValidationUtil.isEmpty(models.getControlType())) {
throw new BadRequest("设备标识码为:"+models.getSequenceCode()+"的设备,"+"控制方式不能为空!");
}
if(ValidationUtil.isEmpty(models.getRatedLoad())) {
throw new BadRequest("设备标识码为:"+models.getSequenceCode()+"的设备,"+"额定载重不能为空!");
}
if(ValidationUtil.isEmpty(models.getSyncDate())) {
throw new BadRequest("设备标识码为:"+models.getSequenceCode()+"的设备,"+"同步时间不能为空!");
}
if(ValidationUtil.isEmpty(models.getSyncState())) {
throw new BadRequest("设备标识码为:"+models.getSequenceCode()+"的设备,"+"同步状态不能为空!");
}
}
}
//package com.yeejoin.amos.api.openapi.face.service;
//
//import com.alibaba.fastjson.JSONObject;
//import com.yeejoin.amos.api.openapi.enums.JgFileAttributeEnum;
//import com.yeejoin.amos.api.openapi.enums.JgFileObjectEnum;
//import com.yeejoin.amos.api.openapi.face.model.ElevatorTechInfoModel;
//import com.yeejoin.amos.api.openapi.face.orm.dao.ElevatorTechInfoMapper;
//import com.yeejoin.amos.api.openapi.face.orm.entity.ElevatorTechInfo;
//import com.yeejoin.amos.api.openapi.face.orm.entity.JgFile;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//import org.springframework.transaction.annotation.Transactional;
//import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
//import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
//
//import java.util.ArrayList;
//import java.util.Date;
//import java.util.List;
//
///**
// * 电梯技术参数 服务类
// *
// * @author duanwei
// * @date 2022-07-19
// */
//@Component
//public class ElevatorTechInfoService extends AppBaseService<ElevatorTechInfoModel, ElevatorTechInfo, ElevatorTechInfoMapper> {
//
// @Autowired
// private JgFileService fileService;
//
// /**
// *
// * 新增电梯技术参数
// *
// * @param model 电梯技术参数实体类集合
// * @return 成功返回“OK”
// */
// @Transactional(rollbackFor= {Exception.class})
// public String saveElevatorTechInfo(List<ElevatorTechInfoModel> model) {
// // TODO Auto-generated method stub
// if (ValidationUtil.isEmpty(model)) {
// throw new BadRequest("电梯技术参数为空.");
// }
//
// List<JgFile> fileList = new ArrayList<>();
// List<JgFile> governorEffiReportList;
//
// for (ElevatorTechInfoModel models : model) {
// checkModel(models);
// models.setRecDate(new Date());
// models.setAppId(getAppId());
//
// ElevatorTechInfoModel elevatorTechInfoModel = this.createWithModel(models);
//
// governorEffiReportList = JSONObject.parseArray(JSONObject.toJSONString(models.getGovernorEffiReport()), JgFile.class);
// for (JgFile files : governorEffiReportList) {
// JgFile file = new JgFile();
// file.setSequenceCode(models.getSequenceCode());
// file.setAppId(getAppId());
// file.setObjectType(JgFileObjectEnum.ELEVATOR_TECH_INFO.getObject());
// file.setAttributeType(JgFileAttributeEnum.GOVERNOR_EFFI_REPORT.getAttribute());
// file.setSyncDate(models.getSyncDate());
// file.setFileUrl(files.getFileUrl());
// file.setFileName(files.getFileName());
// file.setRecDate(new Date());
// file.setSquNbr(elevatorTechInfoModel.getSequenceNbr());
// fileList.add(file);
// }
// }
// fileService.saveBatch(fileList);
// return "OK";
// }
//
// /**
// * 信息校验
// *
// * @param models
// */
// private static void checkModel(ElevatorTechInfoModel models) {
// if(ValidationUtil.isEmpty(models.getSequenceCode())) {
// throw new BadRequest("设备唯一标识码不能为空!");
// }
// if(ValidationUtil.isEmpty(models.getSuperviseCode())) {
// throw new BadRequest("设备标识码为:"+models.getSequenceCode()+"的设备,"+"监管系统唯一编码不能为空!");
// }
// if(ValidationUtil.isEmpty(models.getRatedSpeed())) {
// throw new BadRequest("设备标识码为:"+models.getSequenceCode()+"的设备,"+"额定速度不能为空!");
// }
// if(ValidationUtil.isEmpty(models.getControlType())) {
// throw new BadRequest("设备标识码为:"+models.getSequenceCode()+"的设备,"+"控制方式不能为空!");
// }
// if(ValidationUtil.isEmpty(models.getRatedLoad())) {
// throw new BadRequest("设备标识码为:"+models.getSequenceCode()+"的设备,"+"额定载重不能为空!");
// }
// if(ValidationUtil.isEmpty(models.getSyncDate())) {
// throw new BadRequest("设备标识码为:"+models.getSequenceCode()+"的设备,"+"同步时间不能为空!");
// }
// if(ValidationUtil.isEmpty(models.getSyncState())) {
// throw new BadRequest("设备标识码为:"+models.getSequenceCode()+"的设备,"+"同步状态不能为空!");
// }
// }
//}
......@@ -12,6 +12,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.annotation.Condition;
import org.typroject.tyboot.core.rdbms.annotation.Operator;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import java.util.ArrayList;
......@@ -135,8 +137,5 @@ public class EnterpriseInfoService extends AppBaseService<EnterpriseInfoModel, E
}
}
@DS("tzs")
public List<EnterpriseInfoModel> getEnterpriseInfoByCreditCode(Set<String> useCode) {
return this.queryForList("", false, useCode);
}
}
package com.yeejoin.amos.api.openapi.face.service;
import com.yeejoin.amos.api.openapi.face.model.EquipTechParamBoilerModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.EquipTechParamBoilerMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.EquipTechParamBoiler;
import org.springframework.stereotype.Service;
import com.yeejoin.amos.api.openapi.face.model.MidEquipTechParamBoilerModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.MidEquipTechParamBoilerMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidEquipTechParamBoiler;
public class EquipTechParamBoilerService extends AppBaseService<EquipTechParamBoilerModel, EquipTechParamBoiler, EquipTechParamBoilerMapper>{
public class EquipTechParamBoilerService extends AppBaseService<MidEquipTechParamBoilerModel, MidEquipTechParamBoiler, MidEquipTechParamBoilerMapper>{
}
package com.yeejoin.amos.api.openapi.face.service;
import com.yeejoin.amos.api.openapi.face.orm.dao.EquipTechParamElevatorMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.EquipTechParamElevator;
import org.springframework.stereotype.Service;
import com.yeejoin.amos.api.openapi.face.orm.dao.MidEquipTechParamElevatorMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidEquipTechParamElevator;
public class EquipTechParamElevatorService extends AppBaseService<EquipTechParamElevatorMapper, EquipTechParamElevator,EquipTechParamElevatorMapper> {
public class EquipTechParamElevatorService extends AppBaseService<MidEquipTechParamElevatorMapper, MidEquipTechParamElevator, MidEquipTechParamElevatorMapper> {
}
package com.yeejoin.amos.api.openapi.face.service;
import com.yeejoin.amos.api.openapi.face.model.EquipTechParamLiftingModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.EquipTechParamLiftingMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.EquipTechParamLifting;
import org.springframework.stereotype.Service;
import com.yeejoin.amos.api.openapi.face.model.MidEquipTechParamLiftingModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.MidEquipTechParamLiftingMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidEquipTechParamLifting;
public class EquipTechParamLiftingService extends AppBaseService<EquipTechParamLiftingModel, EquipTechParamLifting, EquipTechParamLiftingMapper> {
public class EquipTechParamLiftingService extends AppBaseService<MidEquipTechParamLiftingModel, MidEquipTechParamLifting, MidEquipTechParamLiftingMapper> {
}
package com.yeejoin.amos.api.openapi.face.service;
import com.yeejoin.amos.api.openapi.face.model.EquipTechParamPipelineModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.EquipTechParamPipelineMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.EquipTechParamPipeline;
import org.springframework.stereotype.Service;
import com.yeejoin.amos.api.openapi.face.model.MidEquipTechParamPipelineModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.MidEquipTechParamPipelineMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidEquipTechParamPipeline;
public class EquipTechParamPipelineService extends AppBaseService<EquipTechParamPipelineModel, EquipTechParamPipeline, EquipTechParamPipelineMapper>{
public class EquipTechParamPipelineService extends AppBaseService<MidEquipTechParamPipelineModel, MidEquipTechParamPipeline, MidEquipTechParamPipelineMapper>{
}
package com.yeejoin.amos.api.openapi.face.service;
import com.yeejoin.amos.api.openapi.face.model.EquipTechParamRidesModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.EquipTechParamRidesMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.EquipTechParamRides;
import org.springframework.stereotype.Service;
import com.yeejoin.amos.api.openapi.face.model.MidEquipTechParamRidesModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.MidEquipTechParamRidesMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidEquipTechParamRides;
public class EquipTechParamRidesService extends AppBaseService<EquipTechParamRidesModel, EquipTechParamRides, EquipTechParamRidesMapper>{
public class EquipTechParamRidesService extends AppBaseService<MidEquipTechParamRidesModel, MidEquipTechParamRides, MidEquipTechParamRidesMapper>{
}
package com.yeejoin.amos.api.openapi.face.service;
import com.yeejoin.amos.api.openapi.face.model.EquipTechParamRopewayModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.EquipTechParamRopewayMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.EquipTechParamRopeway;
import org.springframework.stereotype.Service;
import com.yeejoin.amos.api.openapi.face.model.MidEquipTechParamRopewayModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.MidEquipTechParamRopewayMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidEquipTechParamRopeway;
public class EquipTechParamRopewayService extends AppBaseService<EquipTechParamRopewayModel, EquipTechParamRopeway, EquipTechParamRopewayMapper> {
public class EquipTechParamRopewayService extends AppBaseService<MidEquipTechParamRopewayModel, MidEquipTechParamRopeway, MidEquipTechParamRopewayMapper> {
}
package com.yeejoin.amos.api.openapi.face.service;
import com.yeejoin.amos.api.openapi.face.model.EquipTechParamVehicleModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.EquipTechParamVehicleMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.EquipTechParamVehicle;
import org.springframework.stereotype.Service;
import com.yeejoin.amos.api.openapi.face.model.MidEquipTechParamVehicleModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.MidEquipTechParamVehicleMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidEquipTechParamVehicle;
public class EquipTechParamVehicleService extends AppBaseService<EquipTechParamVehicleModel, EquipTechParamVehicle,EquipTechParamVehicleMapper>{
public class EquipTechParamVehicleService extends AppBaseService<MidEquipTechParamVehicleModel, MidEquipTechParamVehicle, MidEquipTechParamVehicleMapper>{
}
package com.yeejoin.amos.api.openapi.face.service;
import com.yeejoin.amos.api.openapi.face.model.EquipTechParamVesselModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.EquipTechParamVesselMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.EquipTechParamVessel;
import org.springframework.stereotype.Service;
import com.yeejoin.amos.api.openapi.face.model.MidEquipTechParamVesselModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.MidEquipTechParamVesselMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidEquipTechParamVessel;
public class EquipTechParamVesselService extends AppBaseService<EquipTechParamVesselModel, EquipTechParamVessel, EquipTechParamVesselMapper>{
public class EquipTechParamVesselService extends AppBaseService<MidEquipTechParamVesselModel, MidEquipTechParamVessel, MidEquipTechParamVesselMapper>{
}
package com.yeejoin.amos.api.openapi.face.service;
import java.util.List;
import org.springframework.stereotype.Component;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import com.yeejoin.amos.api.openapi.face.model.EquipmentCategoryModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.EquipmentCategoryMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.EquipmentCategory;
/**
*
* <pre>
* 装备分类 服务类
* </pre>
*
* @author gwb
* @version $Id: EquipmentCategoryService.java, v 0.1 2021年10月15日 下午2:28:29 gwb Exp $
*/
@Component
public class EquipmentCategoryService extends
BaseService<EquipmentCategoryModel, EquipmentCategory, EquipmentCategoryMapper>
{
/**
*
* <pre>
* 查询所有装备分类
* </pre>
*
* @return
*/
public List<EquipmentCategoryModel> queryAllForlist()
{
return this.queryForList("id", true);
}
}
//package com.yeejoin.amos.api.openapi.face.service;
//
//import java.util.List;
//
//import org.springframework.stereotype.Component;
//import org.typroject.tyboot.core.rdbms.service.BaseService;
//
//import com.yeejoin.amos.api.openapi.face.model.EquipmentCategoryModel;
//import com.yeejoin.amos.api.openapi.face.orm.dao.EquipmentCategoryMapper;
//import com.yeejoin.amos.api.openapi.face.orm.entity.EquipmentCategory;
//
///**
// *
// * <pre>
// * 装备分类 服务类
// * </pre>
// *
// * @author gwb
// * @version $Id: EquipmentCategoryService.java, v 0.1 2021年10月15日 下午2:28:29 gwb Exp $
// */
//@Component
//public class EquipmentCategoryService extends
// BaseService<EquipmentCategoryModel, EquipmentCategory, EquipmentCategoryMapper>
//{
//
// /**
// *
// * <pre>
// * 查询所有装备分类
// * </pre>
// *
// * @return
// */
// public List<EquipmentCategoryModel> queryAllForlist()
// {
// return this.queryForList("id", true);
// }
//
//}
package com.yeejoin.amos.api.openapi.face.service;
import com.yeejoin.amos.api.openapi.face.model.MainPartsModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.MidEquipMainPartsMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.MainParts;
import com.yeejoin.amos.api.openapi.face.orm.dao.MiddEquipMainPartsMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.MiddMainParts;
/**
* 服务实现类
......@@ -10,6 +10,6 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.MainParts;
* @author duanwei
* @date 2023-04-10
*/
public class MainPartsServiceImpl extends AppBaseService<MainPartsModel, MainParts, MidEquipMainPartsMapper>{
public class MainPartsServiceImpl extends AppBaseService<MainPartsModel, MiddMainParts, MiddEquipMainPartsMapper>{
}
package com.yeejoin.amos.api.openapi.face.service;
import com.yeejoin.amos.api.openapi.face.model.MaintenanceInfoModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.MaintenanceInfoMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.MaintenanceInfo;
import com.yeejoin.amos.api.openapi.face.model.MidMaintenanceInfoModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.MidMaintenanceInfoMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidMaintenanceInfo;
import com.yeejoin.amos.api.openapi.feign.TzsServiceFeignClient;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
......@@ -24,7 +24,7 @@ import java.util.List;
* @date 2022-07-19
*/
@Component
public class MaintenanceInfoService extends AppBaseService<MaintenanceInfoModel, MaintenanceInfo, MaintenanceInfoMapper> {
public class MaintenanceInfoService extends AppBaseService<MidMaintenanceInfoModel, MidMaintenanceInfo, MidMaintenanceInfoMapper> {
private static final Logger logger = LogManager.getLogger(ConstructionInfoService.class);
......@@ -41,7 +41,7 @@ public class MaintenanceInfoService extends AppBaseService<MaintenanceInfoModel,
* @return 成功返回“OK”
*/
@Transactional(rollbackFor = {Exception.class})
public String saveMaintenanceInfo(MaintenanceInfo maintenanceInfo) {
public String saveMaintenanceInfo(MidMaintenanceInfo maintenanceInfo) {
try {
tzsServiceFeignClient.saveMaintenanceRecordInfo(maintenanceInfo);
} catch (Exception e) {
......@@ -58,18 +58,18 @@ public class MaintenanceInfoService extends AppBaseService<MaintenanceInfoModel,
* @return 成功返回“OK”
*/
@Transactional(rollbackFor = {Exception.class})
public String saveMaintenanceInfo(List<MaintenanceInfoModel> model) {
public String saveMaintenanceInfo(List<MidMaintenanceInfoModel> model) {
// TODO Auto-generated method stub
if (ValidationUtil.isEmpty(model)) {
throw new BadRequest("维保备案信息为空.");
}
List<MaintenanceInfo> mainList = new ArrayList<>();
List<MidMaintenanceInfo> mainList = new ArrayList<>();
// List<JgFile> fileList = new ArrayList<>();
// List<JgFile> repairInformList;
for (MaintenanceInfoModel models : model) {
MaintenanceInfo maintenanceInfo = new MaintenanceInfo();
for (MidMaintenanceInfoModel models : model) {
MidMaintenanceInfo maintenanceInfo = new MidMaintenanceInfo();
// checkModel(models);
models.setRecDate(new Date());
models.setAppId(getAppId());
......
package com.yeejoin.amos.api.openapi.face.service;
import com.yeejoin.amos.api.openapi.face.model.OtherInfoModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.OtherInfoMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.OtherInfo;
import com.yeejoin.amos.api.openapi.face.orm.dao.MidEquipOtherInfoMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidEquipOtherInfo;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
......@@ -18,7 +18,7 @@ import java.util.List;
* @date 2022-07-19
*/
@Component
public class OtherInfoService extends AppBaseService<OtherInfoModel, OtherInfo, OtherInfoMapper> {
public class OtherInfoService extends AppBaseService<OtherInfoModel, MidEquipOtherInfo, MidEquipOtherInfoMapper> {
/**
*
......@@ -28,13 +28,13 @@ public class OtherInfoService extends AppBaseService<OtherInfoModel, OtherInfo,
* @return 成功返回“OK”
*/
@Transactional(rollbackFor= {Exception.class})
public String saveOtherInfo(List<OtherInfo> model) {
public String saveOtherInfo(List<MidEquipOtherInfo> model) {
// TODO Auto-generated method stub
if (ValidationUtil.isEmpty(model)) {
throw new BadRequest("其他信息为空.");
}
for (OtherInfo models : model) {
for (MidEquipOtherInfo models : model) {
// checkModel(models);
models.setRecDate(new Date());
models.setAppId(getAppId());
......
package com.yeejoin.amos.api.openapi.face.service;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.api.openapi.enums.JgFileAttributeEnum;
import com.yeejoin.amos.api.openapi.enums.JgFileObjectEnum;
import com.yeejoin.amos.api.openapi.face.model.ProduceInfoModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.ProduceInfoMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.JgFile;
import com.yeejoin.amos.api.openapi.face.orm.entity.ProduceInfo;
import com.yeejoin.amos.api.openapi.face.orm.dao.MidEquipProduceInfoMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidEquipProduceInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
......@@ -23,7 +18,7 @@ import java.util.List;
* @date 2022-07-19
*/
@Component
public class ProduceInfoService extends AppBaseService<ProduceInfoModel, ProduceInfo, ProduceInfoMapper> {
public class ProduceInfoService extends AppBaseService<ProduceInfoModel, MidEquipProduceInfo, MidEquipProduceInfoMapper> {
@Autowired
private JgFileService fileService;
......
package com.yeejoin.amos.api.openapi.face.service;
import com.yeejoin.amos.api.openapi.face.model.ProtectionDevicesModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.MidEquipProtectionDevicesMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.ProtectionDevices;
import com.yeejoin.amos.api.openapi.face.orm.dao.MiddEquipProtectionDevicesMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidEquipProtectionDevices;
/**
* 服务实现类
......@@ -10,6 +10,6 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.ProtectionDevices;
* @author duanwei
* @date 2023-04-10
*/
public class ProtectionDevicesServiceImpl extends AppBaseService<ProtectionDevicesModel, ProtectionDevices, MidEquipProtectionDevicesMapper>{
public class ProtectionDevicesServiceImpl extends AppBaseService<ProtectionDevicesModel, MidEquipProtectionDevices, MiddEquipProtectionDevicesMapper>{
}
package com.yeejoin.amos.api.openapi.face.service;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.api.openapi.enums.JgFileAttributeEnum;
import com.yeejoin.amos.api.openapi.enums.JgFileObjectEnum;
import com.yeejoin.amos.api.openapi.face.model.RegistrationInfoModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.RegistrationInfoMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.JgFile;
import com.yeejoin.amos.api.openapi.face.orm.entity.RegistrationInfo;
import com.yeejoin.amos.api.openapi.face.orm.dao.MidEquipRegistrationInfoMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidEquipRegistrationInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
......@@ -24,7 +19,7 @@ import java.util.List;
* @date 2022-07-19
*/
@Component
public class RegistrationInfoService extends AppBaseService<RegistrationInfoModel, RegistrationInfo, RegistrationInfoMapper> {
public class RegistrationInfoService extends AppBaseService<RegistrationInfoModel, MidEquipRegistrationInfo, MidEquipRegistrationInfoMapper> {
@Autowired
private JgFileService fileService;
......
package com.yeejoin.amos.api.openapi.face.service;
import com.yeejoin.amos.api.openapi.face.model.StaffBaseInfoModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.StaffBaseInfoMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.StaffBaseInfo;
import com.yeejoin.amos.api.openapi.face.orm.dao.MidStaffBaseInfoMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidStaffBaseInfo;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
......@@ -18,7 +18,7 @@ import java.util.List;
* @date 2022-07-19
*/
@Component
public class StaffBaseInfoService extends AppBaseService<StaffBaseInfoModel, StaffBaseInfo, StaffBaseInfoMapper> {
public class StaffBaseInfoService extends AppBaseService<StaffBaseInfoModel, MidStaffBaseInfo, MidStaffBaseInfoMapper> {
/**
*
......@@ -28,13 +28,13 @@ public class StaffBaseInfoService extends AppBaseService<StaffBaseInfoModel, Sta
* @return 成功返回“OK”
*/
@Transactional(rollbackFor= {Exception.class})
public String saveStaffBaseInfo(List<StaffBaseInfo> model) {
public String saveStaffBaseInfo(List<MidStaffBaseInfo> model) {
// TODO Auto-generated method stub
if (ValidationUtil.isEmpty(model)) {
throw new BadRequest("人员基本信息为空.");
}
for (StaffBaseInfo models : model) {
for (MidStaffBaseInfo models : model) {
// checkModel(models);
models.setRecDate(new Date());
models.setAppId(getAppId());
......
package com.yeejoin.amos.api.openapi.face.service;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.api.openapi.enums.JgFileAttributeEnum;
import com.yeejoin.amos.api.openapi.enums.JgFileObjectEnum;
import com.yeejoin.amos.api.openapi.face.model.StaffQualifInfoModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.StaffQualifInfoMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.JgFile;
import com.yeejoin.amos.api.openapi.face.orm.entity.StaffQualifInfo;
import com.yeejoin.amos.api.openapi.face.orm.dao.MidStaffQualifInfoMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidStaffQualifInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
......@@ -24,7 +19,7 @@ import java.util.List;
* @date 2022-07-19
*/
@Component
public class StaffQualifInfoService extends AppBaseService<StaffQualifInfoModel, StaffQualifInfo, StaffQualifInfoMapper> {
public class StaffQualifInfoService extends AppBaseService<StaffQualifInfoModel, MidStaffQualifInfo, MidStaffQualifInfoMapper> {
@Autowired
private JgFileService fileService;
......
package com.yeejoin.amos.api.openapi.face.service;
import com.yeejoin.amos.api.openapi.face.model.SuperviseInfoModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.SuperviseInfoMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.SuperviseInfo;
import com.yeejoin.amos.api.openapi.face.orm.dao.MiddEquipSuperviseInfoMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.MiddEquipSuperviseInfo;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
......@@ -18,7 +18,7 @@ import java.util.List;
* @date 2022-07-19
*/
@Component
public class SuperviseInfoService extends AppBaseService<SuperviseInfoModel, SuperviseInfo, SuperviseInfoMapper> {
public class SuperviseInfoService extends AppBaseService<SuperviseInfoModel, MiddEquipSuperviseInfo, MiddEquipSuperviseInfoMapper> {
/**
*
......@@ -28,12 +28,12 @@ public class SuperviseInfoService extends AppBaseService<SuperviseInfoModel, Sup
* @return 成功返回“OK”
*/
@Transactional(rollbackFor= {Exception.class})
public String saveSuperviseInfo(List<SuperviseInfo> model) {
public String saveSuperviseInfo(List<MiddEquipSuperviseInfo> model) {
// TODO Auto-generated method stub
if (ValidationUtil.isEmpty(model)) {
throw new BadRequest("监督管理信息为空.");
}
for (SuperviseInfo models : model) {
for (MiddEquipSuperviseInfo models : model) {
// checkModel(models);
models.setRecDate(new Date());
models.setAppId(getAppId());
......
package com.yeejoin.amos.api.openapi.face.service;
import org.springframework.stereotype.Component;
import org.typroject.tyboot.core.foundation.utils.Bean;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yeejoin.amos.boot.module.cylinder.flc.api.entity.CylinderUnit;
import com.yeejoin.amos.boot.module.cylinder.flc.api.dto.CylinderUnitDto;
import com.yeejoin.amos.boot.module.cylinder.flc.api.entity.CylinderUnitVideo;
import com.yeejoin.amos.boot.module.cylinder.flc.api.mapper.CylinderUnitMapper;
import java.util.List;
@Component
public class SyncCylinderDataService
// extends ServiceImpl implements IService
{
@DS("tzs")
public void syncCylinderUnit(List<CylinderUnitDto> cylinderUnitDto) {
// List<CylinderUnit> cylinderUnits = Bean.toModels(cylinderUnitDto,CylinderUnit.class);
// LambdaQueryWrapper<CylinderUnit> wrapper = new LambdaQueryWrapper<>();
// List<CylinderUnit> cylinderUnitList = this.getBaseMapper().selectList(wrapper);
}
}
package com.yeejoin.amos.api.openapi.face.service;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.common.restful.utils.ApplicationContextUtils;
import com.yeejoin.amos.api.openapi.constant.Constant;
import com.yeejoin.amos.api.openapi.enums.EightCategorySubformEnum;
import com.yeejoin.amos.api.openapi.enums.EquipTypeEnum;
import com.yeejoin.amos.api.openapi.face.model.BizTokenModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.EquipTechParamBoilerMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.AbstractEquipBaseEntity;
import com.yeejoin.amos.api.openapi.face.orm.entity.EquipTechParamRopeway;
import net.sf.json.JSONObject;
import org.apache.catalina.core.ApplicationContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.ui.context.support.UiApplicationContextUtils;
import org.typroject.tyboot.component.cache.Redis;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
......
......@@ -10,16 +10,13 @@ import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.typroject.tyboot.component.cache.Redis;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import com.yeejoin.amos.api.openapi.constant.Constant;
import com.yeejoin.amos.api.openapi.face.model.BizTokenModel;
import com.yeejoin.amos.api.openapi.face.model.CylinderFillingCheckModel;
import com.yeejoin.amos.api.openapi.face.model.CylinderTagsModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.CylinderFillingCheckMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderFillingCheck;
import com.yeejoin.amos.api.openapi.face.model.TmCylinderFillingCheckModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.TmCylinderFillingCheckMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderFillingCheck;
/**
......@@ -32,16 +29,16 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderFillingCheck;
* @version $Id: ElevatorService.java, v 0.1 2021年9月30日 下午3:28:55 gwb Exp $
*/
@Component
public class CylinderFillingCheckService extends BaseService<CylinderFillingCheckModel,CylinderFillingCheck,CylinderFillingCheckMapper> {
public class TmCylinderFillingCheckService extends BaseService<TmCylinderFillingCheckModel, TmCylinderFillingCheck, TmCylinderFillingCheckMapper> {
@Autowired
private RedisTemplate redisTemplate;
@Transactional(rollbackFor= {Exception.class})
public String createCylinderFillingAfter(List<CylinderFillingCheckModel> model) {
public String createCylinderFillingAfter(List<TmCylinderFillingCheckModel> model) {
// TODO Auto-generated method stub
// if (ValidationUtil.isEmpty(model))
// throw new BadRequest("气瓶标签信息为空.");
for (CylinderFillingCheckModel cylinderFillingCheckModel : model) {
for (TmCylinderFillingCheckModel cylinderFillingCheckModel : model) {
cylinderFillingCheckModel.setRecDate(new Date());
cylinderFillingCheckModel.setAppId(getAppId());
this.createWithModel(cylinderFillingCheckModel);
......
......@@ -16,10 +16,9 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import com.yeejoin.amos.api.openapi.constant.Constant;
import com.yeejoin.amos.api.openapi.face.model.BizTokenModel;
import com.yeejoin.amos.api.openapi.face.model.CylinderFillingExamineModel;
import com.yeejoin.amos.api.openapi.face.model.CylinderTagsModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.CylinderFillingExamineMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderFillingExamine;
import com.yeejoin.amos.api.openapi.face.model.TmCylinderFillingExamineModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.TmCylinderFillingExamineMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderFillingExamine;
/**
......@@ -32,16 +31,16 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderFillingExamine;
* @version $Id: ElevatorService.java, v 0.1 2021年9月30日 下午3:28:55 gwb Exp $
*/
@Component
public class CylinderFillingExamineService extends BaseService<CylinderFillingExamineModel,CylinderFillingExamine,CylinderFillingExamineMapper> {
public class TmCylinderFillingExamineService extends BaseService<TmCylinderFillingExamineModel, TmCylinderFillingExamine, TmCylinderFillingExamineMapper> {
@Autowired
private RedisTemplate redisTemplate;
@Transactional(rollbackFor= {Exception.class})
public String createCylinderFillingExamine(List<CylinderFillingExamineModel> model) {
public String createCylinderFillingExamine(List<TmCylinderFillingExamineModel> model) {
// TODO Auto-generated method stub
if (ValidationUtil.isEmpty(model))
throw new BadRequest("液化气体气瓶充装信息审核为空.");
for (CylinderFillingExamineModel cylinderFillingExamineModel : model) {
for (TmCylinderFillingExamineModel cylinderFillingExamineModel : model) {
cylinderFillingExamineModel.setRecDate(new Date());
cylinderFillingExamineModel.setAppId(getAppId());
this.createWithModel(cylinderFillingExamineModel);
......
......@@ -10,16 +10,13 @@ import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.typroject.tyboot.component.cache.Redis;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import com.yeejoin.amos.api.openapi.constant.Constant;
import com.yeejoin.amos.api.openapi.face.model.BizTokenModel;
import com.yeejoin.amos.api.openapi.face.model.CylinderFillingRecordModel;
import com.yeejoin.amos.api.openapi.face.model.CylinderTagsModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.CylinderFillingRecordMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderFillingRecord;
import com.yeejoin.amos.api.openapi.face.model.TmCylinderFillingRecordModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.TmCylinderFillingRecordMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderFillingRecord;
/**
......@@ -32,16 +29,16 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderFillingRecord;
* @version $Id: ElevatorService.java, v 0.1 2021年9月30日 下午3:28:55 gwb Exp $
*/
@Component
public class CylinderFillingRecordService extends BaseService<CylinderFillingRecordModel,CylinderFillingRecord,CylinderFillingRecordMapper> {
public class TmCylinderFillingRecordService extends BaseService<TmCylinderFillingRecordModel, TmCylinderFillingRecord, TmCylinderFillingRecordMapper> {
@Autowired
private RedisTemplate redisTemplate;
@Transactional(rollbackFor= {Exception.class})
public String createCylinderFilling(List<CylinderFillingRecordModel> model) {
public String createCylinderFilling(List<TmCylinderFillingRecordModel> model) {
// TODO Auto-generated method stub
// if (ValidationUtil.isEmpty(model))
// throw new BadRequest("气瓶标签信息为空.");
for (CylinderFillingRecordModel cylinderFillingRecordModel : model) {
for (TmCylinderFillingRecordModel cylinderFillingRecordModel : model) {
cylinderFillingRecordModel.setRecDate(new Date());
cylinderFillingRecordModel.setAppId(getAppId());
this.createWithModel(cylinderFillingRecordModel);
......
......@@ -10,16 +10,13 @@ import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.typroject.tyboot.component.cache.Redis;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import com.yeejoin.amos.api.openapi.constant.Constant;
import com.yeejoin.amos.api.openapi.face.model.BizTokenModel;
import com.yeejoin.amos.api.openapi.face.model.CylinderFillingModel;
import com.yeejoin.amos.api.openapi.face.model.CylinderTagsModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.CylinderFillingMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderFilling;
import com.yeejoin.amos.api.openapi.face.model.TmCylinderFillingModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.TmCylinderFillingMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderFilling;
/**
......@@ -32,16 +29,16 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderFilling;
* @version $Id: ElevatorService.java, v 0.1 2021年9月30日 下午3:28:55 gwb Exp $
*/
@Component
public class CylinderFillingService extends BaseService<CylinderFillingModel,CylinderFilling,CylinderFillingMapper> {
public class TmCylinderFillingService extends BaseService<TmCylinderFillingModel, TmCylinderFilling, TmCylinderFillingMapper> {
@Autowired
private RedisTemplate redisTemplate;
@Transactional(rollbackFor= {Exception.class})
public String createCylinderFillingBefore(List<CylinderFillingModel> model) {
public String createCylinderFillingBefore(List<TmCylinderFillingModel> model) {
// TODO Auto-generated method stub
// if (ValidationUtil.isEmpty(model))
// throw new BadRequest("气瓶标签信息为空.");
for (CylinderFillingModel cylinderFillingModel : model) {
for (TmCylinderFillingModel cylinderFillingModel : model) {
cylinderFillingModel.setRecDate(new Date());
cylinderFillingModel.setAppId(getAppId());
this.createWithModel(cylinderFillingModel);
......
......@@ -16,9 +16,9 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import com.yeejoin.amos.api.openapi.constant.Constant;
import com.yeejoin.amos.api.openapi.face.model.BizTokenModel;
import com.yeejoin.amos.api.openapi.face.model.CylinderInfoModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.CylinderInfoMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderInfo;
import com.yeejoin.amos.api.openapi.face.model.TmCylinderInfoModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.TmCylinderInfoMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderInfo;
/**
......@@ -31,16 +31,16 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderInfo;
* @version $Id: ElevatorService.java, v 0.1 2021年9月30日 下午3:28:55 gwb Exp $
*/
@Component
public class CylinderInfoService extends BaseService<CylinderInfoModel,CylinderInfo,CylinderInfoMapper> {
public class TmCylinderInfoService extends BaseService<TmCylinderInfoModel, TmCylinderInfo, TmCylinderInfoMapper> {
@Autowired
private RedisTemplate redisTemplate;
@Transactional(rollbackFor= {Exception.class})
public String createCylinderInfo(List<CylinderInfoModel> model) {
public String createCylinderInfo(List<TmCylinderInfoModel> model) {
// TODO Auto-generated method stub
if (ValidationUtil.isEmpty(model))
throw new BadRequest("气瓶基本信息数据为空.");
for (CylinderInfoModel cylinderInfoModel : model) {
for (TmCylinderInfoModel cylinderInfoModel : model) {
cylinderInfoModel.setRecDate(new Date());
cylinderInfoModel.setAppId(getAppId());
this.createWithModel(cylinderInfoModel);
......
......@@ -16,10 +16,9 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import com.yeejoin.amos.api.openapi.constant.Constant;
import com.yeejoin.amos.api.openapi.face.model.BizTokenModel;
import com.yeejoin.amos.api.openapi.face.model.CylinderInspectionModel;
import com.yeejoin.amos.api.openapi.face.model.CylinderTagsModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.CylinderInspectionMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderInspection;
import com.yeejoin.amos.api.openapi.face.model.TmCylinderInspectionModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.TmCylinderInspectionMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderInspection;
/**
......@@ -32,15 +31,15 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderInspection;
* @version $Id: ElevatorService.java, v 0.1 2021年9月30日 下午3:28:55 gwb Exp $
*/
@Component
public class CylinderInspectionService extends BaseService<CylinderInspectionModel,CylinderInspection,CylinderInspectionMapper> {
public class TmCylinderInspectionService extends BaseService<TmCylinderInspectionModel, TmCylinderInspection, TmCylinderInspectionMapper> {
@Autowired
private RedisTemplate redisTemplate;
@Transactional(rollbackFor= {Exception.class})
public String createCylinderInspection(List<CylinderInspectionModel> model) {
public String createCylinderInspection(List<TmCylinderInspectionModel> model) {
if (ValidationUtil.isEmpty(model))
throw new BadRequest("气瓶检验信息为空.");
for (CylinderInspectionModel cylinderInspectionModel : model) {
for (TmCylinderInspectionModel cylinderInspectionModel : model) {
cylinderInspectionModel.setRecDate(new Date());
cylinderInspectionModel.setAppId(getAppId());
this.createWithModel(cylinderInspectionModel);
......
......@@ -16,10 +16,9 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import com.yeejoin.amos.api.openapi.constant.Constant;
import com.yeejoin.amos.api.openapi.face.model.BizTokenModel;
import com.yeejoin.amos.api.openapi.face.model.CylinderFillingModelList;
import com.yeejoin.amos.api.openapi.face.model.CylinderTagsModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.CylinderTagsMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderTags;
import com.yeejoin.amos.api.openapi.face.model.TmCylinderTagsModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.TmCylinderTagsMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderTags;
/**
......@@ -32,16 +31,16 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderTags;
* @version $Id: ElevatorService.java, v 0.1 2021年9月30日 下午3:28:55 gwb Exp $
*/
@Component
public class CylinderTagsService extends BaseService<CylinderTagsModel,CylinderTags,CylinderTagsMapper> {
public class TmCylinderTagsService extends BaseService<TmCylinderTagsModel, TmCylinderTags, TmCylinderTagsMapper> {
@Autowired
private RedisTemplate redisTemplate;
@Transactional(rollbackFor= {Exception.class})
public String createCylinderTag(List<CylinderTagsModel> model) {
public String createCylinderTag(List<TmCylinderTagsModel> model) {
// TODO Auto-generated method stub
if (ValidationUtil.isEmpty(model))
throw new BadRequest("气瓶标签信息为空.");
for (CylinderTagsModel cylinderTagsModel : model) {
for (TmCylinderTagsModel cylinderTagsModel : model) {
cylinderTagsModel.setRecDate(new Date());
cylinderTagsModel.setAppId(getAppId());
this.createWithModel(cylinderTagsModel);
......
......@@ -10,15 +10,18 @@ import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.typroject.tyboot.component.cache.Redis;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import com.yeejoin.amos.api.openapi.constant.Constant;
import com.yeejoin.amos.api.openapi.face.model.BizTokenModel;
import com.yeejoin.amos.api.openapi.face.model.CylinderUnitModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.CylinderUnitMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderUnit;
import com.yeejoin.amos.api.openapi.face.model.TmCylinderUnitModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.TmCylinderUnitMapper;
//import com.yeejoin.amos.boot.module.cylinder.flc.api.entity.CylinderUnit;
import com.yeejoin.amos.api.openapi.face.orm.entity.TmCylinderUnit;
import com.yeejoin.amos.boot.module.cylinder.flc.api.dto.CylinderUnitDto;
/**
......@@ -31,21 +34,27 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderUnit;
* @version $Id: ElevatorService.java, v 0.1 2021年9月30日 下午3:28:55 gwb Exp $
*/
@Component
public class CylinderUnitService extends BaseService<CylinderUnitModel,CylinderUnit,CylinderUnitMapper> {
public class TmCylinderUnitService extends BaseService<TmCylinderUnitModel, TmCylinderUnit, TmCylinderUnitMapper> {
@Autowired
private RedisTemplate redisTemplate;
@Autowired
private SyncCylinderDataService syncCylinderDataService;
@Transactional(rollbackFor= {Exception.class})
public String createCylinderUnit(List<CylinderUnitModel> model) {
public String createCylinderUnit(List<TmCylinderUnitModel> model) {
if (ValidationUtil.isEmpty(model))
throw new BadRequest("气瓶企业信息数据为空.");
for (CylinderUnitModel cylinderUnitModel : model) {
for (TmCylinderUnitModel cylinderUnitModel : model) {
cylinderUnitModel.setRecDate(new Date());
cylinderUnitModel.setAppId(getAppId());
this.createWithModel(cylinderUnitModel);
}
return "OK";
}
private void syncCylinderUnitModel(List<TmCylinderUnitModel> model ) {
List<CylinderUnitDto> cylinderUnitDto = Bean.toModels(model,CylinderUnitDto.class);
syncCylinderDataService.syncCylinderUnit(cylinderUnitDto);
}
private String getAppId() {
String tokenKey = Redis.genKey(Constant.TOKEN_PREFIX,RequestContext.getToken());
BizTokenModel bizTokenModel = (BizTokenModel) redisTemplate.opsForValue().get(tokenKey);
......
package com.yeejoin.amos.api.openapi.face.service;
import com.yeejoin.amos.api.openapi.face.model.EnterpriseInfoModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.EnterpriseInfoMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.EnterpriseInfo;
import org.springframework.stereotype.Component;
/**
* 企业数据信息 服务类
*
* @author duanwei
* @date 2022-07-19
*/
@Component
public class TzsEnterpriseInfoService extends AppBaseService<EnterpriseInfoModel, EnterpriseInfo, EnterpriseInfoMapper> {
}
package com.yeejoin.amos.api.openapi.face.service;
import com.yeejoin.amos.api.openapi.face.dto.EquipmentInfoDto;
import com.yeejoin.amos.api.openapi.face.model.UnitLicenceModel;
import com.yeejoin.amos.api.openapi.face.model.UseInfoModel;
import com.yeejoin.amos.api.openapi.face.orm.dao.UseInfoMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.UseInfo;
import com.yeejoin.amos.api.openapi.face.orm.dao.MiddEquipUseInfoMapper;
import com.yeejoin.amos.api.openapi.face.orm.entity.MiddEquipUseInfo;
import com.yeejoin.amos.api.openapi.feign.TzsAccessFeignService;
import com.yeejoin.amos.api.openapi.feign.TzsServiceFeignClient;
import com.yeejoin.amos.api.openapi.feign.TzsTcmServiceFeignClient;
......@@ -29,7 +28,7 @@ import java.util.Map;
* @date 2022-07-19
*/
@Component
public class UseInfoService extends AppBaseService<UseInfoModel, UseInfo, UseInfoMapper> {
public class UseInfoService extends AppBaseService<UseInfoModel, MiddEquipUseInfo, MiddEquipUseInfoMapper> {
private static final Logger logger = LogManager.getLogger(UseInfoService.class);
......@@ -51,13 +50,13 @@ public class UseInfoService extends AppBaseService<UseInfoModel, UseInfo, UseInf
* @return 成功返回“OK”
*/
@Transactional(rollbackFor = {Exception.class})
public String saveUseInfo(List<UseInfo> model) {
public String saveUseInfo(List<MiddEquipUseInfo> model) {
// TODO Auto-generated method stub
if (ValidationUtil.isEmpty(model)) {
throw new BadRequest("使用信息为空.");
}
for (UseInfo models : model) {
for (MiddEquipUseInfo models : model) {
// checkModel(models);
models.setRecDate(new Date());
models.setAppId(getAppId());
......
package com.yeejoin.amos.api.openapi.feign;
import com.yeejoin.amos.api.openapi.config.FeignConfiguration;
import com.yeejoin.amos.api.openapi.face.dto.JyjcInspectionResultDataModel;
import com.yeejoin.amos.boot.biz.common.feign.FeignConfiguration;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
......
package com.yeejoin.amos.api.openapi.feign;
import com.yeejoin.amos.api.openapi.config.FeignConfiguration;
import com.yeejoin.amos.boot.biz.common.feign.FeignConfiguration;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
......
package com.yeejoin.amos.api.openapi.feign;
import com.yeejoin.amos.api.openapi.config.FeignConfiguration;
import com.yeejoin.amos.api.openapi.face.dto.EquipmentCategoryDto;
import com.yeejoin.amos.api.openapi.face.dto.EquipmentInfoDto;
import com.yeejoin.amos.api.openapi.face.model.InspectionDetectionInfoModel;
import com.yeejoin.amos.api.openapi.face.model.UnitLicenceModel;
import com.yeejoin.amos.api.openapi.face.orm.entity.ConstructionInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.MaintenanceInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidConstructionInfo;
import com.yeejoin.amos.api.openapi.face.orm.entity.MidMaintenanceInfo;
import com.yeejoin.amos.boot.biz.common.feign.FeignConfiguration;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -76,7 +77,7 @@ public interface TzsServiceFeignClient {
* @return
*/
@RequestMapping(value = "/equipment-category/saveConstructionInfoData", method = RequestMethod.POST)
ResponseModel<Boolean> saveConstructionInfo(@RequestBody ConstructionInfo constructionInfo);
ResponseModel<Boolean> saveConstructionInfo(@RequestBody MidConstructionInfo constructionInfo);
/**
* 保存监管维保数据
......@@ -85,7 +86,7 @@ public interface TzsServiceFeignClient {
* @return
*/
@RequestMapping(value = "/equipment-category/saveMaintenanceRecordInfoData", method = RequestMethod.POST)
ResponseModel<Boolean> saveMaintenanceRecordInfo(@RequestBody MaintenanceInfo maintenanceInfo);
ResponseModel<Boolean> saveMaintenanceRecordInfo(@RequestBody MidMaintenanceInfo maintenanceInfo);
/**
* 删除监管设备数据
......
package com.yeejoin.amos.api.openapi.feign;
import com.yeejoin.amos.api.openapi.config.FeignConfiguration;
import com.yeejoin.amos.boot.biz.common.feign.FeignConfiguration;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
......
......@@ -22,14 +22,6 @@
<version>${amos-boot-biz.version}</version>
</dependency>
<dependency>
<groupId>net.javacrumbs.shedlock</groupId>
<artifactId>shedlock-spring</artifactId>
</dependency>
<dependency>
<groupId>net.javacrumbs.shedlock</groupId>
<artifactId>shedlock-provider-redis-spring</artifactId>
</dependency>
<dependency>
<artifactId>amos-component-rule</artifactId>
<groupId>com.yeejoin</groupId>
</dependency>
......
package com.yeejoin.amos.boot.module.cylinder.api.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* @author Administrator
*/
@AllArgsConstructor
@Getter
public enum QuestionTypeEnum {
/**
* 问题类型
*/
WBLSYDJ("1", "未办理使用登记"),
XKCQ("2", "许可超期"),
JYCQ("3", "检验超期"),
JYBHG("4", "检验不合格"),
WJXCZJJ("5", "未进行充装检查"),
CZJCBHG("6", "充装检查不合格");
private String code;
private String name;
}
......@@ -157,4 +157,9 @@ public class CylinderInfoDto extends BaseDto {
private String inspectionDateEnd;
private String inspectionDateStart;
/**
* 最新检验一条数据
*/
private String lastInspectionId;
}
......@@ -123,4 +123,7 @@ public class CylinderInfo extends BaseEntity {
@ApiModelProperty(value = "是否保存到es(1标识已经保存过)")
private String isNotEs;
@ApiModelProperty(value = "最新检验一条数据")
private String lastInspectionId;
}
package com.yeejoin.amos.boot.module.cylinder.flc.api.mapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.cylinder.flc.api.dto.CylinderInfoDto;
......@@ -107,4 +108,5 @@ public interface CylinderInfoMapper extends BaseMapper<CylinderInfo> {
Map<String, Object> countFillingTimesAndQuantityByCompany(@Param("companyId") String companyId, @Param("startTime") String startTime, @Param("endTime") String endTime);
List<CylinderInfoDto> queryCylinderOfInspectionOverdue();
}
......@@ -13,5 +13,5 @@ import java.util.List;
*/
public interface ICylinderUnitVideoService {
List<CommonVideoDto> getUnitVideoUrl(Long unitSeq);
List<CommonVideoDto> getUnitVideoUrl(String unitSeq);
}
......@@ -438,6 +438,23 @@
</if>
</select>
<select id="queryCylinderOfInspectionOverdue" resultType="com.yeejoin.amos.boot.module.cylinder.flc.api.dto.CylinderInfoDto">
SELECT
a.app_id,
u.unit_name,
u.region_code,
a.factory_num,
a.sequence_code
FROM
tz_cylinder_info a,
tz_cylinder_inspection b,
tz_cylinder_unit u
where
a.sequence_code = b.sequence_code
and u.credit_code = a.credit_code
and a.last_inspection_id = b.sequence_nbr
and date_gt(CURRENT_DATE, cast(b.next_inspection_date as date))
</select>
<update id="updateEsCylinderInfoStatus">
UPDATE tz_cylinder_info SET "is_not_es" = 1 WHERE "sequence_nbr" IN
......
......@@ -30,6 +30,14 @@
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
</dependency>
<dependency>
<groupId>net.javacrumbs.shedlock</groupId>
<artifactId>shedlock-spring</artifactId>
</dependency>
<dependency>
<groupId>net.javacrumbs.shedlock</groupId>
<artifactId>shedlock-provider-redis-spring</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
......
......@@ -96,12 +96,13 @@ public class CylinderQuestionInfoController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "问题信息列表分页查询", notes = "问题信息列表分页查询")
public ResponseModel<Page<CylinderQuestionInfoDto>> queryForPage(@ApiParam(value = "页数") @RequestParam(value = "current") int current,
@ApiParam(value = "每页大小") @RequestParam(value = "size") int size,
@ApiParam(value = "appId") @RequestParam(value = "appId",required = false) String appId,
@ApiParam(value = "问题类型枚举") @RequestParam(value = "questionType",required = false) String questionType,
@ApiParam(value = "行政区域code") @RequestParam(value = "regionCode",required = false) String regionCode) {
Page<CylinderQuestionInfoDto> page = new Page<CylinderQuestionInfoDto>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(cylinderQuestionInfoServiceImpl.queryForCylinderQuestionInfoPage(page,questionType, regionCode));
return ResponseHelper.buildResponse(cylinderQuestionInfoServiceImpl.queryForCylinderQuestionInfoPage(page,questionType, regionCode, appId));
}
}
package com.yeejoin.amos.boot.module.cylinder.biz.job;
import com.yeejoin.amos.boot.module.cylinder.api.entity.CylinderQuestionInfo;
import com.yeejoin.amos.boot.module.cylinder.api.enums.QuestionTypeEnum;
import com.yeejoin.amos.boot.module.cylinder.biz.service.impl.CylinderQuestionInfoServiceImpl;
import com.yeejoin.amos.boot.module.cylinder.flc.api.dto.CylinderInfoDto;
import com.yeejoin.amos.boot.module.cylinder.flc.api.mapper.CylinderInfoMapper;
import net.javacrumbs.shedlock.spring.annotation.SchedulerLock;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
/**
* @author Administrator
*/
@Component
@EnableScheduling
public class InspectionOverdueJob {
private CylinderInfoMapper cylinderInfoMapper;
private CylinderQuestionInfoServiceImpl questionInfoService;
public InspectionOverdueJob(CylinderInfoMapper cylinderInfoMapper,
CylinderQuestionInfoServiceImpl questionInfoService) {
this.cylinderInfoMapper = cylinderInfoMapper;
this.questionInfoService = questionInfoService;
}
@SchedulerLock(name = "overdueQuestionJobCylinder", lockAtMostFor = "PT1H")
@Scheduled(cron = "${inspection.overdue.job.cron:0 0 2 * * ?}")
public void genOverdueQuestion() {
List<CylinderInfoDto> cylinderInfo = cylinderInfoMapper.queryCylinderOfInspectionOverdue();
List<CylinderQuestionInfo> cylinderQuestionInfos = cylinderInfo.stream().map(cylinderInfoDto -> {
CylinderQuestionInfo cylinderQuestionInfo = new CylinderQuestionInfo();
cylinderQuestionInfo.setQuestionType(QuestionTypeEnum.JYCQ.getCode());
cylinderQuestionInfo.setQuestionTypeName(QuestionTypeEnum.JYCQ.getName());
cylinderQuestionInfo.setHappenDate(new Date());
cylinderQuestionInfo.setRecDate(new Date());
cylinderQuestionInfo.setRegionCode(cylinderInfoDto.getRegionCode());
cylinderQuestionInfo.setQuestionObjectId(cylinderInfoDto.getSequenceCode());
cylinderQuestionInfo.setQuestionObjectName(cylinderInfoDto.getFactoryNum());
cylinderQuestionInfo.setQuestionAttributionId(cylinderInfoDto.getAppId());
cylinderQuestionInfo.setQuestionAttributionName(cylinderInfoDto.getUnitName());
return cylinderQuestionInfo;
}).collect(Collectors.toList());
if (cylinderQuestionInfos.size() > 0) {
questionInfoService.saveBatch(cylinderQuestionInfos);
}
}
}
......@@ -21,8 +21,8 @@ public class CylinderQuestionInfoServiceImpl extends BaseService<CylinderQuestio
/**
* 分页查询
*/
public Page<CylinderQuestionInfoDto> queryForCylinderQuestionInfoPage(Page<CylinderQuestionInfoDto> page, String questionType, @Condition(value = Operator.like) String regionCode) {
return this.queryForPage(page, "happen_date", true, questionType, regionCode);
public Page<CylinderQuestionInfoDto> queryForCylinderQuestionInfoPage(Page<CylinderQuestionInfoDto> page, String questionType, @Condition(value = Operator.like) String regionCode, String questionAttributionId) {
return this.queryForPage(page, "happen_date", true, questionType, regionCode, questionAttributionId);
}
}
\ No newline at end of file
......@@ -126,7 +126,7 @@ public class CylinderUnitController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getUnitVideoUrl")
@ApiOperation(httpMethod = "GET", value = "根据气瓶企业seq查询视频链接", notes = "根据气瓶企业seq查询视频链接")
public ResponseModel<List<CommonVideoDto>> getUnitVideoUrl(@RequestParam Long unitSeq) {
public ResponseModel<List<CommonVideoDto>> getUnitVideoUrl(@RequestParam String unitSeq) {
return ResponseHelper.buildResponse(icylinderUnitVideoService.getUnitVideoUrl(unitSeq));
}
}
......@@ -42,7 +42,7 @@ public class CylinderUnitVideoServiceImpl extends BaseService<CylinderUnitVideoD
private static final String CODE_404 = "404";
private static final String CODE_20001 = "20001";
@Override
public List<CommonVideoDto> getUnitVideoUrl(Long unitSeq) {
public List<CommonVideoDto> getUnitVideoUrl(String unitSeq) {
List<CommonVideoDto> result = new ArrayList<CommonVideoDto>();
LambdaQueryWrapper<CylinderUnitVideo> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(CylinderUnitVideo::getUnitSeq,unitSeq);
......@@ -68,12 +68,13 @@ public class CylinderUnitVideoServiceImpl extends BaseService<CylinderUnitVideoD
String accessToken = objTokenJson.get("accessToken").toString();
System.out.println(accessToken);
String channelNos = cylinderUnitVideo.getChannelNo();
List<String> channelNoList = Arrays.asList(channelNos.split(","));
for (String channelNo : channelNoList) {
List<CommonVideoDto> channelNoList = JSONObject.parseArray(channelNos, CommonVideoDto.class);
// List<String> channelNoList = Arrays.asList(channelNos.split(","));
for (CommonVideoDto channelNo : channelNoList) {
HashMap<String, Object> requestVideosInfo = new HashMap<>();
requestVideosInfo.put("accessToken",accessToken);
requestVideosInfo.put("deviceSerial",cylinderUnitVideo.getDeviceSerial());
requestVideosInfo.put("channelNo",channelNo);
requestVideosInfo.put("channelNo",channelNo.getKey());
requestVideosInfo.put("protocol",cylinderUnitVideo.getProtocol());
requestVideosInfo.put("expireTime",cylinderUnitVideo.getExpireTime());
String videoData = HttpUtil.post(cylinderUnitVideo.getUrl(),requestVideosInfo);
......@@ -90,9 +91,10 @@ public class CylinderUnitVideoServiceImpl extends BaseService<CylinderUnitVideoD
String url = dd.get("url").toString();
CommonVideoDto commonVideoDto = new CommonVideoDto();
commonVideoDto.setUrl(url);
commonVideoDto.setKey(channelNo);
commonVideoDto.setKey(channelNo.getKey());
commonVideoDto.setType(CommonVideoEnum.getEnum(cylinderUnitVideo.getProtocol()).getName());
commonVideoDto.setTitle(cylinderUnitVideo.getTitle());
commonVideoDto.setTitle(channelNo.getTitle());
commonVideoDto.setThumb(channelNo.getThumb());
result.add(commonVideoDto);
}
}
......
......@@ -62,7 +62,7 @@ public class InspectionExpireRemindJob {
}
@Scheduled(cron = "${inspection.expire.remind.job.cron:0 0 8 * * ?}")
@SchedulerLock(name = "sendReminderMessageJob", lockAtMostFor = "PT1H")
@SchedulerLock(name = "sendReminderMessage", lockAtMostFor = "PT1H")
public void sendReminderMessage() {
// 1.查询临期和超期的设备
List<NeedTipEquipInfo> needTipEquipList = getNeedTipEquipList();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment