Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
谢明辉
/
vion-label
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 4c06d2da
authored
Aug 23, 2021
by
xmh
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
reid标注初步完成,接下来需要集成到完整的标注平台中
1 parent
eb8f558a
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
226 additions
and
26 deletions
label-platform/src/main/java/com/viontech/label/platform/controller/base/PicBaseController.java
label-platform/src/main/java/com/viontech/label/platform/mapping/PicMapper.xml
label-platform/src/main/java/com/viontech/label/platform/model/Pic.java
label-platform/src/main/java/com/viontech/label/platform/model/PicExample.java
label-platform/src/main/java/com/viontech/label/platform/service/main/ReidService.java
label-platform/src/main/java/com/viontech/label/platform/vobase/PicVoBase.java
label-platform/src/main/java/com/viontech/label/platform/controller/base/PicBaseController.java
View file @
4c06d2d
...
...
@@ -142,6 +142,31 @@ public abstract class PicBaseController extends BaseController<Pic, PicVo> {
if
(
picVo
.
getStatus_lte
()
!=
null
)
{
criteria
.
andStatusLessThanOrEqualTo
(
picVo
.
getStatus_lte
());
}
if
(
picVo
.
getReidFinishUser
()
!=
null
)
{
criteria
.
andReidFinishUserEqualTo
(
picVo
.
getReidFinishUser
());
}
if
(
picVo
.
getReidFinishUser_null
()
!=
null
)
{
if
(
picVo
.
getReidFinishUser_null
().
booleanValue
())
{
criteria
.
andReidFinishUserIsNull
();
}
else
{
criteria
.
andReidFinishUserIsNotNull
();
}
}
if
(
picVo
.
getReidFinishUser_arr
()
!=
null
)
{
criteria
.
andReidFinishUserIn
(
picVo
.
getReidFinishUser_arr
());
}
if
(
picVo
.
getReidFinishUser_gt
()
!=
null
)
{
criteria
.
andReidFinishUserGreaterThan
(
picVo
.
getReidFinishUser_gt
());
}
if
(
picVo
.
getReidFinishUser_lt
()
!=
null
)
{
criteria
.
andReidFinishUserLessThan
(
picVo
.
getReidFinishUser_lt
());
}
if
(
picVo
.
getReidFinishUser_gte
()
!=
null
)
{
criteria
.
andReidFinishUserGreaterThanOrEqualTo
(
picVo
.
getReidFinishUser_gte
());
}
if
(
picVo
.
getReidFinishUser_lte
()
!=
null
)
{
criteria
.
andReidFinishUserLessThanOrEqualTo
(
picVo
.
getReidFinishUser_lte
());
}
return
picExample
;
}
...
...
label-platform/src/main/java/com/viontech/label/platform/mapping/PicMapper.xml
View file @
4c06d2d
...
...
@@ -10,6 +10,7 @@
<result
column=
"pic_pack_id"
property=
"packId"
/>
<result
column=
"pic_person_unid"
property=
"personUnid"
/>
<result
column=
"pic_status"
property=
"status"
/>
<result
column=
"pic_reid_finish_user"
property=
"reidFinishUser"
/>
</resultMap>
<resultMap
id=
"BaseResultMap"
type=
"com.viontech.label.platform.model.Pic"
extends=
"BaseResultMapRoot"
>
<result
column=
"storage_id"
property=
"storage.id"
/>
...
...
@@ -101,7 +102,7 @@
<sql
id=
"Base_Column_List_Root"
>
"pic".id as pic_id, "pic".unid as pic_unid, "pic".create_time as pic_create_time,
"pic"."name" as "pic_name", "pic".storage_id as pic_storage_id, "pic".pack_id as pic_pack_id,
"pic".person_unid as pic_person_unid, "pic"."status" as "pic_status"
"pic".person_unid as pic_person_unid, "pic"."status" as "pic_status"
, "pic".reid_finish_user as pic_reid_finish_user
</sql>
<sql
id=
"Base_Column_List"
>
<if
test=
"!(_parameter.getClass().getSimpleName() == 'PicExample')"
>
...
...
@@ -175,10 +176,10 @@
<insert
id=
"insert"
parameterType=
"com.viontech.label.platform.model.Pic"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"id"
>
insert into "d_pic" (unid, create_time, "name",
storage_id, pack_id, person_unid,
"status")
"status"
, reid_finish_user
)
values (#{unid,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{name,jdbcType=VARCHAR},
#{storageId,jdbcType=BIGINT}, #{packId,jdbcType=BIGINT}, #{personUnid,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER})
#{status,jdbcType=INTEGER}
, #{reidFinishUser,jdbcType=BIGINT}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.viontech.label.platform.model.Pic"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"id"
>
insert into "d_pic"
...
...
@@ -204,6 +205,9 @@
<if
test=
"status != null"
>
"status",
</if>
<if
test=
"reidFinishUser != null"
>
reid_finish_user,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"unid != null"
>
...
...
@@ -227,6 +231,9 @@
<if
test=
"status != null"
>
#{status,jdbcType=INTEGER},
</if>
<if
test=
"reidFinishUser != null"
>
#{reidFinishUser,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.viontech.label.platform.model.PicExample"
resultType=
"java.lang.Integer"
>
...
...
@@ -263,6 +270,9 @@
<if
test=
"record.status != null"
>
"status" = #{record.status,jdbcType=INTEGER},
</if>
<if
test=
"record.reidFinishUser != null"
>
reid_finish_user = #{record.reidFinishUser,jdbcType=BIGINT},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
...
...
@@ -277,7 +287,8 @@
storage_id = #{record.storageId,jdbcType=BIGINT},
pack_id = #{record.packId,jdbcType=BIGINT},
person_unid = #{record.personUnid,jdbcType=VARCHAR},
"status" = #{record.status,jdbcType=INTEGER}
"status" = #{record.status,jdbcType=INTEGER},
reid_finish_user = #{record.reidFinishUser,jdbcType=BIGINT}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
...
...
@@ -306,6 +317,9 @@
<if
test=
"status != null"
>
"status" = #{status,jdbcType=INTEGER},
</if>
<if
test=
"reidFinishUser != null"
>
reid_finish_user = #{reidFinishUser,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
...
...
@@ -317,7 +331,8 @@
storage_id = #{storageId,jdbcType=BIGINT},
pack_id = #{packId,jdbcType=BIGINT},
person_unid = #{personUnid,jdbcType=VARCHAR},
"status" = #{status,jdbcType=INTEGER}
"status" = #{status,jdbcType=INTEGER},
reid_finish_user = #{reidFinishUser,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
label-platform/src/main/java/com/viontech/label/platform/model/Pic.java
View file @
4c06d2d
...
...
@@ -2,6 +2,7 @@ package com.viontech.label.platform.model;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.viontech.label.platform.base.BaseModel
;
import
java.util.Date
;
public
class
Pic
extends
BaseModel
{
...
...
@@ -21,6 +22,8 @@ public class Pic extends BaseModel {
private
Integer
status
;
private
Long
reidFinishUser
;
@JsonIgnore
private
Storage
storage
;
...
...
@@ -91,6 +94,14 @@ public class Pic extends BaseModel {
this
.
status
=
status
;
}
public
Long
getReidFinishUser
()
{
return
reidFinishUser
;
}
public
void
setReidFinishUser
(
Long
reidFinishUser
)
{
this
.
reidFinishUser
=
reidFinishUser
;
}
public
Storage
getStorage
()
{
return
storage
;
}
...
...
label-platform/src/main/java/com/viontech/label/platform/model/PicExample.java
View file @
4c06d2d
...
...
@@ -682,6 +682,66 @@ public class PicExample extends BaseExample {
addCriterion
(
"\"pic\".\"status\" not between"
,
value1
,
value2
,
"status"
);
return
(
Criteria
)
this
;
}
public
Criteria
andReidFinishUserIsNull
()
{
addCriterion
(
"\"pic\".reid_finish_user is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andReidFinishUserIsNotNull
()
{
addCriterion
(
"\"pic\".reid_finish_user is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andReidFinishUserEqualTo
(
Long
value
)
{
addCriterion
(
"\"pic\".reid_finish_user ="
,
value
,
"reidFinishUser"
);
return
(
Criteria
)
this
;
}
public
Criteria
andReidFinishUserNotEqualTo
(
Long
value
)
{
addCriterion
(
"\"pic\".reid_finish_user <>"
,
value
,
"reidFinishUser"
);
return
(
Criteria
)
this
;
}
public
Criteria
andReidFinishUserGreaterThan
(
Long
value
)
{
addCriterion
(
"\"pic\".reid_finish_user >"
,
value
,
"reidFinishUser"
);
return
(
Criteria
)
this
;
}
public
Criteria
andReidFinishUserGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"\"pic\".reid_finish_user >="
,
value
,
"reidFinishUser"
);
return
(
Criteria
)
this
;
}
public
Criteria
andReidFinishUserLessThan
(
Long
value
)
{
addCriterion
(
"\"pic\".reid_finish_user <"
,
value
,
"reidFinishUser"
);
return
(
Criteria
)
this
;
}
public
Criteria
andReidFinishUserLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"\"pic\".reid_finish_user <="
,
value
,
"reidFinishUser"
);
return
(
Criteria
)
this
;
}
public
Criteria
andReidFinishUserIn
(
List
<
Long
>
values
)
{
addCriterion
(
"\"pic\".reid_finish_user in"
,
values
,
"reidFinishUser"
);
return
(
Criteria
)
this
;
}
public
Criteria
andReidFinishUserNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"\"pic\".reid_finish_user not in"
,
values
,
"reidFinishUser"
);
return
(
Criteria
)
this
;
}
public
Criteria
andReidFinishUserBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"\"pic\".reid_finish_user between"
,
value1
,
value2
,
"reidFinishUser"
);
return
(
Criteria
)
this
;
}
public
Criteria
andReidFinishUserNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"\"pic\".reid_finish_user not between"
,
value1
,
value2
,
"reidFinishUser"
);
return
(
Criteria
)
this
;
}
}
public
static
class
ColumnContainer
extends
ColumnContainerBase
{
...
...
@@ -729,5 +789,10 @@ public class PicExample extends BaseExample {
addColumnStr
(
"\"pic\".\"status\" as \"pic_status\" "
);
return
(
ColumnContainer
)
this
;
}
public
ColumnContainer
hasReidFinishUserColumn
()
{
addColumnStr
(
"\"pic\".reid_finish_user as pic_reid_finish_user "
);
return
(
ColumnContainer
)
this
;
}
}
}
\ No newline at end of file
label-platform/src/main/java/com/viontech/label/platform/service/main/ReidService.java
View file @
4c06d2d
...
...
@@ -296,6 +296,7 @@ public class ReidService {
Pic
pic
=
new
Pic
();
pic
.
setStatus
(
PicStatus
.
FINISH_LABELING
.
val
);
pic
.
setReidFinishUser
(
StpUtil
.
getLoginIdAsLong
());
picService
.
updateByExampleSelective
(
pic
,
picExample
);
//删除缓存
RMap
<
String
,
User
>
labelingSet
=
redissonClient
.
getMap
(
"labeling:"
+
packId
);
...
...
@@ -425,6 +426,8 @@ public class ReidService {
// 数据库更新状态
Pic
pic
=
new
Pic
();
pic
.
setStatus
(
PicStatus
.
LABELING
.
val
);
pic
.
setReidFinishUser
(
StpUtil
.
getLoginIdAsLong
());
PicExample
picExample
=
new
PicExample
();
picExample
.
createCriteria
().
andPersonUnidEqualTo
(
personUnid
);
...
...
label-platform/src/main/java/com/viontech/label/platform/vobase/PicVoBase.java
View file @
4c06d2d
...
...
@@ -5,6 +5,7 @@ import com.viontech.label.platform.base.VoInterface;
import
com.viontech.label.platform.model.Pack
;
import
com.viontech.label.platform.model.Pic
;
import
com.viontech.label.platform.model.Storage
;
import
java.util.ArrayList
;
import
java.util.Date
;
...
...
@@ -107,12 +108,30 @@ public class PicVoBase extends Pic implements VoInterface<Pic> {
@JsonIgnore
private
Integer
status_lte
;
@JsonIgnore
private
Boolean
reidFinishUser_null
;
@JsonIgnore
private
ArrayList
<
Long
>
reidFinishUser_arr
;
@JsonIgnore
private
Long
reidFinishUser_gt
;
@JsonIgnore
private
Long
reidFinishUser_lt
;
@JsonIgnore
private
Long
reidFinishUser_gte
;
@JsonIgnore
private
Long
reidFinishUser_lte
;
public
PicVoBase
()
{
this
(
null
);
}
public
PicVoBase
(
Pic
pic
)
{
if
(
pic
==
null
)
{
if
(
pic
==
null
)
{
pic
=
new
Pic
();
}
this
.
pic
=
pic
;
...
...
@@ -168,14 +187,14 @@ public class PicVoBase extends Pic implements VoInterface<Pic> {
}
public
Long
getId
()
{
if
(
getModel
()
==
null
)
{
if
(
getModel
()
==
null
)
{
throw
new
RuntimeException
(
"model is null"
);
}
return
this
.
getModel
().
getId
();
}
public
void
setId
(
Long
id
)
{
if
(
getModel
()
==
null
)
{
if
(
getModel
()
==
null
)
{
throw
new
RuntimeException
(
"model is null"
);
}
this
.
getModel
().
setId
(
id
);
...
...
@@ -198,14 +217,14 @@ public class PicVoBase extends Pic implements VoInterface<Pic> {
}
public
String
getUnid
()
{
if
(
getModel
()
==
null
)
{
if
(
getModel
()
==
null
)
{
throw
new
RuntimeException
(
"model is null"
);
}
return
this
.
getModel
().
getUnid
();
}
public
void
setUnid
(
String
unid
)
{
if
(
getModel
()
==
null
)
{
if
(
getModel
()
==
null
)
{
throw
new
RuntimeException
(
"model is null"
);
}
this
.
getModel
().
setUnid
(
unid
);
...
...
@@ -252,14 +271,14 @@ public class PicVoBase extends Pic implements VoInterface<Pic> {
}
public
Date
getCreateTime
()
{
if
(
getModel
()
==
null
)
{
if
(
getModel
()
==
null
)
{
throw
new
RuntimeException
(
"model is null"
);
}
return
this
.
getModel
().
getCreateTime
();
}
public
void
setCreateTime
(
Date
createTime
)
{
if
(
getModel
()
==
null
)
{
if
(
getModel
()
==
null
)
{
throw
new
RuntimeException
(
"model is null"
);
}
this
.
getModel
().
setCreateTime
(
createTime
);
...
...
@@ -282,14 +301,14 @@ public class PicVoBase extends Pic implements VoInterface<Pic> {
}
public
String
getName
()
{
if
(
getModel
()
==
null
)
{
if
(
getModel
()
==
null
)
{
throw
new
RuntimeException
(
"model is null"
);
}
return
this
.
getModel
().
getName
();
}
public
void
setName
(
String
name
)
{
if
(
getModel
()
==
null
)
{
if
(
getModel
()
==
null
)
{
throw
new
RuntimeException
(
"model is null"
);
}
this
.
getModel
().
setName
(
name
);
...
...
@@ -336,14 +355,14 @@ public class PicVoBase extends Pic implements VoInterface<Pic> {
}
public
Long
getStorageId
()
{
if
(
getModel
()
==
null
)
{
if
(
getModel
()
==
null
)
{
throw
new
RuntimeException
(
"model is null"
);
}
return
this
.
getModel
().
getStorageId
();
}
public
void
setStorageId
(
Long
storageId
)
{
if
(
getModel
()
==
null
)
{
if
(
getModel
()
==
null
)
{
throw
new
RuntimeException
(
"model is null"
);
}
this
.
getModel
().
setStorageId
(
storageId
);
...
...
@@ -390,14 +409,14 @@ public class PicVoBase extends Pic implements VoInterface<Pic> {
}
public
Long
getPackId
()
{
if
(
getModel
()
==
null
)
{
if
(
getModel
()
==
null
)
{
throw
new
RuntimeException
(
"model is null"
);
}
return
this
.
getModel
().
getPackId
();
}
public
void
setPackId
(
Long
packId
)
{
if
(
getModel
()
==
null
)
{
if
(
getModel
()
==
null
)
{
throw
new
RuntimeException
(
"model is null"
);
}
this
.
getModel
().
setPackId
(
packId
);
...
...
@@ -428,14 +447,14 @@ public class PicVoBase extends Pic implements VoInterface<Pic> {
}
public
String
getPersonUnid
()
{
if
(
getModel
()
==
null
)
{
if
(
getModel
()
==
null
)
{
throw
new
RuntimeException
(
"model is null"
);
}
return
this
.
getModel
().
getPersonUnid
();
}
public
void
setPersonUnid
(
String
personUnid
)
{
if
(
getModel
()
==
null
)
{
if
(
getModel
()
==
null
)
{
throw
new
RuntimeException
(
"model is null"
);
}
this
.
getModel
().
setPersonUnid
(
personUnid
);
...
...
@@ -482,42 +501,104 @@ public class PicVoBase extends Pic implements VoInterface<Pic> {
}
public
Integer
getStatus
()
{
if
(
getModel
()
==
null
)
{
if
(
getModel
()
==
null
)
{
throw
new
RuntimeException
(
"model is null"
);
}
return
this
.
getModel
().
getStatus
();
}
public
void
setStatus
(
Integer
status
)
{
if
(
getModel
()
==
null
)
{
if
(
getModel
()
==
null
)
{
throw
new
RuntimeException
(
"model is null"
);
}
this
.
getModel
().
setStatus
(
status
);
}
public
Boolean
getReidFinishUser_null
()
{
return
reidFinishUser_null
;
}
public
void
setReidFinishUser_null
(
Boolean
reidFinishUser_null
)
{
this
.
reidFinishUser_null
=
reidFinishUser_null
;
}
public
ArrayList
<
Long
>
getReidFinishUser_arr
()
{
return
reidFinishUser_arr
;
}
public
void
setReidFinishUser_arr
(
ArrayList
<
Long
>
reidFinishUser_arr
)
{
this
.
reidFinishUser_arr
=
reidFinishUser_arr
;
}
public
Long
getReidFinishUser_gt
()
{
return
reidFinishUser_gt
;
}
public
void
setReidFinishUser_gt
(
Long
reidFinishUser_gt
)
{
this
.
reidFinishUser_gt
=
reidFinishUser_gt
;
}
public
Long
getReidFinishUser_lt
()
{
return
reidFinishUser_lt
;
}
public
void
setReidFinishUser_lt
(
Long
reidFinishUser_lt
)
{
this
.
reidFinishUser_lt
=
reidFinishUser_lt
;
}
public
Long
getReidFinishUser_gte
()
{
return
reidFinishUser_gte
;
}
public
void
setReidFinishUser_gte
(
Long
reidFinishUser_gte
)
{
this
.
reidFinishUser_gte
=
reidFinishUser_gte
;
}
public
Long
getReidFinishUser_lte
()
{
return
reidFinishUser_lte
;
}
public
void
setReidFinishUser_lte
(
Long
reidFinishUser_lte
)
{
this
.
reidFinishUser_lte
=
reidFinishUser_lte
;
}
public
Long
getReidFinishUser
()
{
if
(
getModel
()
==
null
)
{
throw
new
RuntimeException
(
"model is null"
);
}
return
this
.
getModel
().
getReidFinishUser
();
}
public
void
setReidFinishUser
(
Long
reidFinishUser
)
{
if
(
getModel
()
==
null
)
{
throw
new
RuntimeException
(
"model is null"
);
}
this
.
getModel
().
setReidFinishUser
(
reidFinishUser
);
}
public
Storage
getStorage
()
{
if
(
getModel
()
==
null
)
{
if
(
getModel
()
==
null
)
{
throw
new
RuntimeException
(
"model is null"
);
}
return
this
.
getModel
().
getStorage
();
}
public
void
setStorage
(
Storage
storage
)
{
if
(
getModel
()
==
null
)
{
if
(
getModel
()
==
null
)
{
throw
new
RuntimeException
(
"model is null"
);
}
this
.
getModel
().
setStorage
(
storage
);
}
public
Pack
getPack
()
{
if
(
getModel
()
==
null
)
{
if
(
getModel
()
==
null
)
{
throw
new
RuntimeException
(
"model is null"
);
}
return
this
.
getModel
().
getPack
();
}
public
void
setPack
(
Pack
pack
)
{
if
(
getModel
()
==
null
)
{
if
(
getModel
()
==
null
)
{
throw
new
RuntimeException
(
"model is null"
);
}
this
.
getModel
().
setPack
(
pack
);
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment