| | |
| | | t.comp_id, |
| | | t1.contract_no, |
| | | t2.company_name AS busGuestName, |
| | | t3.unit_price |
| | | t3.unit_price, |
| | | t4.batch_number |
| | | FROM |
| | | contract_out_bound t |
| | | LEFT JOIN contract t1 ON ( t1.id = t.contract_id AND t1.del_flag = '0' ) |
| | |
| | | LEFT JOIN contract_subject_matter t3 ON t3.contract_id = t.contract_id |
| | | AND t3.material_code = t.subject_matter_code |
| | | AND t3.del_flag = '0' |
| | | LEFT JOIN out_bound t4 ON t4.id = t.out_bound_id |
| | | WHERE |
| | | t.del_flag = '0' |
| | | <if test="queryDTO.queryCompId !=null and queryDTO.queryCompId !=''"> |
| | |
| | | </if> |
| | | <if test="queryDTO.contractNo !=null and queryDTO.contractNo !=''"> |
| | | AND t1.contract_no LIKE CONCAT('%', #{queryDTO.contractNo}, '%') |
| | | </if> |
| | | <if test="queryDTO.contractName !=null and queryDTO.contractName !=''"> |
| | | AND t1.contract_name LIKE CONCAT('%', #{queryDTO.contractName}, '%') |
| | | </if> |
| | | <if test="queryDTO.busGuestName !=null and queryDTO.busGuestName !=''"> |
| | | AND t2.company_name LIKE CONCAT('%', #{queryDTO.busGuestName}, '%') |
| | |
| | | ORDER BY |
| | | t.create_time DESC |
| | | </select> |
| | | <select id="gcpbkwcqk" resultType="com.by4cloud.platformx.business.vo.GcpbkwcqkItemVo"> |
| | | SELECT |
| | | d.dict_name AS bkmc, |
| | | IFNULL(sum(c.unit_price*c.advance_num+c.unit_price*c.out_bound_num),0) AS wc |
| | | FROM |
| | | bip_dict d |
| | | LEFT JOIN |
| | | contract_out_bound c |
| | | ON |
| | | d.dict_code = c.product_section and c.del_flag = '0' |
| | | and c.out_bound_time >= #{start} |
| | | and c.out_bound_time <= #{end} |
| | | WHERE |
| | | d.dict_key = 'zb-cpbk' |
| | | GROUP BY |
| | | d.dict_name, d.dict_key; |
| | | </select> |
| | | <select id="cpxssrwcqk" resultType="com.by4cloud.platformx.business.vo.CpxssrwcqkItemVo"> |
| | | SELECT |
| | | d.dict_name AS xm, |
| | | IFNULL( sum( c.advance_num+ c.out_bound_num), 0 ) AS xsl, |
| | | IFNULL(sum(c.unit_price*c.advance_num+c.unit_price*c.out_bound_num),0) AS xssr |
| | | FROM |
| | | bip_dict d |
| | | LEFT JOIN |
| | | contract_out_bound c |
| | | ON |
| | | d.dict_code = c.product_section and c.del_flag = '0' |
| | | and c.out_bound_time >= #{monstart} |
| | | and c.out_bound_time <= #{monend} |
| | | WHERE |
| | | d.dict_key = 'zb-cpbk' |
| | | GROUP BY |
| | | d.dict_name, d.dict_key; |
| | | </select> |
| | | </mapper> |