Commit bbe3f593 by 赵剑炜

Merge branch 'develop' of http://gitlab.sothing.top/843502640/jyzb_platformV2 into develop-zhaojw

parents 7ae43aef dd85f1bb
2023-05-29 10:13:15.461 ERROR 17468 --- [main] o.s.boot.SpringApplication : Application run failed
com.junmp.v2.config.api.exception.ConfigException: 获取不到application.yml中的数据库配置,无法从数据库加载系统配置表
at com.junmp.v2.config.listener.ConfigInitListener.eventCallback(ConfigInitListener.java:73)
at com.junmp.v2.common.listener.ContextInitializedListener.onApplicationEvent(ContextInitializedListener.java:30)
at com.junmp.v2.common.listener.ContextInitializedListener.onApplicationEvent(ContextInitializedListener.java:20)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:131)
at org.springframework.boot.context.event.EventPublishingRunListener.contextPrepared(EventPublishingRunListener.java:89)
at org.springframework.boot.SpringApplicationRunListeners.lambda$contextPrepared$3(SpringApplicationRunListeners.java:67)
at java.util.ArrayList.forEach(ArrayList.java:1259)
at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:117)
at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:111)
at org.springframework.boot.SpringApplicationRunListeners.contextPrepared(SpringApplicationRunListeners.java:67)
at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:391)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:325)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1313)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1302)
at com.junmp.jyzb.boot.JyzbBootApplication.main(JyzbBootApplication.java:33)
2023-05-29 10:13:34.808 ERROR 21460 --- [main] o.s.boot.SpringApplication : Application run failed
com.junmp.v2.config.api.exception.ConfigException: 获取不到application.yml中的数据库配置,无法从数据库加载系统配置表
at com.junmp.v2.config.listener.ConfigInitListener.eventCallback(ConfigInitListener.java:73)
at com.junmp.v2.common.listener.ContextInitializedListener.onApplicationEvent(ContextInitializedListener.java:30)
at com.junmp.v2.common.listener.ContextInitializedListener.onApplicationEvent(ContextInitializedListener.java:20)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:131)
at org.springframework.boot.context.event.EventPublishingRunListener.contextPrepared(EventPublishingRunListener.java:89)
at org.springframework.boot.SpringApplicationRunListeners.lambda$contextPrepared$3(SpringApplicationRunListeners.java:67)
at java.util.ArrayList.forEach(ArrayList.java:1259)
at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:117)
at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:111)
at org.springframework.boot.SpringApplicationRunListeners.contextPrepared(SpringApplicationRunListeners.java:67)
at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:391)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:325)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1313)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1302)
at com.junmp.jyzb.boot.JyzbBootApplication.main(JyzbBootApplication.java:33)
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
2023-05-29 10:13:15.062 INFO 17468 --- [main] c.j.v.c.listener.ConfigInitListener : 当前数据库驱动类>>>null
2023-05-29 10:13:15.069 WARN 17468 --- [main] o.s.b.c.config.ConfigDataEnvironment : Property 'spring.profiles' imported from location 'class path resource [application.yml]' is invalid and should be replaced with 'spring.config.activate.on-profile' [origin: class path resource [application.yml] - 10:12]
2023-05-29 10:13:15.461 ERROR 17468 --- [main] o.s.boot.SpringApplication : Application run failed
com.junmp.v2.config.api.exception.ConfigException: 获取不到application.yml中的数据库配置,无法从数据库加载系统配置表
at com.junmp.v2.config.listener.ConfigInitListener.eventCallback(ConfigInitListener.java:73)
at com.junmp.v2.common.listener.ContextInitializedListener.onApplicationEvent(ContextInitializedListener.java:30)
at com.junmp.v2.common.listener.ContextInitializedListener.onApplicationEvent(ContextInitializedListener.java:20)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:131)
at org.springframework.boot.context.event.EventPublishingRunListener.contextPrepared(EventPublishingRunListener.java:89)
at org.springframework.boot.SpringApplicationRunListeners.lambda$contextPrepared$3(SpringApplicationRunListeners.java:67)
at java.util.ArrayList.forEach(ArrayList.java:1259)
at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:117)
at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:111)
at org.springframework.boot.SpringApplicationRunListeners.contextPrepared(SpringApplicationRunListeners.java:67)
at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:391)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:325)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1313)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1302)
at com.junmp.jyzb.boot.JyzbBootApplication.main(JyzbBootApplication.java:33)
2023-05-29 10:13:34.432 INFO 21460 --- [main] c.j.v.c.listener.ConfigInitListener : 当前数据库驱动类>>>null
2023-05-29 10:13:34.808 ERROR 21460 --- [main] o.s.boot.SpringApplication : Application run failed
com.junmp.v2.config.api.exception.ConfigException: 获取不到application.yml中的数据库配置,无法从数据库加载系统配置表
at com.junmp.v2.config.listener.ConfigInitListener.eventCallback(ConfigInitListener.java:73)
at com.junmp.v2.common.listener.ContextInitializedListener.onApplicationEvent(ContextInitializedListener.java:30)
at com.junmp.v2.common.listener.ContextInitializedListener.onApplicationEvent(ContextInitializedListener.java:20)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:131)
at org.springframework.boot.context.event.EventPublishingRunListener.contextPrepared(EventPublishingRunListener.java:89)
at org.springframework.boot.SpringApplicationRunListeners.lambda$contextPrepared$3(SpringApplicationRunListeners.java:67)
at java.util.ArrayList.forEach(ArrayList.java:1259)
at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:117)
at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:111)
at org.springframework.boot.SpringApplicationRunListeners.contextPrepared(SpringApplicationRunListeners.java:67)
at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:391)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:325)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1313)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1302)
at com.junmp.jyzb.boot.JyzbBootApplication.main(JyzbBootApplication.java:33)
......@@ -75,6 +75,7 @@ public class EquipmentSizeDto {
private Integer state;
private String photo;
private String typePhoto;
private String instructions;
......
package com.junmp.jyzb.api.bean.dto;
import com.junmp.jyzb.api.bean.dto.FetchingDataDto.SizeDto;
import com.junmp.jyzb.api.bean.dto.FetchingDataDto.TypeDto;
import lombok.Data;
import java.util.List;
@Data
public class SizeAndTypeDto {
private List<SizeDto> sizeList;
private List<TypeDto> typeList;
}
......@@ -67,7 +67,7 @@ public class UpdatePolicemanReq extends BaseRequest {
/**
* 0警员,1辅警
*/
@NotBlank(message = "警员类型不能为空",groups = {add.class,edit.class})
@NotNull(message = "警员类型不能为空",groups = {add.class,edit.class})
private Integer identity;
/**
......
......@@ -29,7 +29,7 @@ import java.util.List;
@Api(tags = "增删改查(文档)")
@RestController
@Slf4j
@RequestMapping("crud")
@RequestMapping("/crud")
public class CrudController {
@Autowired
private BlogRepository blogRepository;
......@@ -54,7 +54,7 @@ public class CrudController {
}
@ApiOperation("一键初始化ES")
@PostMapping("UpdateES")
@PostMapping("/UpdateES")
public Object UpdateES() {
pubOrgService.AddToEs();
......
......@@ -127,6 +127,8 @@ public class EquipmentType implements Serializable {
@ApiModelProperty(value = "单价")
private BigDecimal price;
private String photo;
......
......@@ -218,7 +218,7 @@ public class InventorySummary implements Serializable {
private Integer property;
@TableField(exist = false)
private String picture;
private String sizePhoto;
private static final long serialVersionUID = 1L;
......
......@@ -10,7 +10,9 @@ import com.junmp.jyzb.Repository.TypeRepository;
import com.junmp.jyzb.api.bean.dto.ESTypeDto;
import com.junmp.jyzb.api.bean.dto.EquipmentTypeDto;
import com.junmp.jyzb.api.bean.dto.EquipmentTreeDto;
import com.junmp.jyzb.api.bean.dto.FetchingDataDto.SizeDto;
import com.junmp.jyzb.api.bean.dto.FetchingDataDto.TypeDto;
import com.junmp.jyzb.api.bean.dto.SizeAndTypeDto;
import com.junmp.jyzb.api.bean.query.QueryEquipmentTypeReq;
import com.junmp.jyzb.api.bean.req.UpdateEquipmentTypeReq;
import com.junmp.jyzb.api.exception.JYZBAppException;
......@@ -506,30 +508,69 @@ public class EquipmentTypeServiceImpl extends ServiceImpl<EquipmentTypeMapper, E
@Override
public String exportSizeAndType(QueryEquipmentTypeReq req) {
List<EquipmentType> typeList = list(new LambdaQueryWrapper<EquipmentType>().ge(EquipmentType::getUpdateTime, req.getUpdateTime()));
SizeAndType sizeAndType = new SizeAndType();
sizeAndType.setTypeList(CollectionUtil.isNotEmpty(typeList)?typeList:new ArrayList<>());
SizeAndTypeDto sizeAndType = new SizeAndTypeDto();
List<TypeDto> collect = typeList.stream().map(type -> {
TypeDto typeDto = new TypeDto();
BeanPlusUtil.copyProperties(type, typeDto);
return typeDto;
}).collect(Collectors.toList());
sizeAndType.setTypeList(CollectionUtil.isNotEmpty(collect)?collect:new ArrayList<>());
List<EquipmentSize> sizeList = equipmentSizeService.list(new LambdaQueryWrapper<EquipmentSize>().ge(EquipmentSize::getUpdateTime, req.getUpdateTime()));
sizeAndType.setSizeList(CollectionUtil.isNotEmpty(sizeList)?sizeList:new ArrayList<>());
List<SizeDto> collect1 = sizeList.stream().map(size -> {
SizeDto sizeDto = new SizeDto();
BeanPlusUtil.copyProperties(size, sizeDto);
return sizeDto;
}).collect(Collectors.toList());
sizeAndType.setSizeList(CollectionUtil.isNotEmpty(collect1)?collect1:new ArrayList<>());
String jsonString = JSONObject.toJSONString(sizeAndType);
// try {
// byte[] byKey = Arrays.copyOf("junmp888".getBytes(StandardCharsets.UTF_8), 8);
// byte[] iv = { (byte)0x12, (byte)0x34, (byte)0x56, (byte)0x78, (byte)0x90, (byte)0xAB, (byte)0xCD, (byte)0xEF };
//
// SecretKeySpec secretKeySpec = new SecretKeySpec(byKey, "DES");
// IvParameterSpec ivParameterSpec = new IvParameterSpec(iv);
//
// Cipher desCipher = Cipher.getInstance("DES/CBC/NoPadding");
// desCipher.init(Cipher.ENCRYPT_MODE, secretKeySpec, ivParameterSpec);
//
// byte[] inputByteArray = jsonString.getBytes(StandardCharsets.UTF_8);
// byte[] encryptedBytes = desCipher.doFinal(inputByteArray);
//
// return Base64.getEncoder().encodeToString(encryptedBytes);
// } catch (Exception e) {
// e.printStackTrace();
// return "";
// }
try {
// 设置密钥和初始化向量
byte[] byKey = Arrays.copyOf("junmp888".getBytes(StandardCharsets.UTF_8), 8);
byte[] iv = { (byte)0x12, (byte)0x34, (byte)0x56, (byte)0x78, (byte)0x90, (byte)0xAB, (byte)0xCD, (byte)0xEF };
byte[] iv = { (byte) 0x12, (byte) 0x34, (byte) 0x56, (byte) 0x78, (byte) 0x90, (byte) 0xAB, (byte) 0xCD, (byte) 0xEF };
SecretKeySpec secretKeySpec = new SecretKeySpec(byKey, "DES");
IvParameterSpec ivParameterSpec = new IvParameterSpec(iv);
// 创建加密器并进行初始化
Cipher desCipher = Cipher.getInstance("DES/CBC/NoPadding");
desCipher.init(Cipher.ENCRYPT_MODE, secretKeySpec, ivParameterSpec);
// 对输入数据进行填充
byte[] inputByteArray = jsonString.getBytes(StandardCharsets.UTF_8);
byte[] encryptedBytes = desCipher.doFinal(inputByteArray);
int paddingLength = 8 - (inputByteArray.length % 8);
byte[] paddedByteArray = new byte[inputByteArray.length + paddingLength];
System.arraycopy(inputByteArray, 0, paddedByteArray, 0, inputByteArray.length);
// 执行加密操作
byte[] encryptedBytes = desCipher.doFinal(paddedByteArray);
// 对加密结果进行Base64编码并返回
return Base64.getEncoder().encodeToString(encryptedBytes);
} catch (Exception e) {
e.printStackTrace();
return "";
}
}
}
......
......@@ -121,7 +121,7 @@ public class InventorySummaryServiceImpl extends ServiceImpl<InventorySummaryMa
for (InventorySummary is:records) {
for (EquipmentSize size:equipmentSizeList) {
if (is.getSizeId().equals(size.getId())&& is.getTypeId().equals(size.getTypeId())){
is.setPicture(size.getPhoto());
is.setSizePhoto(size.getPhoto());
break;
}
}
......
......@@ -12,6 +12,8 @@
t2.name AS eqName,
t1.name AS name,
t1.type_id AS typeId,
t1.photo as photo,
t2.photo as typePhoto,
t2.price AS price,
t1.code AS code,
t3.name AS type3Name,
......@@ -48,6 +50,8 @@
eqName,
name,
typeId,
photo,
typePhoto,
price,
code,
type3Name,
......
scanner:
open: false
easy-es:
enable: true
address: 192.168.3.121:9200
username:
password:
# 配置第三方请求
junmp:
swagger:
base-package: com.junmp
id:
worker-id: 1
data-center-id: 1
epoch: 1656036996843
max: 9999
log:
type: db
bz:
config-storage:
type: es
ds: true #是否多数据源
knife4j:
enable: true
setting:
enableDebug: false
basic:
enable: true
username: ning
password: ning
# basic:
# enable: true
# username: ning
# password: ning
spring:
datasource:
driver-class-name: org.postgresql.Driver
url: jdbc:postgresql://localhost:5432/chirpstack_as
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.3.128:3306/db_jyzb?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&nullCatalogMeansCurrent=true
username: junmp
password: junmp.com.cn
password: 123456
redis:
#host: 192.168.3.188
host: 192.168.3.121
port: 6379
database: 1
password:
flowable:
dmn:
enabled: false
cmmn:
enabled: false
idm:
enabled: false
async-history-executor-activate: false
async-executor-activate: false
check-process-definitions: false
content:
enabled: false
app:
enabled: false
eventregistry:
enabled: false
#mybatis plus 设置
mybatis-plus:
configuration:
cache-enabled: true
lazy-loading-enabled: true
multiple-result-sets-enabled: true
map-underscore-to-camel-case: true #开启驼峰命名
global-config:
banner: false
enable-sql-runner: true
db-config:
id-type: assign_id
table-underline: true
# mapper-locations: classpath*:com/junmp/junmpProcess/mapper/**/xml/*Mapper.xml
mapper-locations: classpath*:/mapper/**/*Mapper.xml
flowable:
dmn:
enabled: false
cmmn:
enabled: false
idm:
enabled: false
async-history-executor-activate: false
async-executor-activate: false
check-process-definitions: false
content:
enabled: false
app:
enabled: false
eventregistry:
enabled: false
com:
mqtt:
url: tcp://broker.emqx.io:1883 #这里要写 tcp:// 不能是 mqtt,不然不是合法的 schema,源码中有
clientId: mqtt_test_spring
topics: iot/#,home/#
username: admin
password: public
timeout: 10
keepalive: 20
\ No newline at end of file
......@@ -32,7 +32,7 @@ spring:
virtual-host: /
profiles:
#@spring.active@
active: local
active: prod
servlet:
multipart:
max-request-size: 500MB
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论