| | |
| | | <if test="inventory.farmId != null and inventory.farmId !=''"> |
| | | AND (land.farm_id = #{inventory.farmId} OR inv.fps_id = #{inventory.farmId}) |
| | | </if> |
| | | <if test="inventory.type != null and inventory.type !='' "> |
| | | AND inventory.type = #{inventory.type} |
| | | </if> |
| | | <if test="inventory.kind != null and inventory.kind !='' "> |
| | | AND (inv.product_id = #{inventory.kind} OR inventory.strain_id = #{inventory.kind}) |
| | | </if> |
| | | AND bdb.code = "lossReason" |
| | | AND inventory.is_deleted = 0 |
| | | ORDER BY inventory.create_time DESC |
| | |
| | | * 品种名 |
| | | */ |
| | | private String proName; |
| | | /** |
| | | * 选择产品的id |
| | | */ |
| | | private String kind; |
| | | } |
| | |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 获取农产品和加工产品列表 |
| | | * @return |
| | | */ |
| | | @GetMapping("kind-tree") |
| | | public R kindTree(){ |
| | | return R.data(strainService.kindTree()); |
| | | } |
| | | |
| | | } |
| | |
| | | import org.springblade.modules.farmplant.vo.StrainVO; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 种养品种Mapper 接口 |
| | |
| | | */ |
| | | List<StrainVO> selectStrainPage(@Param("page") IPage page, @Param("strain") StrainVO strain); |
| | | |
| | | List<Map<String,String>> kindTree(); |
| | | } |
| | |
| | | and strain_name like concat('%',#{strain.strainName},'%') |
| | | </if> |
| | | </select> |
| | | <select id="kindTree" resultType="java.util.Map"> |
| | | SELECT strain.id,strain.strain_name kindName,0 AS type |
| | | FROM sys_strain strain |
| | | UNION |
| | | SELECT m.id ,m.machining_type,1 AS type |
| | | FROM sys_machining m |
| | | WHERE m.is_deleted = 0 |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | import org.springblade.modules.farmplant.vo.StrainVO; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 种养品种服务类 |
| | |
| | | * @return |
| | | */ |
| | | List<Strain> strainTree(StrainVO strain); |
| | | |
| | | List<Map<String,String>> kindTree(); |
| | | } |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 种养品种服务实现类 |
| | |
| | | public List<Strain> strainTree(StrainVO strain) { |
| | | return list(new QueryWrapper<>(strain)); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String,String>> kindTree() { |
| | | return baseMapper.kindTree(); |
| | | } |
| | | } |
| | |
| | | <if test="process.farmId!=null and process.farmId!=''"> |
| | | AND (sl.farm_id = #{process.farmId} or (inv.fps_id = #{process.farmId} AND p.land_id IS NULL)) |
| | | </if> |
| | | <if test="process.strainId !=null and process.strainId !=''"> |
| | | and p.strain_id = #{process.strainId} |
| | | <if test="process.kind !=null and process.kind !=''"> |
| | | and (p.strain_id = #{process.kind} OR p.parent_id = #{process.kind}) |
| | | </if> |
| | | GROUP BY p.id |
| | | ORDER BY p.create_time DESC |
| | |
| | | * 源头名 |
| | | */ |
| | | private String parentName; |
| | | /** |
| | | * 选择产品的id |
| | | */ |
| | | private String kind; |
| | | } |
| | |
| | | <if test="retrieval.farmId != null and retrieval.farmId !=''"> |
| | | AND (land.farm_id = #{retrieval.farmId} OR inv.fps_id = #{retrieval.farmId}) |
| | | </if> |
| | | <if test="retrieval.type != null and retrieval.type !='' "> |
| | | AND retrieval.type = #{retrieval.type} |
| | | </if> |
| | | <if test="retrieval.kind != null and retrieval.kind !='' "> |
| | | AND (inv.product_id = #{retrieval.kind} OR retrieval.strain_id = #{retrieval.kind}) |
| | | </if> |
| | | AND retrieval.is_deleted = 0 ORDER BY retrieval.create_time DESC |
| | | </select> |
| | | |
| | |
| | | * 品种名 |
| | | */ |
| | | private String proName; |
| | | /** |
| | | * 选择产品的id |
| | | */ |
| | | private String kind; |
| | | } |
| | |
| | | <if test="sale.farmId != null and sale.farmId !=''"> |
| | | AND (land.farm_id = #{sale.farmId} OR inv.fps_id = #{sale.farmId}) |
| | | </if> |
| | | <if test="sale.type != null and sale.type !='' "> |
| | | AND sale.type = #{sale.type} |
| | | </if> |
| | | <if test="sale.kind != null and sale.kind !='' "> |
| | | AND (inv.product_id = #{sale.kind} OR sale.strain_id = #{sale.kind}) |
| | | </if> |
| | | AND sale.is_deleted = 0 |
| | | ORDER BY |
| | | sale.create_time DESC |
| | |
| | | * 产品名 |
| | | */ |
| | | private String proName; |
| | | /** |
| | | * 选择产品的id |
| | | */ |
| | | private String kind; |
| | | } |