| | |
| | | |
| | | <select id="selectLinkAll" resultType="java.util.Map"> |
| | | SELECT d.id, |
| | | l.entrust_coding entrustCoding, |
| | | DATE_FORMAT(l.`inspection_time`, '%Y-%m-%d') formTime, |
| | | l.`entrusted` supplier, |
| | | d.`sample_number` mcode, |
| | | d.`sample_name` name, |
| | | d.`specifications_models` specifications, |
| | | d.`spe_name` specifications, |
| | | d.`unit`, |
| | | d.`samples_number` num, |
| | | d.specifications_models specificationsId, |
| | |
| | | </resultMap> |
| | | |
| | | <select id="FourTree" resultMap="OneLevelTreeMap"> |
| | | SELECT m.`type`, m.`id` materialId, m.`name` materialName, s.id standardId, s.name standardName, |
| | | f.id specificationsId, f.name specificationsName |
| | | SELECT m.`type`, |
| | | m.`id` materialId, |
| | | m.`name` materialName, |
| | | s.id standardId, |
| | | s.name standardName, |
| | | f.id specificationsId, |
| | | f.name specificationsName |
| | | FROM material m |
| | | LEFT JOIN (SELECT s.`id`, s.`name`, s.`material_id` FROM standard s WHERE s.`state` = 1) s |
| | | ON s.material_id = m.`id` |
| | | LEFT JOIN (SELECT f.`id`, f.`name`, f.`standard_id`, f.`create_time` FROM specifications f WHERE f.`state` = 1) f |
| | | LEFT JOIN (SELECT f.`id`, f.`name`, f.`standard_id`, f.`create_time` |
| | | FROM specifications f |
| | | WHERE f.`state` = 1) f |
| | | ON f.standard_id = s.id |
| | | WHERE m.`state` = 1 |
| | | ORDER BY f.create_time DESC |
| | | </select> |
| | | |
| | | <select id="getTreeByMaterialId" resultMap="getTreeById"> |
| | | SELECT |
| | | m.id mId, |
| | | SELECT m.id mId, |
| | | m.`name` mName, |
| | | sd.id sdId, |
| | | sd.`name` sdName, |
| | | ss.id ssId, |
| | | ss.`name` ssName |
| | | FROM |
| | | material m, |
| | | FROM material m, |
| | | standard sd, |
| | | specifications ss |
| | | WHERE |
| | | m.id = sd.material_id |
| | | WHERE m.id = sd.material_id |
| | | AND sd.id = ss.standard_id |
| | | AND m.id = #{id} |
| | | AND m.state != 0 |
| | |
| | | # redis访问密码(默认为空) |
| | | password: null |
| | | # redis连接超时时间(单位毫秒) |
| | | timeout: 2000 |
| | | timeout: 20 |
| | | # redis连接池配置 |
| | | pool: |
| | | # 最大可用连接数(默认为8,负数表示无限) |