设备管理知识库修改

master
maxw@mesnac.com 8 hours ago
parent 589eb13f76
commit 5d68406627

@ -79,4 +79,8 @@ public interface DmsBillsInspectInstanceMapper
int insertRecord(DmsRecordInspect dmsRecordInspect);
List<DmsRecordInspect> selectRecordByInstainceId(@Param("inspectInstanceId") Long inspectInstanceId);
int selectUnCompletedInstance(@Param("inspectInstanceId") Long inspectInstanceId);
int selectAllInstance(@Param("inspectInstanceId")Long inspectInstanceId);
}

@ -256,8 +256,10 @@ public class DmsBillsInspectInstanceServiceImpl implements IDmsBillsInspectInsta
dmsInspectInstanceDetail.setDmsInspectInstanceDetailProjectList(dmsInspectInstanceDetailProjects);
DmsBillsInspectInstance dmsBillsInspectInstance = new DmsBillsInspectInstance();
dmsBillsInspectInstance.setInspectInstanceId(dmsBillsInspectInstanceScanVo.getInspectInstanceId());
dmsBillsInspectInstance.setRealBeginTime(new Date());
// dmsBillsInspectInstance.setInspectStatus("2");
int i = dmsBillsInspectInstanceMapper.updateDmsBillsInspectInstance(dmsBillsInspectInstance);
return dmsInspectInstanceDetail;
@ -276,13 +278,21 @@ public class DmsBillsInspectInstanceServiceImpl implements IDmsBillsInspectInsta
DmsRecordInspect dmsRecordInspect = dmsBillsInspectInstanceMapper.selectRecord(dmsInspectInstanceDetail.getInstanceDetailId());
List<DmsRecordInspect> recordInspect = dmsBillsInspectInstanceMapper.selectRecordByInstainceId(dmsRecordInspect.getInspectInstanceId());
if (recordInspect!=null&&recordInspect.size()>0){
dmsRecordInspect.setInspectStatus(2l);
}else {
dmsRecordInspect.setInspectStatus(3l);
}
// if (recordInspect!=null&&recordInspect.size()>0){
// dmsRecordInspect.setInspectStatus(2l);
// }else {
// dmsRecordInspect.setInspectStatus(3l);
// }
dmsRecordInspect.setInspectStatus(3l);
int i1 = dmsBillsInspectInstanceMapper.insertRecord(dmsRecordInspect);
int count = dmsBillsInspectInstanceMapper.selectUnCompletedInstance(dmsRecordInspect.getInspectInstanceId());
// int count1 = dmsBillsInspectInstanceMapper.selectAllInstance(dmsRecordInspect.getInspectInstanceId());
DmsBillsInspectInstance dmsBillsInspectInstance = new DmsBillsInspectInstance();
if (count==0||count==1){
dmsBillsInspectInstance.setInspectStatus("3");
}else{
dmsBillsInspectInstance.setInspectStatus("2");
}
dmsBillsInspectInstance.setInspectInstanceId(dmsInspectInstanceDetail.getInspectInstanceId());
dmsBillsInspectInstance.setRealEndTime(new Date());
int i = dmsBillsInspectInstanceMapper.updateDmsBillsInspectInstance(dmsBillsInspectInstance);

@ -1,6 +1,7 @@
package com.hw.dms.service.impl;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import com.hw.common.core.constant.DmsConstants;
@ -147,8 +148,9 @@ public class DmsKnowledgeMaintServiceImpl implements IDmsKnowledgeMaintService
for (String fileUrl : fileUrls){
BaseAttachInfo baseAttachInfo = new BaseAttachInfo();
baseAttachInfo.setAttachType(DmsConstants.MES_BASE_ATTACH_INFO_KNOWLEDGEMAINT);
baseAttachInfo.setAttachName("name");
baseAttachInfo.setAttachName("设备保养");
baseAttachInfo.setAttachPath(fileUrl);
baseAttachInfo.setCreateTime(new Date());
baseAttachInfo.setProcessId(knowledgeLubeId);
baseAttachInfos.add(baseAttachInfo);
}

@ -1,6 +1,7 @@
package com.hw.dms.service.impl;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import com.hw.common.core.constant.DmsConstants;
@ -151,6 +152,7 @@ public class DmsKnowledgeRepairServiceImpl implements IDmsKnowledgeRepairService
baseAttachInfo.setAttachName("name");
baseAttachInfo.setAttachPath(fileUrl);
baseAttachInfo.setProcessId(knowledgeLubeId);
baseAttachInfo.setCreateTime(new Date());
baseAttachInfos.add(baseAttachInfo);
}
baseAttachInfoMapper.batchDmsKnowLedgeLubeFile(baseAttachInfos);

@ -19,9 +19,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<insert id="batchDmsKnowLedgeLubeFile" >
insert into mes_base_attach_info( attach_type, attach_name, attach_path, process_id) values
insert into mes_base_attach_info( attach_type, attach_name, attach_path, process_id,create_time) values
<foreach item="item" index="index" collection="list" separator=",">
( #{item.attachType}, #{item.attachName}, #{item.attachPath}, #{item.processId})
( #{item.attachType}, #{item.attachName}, #{item.attachPath}, #{item.processId},#{item.createTime})
</foreach>
</insert>

@ -26,9 +26,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select a.maint_standard_id, a.maint_standard_code, a.device_type_id, a.maint_protocol, a.operation_description, a.is_flag, a.remark, a.create_by, a.create_time, a.update_by, a.update_time
from dms_base_maint_standard a
left join dms_base_device_type b on a.device_type_id = b.device_type_id <where>
<if test="maintStandardCode != null and maintStandardCode != ''"> and a.maint_standard_code = #{maintStandardCode}</if>
<if test="maintStandardCode != null and maintStandardCode != ''"> and a.maint_standard_code like concat('%',#{maintStandardCode},'%') </if>
<if test="deviceTypeId != null "> and a.device_type_id = #{deviceTypeId}</if>
<if test="maintProtocol != null and maintProtocol != ''"> and a.maint_protocol = #{maintProtocol}</if>
<if test="maintProtocol != null and maintProtocol != ''"> and a.maint_protocol like concat('%',#{maintProtocol},'%') </if>
<if test="operationDescription != null and operationDescription != ''"> and a.operation_description = #{operationDescription}</if>
<if test="isFlag != null "> and a.is_flag = #{isFlag}</if>
<if test="TypeName != null "> and b.type_name like concat('%', #{TypeName},'%')</if>

@ -259,5 +259,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
parameterType="java.lang.Long">
select * from dms_record_inspect where inspect_instance_id = #{inspectInstanceId} and inspect_status != 3
</select>
<select id="selectUnCompletedInstance" resultType="java.lang.Integer">
select
count(1)
from
`hwjy-cloud`.dms_inspect_instance_detail x
where
x.inspect_instance_id = #{inspectInstanceId}
and instance_detail_status != 3
</select>
<select id="selectAllInstance" resultType="java.lang.Integer" parameterType="java.lang.Long">
select
count(1)
from
`hwjy-cloud`.dms_inspect_instance_detail x
where
x.inspect_instance_id = #{inspectInstanceId}
</select>
</mapper>

Loading…
Cancel
Save