Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vehicle-quality-review
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王飞
vehicle-quality-review
Commits
2686c6f7
Commit
2686c6f7
authored
Jan 29, 2024
by
高滢
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
样品管理 增删改查 规范
parent
8a62313e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
28 deletions
+23
-28
SampleManagement.java
...view/src/main/java/com/ruoyi/domain/SampleManagement.java
+2
-6
SampleManagementMapper.xml
...view/src/main/resources/mapper/SampleManagementMapper.xml
+21
-22
No files found.
quality-review/src/main/java/com/ruoyi/domain/SampleManagement.java
View file @
2686c6f7
...
...
@@ -20,7 +20,7 @@ import lombok.Data;
*/
@ApiModel
@TableName
(
value
=
"t_sample
_management
"
)
@TableName
(
value
=
"t_sample"
)
@Data
public
class
SampleManagement
extends
BaseEntity
{
...
...
@@ -75,12 +75,8 @@ public class SampleManagement extends BaseEntity
@ApiModelProperty
(
"0:整车样品 1:零部件样品"
)
private
String
flag
;
/** 逻辑删除(0-存在,1-删除) */
@ApiModelProperty
(
"0-存在,1-删除"
)
private
String
delFlag
;
/** 生产企业名称*/
@ApiModelProperty
(
"
0-存在,1-删除
"
)
@ApiModelProperty
(
"
生产企业名称
"
)
private
String
enterpriseName
;
/** 商标 */
...
...
quality-review/src/main/resources/mapper/SampleManagementMapper.xml
View file @
2686c6f7
...
...
@@ -19,7 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"del
Flag"
column=
"del_flag
"
/>
<result
property=
"del
eted"
column=
"deleted
"
/>
<result
property=
"enterpriseId"
column=
"enterprise_id"
/>
<result
property=
"enterpriseName"
column=
"enterprise_name"
/>
<result
property=
"remark"
column=
"remark"
/>
...
...
@@ -42,40 +42,40 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sm.create_time,
sm.update_by,
sm.update_time,
sm.del
_flag
,
sm.del
eted
,
sm.enterprise_id,
sm.remark,
sm.trademark,
sm.sample_photos,
ae.enterprise_name
from t_sample
_management
sm
from t_sample sm
left join t_automobile_enterprise ae on ae.id = sm.enterprise_id
</sql>
<select
id=
"selectSampleManagementList"
parameterType=
"com.ruoyi.domain.SampleManagement"
resultMap=
"SampleManagementResult"
>
<include
refid=
"selectTSampleManagementVo"
/>
<where>
del_flag = '0'
<if
test=
"identificationCode != null and identificationCode != ''"
>
and identification_code like concat('%', #{identificationCode}, '%')
</if>
<if
test=
"sampleNumber != null and sampleNumber != ''"
>
and sample_number like concat('%', #{sampleNumber}, '%')
</if>
<if
test=
"sampleName != null and sampleName != ''"
>
and sample_name like concat('%', #{sampleName}, '%')
</if>
<if
test=
"flag != null and flag != ''"
>
flag = #{flag}
</if>
sm.deleted = 0
<if
test=
"identificationCode != null and identificationCode != ''"
>
and
sm.
identification_code like concat('%', #{identificationCode}, '%')
</if>
<if
test=
"sampleNumber != null and sampleNumber != ''"
>
and s
m.s
ample_number like concat('%', #{sampleNumber}, '%')
</if>
<if
test=
"sampleName != null and sampleName != ''"
>
and s
m.s
ample_name like concat('%', #{sampleName}, '%')
</if>
<if
test=
"flag != null and flag != ''"
>
sm.
flag = #{flag}
</if>
</where>
</select>
<select
id=
"selectSampleManagementById"
parameterType=
"Long"
resultMap=
"SampleManagementResult"
>
<include
refid=
"selectTSampleManagementVo"
/>
where id = #{id}
where
sm.
id = #{id}
</select>
<insert
id=
"insertSampleManagement"
parameterType=
"com.ruoyi.domain.SampleManagement"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into t_sample
_management
insert into t_sample
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"identificationCode != null"
>
identification_code,
</if>
<if
test=
"sampleNumber != null"
>
sample_number,
</if>
<if
test=
"sampleName != null"
>
sample_name,
</if>
<if
test=
"sampleSender != null"
>
sample_sender,
</if>
<if
test=
"number
OfSamples != null"
>
number_of_samples,
</if>
<if
test=
"numberOfSamples != null"
>
number_of_samples,
</if>
<if
test=
"deliveryDate != null"
>
delivery_date,
</if>
<if
test=
"manufactureDate != null"
>
manufacture_date,
</if>
<if
test=
"manufacturingEnterprise != null"
>
manufacturing_enterprise,
</if>
...
...
@@ -84,18 +84,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateBy != null"
>
update_by,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"delFlag != null"
>
del_flag,
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"trademark != null"
>
trademark,
</if>
<if
test=
"samplePhotos != null"
>
sample_photos,
</if>
<if
test=
"deleted != null"
>
deleted,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"identificationCode != null"
>
#{identificationCode},
</if>
<if
test=
"sampleNumber != null"
>
#{sampleNumber},
</if>
<if
test=
"sampleName != null"
>
#{sampleName},
</if>
<if
test=
"sampleSender != null"
>
#{sampleSender},
</if>
<if
test=
"number
OfSamples != null"
>
#{number
OfSamples},
</if>
<if
test=
"number
OfSamples != null"
>
#{number
OfSamples},
</if>
<if
test=
"deliveryDate != null"
>
#{deliveryDate},
</if>
<if
test=
"manufactureDate != null"
>
#{manufactureDate},
</if>
<if
test=
"manufacturingEnterprise != null"
>
#{manufacturingEnterprise},
</if>
...
...
@@ -104,22 +104,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"updateBy != null"
>
#{updateBy},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"delFlag != null"
>
#{delFlag},
</if>
<if
test=
"enterpriseId != null"
>
#{enterpriseId}
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
<if
test=
"trademark != null"
>
#{trademark},
</if>
<if
test=
"samplePhotos != null"
>
#{samplePhotos},
</if>
<if
test=
"deleted != null"
>
#{deleted},
</if>
</trim>
</insert>
<update
id=
"updateSampleManagement"
parameterType=
"com.ruoyi.domain.SampleManagement"
>
update t_sample
_management
update t_sample
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"identificationCode != null"
>
identification_code = #{identificationCode},
</if>
<if
test=
"sampleNumber != null"
>
sample_number = #{sampleNumber},
</if>
<if
test=
"sampleName != null"
>
sample_name = #{sampleName},
</if>
<if
test=
"sampleSender != null"
>
sample_sender = #{sampleSender},
</if>
<if
test=
"number
OfSamples != null"
>
number_of_samples = #{number
OfSamples},
</if>
<if
test=
"number
OfSamples != null"
>
number_of_samples = #{number
OfSamples},
</if>
<if
test=
"deliveryDate != null"
>
delivery_date = #{deliveryDate},
</if>
<if
test=
"manufactureDate != null"
>
manufacture_date = #{manufactureDate},
</if>
<if
test=
"manufacturingEnterprise != null"
>
manufacturing_enterprise = #{manufacturingEnterprise},
</if>
...
...
@@ -128,7 +128,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"delFlag != null"
>
del_flag = #{delFlag},
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id = #{enterpriseId},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
<if
test=
"trademark != null"
>
trademark = #{trademark},
</if>
...
...
@@ -138,14 +137,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete
id=
"deleteSampleManagementById"
parameterType=
"Long"
>
update t_sample
_management set del_flag = '1'
,
update t_sample
set deleted = 1
,
where id = #{id}
</delete>
<select
id=
"selectIdentificationCodeCount"
parameterType=
"com.ruoyi.domain.SampleManagement"
resultType=
"integer"
>
select count(id) from t_sample
_management
select count(id) from t_sample
<where>
del
_flag = '0'
del
eted = 0
<if
test=
"flag != null and flag != ''"
>
and flag = #{flag}
</if>
<if
test=
"identificationCode != null and identificationCode != ''"
>
and identification_code = #{identificationCode}
</if>
<if
test=
"id != null and id != ''"
>
and id != #{id}
</if>
...
...
@@ -153,9 +152,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select
id=
"selectSampleNumberCount"
parameterType=
"com.ruoyi.domain.SampleManagement"
resultType=
"integer"
>
select count(id) from t_sample
_management
select count(id) from t_sample
<where>
del
_flag = '0'
del
eted = 0
<if
test=
"flag != null and flag != ''"
>
and flag = #{flag}
</if>
<if
test=
"sampleNumber != null and sampleNumber != ''"
>
and sample_number = #{sampleNumber}
</if>
<if
test=
"id != null and id != ''"
>
and id != #{id}
</if>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment