diff --git a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/devchange/MaDevInfoMapper.xml b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/devchange/MaDevInfoMapper.xml index 19cc5b8..70c1021 100644 --- a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/devchange/MaDevInfoMapper.xml +++ b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/devchange/MaDevInfoMapper.xml @@ -1,75 +1,75 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ma_id, device_name, device_weight, device_count, code, identify_code, type_id, ma_status, + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ma_id, device_name, device_weight, device_count, code, identify_code, type_id, ma_status, lease_scope, `location`, brand, model_name, production_date, working_hours, serial_number, month_lease_price, day_lease_price, pic_url, js_month_price, js_day_price, description, gps_code, own_co, person, person_phone, create_time, creator, deposit, is_active, @@ -77,130 +77,169 @@ video_url, own_id, check_date, check_cycle, is_qc, is_safe_book, is_zone, zone_id, total_up_day, total_lease_day, origina_value, change_status, expiration_time, entry_status, up_down_status, json_data, buy_price, item_type_model, on_project - + - + SELECT + mtv.proType, + mtv.mainGx, + mtv.childGx, + mtv.devCategory, + mtv.devSubcategory, + mtv.devName, + mtv.devModel, + mtv.unit_name, + mdi.ma_id, + mdi.device_name, + mdi.model_name, + mdi.ma_status, + mdi.`code`, + mdi.expiration_time, + c.company_name, + mdi.buy_price, + mdi.production_date, + mdi.working_hours, + mdi.on_project, + mdi.person, + mdi.person_phone, + mdi.change_status, + mdi.up_down_status, + mdq.next_check_time, + mdi.brand, + mdi.pic_url + FROM + ma_dev_info mdi LEFT JOIN ma_dev_qc mdq ON mdq.ma_id = mdi.ma_id LEFT JOIN sys_dept sd ON sd.dept_id = mdi.own_co LEFT JOIN bm_company_info c ON sd.dept_id = c.company_id LEFT JOIN ma_type_view mtv ON mtv.typeId = mdi.type_id - WHERE mdi.is_active = 1 and mdi.entry_status = 1 - - and ( - mtv.mainGxId = #{typeId} - or mtv.childGxId = #{typeId} - or mtv.devCategoryId = #{typeId} - or mtv.devSubcategoryId = #{typeId} - or mtv.devNameId = #{typeId} - or mtv.devModelId = #{typeId} - or mtv.maxTypeId = #{typeId} - ) - - + WHERE mdi.is_active = 1 and mdi.entry_status = 1 + + and ( + mtv.mainGxId = #{typeId} + or mtv.childGxId = #{typeId} + or mtv.devCategoryId = #{typeId} + or mtv.devSubcategoryId = #{typeId} + or mtv.devNameId = #{typeId} + or mtv.devModelId = #{typeId} + or mtv.maxTypeId = #{typeId} + ) + + + and c.company_name like concat('%',#{companyName},'%') + + + and mdi.on_project like concat('%',#{onProject},'%') + - - - UPDATE ma_dev_info SET up_down_status = #{data.value} where ma_id =#{data.key} - - + + and mtv.devName like concat('%',#{deviceName},'%') + - + + and mdi.`code` like concat('%',#{code},'%') + - + + and mdi.ma_status like concat('%',#{changeStatus},'%') + - + + + + UPDATE ma_dev_info SET up_down_status = #{data.value} where ma_id =#{data.key} + + + + + + + + + FROM + ma_dev_info mdi + LEFT JOIN ma_dev_qc mdq ON mdq.ma_id = mdi.ma_id + LEFT JOIN sys_dept sd ON sd.dept_id = mdi.own_co + LEFT JOIN bm_company_info c ON sd.dept_id = c.company_id + LEFT JOIN ma_type_view mtv ON mtv.typeId = mdi.type_id + WHERE mdi.is_active = 1 + + and ( + mtv.mainGxId = #{typeId} + or mtv.childGxId = #{typeId} + or mtv.devCategoryId = #{typeId} + or mtv.devSubcategoryId = #{typeId} + or mtv.devNameId = #{typeId} + or mtv.devModelId = #{typeId} + or mtv.maxTypeId = #{typeId} + ) + + - + - + - + SELECT bci.id as `key`, bci.company_name as `value` - FROM + FROM bm_company_info bci - - - and bci.id = #{id} - - - + + + and bci.id = #{id} + + + diff --git a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/DevInfoMapper.xml b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/DevInfoMapper.xml index 89f0186..0bc341e 100644 --- a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/DevInfoMapper.xml +++ b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/DevInfoMapper.xml @@ -137,6 +137,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ) and d.is_active='1' + and d.up_down_status ='1' order by d.is_active