装备编辑回显装备证书

This commit is contained in:
liang.chao 2024-12-20 18:50:16 +08:00
parent 814f82ba1a
commit c8dada1e67
4 changed files with 24 additions and 2 deletions

View File

@ -30,7 +30,7 @@ public interface MaDevQcMapper {
/** /**
* 删除装备质检 * 删除装备质检
* @param id * @param maId
* @return * @return
*/ */
int deleteDevQcById(Integer maId); int deleteDevQcById(Integer maId);
@ -47,4 +47,6 @@ public interface MaDevQcMapper {
List<MaDevQc> getQcList(Long maId); List<MaDevQc> getQcList(Long maId);
MaDevQc getQcListByOne(Long maId); MaDevQc getQcListByOne(Long maId);
Integer updateById(MaDevQc maDevQc);
} }

View File

@ -520,7 +520,17 @@ public class DevInfoServiceImpl implements DevInfoService {
if (!CollectionUtils.isEmpty(devInfo.getDevInfoProperties())) { if (!CollectionUtils.isEmpty(devInfo.getDevInfoProperties())) {
devInfoMapper.insertDevInfoProperties(devInfo.getMaId(), devInfo.getDevInfoProperties()); devInfoMapper.insertDevInfoProperties(devInfo.getMaId(), devInfo.getDevInfoProperties());
} }
List<Table> tableList = devInfo.getTableList();
String identifyCode = tableList.get(0).getIdentifyCode();
devInfo.setIdentifyCode(identifyCode);
int i = devInfoMapper.updateDevInfo(devInfo); int i = devInfoMapper.updateDevInfo(devInfo);
Integer id = tableList.get(0).getId();
if (id != null) {
MaDevQc maDevQc = new MaDevQc();
maDevQc.setId(id).setQcUser(tableList.get(0).getCheckMan()).setQcTime(tableList.get(0).getCheckDate()).setNextCheckTime(tableList.get(0).getNextCheckDate());
maDevQcMapper.updateById(maDevQc);
}
if (i > 0) { if (i > 0) {
BmFileInfo bmFileInfo = new BmFileInfo() BmFileInfo bmFileInfo = new BmFileInfo()
.setTaskType(MaterialConstants.MATERIAL_FILE_TYPE_CODE) .setTaskType(MaterialConstants.MATERIAL_FILE_TYPE_CODE)

View File

@ -372,6 +372,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update ma_dev_info update ma_dev_info
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="code != null and code != '' ">code = #{code},</if> <if test="code != null and code != '' ">code = #{code},</if>
<if test="identifyCode != null and identifyCode != '' ">identifyCode = #{identify_code},</if>
<if test="deviceName != null and deviceName != '' ">device_name = #{deviceName},</if> <if test="deviceName != null and deviceName != '' ">device_name = #{deviceName},</if>
<if test="deviceWeight != null">device_weight = #{deviceWeight},</if> <if test="deviceWeight != null">device_weight = #{deviceWeight},</if>
<if test="deviceCount != null">device_count = #{deviceCount},</if> <if test="deviceCount != null">device_count = #{deviceCount},</if>

View File

@ -4,6 +4,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bonus.material.device.mapper.MaDevQcMapper"> <mapper namespace="com.bonus.material.device.mapper.MaDevQcMapper">
<update id="updateById">
update ma_dev_qc
<set>
<if test="qc_user != null and qc_user != ''">qc_user = #{qcUser},</if>
<if test="qc_time != null ">qc_time = #{qcTime},</if>
<if test="nextCheckTime != null ">next_check_time = #{nextCheckTime},</if>
</set>
where id = #{id}
</update>
<delete id="deleteDevQcById"> <delete id="deleteDevQcById">
delete from ma_dev_qc where ma_id = #{maId} delete from ma_dev_qc where ma_id = #{maId}
@ -123,7 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="getQcListByOne" resultType="com.bonus.material.device.domain.MaDevQc"> <select id="getQcListByOne" resultType="com.bonus.material.device.domain.MaDevQc">
SELECT SELECT
id, mdc.id,
mdc.qc_time, mdc.qc_time,
mt.maintenance_alarm_day, mt.maintenance_alarm_day,
mdc.qc_user, mdc.qc_user,