src/main/java/org/springblade/modules/InventoryLoss/entity/Inventory.java
@@ -72,5 +72,9 @@ * 备注 */ private String remarks; /** * 地块id */ private String landId; } src/main/java/org/springblade/modules/InventoryLoss/mapper/InventoryMapper.xml
@@ -16,10 +16,14 @@ from sys_inventory inventory LEFT JOIN sys_strain strain on inventory.strain_id = strain.id LEFT JOIN blade_dict_biz bdb ON inventory.reason = bdb.dict_key LEFT JOIN sys_land land ON land.id = inventory.land_id where <if test="inventory.strainId !=null and inventory.strainId != '' "> inventory.strain_id = #{inventory.strainId} AND </if> <if test="inventory.farmId != null and inventory.farmId !='' "> land.farm_id = #{inventory.farmId} AND </if> bdb.code = "lossReason" AND inventory.is_deleted = 0 ORDER BY inventory.create_time DESC </select> src/main/java/org/springblade/modules/InventoryLoss/vo/InventoryVO.java
@@ -42,4 +42,8 @@ * 损耗原因名 */ private String reasonName; /** * 农场id */ private String farmId; } src/main/java/org/springblade/modules/processInv/entity/ProcessInv.java
@@ -48,6 +48,9 @@ * 产品库存数量 */ private Double productInventoryNum; /** * 农场id */ private String farmId; } src/main/java/org/springblade/modules/processInv/mapper/ProcessInvMapper.java
@@ -38,7 +38,7 @@ * @param processInv * @return */ List<ProcessInvVO> selectProcessInvPage(IPage page, ProcessInvVO processInv); List<ProcessInvVO> selectProcessInvPage(IPage page, @Param("processInv") ProcessInvVO processInv); ProcessInv selectBy2Id(@Param("strainId") Long strainId, @Param("productId") Long productId); src/main/java/org/springblade/modules/processInv/mapper/ProcessInvMapper.xml
@@ -25,6 +25,9 @@ LEFT JOIN sys_machining m ON m.id = inv.product_id LEFT JOIN sys_strain strain ON strain.id = inv.strain_id where inv.is_deleted = 0 <if test="processInv.farmId != null and processInv.farmId != ''"> AND inv.farm_id = #{processInv.farmId} </if> </select> <select id="selectBy2Id" resultType="org.springblade.modules.processInv.entity.ProcessInv"> src/main/java/org/springblade/modules/retrieval/mapper/RetrievalMapper.xml
@@ -40,11 +40,15 @@ LEFT JOIN sys_strain strain ON strain.id = retrieval.strain_id LEFT JOIN sys_district district ON retrieval.sale_destination = district.code LEFT JOIN blade_region region on retrieval.county = region.district_code LEFT JOIN sys_land land ON land.id = retrieval.land_id WHERE <if test="retrieval.strainId !=null and retrieval.strainId != '' "> retrieval.strain_id = #{retrieval.strainId} AND </if> is_deleted = 0 ORDER BY retrieval.create_time DESC <if test="retrieval.farmId != null and retrieval.farmId !=''"> land.farm_id = #{retrieval.farmId} AND </if> retrieval.is_deleted = 0 ORDER BY retrieval.create_time DESC </select> </mapper> src/main/java/org/springblade/modules/retrieval/vo/RetrievalVO.java
@@ -54,4 +54,8 @@ * 省市区中文拼接 */ private String saleDestination2; /** * 农场id */ private String farmId; } src/main/java/org/springblade/modules/sale/mapper/SaleMapper.xml
@@ -43,10 +43,14 @@ LEFT JOIN sys_strain strain on sale.strain_id = strain.id LEFT JOIN sys_district district on sale.sale_destination = district.code LEFT JOIN blade_region region on sale.county = region.district_code LEFT JOIN sys_land land ON land.id = sale.land_id WHERE <if test="sale.strainId !=null and sale.strainId != '' "> sale.strain_id = #{sale.strainId} AND </if> <if test="sale.farmId != null and sale.farmId !=''"> land.farm_id = #{sale.farmId} AND </if> sale.is_deleted = 0 ORDER BY sale.create_time DESC </select>