Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
c08f08ac
提交
c08f08ac
authored
3月 13, 2021
作者:
133
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[报废 维修] 单据数据代码提交
上级
5da40544
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
49 行增加
和
24 行删除
+49
-24
DeviceScrapController.java
...kj/dev/device/scrap/controller/DeviceScrapController.java
+2
-0
ScrapBillServiceImpl.java
...j/dev/device/scrap/service/impl/ScrapBillServiceImpl.java
+8
-3
ScrapBill.java
...va/com/tykj/dev/device/scrap/subject/domin/ScrapBill.java
+10
-0
ScrapSaveVo.java
...ava/com/tykj/dev/device/scrap/subject/vo/ScrapSaveVo.java
+5
-0
UnionApplication.java
...on/src/main/java/com/tykj/dev/union/UnionApplication.java
+1
-16
allatori.xml
dev-union/src/main/resources/allatori.xml
+14
-0
application-dev.properties
dev-union/src/main/resources/application-dev.properties
+2
-2
application-prod.properties
dev-union/src/main/resources/application-prod.properties
+4
-1
application.properties
dev-union/src/main/resources/application.properties
+3
-2
没有找到文件。
dev-scrap/src/main/java/com/tykj/dev/device/scrap/controller/DeviceScrapController.java
浏览文件 @
c08f08ac
...
...
@@ -16,6 +16,7 @@ import com.tykj.dev.device.task.service.TaskService;
import
com.tykj.dev.device.task.subject.bto.TaskBto
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
com.tykj.dev.misc.utils.StringSplitUtil
;
import
com.tykj.dev.misc.utils.TaskDisposeUtil
;
import
io.swagger.annotations.Api
;
...
...
@@ -96,6 +97,7 @@ public class DeviceScrapController {
names
.
forEach
(
s
->
stringBuffer2
.
append
(
s
).
append
(
","
));
stringBuffer2
.
deleteCharAt
(
stringBuffer2
.
length
()
-
1
);
scrapBill
.
setNames
(
stringBuffer2
.
toString
());
scrapBill
.
setScriptJson
(
JacksonUtil
.
toJSon
(
scrapSaveVo
.
getScriptSaveVos
()));
ScrapBill
scrapBill1
=
scrapBillService
.
add
(
scrapBill
);
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
new
Date
());
...
...
dev-scrap/src/main/java/com/tykj/dev/device/scrap/service/impl/ScrapBillServiceImpl.java
浏览文件 @
c08f08ac
package
com
.
tykj
.
dev
.
device
.
scrap
.
service
.
impl
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.github.wenhao.jpa.PredicateBuilder
;
import
com.github.wenhao.jpa.Specifications
;
import
com.tykj.dev.blockcha.subject.entity.BcHash
;
import
com.tykj.dev.blockcha.subject.service.BlockChainUtil
;
import
com.tykj.dev.config.TaskBeanConfig
;
import
com.tykj.dev.device.library.subject.vo.ScriptSaveVo
;
import
com.tykj.dev.device.scrap.repository.ScrapBillDao
;
import
com.tykj.dev.device.scrap.service.ScrapBillService
;
import
com.tykj.dev.device.scrap.subject.domin.ScrapBill
;
...
...
@@ -69,9 +71,12 @@ public class ScrapBillServiceImpl implements ScrapBillService {
@Override
public
ScrapBill
getOne
(
Integer
id
)
{
Optional
<
ScrapBill
>
scrapBill
=
scrapBillDao
.
findById
(
id
);
if
(
scrapBill
.
isPresent
())
{
return
scrapBill
.
get
();
Optional
<
ScrapBill
>
scrapBillOptional
=
scrapBillDao
.
findById
(
id
);
if
(
scrapBillOptional
.
isPresent
())
{
ScrapBill
scrapBill
=
scrapBillOptional
.
get
();
scrapBill
.
setScripts
(
JacksonUtil
.
readValue
(
scrapBill
.
getScriptJson
(),
new
TypeReference
<
List
<
ScriptSaveVo
>>()
{
}));
return
scrapBill
;
}
else
{
throw
new
ApiException
(
ResultUtil
.
failed
(
"查询Id不存在"
));
}
...
...
dev-scrap/src/main/java/com/tykj/dev/device/scrap/subject/domin/ScrapBill.java
浏览文件 @
c08f08ac
package
com
.
tykj
.
dev
.
device
.
scrap
.
subject
.
domin
;
import
com.tykj.dev.device.library.subject.vo.ScriptSaveVo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
...
...
@@ -14,7 +15,9 @@ import org.springframework.data.annotation.LastModifiedDate;
import
org.springframework.data.jpa.domain.support.AuditingEntityListener
;
import
javax.persistence.*
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
/**
* @author dengdiyi
...
...
@@ -97,6 +100,13 @@ public class ScrapBill {
@ApiModelProperty
(
value
=
"删除标记(0:未删除,1:已删除)"
)
private
Integer
deleteTag
=
0
;
@Column
(
name
=
"script_json"
,
columnDefinition
=
"TEXT"
)
private
String
scriptJson
;
@Transient
private
List
<
ScriptSaveVo
>
scripts
=
new
ArrayList
<>();
@ApiModelProperty
(
value
=
"区块链记录id"
)
private
String
recordId
;
}
dev-scrap/src/main/java/com/tykj/dev/device/scrap/subject/vo/ScrapSaveVo.java
浏览文件 @
c08f08ac
package
com
.
tykj
.
dev
.
device
.
scrap
.
subject
.
vo
;
import
com.tykj.dev.device.library.subject.vo.ScriptSaveVo
;
import
com.tykj.dev.device.scrap.subject.domin.ScrapBill
;
import
com.tykj.dev.misc.base.BeanHelper
;
import
io.swagger.annotations.ApiModel
;
...
...
@@ -9,9 +10,11 @@ import lombok.Data;
import
lombok.NoArgsConstructor
;
import
org.modelmapper.ModelMapper
;
import
javax.persistence.Transient
;
import
javax.validation.constraints.Min
;
import
javax.validation.constraints.NotEmpty
;
import
javax.validation.constraints.NotNull
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -57,6 +60,8 @@ public class ScrapSaveVo {
@NotEmpty
(
message
=
"deviceIds不能为空"
)
@ApiModelProperty
(
value
=
"报废装备Id列表"
)
private
List
<
Integer
>
deviceIds
;
private
List
<
ScriptSaveVo
>
scriptSaveVos
=
new
ArrayList
<>();
public
ScrapBill
toDo
()
{
ModelMapper
modelMapper
=
BeanHelper
.
getUserMapper
();
...
...
dev-union/src/main/java/com/tykj/dev/union/UnionApplication.java
浏览文件 @
c08f08ac
...
...
@@ -17,6 +17,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@EnableJpaAuditing
@EnableTransactionManagement
@EnableScheduling
public
class
UnionApplication
extends
SpringBootServletInitializer
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
UnionApplication
.
class
,
args
);
...
...
@@ -26,20 +27,4 @@ public class UnionApplication extends SpringBootServletInitializer {
protected
SpringApplicationBuilder
configure
(
SpringApplicationBuilder
applicationBuilder
)
{
return
applicationBuilder
.
sources
(
UnionApplication
.
class
);
}
// @Bean
// public CommandLineRunner commandLineRunner(ApplicationContext ctx) {
// return args -> {
//
// System.out.println("Let's inspect the beans provided by Spring Boot:");
//
// String[] beanNames = ctx.getBeanDefinitionNames();
// Arrays.sort(beanNames);
// for (String beanName : beanNames) {
// System.out.println(beanName);
// }
//
// };
// }
}
dev-union/src/main/resources/allatori.xml
0 → 100644
浏览文件 @
c08f08ac
<config>
<input>
<jar
in=
"confusion-0.0.1-SNAPSHOT.jar"
out=
"confusion-0.0.1-SNAPSHOT-obfuscated.jar"
/>
</input>
<keep-names>
<class
access=
"protected+"
>
<field
access=
"protected+"
/>
<method
access=
"protected+"
/>
</class>
</keep-names>
<property
name=
"log-file"
value=
"log.xml"
/>
</config>
dev-union/src/main/resources/application-dev.properties
浏览文件 @
c08f08ac
...
...
@@ -3,4 +3,4 @@ spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.username
=
root
spring.datasource.password
=
root
spring.jpa.hibernate.ddl-auto
=
update
file.path
=
C:/Users/dengdiyi/Documents/file/
\ No newline at end of file
#
file.path
=
C:/Users/dengdiyi/Documents/file/
\ No newline at end of file
dev-union/src/main/resources/application-prod.properties
浏览文件 @
c08f08ac
spring.datasource.driver-class-name
=
com.oscar.Driver
spring.datasource.url
=
jdbc:oscar://192.168.0.80:
2003
/OSRDB
spring.datasource.url
=
jdbc:oscar://192.168.0.80:
8088
/OSRDB
spring.datasource.username
=
SYSDBA
spring.datasource.password
=
szoscar55
spring.jpa.database-platform
=
org.hibernate.dialect.OscarDialect
file.path
=
/opt/zb/
preview.path
=
http://192.168.0.80:8088/equip/file/
\ No newline at end of file
dev-union/src/main/resources/application.properties
浏览文件 @
c08f08ac
...
...
@@ -11,7 +11,7 @@ spring.main.allow-bean-definition-overriding=true
server.servlet.session.timeout
=
PT1H
spring.jackson.date-format
=
yyyy-MM-dd HH:mm:ss
spring.jackson.time-zone
=
GMT+8
file.path
=
/Users/zjm/code/
preview.path
=
http://192.168.102.
26
:8087/file/
file.path
=
/Users/zjm/code/
test-tu/
preview.path
=
http://192.168.102.
169
:8087/file/
useBlockcha
=
true
spring.jpa.hibernate.use-new-id-generator-mappings
=
false
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论