| | |
| | | </if> |
| | | </select> |
| | | <select id="authorizedPerson" resultType="com.yuanchu.mom.pojo.Device"> |
| | | select * |
| | | from (select id, |
| | | authorized_person, |
| | | status |
| | | from device) a |
| | | select id, |
| | | authorized_person |
| | | from device |
| | | </select> |
| | | <select id="search" resultType="com.yuanchu.mom.pojo.Device"> |
| | | select * |
| | | from device |
| | | <where> |
| | | <if test="status!=null"> |
| | | and status = #{status} |
| | | </if> |
| | | <if test="deviceName!=null and deviceName!=''"> |
| | | and device_name like concat('%',#{deviceName},'%') |
| | | </if> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <update id="upDeviceParameter" parameterType="com.yuanchu.mom.pojo.Device"> |
| | | |
| | | UPDATE device |
| | | <set> |
| | | <if test="largeCategory!=null and largeCategory!='' ">large_category=#{largeCategory},</if> |
| | | <if test="dateProduction!=null ">date_production=#{dateProduction},</if> |
| | | <if test="equipmentManager!=null ">equipment_manager=#{equipmentManager},</if> |
| | | <if test="authorizedPerson!=null ">authorized_person=#{authorizedPerson}</if> |
| | | <if test="deviceName!=null ">device_name=#{deviceName}</if> |
| | | <if test="internalCode!=null ">internal_code=#{internalCode}</if> |
| | | <if test="assetCode!=null ">asset_code=#{assetCode}</if> |
| | | <if test="calibrationDate!=null ">calibration_date=#{calibrationDate}</if> |
| | | <if test="scrapTime!=null ">scrap_time=#{scrapTime}</if> |
| | | <if test="acceptanceRecords!=null ">acceptance_records=#{acceptanceRecords}</if> |
| | | <if test="subclass!=null ">subclass=#{subclass}</if> |
| | | <if test="factoryNo!=null ">factory_no=#{factoryNo}</if> |
| | | <if test="acquisitionDate!=null ">create_time=#{acquisition_date}</if> |
| | | <if test="factoryNo!=null ">create_time=#{factory_no}</if> |
| | | <if test="acquisitionDate!=null ">acquisition_date=#{acquisitionDate}</if> |
| | | <if test="accurateMeasurement!=null ">accurate_measurement=#{accurateMeasurement}</if> |
| | | <if test="notes!=null ">notes=#{notes}</if> |
| | | <if test="specificationModel!=null ">specification_model=#{specificationModel}</if> |
| | | <if test="deviceStatus!=null ">device_status=#{deviceStatus}</if> |
| | | <if test="storagePoint!=null ">storage_point=#{storagePoint}</if> |
| | | <if test="latestTraceability!=null ">latest_traceability=#{latestTraceability}</if> |
| | | <if test="downTime!=null ">down_time=#{downTime}</if> |
| | | <if test="maintenanceRecords!=null ">maintenance_records=#{maintenanceRecords}</if> |
| | | <if test="manufacturer!=null ">manufacturer=#{manufacturer}</if> |
| | | <if test="detectionType!=null ">detection_type=#{detectionType}</if> |
| | | <if test="procurementCosts!=null ">procurement_costs=#{procurementCosts}</if> |
| | | <if test="calibrationCerticate!=null ">calibration_certicate=#{calibrationCerticate}</if> |
| | | <if test="status!=null ">status=#{status}</if> |
| | | <if test="imageUpload!=null ">image_upload=#{imageUpload}</if> |
| | | <if test="imageName!=null ">image_name=#{imageName}</if> |
| | | </set> |
| | | <where> |
| | | id=#{id} |
| | | </where> |
| | | </update> |
| | | |
| | | <select id="selectDeviceImage" resultType="com.yuanchu.mom.pojo.Device"> |
| | | select (image_upload, create_user, create_time) values (#{image_upload} |
| | | , #{createUser} |
| | |
| | | equipment_manager |
| | | from device |
| | | </select> |
| | | |
| | | <select id="selectDeviceParameterPage" resultType="com.yuanchu.mom.dto.DeviceDto"> |
| | | select * from( |
| | | SELECT |
| | | d.*, u.name equipmentManagerUser, l.laboratory_name laboratoryName |
| | | FROM |
| | | device d |
| | | left join `user` u on u.id = d.equipment_manager |
| | | left join laboratory l on l.id = d.subordinate_departments_id |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | </mapper> |