| | |
| | | a.dict_value AS stype, |
| | | d.dict_value AS dic1, |
| | | c.dict_value AS dic2, |
| | | stf.agricultural_name as agrname |
| | | stf.agricultural_name as agrname, |
| | | st.dept_id |
| | | FROM sys_soldr st |
| | | LEFT JOIN sys_stockfactory stf ON stf.id = st.stock_id1 |
| | | LEFT JOIN (SELECT dict_key, dict_value |
| | |
| | | </if> |
| | | <if test="soldr.stockId1!=null and soldr.stockId1 != ''"> |
| | | and st.stock_id1 = #{soldr.stockId1} |
| | | </if> |
| | | <if test="soldr.deptId != null and soldr.deptId !=''"> |
| | | AND st.dept_id = #{soldr.deptId} |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | WHERE CODE = 'stockType' AND is_deleted = 0) a ON |
| | | a.dict_key = stf.type |
| | | WHERE st.is_deleted = 0 |
| | | <if test="farmId != null and farmId !=''"> |
| | | AND st.dept_id = #{farmId} |
| | | </if> |
| | | </select> |
| | | |
| | | <!--查询是否存在已出库农资--> |
| | | <select id="selectCz" resultType="java.util.Map"> |
| | | SELECT census, sid, amount1 |
| | | FROM `sys_soldr` |
| | | WHERE sid = #{sid} |
| | | WHERE sid = #{sid} AND dept_id = #{deptId} |
| | | </select> |
| | | <!-- 根据stockId、specs1、specs_val1、specs_val2、sid--> |
| | | <select id="getByServalParam" resultType="org.springblade.modules.soldr.entity.Soldr"> |