parent
8abea9c774
commit
039ad034b4
|
|
@ -100,6 +100,7 @@ public class SafetyViolationServiceImpl implements SafetyViolationService {
|
|||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public ServerResponse updateSafetyViolationById(SafetyViolationDto bean) {
|
||||
LoginUser loginUser = UserUtil.getLoginUser();
|
||||
bean.setUpdateUserId(loginUser.getId());
|
||||
|
|
|
|||
|
|
@ -7,19 +7,19 @@
|
|||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id,</if>
|
||||
<if test="proId != null and proId != ''">pro_id,</if>
|
||||
<if test="proName != null">pro_name,</if>
|
||||
<if test="proName != null and proName != ''">pro_name,</if>
|
||||
<if test="majorId != null and majorId != ''">major_id,</if>
|
||||
<if test="majorName != null">major_name,</if>
|
||||
<if test="majorName != null and majorName != ''">major_name,</if>
|
||||
<if test="gxId != null and gxId != ''">gx_id,</if>
|
||||
<if test="gxName != null">gx_name,</if>
|
||||
<if test="checkUserName != null">check_user_name,</if>
|
||||
<if test="vioDate != null">vio_date,</if>
|
||||
<if test="vioPlace != null">vio_place,</if>
|
||||
<if test="vioDesc != null">vio_desc,</if>
|
||||
<if test="rectDate != null">rect_date,</if>
|
||||
<if test="rectUserName != null">rect_user_name,</if>
|
||||
<if test="rectTime != null">rect_time,</if>
|
||||
<if test="rectDesc != null">rect_desc,</if>
|
||||
<if test="gxName != null and gxName != ''">gx_name,</if>
|
||||
<if test="checkUserName != null and checkUserName != ''">check_user_name,</if>
|
||||
<if test="vioDate != null and vioDate != ''">vio_date,</if>
|
||||
<if test="vioPlace != null and vioPlace != ''" >vio_place,</if>
|
||||
<if test="vioDesc != null and vioDesc != ''" >vio_desc,</if>
|
||||
<if test="rectDate != null and rectDate != ''">rect_date,</if>
|
||||
<if test="rectUserName != null and rectUserName != ''">rect_user_name,</if>
|
||||
<if test="rectTime != null and rectTime != ''">rect_time,</if>
|
||||
<if test="rectDesc != null and rectDesc != ''" >rect_desc,</if>
|
||||
<if test="rectStatus != null">rect_status,</if>
|
||||
<if test="buildBeforeDesc != null">build_before_desc,</if>
|
||||
<if test="buildUnderDesc != null">build_under_desc,</if>
|
||||
|
|
@ -39,18 +39,18 @@
|
|||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">#{id},</if>
|
||||
<if test="proId != null and proId != ''">#{proId},</if>
|
||||
<if test="proName != null">#{proName},</if>
|
||||
<if test="proName != null and proName != ''">#{proName},</if>
|
||||
<if test="majorId != null and majorId != ''">#{majorId},</if>
|
||||
<if test="majorName != null">#{majorName},</if>
|
||||
<if test="majorName != null and majorName != ''">#{majorName},</if>
|
||||
<if test="gxId != null and gxId != ''">#{gxId},</if>
|
||||
<if test="gxName != null and gxName != ''">#{gxName},</if>
|
||||
<if test="checkUserName != null">#{checkUserName},</if>
|
||||
<if test="checkUserName != null and checkUserName != ''">#{checkUserName},</if>
|
||||
<if test="vioDate != null and vioDate != ''">#{vioDate},</if>
|
||||
<if test="vioPlace != null">#{vioPlace},</if>
|
||||
<if test="vioDesc != null">#{vioDesc},</if>
|
||||
<if test="vioPlace != null and vioPlace != ''">#{vioPlace},</if>
|
||||
<if test="vioDesc != null and vioDesc != ''">#{vioDesc},</if>
|
||||
<if test="rectDate != null and rectDate != ''">#{rectDate},</if>
|
||||
<if test="rectUserName != null">#{rectUserName},</if>
|
||||
<if test="rectTime != null">#{rectTime},</if>
|
||||
<if test="rectUserName != null and rectUserName != ''">#{rectUserName},</if>
|
||||
<if test="rectTime != null and rectTime != ''">#{rectTime},</if>
|
||||
<if test="rectDesc != null and rectDesc != ''">#{rectDesc},</if>
|
||||
<if test="rectStatus != null">#{rectStatus},</if>
|
||||
<if test="buildBeforeDesc != null">#{buildBeforeDesc},</if>
|
||||
|
|
|
|||
|
|
@ -13,12 +13,18 @@
|
|||
gx_id,
|
||||
gx_name,
|
||||
check_user_name,
|
||||
<if test="vioDate != null and vioDate !='' ">
|
||||
check_date,
|
||||
</if>
|
||||
check_place,
|
||||
check_desc,
|
||||
<if test="rectDate != null and rectDate !='' ">
|
||||
rect_date,
|
||||
</if>
|
||||
rect_user_name,
|
||||
<if test="rectTime != null and rectTime !='' ">
|
||||
rect_time,
|
||||
</if>
|
||||
rect_desc,
|
||||
rect_status,
|
||||
data_source,
|
||||
|
|
@ -33,12 +39,18 @@
|
|||
#{gxId},
|
||||
#{gxName},
|
||||
#{checkUserName},
|
||||
<if test="vioDate != null and vioDate !='' ">
|
||||
#{vioDate},
|
||||
</if>
|
||||
#{vioPlace},
|
||||
#{vioDesc},
|
||||
<if test="rectDate != null and rectDate !='' ">
|
||||
#{rectDate},
|
||||
</if>
|
||||
#{rectUserName},
|
||||
<if test="rectTime != null and rectTime !='' ">
|
||||
#{rectTime},
|
||||
</if>
|
||||
#{rectDesc},
|
||||
#{rectStatus},
|
||||
#{dataSource},
|
||||
|
|
@ -72,7 +84,7 @@
|
|||
<if test="checkUserName != null">
|
||||
check_user_name = #{checkUserName},
|
||||
</if>
|
||||
<if test="vioDate != null">
|
||||
<if test="vioDate != null and vioDate != ''">
|
||||
check_date = #{vioDate},
|
||||
</if>
|
||||
<if test="vioPlace != null">
|
||||
|
|
@ -81,13 +93,13 @@
|
|||
<if test="vioDesc != null">
|
||||
check_desc = #{vioDesc},
|
||||
</if>
|
||||
<if test="rectDate != null">
|
||||
<if test="rectDate != null and rectDate != ''">
|
||||
rect_date = #{rectDate},
|
||||
</if>
|
||||
<if test="rectUserName != null">
|
||||
rect_user_name = #{rectUserName},
|
||||
</if>
|
||||
<if test="rectTime != null">
|
||||
<if test="rectTime != null and rectTime != ''">
|
||||
rect_time = #{rectTime},
|
||||
</if>
|
||||
<if test="rectDesc != null">
|
||||
|
|
@ -110,7 +122,8 @@
|
|||
</update>
|
||||
|
||||
<delete id="delQualityInspectionById">
|
||||
update tb_quality_inspection set is_active = '0'
|
||||
update tb_quality_inspection
|
||||
set is_active = '0'
|
||||
WHERE id = #{id}
|
||||
</delete>
|
||||
|
||||
|
|
@ -165,8 +178,7 @@
|
|||
GROUP BY tsv.id
|
||||
</select>
|
||||
<select id="getQualityInspectionById" resultType="com.bonus.imgTool.imgUpload.vo.SafetyViolationVo">
|
||||
SELECT
|
||||
tsv.id,
|
||||
SELECT tsv.id,
|
||||
tsv.pro_id,
|
||||
tsv.pro_name,
|
||||
tsv.major_id,
|
||||
|
|
@ -183,8 +195,7 @@
|
|||
tsv.rect_desc,
|
||||
tsv.rect_status,
|
||||
tsv.data_source
|
||||
FROM
|
||||
tb_quality_inspection tsv
|
||||
FROM tb_quality_inspection tsv
|
||||
WHERE tsv.id = #{id}
|
||||
</select>
|
||||
|
||||
|
|
|
|||
|
|
@ -13,18 +13,23 @@
|
|||
gx_id,
|
||||
gx_name,
|
||||
check_user_name,
|
||||
<if test="vioDate != null and vioDate !='' ">
|
||||
vio_date,
|
||||
</if>
|
||||
vio_place,
|
||||
vio_desc,
|
||||
<if test="rectDate != null and rectDate !='' ">
|
||||
rect_date,
|
||||
</if>
|
||||
rect_user_name,
|
||||
<if test="rectTime != null and rectTime !='' ">
|
||||
rect_time,
|
||||
</if>
|
||||
rect_desc,
|
||||
rect_status,
|
||||
data_source,
|
||||
create_user_id,
|
||||
create_user_name,
|
||||
create_time
|
||||
create_user_name
|
||||
)values (
|
||||
#{proId},
|
||||
#{proName},
|
||||
|
|
@ -33,18 +38,23 @@
|
|||
#{gxId},
|
||||
#{gxName},
|
||||
#{checkUserName},
|
||||
<if test="vioDate != null and vioDate !='' ">
|
||||
#{vioDate},
|
||||
</if>
|
||||
#{vioPlace},
|
||||
#{vioDesc},
|
||||
<if test="rectDate != null and rectDate !='' ">
|
||||
#{rectDate},
|
||||
</if>
|
||||
#{rectUserName},
|
||||
<if test="rectTime != null and rectTime !='' ">
|
||||
#{rectTime},
|
||||
</if>
|
||||
#{rectDesc},
|
||||
#{rectStatus},
|
||||
#{dataSource},
|
||||
#{createUserId},
|
||||
#{createUserName},
|
||||
#{createTime}
|
||||
#{createUserName}
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
|
@ -106,7 +116,7 @@
|
|||
<if test="checkUserName != null">
|
||||
check_user_name = #{checkUserName},
|
||||
</if>
|
||||
<if test="vioDate != null">
|
||||
<if test="vioDate != null and vioDate != ''">
|
||||
vio_date = #{vioDate},
|
||||
</if>
|
||||
<if test="vioPlace != null">
|
||||
|
|
@ -115,13 +125,13 @@
|
|||
<if test="vioDesc != null">
|
||||
vio_desc = #{vioDesc},
|
||||
</if>
|
||||
<if test="rectDate != null">
|
||||
<if test="rectDate != null and rectDate != ''">
|
||||
rect_date = #{rectDate},
|
||||
</if>
|
||||
<if test="rectUserName != null">
|
||||
rect_user_name = #{rectUserName},
|
||||
</if>
|
||||
<if test="rectTime != null">
|
||||
<if test="rectTime != null and rectTime != ''">
|
||||
rect_time = #{rectTime},
|
||||
</if>
|
||||
<if test="rectDesc != null">
|
||||
|
|
@ -153,14 +163,15 @@
|
|||
</delete>
|
||||
|
||||
<delete id="delImgPhotoBySourceId">
|
||||
update sys_file_resource set is_active = '0'
|
||||
WHERE
|
||||
source_id = #{sourceId}
|
||||
update sys_file_resource
|
||||
set is_active = '0'
|
||||
WHERE source_id = #{sourceId}
|
||||
AND upload_type = #{uploadType}
|
||||
</delete>
|
||||
|
||||
<delete id="delSafetyViolationById">
|
||||
update tb_safety_violations set is_active = '0'
|
||||
update tb_safety_violations
|
||||
set is_active = '0'
|
||||
WHERE id = #{id}
|
||||
</delete>
|
||||
|
||||
|
|
@ -215,8 +226,7 @@
|
|||
GROUP BY tsv.id
|
||||
</select>
|
||||
<select id="getSafetyViolationById" resultType="com.bonus.imgTool.imgUpload.vo.SafetyViolationVo">
|
||||
SELECT
|
||||
tsv.id,
|
||||
SELECT tsv.id,
|
||||
tsv.pro_id,
|
||||
tsv.pro_name,
|
||||
tsv.major_id,
|
||||
|
|
@ -233,14 +243,12 @@
|
|||
tsv.rect_desc,
|
||||
tsv.rect_status,
|
||||
tsv.data_source
|
||||
FROM
|
||||
tb_safety_violations tsv
|
||||
FROM tb_safety_violations tsv
|
||||
WHERE tsv.id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="getImgPhotoList" resultType="com.bonus.imgTool.system.vo.dto.FileStorageDto">
|
||||
SELECT
|
||||
sfr.id,
|
||||
SELECT sfr.id,
|
||||
sfr.file_name,
|
||||
sfr.file_suffix,
|
||||
sfr.file_size,
|
||||
|
|
@ -254,11 +262,10 @@
|
|||
sfr.source_type_name,
|
||||
sfr.create_user,
|
||||
sfr.create_user_name
|
||||
FROM
|
||||
sys_file_resource sfr
|
||||
FROM sys_file_resource sfr
|
||||
WHERE sfr.source_id = #{sourceId}
|
||||
AND sfr.source_type = #{sourceType}
|
||||
And sfr.is_active= '1'
|
||||
And sfr.is_active = '1'
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue