| | |
| | | <select id="selectLists" resultType="org.springblade.modules.stock.vo.StockVO"> |
| | | SELECT st.*, |
| | | stf.factory_name AS factoryName, |
| | | stf.type AS stype, |
| | | a.dict_value AS stype, |
| | | d.dict_value AS dic1, |
| | | c.dict_value AS dic2 |
| | | c.dict_value AS dic2, |
| | | stf.agricultural_name as agrname |
| | | FROM sys_stock st |
| | | LEFT JOIN sys_stockfactory stf ON stf.id = st.stock_id |
| | | LEFT JOIN (SELECT dict_key, dict_value |
| | |
| | | LEFT JOIN (SELECT dict_key, dict_value |
| | | FROM blade_dict_biz |
| | | WHERE CODE = 'stockSpecs2' AND is_deleted = 0) c ON c.dict_key = st.specs_value2 |
| | | WHERE st.is_deleted = 0 |
| | | LEFT JOIN ( SELECT dict_key, dict_value FROM blade_dict_biz WHERE CODE = 'stockType' AND is_deleted = 0 ) a ON |
| | | a.dict_key = stf.type |
| | | WHERE st.is_deleted = 0 and state=0 |
| | | <if test="stock.stype!=null and stock.stype != ''"> |
| | | and stf.type = #{stock.stype} |
| | | </if> |
| | |
| | | <if test="stock.type!=null and stock.type != ''"> |
| | | and st.type = #{stock.type} |
| | | </if> |
| | | <if test="stock.agrname!=null and stock.agrname != ''"> |
| | | and stf.agricultural_name like concat('%', #{stock.agrname},'%') |
| | | </if> |
| | | </select> |
| | | <!--入库出库--> |
| | | <update id="UpdaeAmountc"> |
| | | update sys_stock set amount = #{stock.amount} ,state=#{stock.state} where stock_id=#{stock.stockId} |
| | | update sys_stock set amount = #{stock.amount} ,state=#{stock.state} where id=#{stock.id} |
| | | </update> |
| | | |
| | | <!--入库出库--> |
| | | <update id="Updaet"> |
| | | update sys_stock set amount = #{stock.amount} where id=#{stock.id} |
| | | </update> |
| | | |
| | | </mapper> |