From 8bdbba337b312e8d5b5769f945236b9b5472ebc2 Mon Sep 17 00:00:00 2001
From: tangzy <tangzy123456>
Date: Sat, 11 Jun 2022 09:05:33 +0800
Subject: [PATCH] 农资统计

---
 src/main/java/org/springblade/modules/farmplant/controller/FarmPlantController.java           |   92 ++
 src/main/java/org/springblade/modules/farmplant/mapper/FarmPlantMapper.java                   |   33 
 src/main/java/org/springblade/modules/machining/dto/MachiningDTO.java                         |   34 +
 src/main/java/org/springblade/modules/farmplant/mapper/FarmProductStockMapper.java            |    2 
 src/main/java/org/springblade/modules/sale/entity/Sale.java                                   |   65 +
 src/main/java/org/springblade/modules/task/mapper/TaskMapper.java                             |   42 +
 src/main/java/sql/task.menu.sql                                                               |   10 
 src/main/java/org/springblade/modules/farmplant/mapper/FarmProductStockMapper.xml             |   14 
 src/main/java/org/springblade/modules/lang/mapper/LandMapper.xml                              |   23 
 src/main/java/org/springblade/modules/task/vo/TaskVO.java                                     |   34 +
 src/main/java/org/springblade/modules/sale/service/ISaleService.java                          |   45 +
 src/main/java/org/springblade/modules/sale/controller/SaleController.java                     |  143 ++++
 src/main/java/sql/sale.menu.sql                                                               |   10 
 src/main/java/org/springblade/modules/farmplant/service/impl/FarmPlantServiceImpl.java        |   91 ++
 src/main/java/org/springblade/modules/machining/mapper/MachiningMapper.xml                    |   26 
 src/main/java/org/springblade/modules/task/dto/TaskDTO.java                                   |   34 +
 src/main/java/org/springblade/modules/machining/controller/MachiningController.java           |  127 +++
 src/main/java/org/springblade/modules/task/entity/Task.java                                   |   84 ++
 src/main/java/org/springblade/modules/machining/service/IMachiningService.java                |   41 +
 src/main/java/org/springblade/modules/task/mapper/TaskMapper.xml                              |   31 
 src/main/java/org/springblade/modules/sale/dto/SaleDTO.java                                   |   34 +
 src/main/java/org/springblade/modules/farmplant/vo/FarmPlantVO.java                           |    1 
 src/main/java/org/springblade/modules/lang/controller/LandController.java                     |  156 +++
 src/main/java/sql/machining.menu.sql                                                          |   10 
 src/main/java/org/springblade/modules/lang/service/ILandService.java                          |    1 
 src/main/java/org/springblade/modules/machining/mapper/MachiningMapper.java                   |   42 +
 src/main/java/org/springblade/modules/farmplant/mapper/FarmPlantMapper.xml                    |  196 +++++
 src/main/java/org/springblade/modules/sale/mapper/SaleMapper.xml                              |   52 +
 src/main/java/org/springblade/modules/sale/service/impl/SaleServiceImpl.java                  |   54 +
 src/main/java/org/springblade/modules/task/service/impl/TaskServiceImpl.java                  |   41 +
 src/main/java/org/springblade/modules/farmplant/service/FarmProductStockService.java          |    3 
 src/main/java/org/springblade/modules/lang/mapper/LandMapper.java                             |    1 
 src/main/java/org/springblade/modules/farmplant/controller/FarmProductStockController.java    |    8 
 src/main/java/org/springblade/modules/farmplant/service/FarmPlantService.java                 |   11 
 src/main/java/org/springblade/modules/lang/entity/Land.java                                   |   53 
 src/main/java/org/springblade/modules/machining/service/impl/MachiningServiceImpl.java        |   41 +
 src/main/java/org/springblade/modules/task/controller/TaskController.java                     |  128 +++
 src/main/java/org/springblade/modules/lang/vo/LandVO.java                                     |    1 
 src/main/java/org/springblade/common/config/BladeConfiguration.java                           |    1 
 src/main/java/org/springblade/modules/sale/vo/SaleVO.java                                     |   34 +
 src/main/java/org/springblade/modules/sale/mapper/SaleMapper.java                             |   44 +
 src/main/java/org/springblade/modules/machining/vo/MachiningVO.java                           |   34 +
 src/main/java/org/springblade/modules/task/service/ITaskService.java                          |   41 +
 src/main/java/org/springblade/modules/machining/entity/Machining.java                         |   56 +
 src/main/java/org/springblade/modules/farmplant/service/impl/FarmProductStockServiceImpl.java |    6 
 src/main/java/org/springblade/modules/lang/service/impl/LandServiceImpl.java                  |    5 
 46 files changed, 1,928 insertions(+), 107 deletions(-)

diff --git a/src/main/java/org/springblade/common/config/BladeConfiguration.java b/src/main/java/org/springblade/common/config/BladeConfiguration.java
index 405bf2d..c57864e 100644
--- a/src/main/java/org/springblade/common/config/BladeConfiguration.java
+++ b/src/main/java/org/springblade/common/config/BladeConfiguration.java
@@ -51,6 +51,7 @@
 		secureRegistry.excludePathPatterns("/webjars/**");
 		secureRegistry.excludePathPatterns("/swagger-resources/**");
 		secureRegistry.excludePathPatterns("/druid/**");
+		secureRegistry.excludePathPatterns("/farmPlant/**");
 		secureRegistry.excludePathPatterns("/land/land/**");
 		secureRegistry.excludePathPatterns("/blade-resource/oss/endpoint/**");
 		return secureRegistry;
diff --git a/src/main/java/org/springblade/modules/farmplant/controller/FarmPlantController.java b/src/main/java/org/springblade/modules/farmplant/controller/FarmPlantController.java
index da64666..f8eb416 100644
--- a/src/main/java/org/springblade/modules/farmplant/controller/FarmPlantController.java
+++ b/src/main/java/org/springblade/modules/farmplant/controller/FarmPlantController.java
@@ -42,12 +42,15 @@
 import java.text.DecimalFormat;
 import java.text.SimpleDateFormat;
 import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * 农场养殖记录表控制器
- * @since 2022-05-12
+ *
  * @author zhongrj
+ * @since 2022-05-12
  */
 @RestController
 @AllArgsConstructor
@@ -104,23 +107,23 @@
 	public R save(@Valid @RequestBody FarmPlant farmPlant) {
 		farmPlant.setCreateTime(new Date());
 		boolean save = farmplantService.save(farmPlant);
-		if (save){
+		if (save) {
 			//同时生成农事记录
 			FarmingRecord record = new FarmingRecord();
 			record.setCreateTime(new Date());
 			record.setJobWay(farmPlant.getJobWay());
 			record.setTime(farmPlant.getTransplanTime());
-			if(farmPlant.getPlantingWay().equals("0")){
+			if (farmPlant.getPlantingWay().equals("0")) {
 				//移栽
 				record.setType("10");
 			}
-			if(farmPlant.getPlantingWay().equals("1")){
+			if (farmPlant.getPlantingWay().equals("1")) {
 				//直播
 				record.setType("11");
 			}
 			record.setLandId(farmPlant.getLandId());
 			record.setOperator(farmPlant.getCreateUser());
-			record.setRemarks("品种: "+farmPlant.getVarieties());
+			record.setRemarks("品种: " + farmPlant.getVarieties());
 			//新增
 			farmingRecordService.save(record);
 
@@ -143,7 +146,7 @@
 	public R update(@Valid @RequestBody FarmPlant farmPlant) {
 		boolean status = false;
 		//如果是结束
-		if (farmPlant.getStatus().equals("2")){
+		if (farmPlant.getStatus().equals("2")) {
 			//更新
 			status = farmplantService.updateById(farmPlant);
 			//判断该地块是否还有种植的农产品
@@ -152,14 +155,14 @@
 			farmPlant1.setLandId(farmPlant2.getLandId());
 			farmPlant1.setStatus("1");
 			List<FarmPlant> list = farmplantService.list(new QueryWrapper<>(farmPlant1));
-			if (list.size()<1){
+			if (list.size() < 1) {
 				//更新该地块的耕种状态
 				Land land = new Land();
 				land.setType(1);
 				land.setId(Long.parseLong(farmPlant2.getLandId()));
 				landService.updateById(land);
 			}
-		}else {
+		} else {
 			//更新
 			status = farmplantService.updateById(farmPlant);
 		}
@@ -191,17 +194,19 @@
 
 	/**
 	 * 农产品种养统计
+	 *
 	 * @param farmPlantVO 农产品种植对象
-	 * @param query 分页查询对象
+	 * @param query       分页查询对象
 	 * @return
 	 */
 	@GetMapping("/getFarmPlantStatistics")
 	public R<IPage<FarmPlantVO>> getFarmPlantStatistics(FarmPlantVO farmPlantVO, Query query) {
-		return R.data(farmplantService.getFarmPlantStatistics(Condition.getPage(query),farmPlantVO));
+		return R.data(farmplantService.getFarmPlantStatistics(Condition.getPage(query), farmPlantVO));
 	}
 
 	/**
 	 * 农产品种养统计(累计和)
+	 *
 	 * @param farmPlantVO 农产品种植对象
 	 * @return
 	 */
@@ -212,12 +217,77 @@
 
 	/**
 	 * 农产品列表
+	 *
 	 * @param farm 农产品对象
 	 * @return
 	 */
 	@GetMapping("/strain-tree")
-	public R strainTree(FarmPlantVO farm){
+	public R strainTree(FarmPlantVO farm) {
 		return R.data(farmplantService.strainTree(farm));
 	}
 
+
+	/**
+	 * 大屏种养品种接口
+	 *
+	 * @param farmPlant
+	 * @param query
+	 * @return
+	 */
+	@GetMapping("/pagePalnt")
+	public R pagePalnt(FarmPlantVO farmPlant, Query query) {
+		int i = farmplantService.selectCount();
+		IPage<FarmPlantVO> pages = farmplantService.selectFarmPlantPage(Condition.getPage(query), farmPlant);
+		Map map = new HashMap<>();
+		map.put("num", i);
+		map.put("page", pages);
+		return R.data(map);
+	}
+
+	/**
+	 * 种植品种监管 0:有机 1:绿色 2:无公害 3:普通
+	 * code=1(当天) =2(月) =3(年)
+	 *
+	 * @return
+	 */
+	@GetMapping("/selectPlant")
+	public R selectPlant(String code, String time) {
+		Map map1 = farmplantService.selectPlant(code, time);
+		Map map2 = farmplantService.selectPlantl(code, time);
+		Map map3 = farmplantService.selectPlantw(code, time);
+		Map map4 = farmplantService.selectPlantp(code, time);
+		Map map = new HashMap();
+		map.put("yj", map1.get("num"));
+		map.put("ls", map2.get("num"));
+		map.put("wgh", map3.get("num"));
+		map.put("pt", map4.get("num"));
+		return R.data(map);
+	}
+
+	/**
+	 * 种植采收监管 产品等级(0:一等品 1:二等品 2:三等品 3:四等品4:五等品  code=1(当天) =2(月) =3(年)
+	 *
+	 * @return
+	 */
+	@GetMapping("/selectProduct")
+	public R selectProduct(String code, String time) {
+		//(0:一等品
+		Map map1 = farmplantService.selectProduct(code, time);
+		//1:二等品
+		Map map2 = farmplantService.selectProducty(code, time);
+		//2:三等品
+		Map map3 = farmplantService.selectProductr(code, time);
+		//3:四等品
+		Map map4 = farmplantService.selectProducts(code, time);
+		//4:五等品
+		Map map5 = farmplantService.selectProductf(code, time);
+		Map map = new HashMap();
+		map.put("yi", map1.get("num"));
+		map.put("er", map2.get("num"));
+		map.put("san", map3.get("num"));
+		map.put("shi", map4.get("num"));
+		map.put("wu", map5.get("num"));
+		return R.data(map);
+	}
+
 }
diff --git a/src/main/java/org/springblade/modules/farmplant/controller/FarmProductStockController.java b/src/main/java/org/springblade/modules/farmplant/controller/FarmProductStockController.java
index 6de6115..5816a2b 100644
--- a/src/main/java/org/springblade/modules/farmplant/controller/FarmProductStockController.java
+++ b/src/main/java/org/springblade/modules/farmplant/controller/FarmProductStockController.java
@@ -116,4 +116,12 @@
 		return R.status(farmProductStockService.removeByIds(Func.toLongList(ids)));
 	}
 
+	/**
+	 * 大屏产量统计
+	 */
+	@PostMapping("/selctProductCount")
+	public R selctProductCount( String year) {
+		return R.data(farmProductStockService.selctProductCount(year));
+	}
+
 }
diff --git a/src/main/java/org/springblade/modules/farmplant/mapper/FarmPlantMapper.java b/src/main/java/org/springblade/modules/farmplant/mapper/FarmPlantMapper.java
index a893ac1..73b8ed8 100644
--- a/src/main/java/org/springblade/modules/farmplant/mapper/FarmPlantMapper.java
+++ b/src/main/java/org/springblade/modules/farmplant/mapper/FarmPlantMapper.java
@@ -9,11 +9,13 @@
 import org.springblade.modules.farmplant.vo.StrainVO;
 
 import java.util.List;
+import java.util.Map;
 
 /**
- *  农产品种植记录表Mapper 接口
- * @since 2022-05-12
+ * 农产品种植记录表Mapper 接口
+ *
  * @author zhongrj
+ * @since 2022-05-12
  */
 public interface FarmPlantMapper extends BaseMapper<FarmPlant> {
 
@@ -24,28 +26,45 @@
 	 * @param farm
 	 * @return
 	 */
-	List<FarmPlantVO> selectFarmPlantPage(@Param("page") IPage page,@Param("farmPlant") FarmPlantVO farm);
+	List<FarmPlantVO> selectFarmPlantPage(@Param("page") IPage page, @Param("farmPlant") FarmPlantVO farm);
 
 	/**
-	 *
 	 * @param page
 	 * @param farm
 	 * @return
 	 */
-    List<FarmPlantVO> getFarmPlantStatistics(@Param("page") IPage<FarmPlantVO> page,@Param("farmPlant") FarmPlantVO farm);
+	List<FarmPlantVO> getFarmPlantStatistics(@Param("page") IPage<FarmPlantVO> page, @Param("farmPlant") FarmPlantVO farm);
 
 	/**
 	 * 农产品列表
+	 *
 	 * @param farm 农产品对象
 	 * @return
 	 */
-    List<Strain> strainTree(@Param("farm") FarmPlantVO farm);
+	List<Strain> strainTree(@Param("farm") FarmPlantVO farm);
 
 
 	/**
 	 * 统计查询种植面积
- 	 * @param farm
+	 *
+	 * @param farm
 	 * @return
 	 */
 	List<FarmPlantVO> getFarmPlantStatisticsCount(@Param("farmPlant") FarmPlantVO farm);
+
+	int selectCount();
+
+	Map selectPlant(String code, String time);
+
+	Map selectPlantl(String code, String time);
+
+	Map selectPlantw(String code, String time);
+
+	Map selectPlantp(String code, String time);
+
+	Map selectProduct(String code, String time);
+	Map selectProducty(String code, String time);
+	Map selectProductr(String code, String time);
+	Map selectProducts(String code, String time);
+	Map selectProductf(String code, String time);
 }
diff --git a/src/main/java/org/springblade/modules/farmplant/mapper/FarmPlantMapper.xml b/src/main/java/org/springblade/modules/farmplant/mapper/FarmPlantMapper.xml
index 066cd89..4aaf932 100644
--- a/src/main/java/org/springblade/modules/farmplant/mapper/FarmPlantMapper.xml
+++ b/src/main/java/org/springblade/modules/farmplant/mapper/FarmPlantMapper.xml
@@ -4,7 +4,8 @@
 
     <!--自定义查询农场养殖记录分页数据-->
     <select id="selectFarmPlantPage" resultType="org.springblade.modules.farmplant.vo.FarmPlantVO">
-        select sfp.*,ss.strain_name strainName,ss.url,sl.land_name landName,sl.land_area area,land_unit landUnit from sys_farm_plant sfp
+        select sfp.*,ss.strain_name strainName,ss.url,sl.land_name landName,sl.land_area area,land_unit landUnit from
+        sys_farm_plant sfp
         left join sys_strain ss on ss.id = sfp.strain_id
         left join sys_land sl on sl.id = sfp.land_id
         where 1=1
@@ -40,7 +41,8 @@
 
     <!--自定义查询农场养殖记录分页数据-->
     <select id="getFarmPlantStatistics" resultType="org.springblade.modules.farmplant.vo.FarmPlantVO">
-        select sfp.strain_id,ss.strain_name strainName,sum(sl.land_area) areas,land_unit landUnit from sys_farm_plant sfp
+        select sfp.strain_id,ss.strain_name strainName,sum(sl.land_area) areas,land_unit landUnit from sys_farm_plant
+        sfp
         left join sys_strain ss on ss.id = sfp.strain_id
         left join sys_land sl on sl.id = sfp.land_id
         where 1=1
@@ -55,7 +57,8 @@
 
     <!--查询农场养殖记录数据-->
     <select id="getFarmPlantStatisticsCount" resultType="org.springblade.modules.farmplant.vo.FarmPlantVO">
-        select sfp.strain_id,ss.strain_name strainName,sum(sl.land_area) areas,land_unit landUnit from sys_farm_plant sfp
+        select sfp.strain_id,ss.strain_name strainName,sum(sl.land_area) areas,land_unit landUnit from sys_farm_plant
+        sfp
         left join sys_strain ss on ss.id = sfp.strain_id
         left join sys_land sl on sl.id = sfp.land_id
         where 1=1
@@ -70,8 +73,189 @@
 
     <!--已种植农产品列表-->
     <select id="strainTree" resultType="org.springblade.modules.farmplant.entity.Strain">
-        select ss.id,ss.strain_name strainName from sys_farm_plant sfp
-        left join sys_strain ss on ss.id = sfp.strain_id
-        where sfp.status = "1" and sfp.land_id = #{farm.landId}
+        select ss.id, ss.strain_name strainName
+        from sys_farm_plant sfp
+                 left join sys_strain ss on ss.id = sfp.strain_id
+        where sfp.status = "1"
+          and sfp.land_id = #{farm.landId}
     </select>
+
+    <select id="selectCount" resultType="java.lang.Integer">
+        SELECT IFNULL(COUNT(*), 0) as num
+        FROM (SELECT strain_id FROM `sys_farm_plant` WHERE STATUS = 1 GROUP BY strain_id) a
+    </select>
+
+    <!--种植品种监管 0:有机 code=1(当天) =2(月) =3(年)-->
+    <select id="selectPlant" resultType="java.util.HashMap">
+        SELECT
+        IFNULL( COUNT( * ), 0 ) AS num
+        FROM
+        `sys_farm_plant`
+        WHERE
+        plant = 0
+        AND STATUS = 1
+        <if test="1 == code">
+            and to_days(create_time) = to_days(#{time});
+        </if>
+        <if test="2 == code">
+            and DATE_FORMAT( create_time, '%Y%m' ) = DATE_FORMAT(#{time} ,'%Y%m' )
+        </if>
+        <if test="3 == code">
+            and YEAR(create_time)=YEAR(#{time});
+        </if>
+    </select>
+    <!--种植品种监管 1:绿色 -->
+    <select id="selectPlantl" resultType="java.util.HashMap">
+        SELECT
+        IFNULL( COUNT( * ), 0 ) AS num
+        FROM
+        `sys_farm_plant`
+        WHERE
+        plant = 1
+        AND STATUS = 1
+        <if test="1 == code">
+            and to_days(create_time) = to_days(#{time});
+        </if>
+        <if test="2 == code">
+            and DATE_FORMAT( create_time, '%Y%m' ) = DATE_FORMAT(#{time} ,'%Y%m' )
+        </if>
+        <if test="3 == code">
+            and YEAR(create_time)=YEAR(#{time});
+        </if>
+    </select>
+    <!--种植品种监管 2:无公害 -->
+    <select id="selectPlantw" resultType="java.util.HashMap">
+        SELECT
+        IFNULL( COUNT( * ), 0 ) AS num
+        FROM
+        `sys_farm_plant`
+        WHERE
+        plant = 2
+        AND STATUS = 1
+        <if test="1 == code">
+            and to_days(create_time) = to_days(#{time});
+        </if>
+        <if test="2 == code">
+            and DATE_FORMAT( create_time, '%Y%m' ) = DATE_FORMAT(#{time} ,'%Y%m' )
+        </if>
+        <if test="3 == code">
+            and YEAR(create_time)=YEAR(#{time});
+        </if>
+    </select>
+    <!--种植品种监管 3:普通 -->
+    <select id="selectPlantp" resultType="java.util.HashMap">
+        SELECT
+        IFNULL( COUNT( * ), 0 ) AS num
+        FROM
+        `sys_farm_plant`
+        WHERE
+        plant = 3
+        AND STATUS = 1
+        <if test="1 == code">
+            and to_days(create_time) = to_days(#{time});
+        </if>
+        <if test="2 == code">
+            and DATE_FORMAT( create_time, '%Y%m' ) = DATE_FORMAT(#{time} ,'%Y%m' )
+        </if>
+        <if test="3 == code">
+            and YEAR(create_time)=YEAR(#{time});
+        </if>
+    </select>
+
+
+
+
+
+    <!--种植采收监管 产品等级(0:一等品)-->
+    <select id="selectProduct" resultType="java.util.HashMap">
+        SELECT
+        IFNULL( COUNT( * ), 0 ) AS num
+        FROM
+        `sys_farm_product_stock`
+        WHERE
+        leaves = 0
+        <if test="1 == code">
+            and to_days(create_time) = to_days(#{time});
+        </if>
+        <if test="2 == code">
+            and DATE_FORMAT( create_time, '%Y%m' ) = DATE_FORMAT(#{time} ,'%Y%m' )
+        </if>
+        <if test="3 == code">
+            and YEAR(create_time)=YEAR(#{time});
+        </if>
+    </select>
+    <!--种植采收监管 产品等级 1:二等品 -->
+    <select id="selectProducty" resultType="java.util.HashMap">
+        SELECT
+        IFNULL( COUNT( * ), 0 ) AS num
+        FROM
+        `sys_farm_product_stock`
+        WHERE
+        leaves = 1
+        <if test="1 == code">
+            and to_days(create_time) = to_days(#{time});
+        </if>
+        <if test="2 == code">
+            and DATE_FORMAT( create_time, '%Y%m' ) = DATE_FORMAT(#{time} ,'%Y%m' )
+        </if>
+        <if test="3 == code">
+            and YEAR(create_time)=YEAR(#{time});
+        </if>
+    </select>
+    <!--种植采收监管 产品等级 2:三等品 -->
+    <select id="selectProductr" resultType="java.util.HashMap">
+        SELECT
+        IFNULL( COUNT( * ), 0 ) AS num
+        FROM
+        `sys_farm_product_stock`
+        WHERE
+        leaves = 2
+        <if test="1 == code">
+            and to_days(create_time) = to_days(#{time});
+        </if>
+        <if test="2 == code">
+            and DATE_FORMAT( create_time, '%Y%m' ) = DATE_FORMAT(#{time} ,'%Y%m' )
+        </if>
+        <if test="3 == code">
+            and YEAR(create_time)=YEAR(#{time});
+        </if>
+    </select>
+    <!--种植采收监管 产品等级3:四等品-->
+    <select id="selectProducts" resultType="java.util.HashMap">
+        SELECT
+        IFNULL( COUNT( * ), 0 ) AS num
+        FROM
+        `sys_farm_product_stock`
+        WHERE
+        leaves = 3
+        <if test="1 == code">
+            and to_days(create_time) = to_days(#{time});
+        </if>
+        <if test="2 == code">
+            and DATE_FORMAT( create_time, '%Y%m' ) = DATE_FORMAT(#{time} ,'%Y%m' )
+        </if>
+        <if test="3 == code">
+            and YEAR(create_time)=YEAR(#{time});
+        </if>
+    </select>
+    <!--种植采收监管 产品等级 4:五等品 -->
+    <select id="selectProductf" resultType="java.util.HashMap">
+        SELECT
+        IFNULL( COUNT( * ), 0 ) AS num
+        FROM
+        `sys_farm_product_stock`
+        WHERE
+        leaves = 4
+        <if test="1 == code">
+            and to_days(create_time) = to_days(#{time});
+        </if>
+        <if test="2 == code">
+            and DATE_FORMAT( create_time, '%Y%m' ) = DATE_FORMAT(#{time} ,'%Y%m' )
+        </if>
+        <if test="3 == code">
+            and YEAR(create_time)=YEAR(#{time});
+        </if>
+    </select>
+
+
 </mapper>
diff --git a/src/main/java/org/springblade/modules/farmplant/mapper/FarmProductStockMapper.java b/src/main/java/org/springblade/modules/farmplant/mapper/FarmProductStockMapper.java
index 70448b2..c2ae41f 100644
--- a/src/main/java/org/springblade/modules/farmplant/mapper/FarmProductStockMapper.java
+++ b/src/main/java/org/springblade/modules/farmplant/mapper/FarmProductStockMapper.java
@@ -8,6 +8,7 @@
 import org.springblade.modules.farmplant.vo.FarmProductStockVO;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  *  农产品库存Mapper 接口
@@ -31,4 +32,5 @@
 	 * @return
 	 */
 	List<FarmProductStockVO> statisticsProduct(@Param("farmProductStock") FarmProductStockVO farmProductStock);
+	Map<String, String> selctProductCount(String year);
 }
diff --git a/src/main/java/org/springblade/modules/farmplant/mapper/FarmProductStockMapper.xml b/src/main/java/org/springblade/modules/farmplant/mapper/FarmProductStockMapper.xml
index c48032a..873edb4 100644
--- a/src/main/java/org/springblade/modules/farmplant/mapper/FarmProductStockMapper.xml
+++ b/src/main/java/org/springblade/modules/farmplant/mapper/FarmProductStockMapper.xml
@@ -4,7 +4,8 @@
 
     <!--自定义查询农产品库存分页数据-->
     <select id="selectFarmProductStockPage" resultType="org.springblade.modules.farmplant.vo.FarmProductStockVO">
-        select sfps.strain_id strainId,sum(sfps.weight) weight,ss.url,ss.strain_name strainName from sys_farm_product_stock sfps
+        select sfps.strain_id strainId,sum(sfps.weight) weight,ss.url,ss.strain_name strainName from
+        sys_farm_product_stock sfps
         left join sys_strain ss on ss.id = sfps.strain_id
         where 1=1
         <if test="farmProductStock.strainId!=null and farmProductStock.strainId!=''">
@@ -25,7 +26,8 @@
 
     <!--查询农产品库存数据-->
     <select id="statisticsProduct" resultType="org.springblade.modules.farmplant.vo.FarmProductStockVO">
-        select sfps.strain_id strainId,sum(sfps.weight) weight,ss.url,ss.strain_name strainName from sys_farm_product_stock sfps
+        select sfps.strain_id strainId,sum(sfps.weight) weight,ss.url,ss.strain_name strainName from
+        sys_farm_product_stock sfps
         left join sys_strain ss on ss.id = sfps.strain_id
         where 1=1
         <if test="farmProductStock.strainId!=null and farmProductStock.strainId!=''">
@@ -42,4 +44,12 @@
         </if>
         group by sfps.strain_id,ss.url,ss.strain_name
     </select>
+
+    <!--大屏产量每个月统计-->
+    <select id="selctProductCount" resultType="java.util.HashMap">
+        SELECT SUM(CASE WHEN MONTH ( s.time ) = 1 THEN s.weight END ) AS '1', SUM(CASE WHEN MONTH ( s.time ) = 2 THEN s.weight END ) AS '2', SUM(CASE WHEN MONTH ( s.time ) = 3 THEN s.weight END ) AS '3', SUM(CASE WHEN MONTH ( s.time ) = 4 THEN s.weight END ) AS '4', SUM(CASE WHEN MONTH ( s.time ) = 5 THEN s.weight END ) AS '5', SUM(CASE WHEN MONTH ( s.time ) = 6 THEN s.weight END ) AS '6', SUM(CASE WHEN MONTH ( s.time ) = 7 THEN s.weight END ) AS '7', SUM(CASE WHEN MONTH ( s.time ) = 8 THEN s.weight END ) AS '8', SUM(CASE WHEN MONTH ( s.time ) = 9 THEN s.weight END ) AS '9', SUM(CASE WHEN MONTH ( s.time ) = 10 THEN s.weight END ) AS '10', SUM(CASE WHEN MONTH ( s.time ) = 11 THEN s.weight END ) AS '11', SUM(CASE WHEN MONTH ( s.time ) = 12 THEN s.weight END ) AS '12'
+        FROM sys_farm_product_stock AS s
+        WHERE
+            YEAR ( s.time ) =#{year}
+    </select>
 </mapper>
diff --git a/src/main/java/org/springblade/modules/farmplant/service/FarmPlantService.java b/src/main/java/org/springblade/modules/farmplant/service/FarmPlantService.java
index 34d34a7..264f617 100644
--- a/src/main/java/org/springblade/modules/farmplant/service/FarmPlantService.java
+++ b/src/main/java/org/springblade/modules/farmplant/service/FarmPlantService.java
@@ -9,6 +9,7 @@
 import org.springblade.modules.farmplant.vo.StrainVO;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * 农场养殖记录表服务类
@@ -47,4 +48,14 @@
 	 * @return
 	 */
 	FarmPlantVO getFarmPlantStatisticsCount(FarmPlantVO farmPlantVO);
+	int selectCount();
+	Map selectPlant(String code,String time);
+	Map selectPlantl(String code,String time);
+	Map selectPlantw(String code,String time);
+	Map selectPlantp(String code,String time);
+	Map selectProduct(String code,String time);
+	Map selectProducty(String code, String time);
+	Map selectProductr(String code, String time);
+	Map selectProducts(String code, String time);
+	Map selectProductf(String code, String time);
 }
diff --git a/src/main/java/org/springblade/modules/farmplant/service/FarmProductStockService.java b/src/main/java/org/springblade/modules/farmplant/service/FarmProductStockService.java
index 862db24..a283d0e 100644
--- a/src/main/java/org/springblade/modules/farmplant/service/FarmProductStockService.java
+++ b/src/main/java/org/springblade/modules/farmplant/service/FarmProductStockService.java
@@ -6,6 +6,8 @@
 import org.springblade.modules.farmplant.entity.FarmProductStock;
 import org.springblade.modules.farmplant.vo.FarmProductStockVO;
 
+import java.util.Map;
+
 /**
  * 农产品库存服务类
  * @since 2022-05-18
@@ -28,4 +30,5 @@
 	 * @return
 	 */
 	FarmProductStockVO statisticsProduct(FarmProductStockVO farmProductStock);
+	Map<String, String> selctProductCount(String year);
 }
diff --git a/src/main/java/org/springblade/modules/farmplant/service/impl/FarmPlantServiceImpl.java b/src/main/java/org/springblade/modules/farmplant/service/impl/FarmPlantServiceImpl.java
index 2e620d9..4dd6b28 100644
--- a/src/main/java/org/springblade/modules/farmplant/service/impl/FarmPlantServiceImpl.java
+++ b/src/main/java/org/springblade/modules/farmplant/service/impl/FarmPlantServiceImpl.java
@@ -1,4 +1,5 @@
 package org.springblade.modules.farmplant.service.impl;
+
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springblade.modules.farm.entity.Farm;
@@ -12,11 +13,13 @@
 
 import java.math.BigDecimal;
 import java.util.List;
+import java.util.Map;
 
 /**
  * 农场养殖记录表服务实现类
- * @since 2022-05-12
+ *
  * @author zhongrj
+ * @since 2022-05-12
  */
 @Service
 public class FarmPlantServiceImpl extends ServiceImpl<FarmPlantMapper, FarmPlant> implements FarmPlantService {
@@ -33,11 +36,11 @@
 		List<FarmPlantVO> farmPlantVOS = baseMapper.selectFarmPlantPage(page, farm);
 		//遍历
 		farmPlantVOS.forEach(farmPlantVO -> {
-			if (farmPlantVO.getLandUnit().equals("1")){
-				farmPlantVO.setArea(String.format("%.2f", Double.parseDouble(farmPlantVO.getArea())*0.1));
+			if (farmPlantVO.getLandUnit().equals("1")) {
+				farmPlantVO.setArea(String.format("%.2f", Double.parseDouble(farmPlantVO.getArea()) * 0.1));
 			}
-			if (farmPlantVO.getLandUnit().equals("2")){
-				farmPlantVO.setArea(String.format("%.2f",Double.parseDouble(farmPlantVO.getArea())*0.0015));
+			if (farmPlantVO.getLandUnit().equals("2")) {
+				farmPlantVO.setArea(String.format("%.2f", Double.parseDouble(farmPlantVO.getArea()) * 0.0015));
 			}
 		});
 		return page.setRecords(farmPlantVOS);
@@ -45,6 +48,7 @@
 
 	/**
 	 * 农产品种养统计
+	 *
 	 * @param farm 农产品种植对象
 	 * @param page 分页查询对象
 	 * @return
@@ -54,12 +58,12 @@
 		List<FarmPlantVO> farmPlantVOS = baseMapper.getFarmPlantStatistics(page, farm);
 		//遍历
 		farmPlantVOS.forEach(farmPlantVO -> {
-			if (farmPlantVO.getLandUnit().equals("1")){
-				BigDecimal bg = new BigDecimal(farmPlantVO.getAreas()*0.1);
+			if (farmPlantVO.getLandUnit().equals("1")) {
+				BigDecimal bg = new BigDecimal(farmPlantVO.getAreas() * 0.1);
 				farmPlantVO.setAreas(bg.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
 			}
-			if (farmPlantVO.getLandUnit().equals("2")){
-				BigDecimal bg = new BigDecimal(farmPlantVO.getAreas()*0.0015);
+			if (farmPlantVO.getLandUnit().equals("2")) {
+				BigDecimal bg = new BigDecimal(farmPlantVO.getAreas() * 0.0015);
 				farmPlantVO.setAreas(bg.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
 			}
 		});
@@ -69,6 +73,7 @@
 
 	/**
 	 * 农产品列表
+	 *
 	 * @param farm 农产品对象
 	 * @return
 	 */
@@ -79,6 +84,7 @@
 
 	/**
 	 * 农产品种养统计(累计和)
+	 *
 	 * @param farm 农产品种植对象
 	 * @return
 	 */
@@ -86,30 +92,81 @@
 	public FarmPlantVO getFarmPlantStatisticsCount(FarmPlantVO farm) {
 		List<FarmPlantVO> farmPlantVOS = baseMapper.getFarmPlantStatisticsCount(farm);
 		FarmPlantVO plantVO = new FarmPlantVO();
-		if (farmPlantVOS.size()>0){
+		if (farmPlantVOS.size() > 0) {
 			BigDecimal decimal = new BigDecimal(0.0);
 			//遍历
 			for (FarmPlantVO farmPlantVO : farmPlantVOS) {
-				if (farmPlantVO.getLandUnit().equals("0")){
-					BigDecimal bg = new BigDecimal(farmPlantVO.getAreas()*1);
+				if (farmPlantVO.getLandUnit().equals("0")) {
+					BigDecimal bg = new BigDecimal(farmPlantVO.getAreas() * 1);
 					decimal = decimal.add(bg.setScale(2, BigDecimal.ROUND_HALF_UP));
 				}
-				if (farmPlantVO.getLandUnit().equals("1")){
-					BigDecimal bg = new BigDecimal(farmPlantVO.getAreas()*0.1);
+				if (farmPlantVO.getLandUnit().equals("1")) {
+					BigDecimal bg = new BigDecimal(farmPlantVO.getAreas() * 0.1);
 					decimal = decimal.add(bg.setScale(2, BigDecimal.ROUND_HALF_UP));
 				}
-				if (farmPlantVO.getLandUnit().equals("2")){
-					BigDecimal bg = new BigDecimal(farmPlantVO.getAreas()*0.0015);
+				if (farmPlantVO.getLandUnit().equals("2")) {
+					BigDecimal bg = new BigDecimal(farmPlantVO.getAreas() * 0.0015);
 					decimal = decimal.add(bg.setScale(2, BigDecimal.ROUND_HALF_UP));
 				}
 			}
 			//求和
 			plantVO.setArea(decimal.toString());
-		}else {
+		} else {
 			//求和
 			plantVO.setArea("0");
 		}
 		//返回
 		return plantVO;
 	}
+
+	@Override
+	public int selectCount() {
+		return baseMapper.selectCount();
+	}
+
+	@Override
+	public Map selectPlant(String code, String time) {
+		return baseMapper.selectPlant(code, time);
+	}
+
+	@Override
+	public Map selectPlantl(String code, String time) {
+		return baseMapper.selectPlantl(code, time);
+	}
+
+	@Override
+	public Map selectPlantw(String code, String time) {
+		return baseMapper.selectPlantw(code, time);
+	}
+
+	@Override
+	public Map selectPlantp(String code, String time) {
+		return baseMapper.selectPlantp(code, time);
+	}
+
+	@Override
+	public Map selectProduct(String code, String time) {
+		return baseMapper.selectProduct(code, time);
+	}
+
+	@Override
+	public Map selectProducty(String code, String time) {
+		return baseMapper.selectProducty(code, time);
+	}
+
+	@Override
+	public Map selectProductr(String code, String time) {
+		return baseMapper.selectProductr(code, time);
+	}
+
+	@Override
+	public Map selectProducts(String code, String time) {
+		return baseMapper.selectProducts(code, time);
+	}
+
+	@Override
+	public Map selectProductf(String code, String time) {
+		return baseMapper.selectProductf(code, time);
+	}
+
 }
diff --git a/src/main/java/org/springblade/modules/farmplant/service/impl/FarmProductStockServiceImpl.java b/src/main/java/org/springblade/modules/farmplant/service/impl/FarmProductStockServiceImpl.java
index 58124e9..6a4058f 100644
--- a/src/main/java/org/springblade/modules/farmplant/service/impl/FarmProductStockServiceImpl.java
+++ b/src/main/java/org/springblade/modules/farmplant/service/impl/FarmProductStockServiceImpl.java
@@ -9,6 +9,7 @@
 
 import java.math.BigDecimal;
 import java.util.List;
+import java.util.Map;
 
 /**
  * 农产品库存服务实现类
@@ -48,4 +49,9 @@
 		//返回
 		return stock;
 	}
+
+	@Override
+	public Map<String, String> selctProductCount(String year) {
+		return baseMapper.selctProductCount(year);
+	}
 }
diff --git a/src/main/java/org/springblade/modules/farmplant/vo/FarmPlantVO.java b/src/main/java/org/springblade/modules/farmplant/vo/FarmPlantVO.java
index 4dc90e5..d67586e 100644
--- a/src/main/java/org/springblade/modules/farmplant/vo/FarmPlantVO.java
+++ b/src/main/java/org/springblade/modules/farmplant/vo/FarmPlantVO.java
@@ -51,5 +51,4 @@
 	 * 面积合计
 	 */
 	private Double areas;
-
 }
diff --git a/src/main/java/org/springblade/modules/lang/controller/LandController.java b/src/main/java/org/springblade/modules/lang/controller/LandController.java
index 4df3c4e..ccdd422 100644
--- a/src/main/java/org/springblade/modules/lang/controller/LandController.java
+++ b/src/main/java/org/springblade/modules/lang/controller/LandController.java
@@ -32,6 +32,8 @@
 import org.springblade.core.tool.utils.Func;
 import org.springblade.modules.farm.entity.Farm;
 import org.springblade.modules.farm.vo.FarmVO;
+import org.springblade.modules.system.entity.DictBiz;
+import org.springblade.modules.system.service.IDictBizService;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.RequestParam;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -60,6 +62,7 @@
 public class LandController extends BladeController {
 
 	private final ILandService landService;
+	private final IDictBizService dictService;
 
 	/**
 	 * 详情
@@ -230,60 +233,149 @@
 		List<Map<String, Object>> lists = landService.selectSAre();
 		List list1 = landService.selectNum();
 		//总面积
-		Double num=0.0;
-		for (int i=0;i<list.size();i++){
+		Double num = 0.0;
+		for (int i = 0; i < list.size(); i++) {
 			//面积
 			String area = list.get(i).get("area").toString();
 			//单位
 			String unit = list.get(i).get("unit").toString();
-			Double area1=Double.parseDouble(area);
+			Double area1 = Double.parseDouble(area);
 			//面积单位(0: 亩 1:分 2:平方米)
-			if (unit.equals("0")){
-				num+=area1;
+			if (unit.equals("0")) {
+				num += area1;
 			}
-			if (unit.equals("1")){
+			if (unit.equals("1")) {
 				double v = area1 * 0.1;
-				num+=v;
-			}
-			else {
-				double v = area1 *0.0015;
-				num+=v;
+				num += v;
+			} else {
+				double v = area1 * 0.0015;
+				num += v;
 			}
 		}
 		//使用面积
-		Double snum=0.0;
-		for (int i=0;i<lists.size();i++){
+		Double snum = 0.0;
+		for (int i = 0; i < lists.size(); i++) {
 			//面积
 			String area = lists.get(i).get("area").toString();
 			//单位
 			String unit = lists.get(i).get("unit").toString();
-			Double area1=Double.parseDouble(area);
+			Double area1 = Double.parseDouble(area);
 			//面积单位(0: 亩 1:分 2:平方米)
-			if (unit.equals("0")){
-				snum+=area1;
+			if (unit.equals("0")) {
+				snum += area1;
 			}
-			if (unit.equals("1")){
+			if (unit.equals("1")) {
 				double v = area1 * 0.1;
-				snum+=v;
-			}
-			else {
-				double v = area1 *0.0015;
-				snum+=v;
+				snum += v;
+			} else {
+				double v = area1 * 0.0015;
+				snum += v;
 			}
 		}
 		//品种数量
 		int size = list1.size();
+		Map map = new HashMap();
 		//地块使用率
-		double v = snum / num;
-		double v1 = v * 100;
-		DecimalFormat df = new DecimalFormat("#0.00");
-		String format = df.format(v1);
-		Double a=Double.parseDouble(format);
-		Map map =new HashMap();
-		map.put("rate",a);
-		map.put("zarea",(double) Math.round(num * 100) / 100);
-		map.put("sarea",(double) Math.round(snum * 100) / 100);
-		map.put("num",size);
+		if(snum!=0.0|| num!=0.0){
+			double v = snum / num;
+			double v1 = v * 100;
+			DecimalFormat df = new DecimalFormat("#0.00");
+			String format = df.format(v1);
+			Double a = Double.parseDouble(format);
+			map.put("rate", a);
+			map.put("zarea", (double) Math.round(num * 100) / 100);
+			map.put("sarea", (double) Math.round(snum * 100) / 100);
+			map.put("num", size);
+		}
+		else {
+			map.put("rate", 0.0);
+			map.put("zarea", 0.0);
+			map.put("sarea", 0.0);
+			map.put("num", size);
+		}
+		return R.data(map);
+	}
+
+	/**
+	 * 大屏地块统计接口
+	 */
+	@GetMapping("/selectXCount")
+	public R selectXCount() {
+		List<Map<String, Object>> list = landService.selectZAre();
+		List<Map<String, Object>> lists = landService.selectSAre();
+		List<Map<String, Object>> listw = landService.selectWAre();
+		List list1 = landService.selectNum();
+		//总面积
+		Double num = 0.0;
+		for (int i = 0; i < list.size(); i++) {
+			//面积
+			String area = list.get(i).get("area").toString();
+			//单位
+			String unit = list.get(i).get("unit").toString();
+			Double area1 = Double.parseDouble(area);
+			//面积单位(0: 亩 1:分 2:平方米)
+			if (unit.equals("0")) {
+				num += area1;
+			}
+			if (unit.equals("1")) {
+				double v = area1 * 0.1;
+				num += v;
+			} else {
+				double v = area1 * 0.0015;
+				num += v;
+			}
+		}
+		//使用面积
+		Double snum = 0.0;
+		for (int i = 0; i < lists.size(); i++) {
+			//面积
+			String area = lists.get(i).get("area").toString();
+			//单位
+			String unit = lists.get(i).get("unit").toString();
+			Double area1 = Double.parseDouble(area);
+			//面积单位(0: 亩 1:分 2:平方米)
+			if (unit.equals("0")) {
+				snum += area1;
+			}
+			if (unit.equals("1")) {
+				double v = area1 * 0.1;
+				snum += v;
+			} else {
+				double v = area1 * 0.0015;
+				snum += v;
+			}
+		}
+		//未使用面积
+		Double wnum = 0.0;
+		for (int i = 0; i < listw.size(); i++) {
+			//面积
+			String area = listw.get(i).get("area").toString();
+			//单位
+			String unit = listw.get(i).get("unit").toString();
+			Double area1 = Double.parseDouble(area);
+			//面积单位(0: 亩 1:分 2:平方米)
+			if (unit.equals("0")) {
+				wnum += area1;
+			}
+			if (unit.equals("1")) {
+				double v = area1 * 0.1;
+				wnum += v;
+			} else {
+				double v = area1 * 0.0015;
+				wnum += v;
+			}
+		}
+		//品种数量
+		int size = list1.size();
+		//农资种类
+		List<DictBiz> tree = dictService.getList("stockType");
+		int size1 = tree.size();
+		Map map = new HashMap();
+		map.put("num", num);
+		map.put("snum", snum);
+		map.put("wnum", wnum);
+		map.put("zynum", size);
+		map.put("nznum", size1);
 		return R.data(map);
 	}
 
diff --git a/src/main/java/org/springblade/modules/lang/entity/Land.java b/src/main/java/org/springblade/modules/lang/entity/Land.java
index 0903be4..993473d 100644
--- a/src/main/java/org/springblade/modules/lang/entity/Land.java
+++ b/src/main/java/org/springblade/modules/lang/entity/Land.java
@@ -17,7 +17,9 @@
 package org.springblade.modules.lang.entity;
 
 import com.baomidou.mybatisplus.annotation.TableName;
+
 import java.io.Serializable;
+
 import org.springblade.core.mp.base.BaseEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -32,39 +34,42 @@
 @Data
 @TableName("sys_land")
 @EqualsAndHashCode(callSuper = true)
-public class Land  extends TenantEntity {
+public class Land extends TenantEntity {
 
 	private static final long serialVersionUID = 1L;
 
 	/**
-	* 用户id
-	*/
-		private String userId;
+	 * 用户id
+	 */
+	private String userId;
 	/**
-	* 地块名称
-	*/
-		private String landName;
+	 * 地块名称
+	 */
+	private String landName;
 	/**
-	* 地块类型(0:大田 1:大棚 2:果园 3:鱼塘 4:山地 5:养殖区)
-	*/
-		private Integer landType;
+	 * 地块类型(0:大田 1:大棚 2:果园 3:鱼塘 4:山地 5:养殖区)
+	 */
+	private Integer landType;
 	/**
-	* 地块面积
-	*/
-		private String landArea;
-		private String url;
+	 * 地块面积
+	 */
+	private String landArea;
+	private String url;
 	/**
-	* 地块范围
-	*/
-		private String landRange;
+	 * 地块范围
+	 */
+	private String landRange;
 	/**
-	* 状态 (0:已耕种 1:未耕种)
-	*/
-		private Integer type;
+	 * 状态 (0:已耕种 1:未耕种)
+	 */
+	private Integer type;
 	/**
-	* 面积单位(0: 亩 1:分 2:平方米)
-	*/
-		private Integer landUnit;
-
+	 * 面积单位(0: 亩 1:分 2:平方米)
+	 */
+	private Integer landUnit;
+	/**
+	 * 部门id
+	 */
+	private String deptId;
 
 }
diff --git a/src/main/java/org/springblade/modules/lang/mapper/LandMapper.java b/src/main/java/org/springblade/modules/lang/mapper/LandMapper.java
index f4d03c0..292592c 100644
--- a/src/main/java/org/springblade/modules/lang/mapper/LandMapper.java
+++ b/src/main/java/org/springblade/modules/lang/mapper/LandMapper.java
@@ -58,4 +58,5 @@
 	List selectNum();
 	List<Map<String, Object>> selectZAre();
 	List<Map<String, Object>> selectSAre();
+	List<Map<String, Object>> selectWAre();
 }
diff --git a/src/main/java/org/springblade/modules/lang/mapper/LandMapper.xml b/src/main/java/org/springblade/modules/lang/mapper/LandMapper.xml
index 9c3815c..4bce6d7 100644
--- a/src/main/java/org/springblade/modules/lang/mapper/LandMapper.xml
+++ b/src/main/java/org/springblade/modules/lang/mapper/LandMapper.xml
@@ -21,14 +21,16 @@
         ST_ASTEXT(land_range) as land_range,
         l.url,
         d.dict_value as dic,
-        c.dict_value as dica
+        c.dict_value as dica,
+        v.dept_name as deptname
         FROM `sys_land` l
         LEFT JOIN (SELECT dict_key, dict_value FROM blade_dict_biz WHERE CODE = 'land' AND is_deleted = 0) d
         ON d.dict_key = l.land_type
         LEFT JOIN (SELECT dict_key, dict_value
         FROM blade_dict_biz
         WHERE CODE = 'landunit'
-        AND is_deleted = 0) c ON c.dict_key = l.type
+        AND is_deleted = 0) c ON c.dict_key = l.land_unit
+        LEFT JOIN ( SELECT id, dept_name FROM blade_dept WHERE is_deleted = 0 ) v ON v.id = l.dept_id
         where l.is_deleted = 0
         <if test="land.landType!=null and land.landType != ''">
             and l.land_type = #{land.landType}
@@ -40,13 +42,13 @@
 
     <insert id="saveLandInfo">
         insert into sys_land
-        (user_id,land_name,land_type,land_area,land_range,type,land_unit)
+        (user_id,land_name,land_type,land_area,land_range,type,land_unit,dept_id)
         values
         (#{land.userId},#{land.landName},#{land.landType},#{land.landArea},
         <if test="land.landRange!=null and land.landRange!=''">
             ST_GeomFromText(${land.landRange}),
         </if>
-        #{land.type},#{land.landUnit})
+        #{land.type},#{land.landUnit},#{land.deptId})
     </insert>
 
     <!--详情信息(自定义查询)-->
@@ -81,22 +83,29 @@
     <select id="selectLandList" resultType="java.util.HashMap">
         select id, land_name as landName
         from sys_land
-        where user_id = #{userid}
+        where dept_id = #{userid}
           and is_deleted = 0
     </select>
     <!--土地总面积-->
     <select id="selectZAre" resultType="java.util.HashMap">
-        SELECT land_area as area, land_unit as unit
+        SELECT IFNULL(land_area, 0) as area, IFNULL(land_unit, 0) as unit
         FROM sys_land
         WHERE is_deleted = 0
     </select>
     <!--土地使用面积-->
     <select id="selectSAre" resultType="java.util.HashMap">
-        SELECT land_area as area, land_unit as unit
+        SELECT IFNULL(land_area, 0) as area, IFNULL(land_unit, 0) as unit
         FROM sys_land
         WHERE is_deleted = 0
           and type = 0
     </select>
+    <!--土地未使用面积-->
+    <select id="selectWAre" resultType="java.util.HashMap">
+        SELECT IFNULL(land_area, 0) as area, IFNULL(land_unit, 0) as unit
+        FROM sys_land
+        WHERE is_deleted = 0
+          and type = 1
+    </select>
     <select id="selectNum" resultType="java.util.HashMap">
         SELECT strain_id
         FROM `sys_farm_plant`
diff --git a/src/main/java/org/springblade/modules/lang/service/ILandService.java b/src/main/java/org/springblade/modules/lang/service/ILandService.java
index ff29c77..c452523 100644
--- a/src/main/java/org/springblade/modules/lang/service/ILandService.java
+++ b/src/main/java/org/springblade/modules/lang/service/ILandService.java
@@ -68,5 +68,6 @@
 	 */
 	List<Map<String, Object>> selectZAre();
 	List<Map<String, Object>> selectSAre();
+	List<Map<String, Object>> selectWAre();
 	List selectNum();
 }
diff --git a/src/main/java/org/springblade/modules/lang/service/impl/LandServiceImpl.java b/src/main/java/org/springblade/modules/lang/service/impl/LandServiceImpl.java
index f28ba01..5355265 100644
--- a/src/main/java/org/springblade/modules/lang/service/impl/LandServiceImpl.java
+++ b/src/main/java/org/springblade/modules/lang/service/impl/LandServiceImpl.java
@@ -76,6 +76,11 @@
 	}
 
 	@Override
+	public List<Map<String, Object>> selectWAre() {
+		return baseMapper.selectWAre();
+	}
+
+	@Override
 	public List selectNum() {
 		return baseMapper.selectNum();
 	}
diff --git a/src/main/java/org/springblade/modules/lang/vo/LandVO.java b/src/main/java/org/springblade/modules/lang/vo/LandVO.java
index 1b53764..a76838d 100644
--- a/src/main/java/org/springblade/modules/lang/vo/LandVO.java
+++ b/src/main/java/org/springblade/modules/lang/vo/LandVO.java
@@ -32,5 +32,6 @@
 	private static final long serialVersionUID = 1L;
 	String dic;
 	String dica;
+	String deptname;
 
 }
diff --git a/src/main/java/org/springblade/modules/machining/controller/MachiningController.java b/src/main/java/org/springblade/modules/machining/controller/MachiningController.java
new file mode 100644
index 0000000..9f7a0c9
--- /dev/null
+++ b/src/main/java/org/springblade/modules/machining/controller/MachiningController.java
@@ -0,0 +1,127 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.machining.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RequestParam;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.machining.entity.Machining;
+import org.springblade.modules.machining.vo.MachiningVO;
+import org.springblade.modules.machining.service.IMachiningService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 加工管理 控制器
+ *
+ * @author BladeX
+ * @since 2022-06-07
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/machining/machining")
+@Api(value = "加工管理", tags = "加工管理接口")
+public class MachiningController extends BladeController {
+
+	private final IMachiningService machiningService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入machining")
+	public R<Machining> detail(Machining machining) {
+		Machining detail = machiningService.getOne(Condition.getQueryWrapper(machining));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 加工管理
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入machining")
+	public R<IPage<Machining>> list(Machining machining, Query query) {
+		IPage<Machining> pages = machiningService.page(Condition.getPage(query), Condition.getQueryWrapper(machining));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 加工管理
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入machining")
+	public R<IPage<MachiningVO>> page(MachiningVO machining, Query query) {
+		IPage<MachiningVO> pages = machiningService.selectMachiningPage(Condition.getPage(query), machining);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 加工管理
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入machining")
+	public R save(@Valid @RequestBody Machining machining) {
+		return R.status(machiningService.save(machining));
+	}
+
+	/**
+	 * 修改 加工管理
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入machining")
+	public R update(@Valid @RequestBody Machining machining) {
+		return R.status(machiningService.updateById(machining));
+	}
+
+	/**
+	 * 新增或修改 加工管理
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入machining")
+	public R submit(@Valid @RequestBody Machining machining) {
+		return R.status(machiningService.saveOrUpdate(machining));
+	}
+
+	
+	/**
+	 * 删除 加工管理
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(machiningService.deleteLogic(Func.toLongList(ids)));
+	}
+
+	
+}
diff --git a/src/main/java/org/springblade/modules/machining/dto/MachiningDTO.java b/src/main/java/org/springblade/modules/machining/dto/MachiningDTO.java
new file mode 100644
index 0000000..55a4790
--- /dev/null
+++ b/src/main/java/org/springblade/modules/machining/dto/MachiningDTO.java
@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.machining.dto;
+
+import org.springblade.modules.machining.entity.Machining;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 加工管理数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2022-06-07
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class MachiningDTO extends Machining {
+	private static final long serialVersionUID = 1L;
+
+}
diff --git a/src/main/java/org/springblade/modules/machining/entity/Machining.java b/src/main/java/org/springblade/modules/machining/entity/Machining.java
new file mode 100644
index 0000000..28077b5
--- /dev/null
+++ b/src/main/java/org/springblade/modules/machining/entity/Machining.java
@@ -0,0 +1,56 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.machining.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import org.springblade.core.mp.base.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 加工管理实体类
+ *
+ * @author BladeX
+ * @since 2022-06-07
+ */
+@Data
+@TableName("sys_machining")
+@EqualsAndHashCode(callSuper = true)
+public class Machining extends BaseEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 加工类型
+	*/
+		private String machiningType;
+	/**
+	* 图片
+	*/
+		private String machiningTp;
+	/**
+	* 加工原料
+	*/
+		private String machiningYl;
+	/**
+	* 备注
+	*/
+		private String remarks;
+
+
+}
diff --git a/src/main/java/org/springblade/modules/machining/mapper/MachiningMapper.java b/src/main/java/org/springblade/modules/machining/mapper/MachiningMapper.java
new file mode 100644
index 0000000..4d3bea8
--- /dev/null
+++ b/src/main/java/org/springblade/modules/machining/mapper/MachiningMapper.java
@@ -0,0 +1,42 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.machining.mapper;
+
+import org.springblade.modules.machining.entity.Machining;
+import org.springblade.modules.machining.vo.MachiningVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 加工管理 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2022-06-07
+ */
+public interface MachiningMapper extends BaseMapper<Machining> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param machining
+	 * @return
+	 */
+	List<MachiningVO> selectMachiningPage(IPage page, MachiningVO machining);
+
+}
diff --git a/src/main/java/org/springblade/modules/machining/mapper/MachiningMapper.xml b/src/main/java/org/springblade/modules/machining/mapper/MachiningMapper.xml
new file mode 100644
index 0000000..169adf9
--- /dev/null
+++ b/src/main/java/org/springblade/modules/machining/mapper/MachiningMapper.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.modules.machining.mapper.MachiningMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="machiningResultMap" type="org.springblade.modules.machining.entity.Machining">
+        <result column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="machining_type" property="machiningType"/>
+        <result column="machining_tp" property="machiningTp"/>
+        <result column="machining_yl" property="machiningYl"/>
+        <result column="remarks" property="remarks"/>
+    </resultMap>
+
+
+    <select id="selectMachiningPage" resultMap="machiningResultMap">
+        select * from sys_machining where is_deleted = 0
+    </select>
+
+</mapper>
diff --git a/src/main/java/org/springblade/modules/machining/service/IMachiningService.java b/src/main/java/org/springblade/modules/machining/service/IMachiningService.java
new file mode 100644
index 0000000..ba8b973
--- /dev/null
+++ b/src/main/java/org/springblade/modules/machining/service/IMachiningService.java
@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.machining.service;
+
+import org.springblade.modules.machining.entity.Machining;
+import org.springblade.modules.machining.vo.MachiningVO;
+import org.springblade.core.mp.base.BaseService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 加工管理 服务类
+ *
+ * @author BladeX
+ * @since 2022-06-07
+ */
+public interface IMachiningService extends BaseService<Machining> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param machining
+	 * @return
+	 */
+	IPage<MachiningVO> selectMachiningPage(IPage<MachiningVO> page, MachiningVO machining);
+
+}
diff --git a/src/main/java/org/springblade/modules/machining/service/impl/MachiningServiceImpl.java b/src/main/java/org/springblade/modules/machining/service/impl/MachiningServiceImpl.java
new file mode 100644
index 0000000..db62596
--- /dev/null
+++ b/src/main/java/org/springblade/modules/machining/service/impl/MachiningServiceImpl.java
@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.machining.service.impl;
+
+import org.springblade.modules.machining.entity.Machining;
+import org.springblade.modules.machining.vo.MachiningVO;
+import org.springblade.modules.machining.mapper.MachiningMapper;
+import org.springblade.modules.machining.service.IMachiningService;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 加工管理 服务实现类
+ *
+ * @author BladeX
+ * @since 2022-06-07
+ */
+@Service
+public class MachiningServiceImpl extends BaseServiceImpl<MachiningMapper, Machining> implements IMachiningService {
+
+	@Override
+	public IPage<MachiningVO> selectMachiningPage(IPage<MachiningVO> page, MachiningVO machining) {
+		return page.setRecords(baseMapper.selectMachiningPage(page, machining));
+	}
+
+}
diff --git a/src/main/java/org/springblade/modules/machining/vo/MachiningVO.java b/src/main/java/org/springblade/modules/machining/vo/MachiningVO.java
new file mode 100644
index 0000000..8c1a933
--- /dev/null
+++ b/src/main/java/org/springblade/modules/machining/vo/MachiningVO.java
@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.machining.vo;
+
+import org.springblade.modules.machining.entity.Machining;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 加工管理视图实体类
+ *
+ * @author BladeX
+ * @since 2022-06-07
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class MachiningVO extends Machining {
+	private static final long serialVersionUID = 1L;
+
+}
diff --git a/src/main/java/org/springblade/modules/sale/controller/SaleController.java b/src/main/java/org/springblade/modules/sale/controller/SaleController.java
new file mode 100644
index 0000000..b2ee976
--- /dev/null
+++ b/src/main/java/org/springblade/modules/sale/controller/SaleController.java
@@ -0,0 +1,143 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.sale.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+
+import javax.validation.Valid;
+
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RequestParam;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.sale.entity.Sale;
+import org.springblade.modules.sale.vo.SaleVO;
+import org.springblade.modules.sale.service.ISaleService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 销售记录表 控制器
+ *
+ * @author BladeX
+ * @since 2022-06-09
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/sale/sale")
+@Api(value = "销售记录表", tags = "销售记录表接口")
+public class SaleController extends BladeController {
+
+	private final ISaleService saleService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入sale")
+	public R<Sale> detail(Sale sale) {
+		Sale detail = saleService.getOne(Condition.getQueryWrapper(sale));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 销售记录表
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入sale")
+	public R<IPage<Sale>> list(Sale sale, Query query) {
+		IPage<Sale> pages = saleService.page(Condition.getPage(query), Condition.getQueryWrapper(sale));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 销售记录表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入sale")
+	public R<IPage<SaleVO>> page(SaleVO sale, Query query) {
+		IPage<SaleVO> pages = saleService.selectSalePage(Condition.getPage(query), sale);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 销售记录表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入sale")
+	public R save(@Valid @RequestBody Sale sale) {
+		return R.status(saleService.save(sale));
+	}
+
+	/**
+	 * 修改 销售记录表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入sale")
+	public R update(@Valid @RequestBody Sale sale) {
+		return R.status(saleService.updateById(sale));
+	}
+
+	/**
+	 * 新增或修改 销售记录表
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入sale")
+	public R submit(@Valid @RequestBody Sale sale) {
+		return R.status(saleService.saveOrUpdate(sale));
+	}
+
+
+	/**
+	 * 删除 销售记录表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(saleService.deleteLogic(Func.toLongList(ids)));
+	}
+
+	/**
+	 * 大屏销售统计
+	 */
+	@PostMapping("/selctSaletCount")
+	public R selctSaletCount(String year) {
+		return R.data(saleService.selctSaletCount(year));
+	}
+
+	/**
+	 * 统计今年和去年的销售总额
+	 */
+	@PostMapping("/selctSaletZ")
+	public R selctSaletZ() {
+		return R.data(saleService.selctSaletZ());
+	}
+
+}
diff --git a/src/main/java/org/springblade/modules/sale/dto/SaleDTO.java b/src/main/java/org/springblade/modules/sale/dto/SaleDTO.java
new file mode 100644
index 0000000..ddb41e3
--- /dev/null
+++ b/src/main/java/org/springblade/modules/sale/dto/SaleDTO.java
@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.sale.dto;
+
+import org.springblade.modules.sale.entity.Sale;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 销售记录表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2022-06-09
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class SaleDTO extends Sale {
+	private static final long serialVersionUID = 1L;
+
+}
diff --git a/src/main/java/org/springblade/modules/sale/entity/Sale.java b/src/main/java/org/springblade/modules/sale/entity/Sale.java
new file mode 100644
index 0000000..7a2169d
--- /dev/null
+++ b/src/main/java/org/springblade/modules/sale/entity/Sale.java
@@ -0,0 +1,65 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.sale.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.time.LocalDateTime;
+import org.springblade.core.mp.base.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 销售记录表实体类
+ *
+ * @author BladeX
+ * @since 2022-06-09
+ */
+@Data
+@TableName("sys_sale")
+@EqualsAndHashCode(callSuper = true)
+public class Sale extends BaseEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 品种id
+	*/
+		private Integer strainId;
+	/**
+	* 销售时间
+	*/
+		private LocalDateTime saleTime;
+	/**
+	* 销售数量
+	*/
+		private Integer saleNum;
+	/**
+	* 销售去向
+	*/
+		private Integer saleDestination;
+	/**
+	* 具体销售去向
+	*/
+		private String saleDestination1;
+	/**
+	* 销售价格
+	*/
+		private Double salePrice;
+
+
+}
diff --git a/src/main/java/org/springblade/modules/sale/mapper/SaleMapper.java b/src/main/java/org/springblade/modules/sale/mapper/SaleMapper.java
new file mode 100644
index 0000000..0ec3356
--- /dev/null
+++ b/src/main/java/org/springblade/modules/sale/mapper/SaleMapper.java
@@ -0,0 +1,44 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.sale.mapper;
+
+import org.springblade.modules.sale.entity.Sale;
+import org.springblade.modules.sale.vo.SaleVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 销售记录表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2022-06-09
+ */
+public interface SaleMapper extends BaseMapper<Sale> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param sale
+	 * @return
+	 */
+	List<SaleVO> selectSalePage(IPage page, SaleVO sale);
+	Map<String, String> selctSaletCount(String year);
+	List<Map<Object,String>> selctSaletZ();
+}
diff --git a/src/main/java/org/springblade/modules/sale/mapper/SaleMapper.xml b/src/main/java/org/springblade/modules/sale/mapper/SaleMapper.xml
new file mode 100644
index 0000000..8e1f3ca
--- /dev/null
+++ b/src/main/java/org/springblade/modules/sale/mapper/SaleMapper.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.modules.sale.mapper.SaleMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="saleResultMap" type="org.springblade.modules.sale.entity.Sale">
+        <result column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="strain_id" property="strainId"/>
+        <result column="sale_time" property="saleTime"/>
+        <result column="sale_num" property="saleNum"/>
+        <result column="sale_destination" property="saleDestination"/>
+        <result column="sale_destination1" property="saleDestination1"/>
+        <result column="sale_price" property="salePrice"/>
+    </resultMap>
+
+
+    <select id="selectSalePage" resultMap="saleResultMap">
+        select *
+        from sys_sale
+        where is_deleted = 0
+    </select>
+
+
+    <!--大屏销售每个月统计-->
+    <select id="selctSaletCount" resultType="java.util.HashMap">
+        SELECT SUM(CASE WHEN MONTH ( s.sale_time ) = 1 THEN s.sale_price END ) AS '1', SUM(CASE WHEN MONTH ( s.sale_time ) = 2 THEN s.sale_price END ) AS '2', SUM(CASE WHEN MONTH ( s.sale_time ) = 3 THEN s.sale_price END ) AS '3', SUM(CASE WHEN MONTH ( s.sale_time ) = 4 THEN s.sale_price END ) AS '4', SUM(CASE WHEN MONTH ( s.sale_time ) = 5 THEN s.sale_price END ) AS '5', SUM(CASE WHEN MONTH ( s.sale_time ) = 6 THEN s.sale_price END ) AS '6', SUM(CASE WHEN MONTH ( s.sale_time ) = 7 THEN s.sale_price END ) AS '7', SUM(CASE WHEN MONTH ( s.sale_time ) = 8 THEN s.sale_price END ) AS '8', SUM(CASE WHEN MONTH ( s.sale_time ) = 9 THEN s.sale_price END ) AS '9', SUM(CASE WHEN MONTH ( s.sale_time ) = 10 THEN s.sale_price END ) AS '10', SUM(CASE WHEN MONTH ( s.sale_time ) = 11 THEN s.sale_price END ) AS '11', SUM(CASE WHEN MONTH ( s.sale_time ) = 12 THEN s.sale_price END ) AS '12'
+        FROM sys_sale AS s
+        WHERE
+            YEAR ( s.sale_time ) = #{year}
+    </select>
+
+    <!--统计今年和去年的销售总额-->
+    <select id="selctSaletZ" resultType="java.util.HashMap" >
+        SELECT IFNULL(SUM(sale_num), 0) AS num
+        FROM sys_sale
+        WHERE
+            YEAR ( sale_time ) = YEAR ( NOW( ) )
+        UNION ALL
+        SELECT IFNULL(SUM(sale_num), 0) AS num
+        FROM sys_sale
+        WHERE
+            YEAR ( sale_time ) = YEAR ( date_sub( now( )
+            , INTERVAL 1 YEAR ) );
+    </select>
+</mapper>
diff --git a/src/main/java/org/springblade/modules/sale/service/ISaleService.java b/src/main/java/org/springblade/modules/sale/service/ISaleService.java
new file mode 100644
index 0000000..17e5de4
--- /dev/null
+++ b/src/main/java/org/springblade/modules/sale/service/ISaleService.java
@@ -0,0 +1,45 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.sale.service;
+
+import org.springblade.modules.sale.entity.Sale;
+import org.springblade.modules.sale.vo.SaleVO;
+import org.springblade.core.mp.base.BaseService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 销售记录表 服务类
+ *
+ * @author BladeX
+ * @since 2022-06-09
+ */
+public interface ISaleService extends BaseService<Sale> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param sale
+	 * @return
+	 */
+	IPage<SaleVO> selectSalePage(IPage<SaleVO> page, SaleVO sale);
+	Map<String, String> selctSaletCount(String year);
+	List<Map<Object,String>> selctSaletZ();
+}
diff --git a/src/main/java/org/springblade/modules/sale/service/impl/SaleServiceImpl.java b/src/main/java/org/springblade/modules/sale/service/impl/SaleServiceImpl.java
new file mode 100644
index 0000000..f7033ef
--- /dev/null
+++ b/src/main/java/org/springblade/modules/sale/service/impl/SaleServiceImpl.java
@@ -0,0 +1,54 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.sale.service.impl;
+
+import org.springblade.modules.sale.entity.Sale;
+import org.springblade.modules.sale.vo.SaleVO;
+import org.springblade.modules.sale.mapper.SaleMapper;
+import org.springblade.modules.sale.service.ISaleService;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 销售记录表 服务实现类
+ *
+ * @author BladeX
+ * @since 2022-06-09
+ */
+@Service
+public class SaleServiceImpl extends BaseServiceImpl<SaleMapper, Sale> implements ISaleService {
+
+	@Override
+	public IPage<SaleVO> selectSalePage(IPage<SaleVO> page, SaleVO sale) {
+		return page.setRecords(baseMapper.selectSalePage(page, sale));
+	}
+
+	@Override
+	public Map<String, String> selctSaletCount(String year) {
+		return baseMapper.selctSaletCount(year);
+	}
+
+	@Override
+	public List<Map<Object, String>> selctSaletZ() {
+		return baseMapper.selctSaletZ();
+	}
+
+}
diff --git a/src/main/java/org/springblade/modules/sale/vo/SaleVO.java b/src/main/java/org/springblade/modules/sale/vo/SaleVO.java
new file mode 100644
index 0000000..4636f3b
--- /dev/null
+++ b/src/main/java/org/springblade/modules/sale/vo/SaleVO.java
@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.sale.vo;
+
+import org.springblade.modules.sale.entity.Sale;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 销售记录表视图实体类
+ *
+ * @author BladeX
+ * @since 2022-06-09
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class SaleVO extends Sale {
+	private static final long serialVersionUID = 1L;
+
+}
diff --git a/src/main/java/org/springblade/modules/task/controller/TaskController.java b/src/main/java/org/springblade/modules/task/controller/TaskController.java
new file mode 100644
index 0000000..5e30ef2
--- /dev/null
+++ b/src/main/java/org/springblade/modules/task/controller/TaskController.java
@@ -0,0 +1,128 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.task.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RequestParam;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.task.entity.Task;
+import org.springblade.modules.task.vo.TaskVO;
+import org.springblade.modules.task.service.ITaskService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ *  控制器
+ *
+ * @author BladeX
+ * @since 2022-06-10
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/task/task")
+@Api(value = "", tags = "接口")
+public class TaskController extends BladeController {
+
+	private final ITaskService taskService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入task")
+	public R<Task> detail(Task task) {
+		Task detail = taskService.getOne(Condition.getQueryWrapper(task));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入task")
+	public R<IPage<Task>> list(Task task, Query query) {
+		IPage<Task> pages = taskService.page(Condition.getPage(query), Condition.getQueryWrapper(task));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入task")
+	public R<IPage<TaskVO>> page(TaskVO task, Query query) {
+		IPage<TaskVO> pages = taskService.selectTaskPage(Condition.getPage(query), task);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入task")
+	public R save(@Valid @RequestBody Task task) {
+		task.setStatus(1);
+		return R.status(taskService.save(task));
+	}
+
+	/**
+	 * 修改
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入task")
+	public R update(@Valid @RequestBody Task task) {
+		return R.status(taskService.updateById(task));
+	}
+
+	/**
+	 * 新增或修改
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入task")
+	public R submit(@Valid @RequestBody Task task) {
+		return R.status(taskService.saveOrUpdate(task));
+	}
+
+
+	/**
+	 * 删除
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(taskService.deleteLogic(Func.toLongList(ids)));
+	}
+
+
+}
diff --git a/src/main/java/org/springblade/modules/task/dto/TaskDTO.java b/src/main/java/org/springblade/modules/task/dto/TaskDTO.java
new file mode 100644
index 0000000..1eb3322
--- /dev/null
+++ b/src/main/java/org/springblade/modules/task/dto/TaskDTO.java
@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.task.dto;
+
+import org.springblade.modules.task.entity.Task;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2022-06-10
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class TaskDTO extends Task {
+	private static final long serialVersionUID = 1L;
+
+}
diff --git a/src/main/java/org/springblade/modules/task/entity/Task.java b/src/main/java/org/springblade/modules/task/entity/Task.java
new file mode 100644
index 0000000..b44657a
--- /dev/null
+++ b/src/main/java/org/springblade/modules/task/entity/Task.java
@@ -0,0 +1,84 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.task.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springblade.core.mp.base.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springframework.format.annotation.DateTimeFormat;
+
+/**
+ * 实体类
+ *
+ * @author BladeX
+ * @since 2022-06-10
+ */
+@Data
+@TableName("sys_task")
+@EqualsAndHashCode(callSuper = true)
+public class Task extends BaseEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 任务名称
+	 */
+	private String taskName;
+	/**
+	 * 地块id
+	 */
+	private String landId;
+	/**
+	 * 截止时间
+	 */
+	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+	@DateTimeFormat(pattern = "yyyy-MM-dd")
+	private Date time;
+	/**
+	 * 操作人
+	 */
+	private String taskUser;
+	/**
+	 * 是否上传照片 0:是 1:否
+	 */
+	private String type;
+	/**
+	 * 任务说明
+	 */
+	private String taskExplain;
+	/**
+	 * 备注
+	 */
+	private String remark;
+	/**
+	 * 图片
+	 */
+	private String tp;
+	/**
+	 * 农事操作
+	 */
+	private String farm;
+
+
+}
diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskMapper.java b/src/main/java/org/springblade/modules/task/mapper/TaskMapper.java
new file mode 100644
index 0000000..dd17851
--- /dev/null
+++ b/src/main/java/org/springblade/modules/task/mapper/TaskMapper.java
@@ -0,0 +1,42 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.task.mapper;
+
+import org.springblade.modules.task.entity.Task;
+import org.springblade.modules.task.vo.TaskVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ *  Mapper 接口
+ *
+ * @author BladeX
+ * @since 2022-06-10
+ */
+public interface TaskMapper extends BaseMapper<Task> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param task
+	 * @return
+	 */
+	List<TaskVO> selectTaskPage(IPage page, TaskVO task);
+
+}
diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskMapper.xml b/src/main/java/org/springblade/modules/task/mapper/TaskMapper.xml
new file mode 100644
index 0000000..57ea9d6
--- /dev/null
+++ b/src/main/java/org/springblade/modules/task/mapper/TaskMapper.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.modules.task.mapper.TaskMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="taskResultMap" type="org.springblade.modules.task.entity.Task">
+        <result column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="task_name" property="taskName"/>
+        <result column="land_id" property="landId"/>
+        <result column="time" property="time"/>
+        <result column="task_user" property="taskUser"/>
+        <result column="type" property="type"/>
+        <result column="task_explain" property="taskExplain"/>
+        <result column="remark" property="remark"/>
+        <result column="tp" property="tp"/>
+        <result column="farm" property="farm"/>
+    </resultMap>
+
+
+    <select id="selectTaskPage" resultMap="taskResultMap">
+        select * from sys_task where is_deleted = 0
+    </select>
+
+</mapper>
diff --git a/src/main/java/org/springblade/modules/task/service/ITaskService.java b/src/main/java/org/springblade/modules/task/service/ITaskService.java
new file mode 100644
index 0000000..54b86ac
--- /dev/null
+++ b/src/main/java/org/springblade/modules/task/service/ITaskService.java
@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.task.service;
+
+import org.springblade.modules.task.entity.Task;
+import org.springblade.modules.task.vo.TaskVO;
+import org.springblade.core.mp.base.BaseService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ *  服务类
+ *
+ * @author BladeX
+ * @since 2022-06-10
+ */
+public interface ITaskService extends BaseService<Task> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param task
+	 * @return
+	 */
+	IPage<TaskVO> selectTaskPage(IPage<TaskVO> page, TaskVO task);
+
+}
diff --git a/src/main/java/org/springblade/modules/task/service/impl/TaskServiceImpl.java b/src/main/java/org/springblade/modules/task/service/impl/TaskServiceImpl.java
new file mode 100644
index 0000000..b7de4ac
--- /dev/null
+++ b/src/main/java/org/springblade/modules/task/service/impl/TaskServiceImpl.java
@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.task.service.impl;
+
+import org.springblade.modules.task.entity.Task;
+import org.springblade.modules.task.vo.TaskVO;
+import org.springblade.modules.task.mapper.TaskMapper;
+import org.springblade.modules.task.service.ITaskService;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ *  服务实现类
+ *
+ * @author BladeX
+ * @since 2022-06-10
+ */
+@Service
+public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implements ITaskService {
+
+	@Override
+	public IPage<TaskVO> selectTaskPage(IPage<TaskVO> page, TaskVO task) {
+		return page.setRecords(baseMapper.selectTaskPage(page, task));
+	}
+
+}
diff --git a/src/main/java/org/springblade/modules/task/vo/TaskVO.java b/src/main/java/org/springblade/modules/task/vo/TaskVO.java
new file mode 100644
index 0000000..e5b5488
--- /dev/null
+++ b/src/main/java/org/springblade/modules/task/vo/TaskVO.java
@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.task.vo;
+
+import org.springblade.modules.task.entity.Task;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 视图实体类
+ *
+ * @author BladeX
+ * @since 2022-06-10
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class TaskVO extends Task {
+	private static final long serialVersionUID = 1L;
+
+}
diff --git a/src/main/java/sql/machining.menu.sql b/src/main/java/sql/machining.menu.sql
new file mode 100644
index 0000000..d54e3f1
--- /dev/null
+++ b/src/main/java/sql/machining.menu.sql
@@ -0,0 +1,10 @@
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1534069206188834817', 1123598815738675201, 'machining', '加工产品管理', 'menu', '/machining/machining', NULL, 1, 1, 0, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1534069206188834818', '1534069206188834817', 'machining_add', '新增', 'add', '/machining/machining/add', 'plus', 1, 2, 1, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1534069206188834819', '1534069206188834817', 'machining_edit', '修改', 'edit', '/machining/machining/edit', 'form', 2, 2, 2, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1534069206188834820', '1534069206188834817', 'machining_delete', '删除', 'delete', '/api/machining/machining/remove', 'delete', 3, 2, 3, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1534069206188834821', '1534069206188834817', 'machining_view', '查看', 'view', '/machining/machining/view', 'file-text', 4, 2, 2, 1, NULL, 0);
diff --git a/src/main/java/sql/sale.menu.sql b/src/main/java/sql/sale.menu.sql
new file mode 100644
index 0000000..1d88c46
--- /dev/null
+++ b/src/main/java/sql/sale.menu.sql
@@ -0,0 +1,10 @@
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1534699115533852674', 1123598815738675201, 'sale', '销售管理', 'menu', '/sale/sale', NULL, 1, 1, 0, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1534699115533852675', '1534699115533852674', 'sale_add', '新增', 'add', '/sale/sale/add', 'plus', 1, 2, 1, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1534699115533852676', '1534699115533852674', 'sale_edit', '修改', 'edit', '/sale/sale/edit', 'form', 2, 2, 2, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1534699115533852677', '1534699115533852674', 'sale_delete', '删除', 'delete', '/api/sale/sale/remove', 'delete', 3, 2, 3, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1534699115533852678', '1534699115533852674', 'sale_view', '查看', 'view', '/sale/sale/view', 'file-text', 4, 2, 2, 1, NULL, 0);
diff --git a/src/main/java/sql/task.menu.sql b/src/main/java/sql/task.menu.sql
new file mode 100644
index 0000000..2dc3054
--- /dev/null
+++ b/src/main/java/sql/task.menu.sql
@@ -0,0 +1,10 @@
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1535070746886311938', 1123598815738675201, 'task', '任务管理', 'menu', '/task/task', NULL, 1, 1, 0, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1535070746886311939', '1535070746886311938', 'task_add', '新增', 'add', '/task/task/add', 'plus', 1, 2, 1, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1535070746886311940', '1535070746886311938', 'task_edit', '修改', 'edit', '/task/task/edit', 'form', 2, 2, 2, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1535070746886311941', '1535070746886311938', 'task_delete', '删除', 'delete', '/api/task/task/remove', 'delete', 3, 2, 3, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1535070746886311942', '1535070746886311938', 'task_view', '查看', 'view', '/task/task/view', 'file-text', 4, 2, 2, 1, NULL, 0);

--
Gitblit v1.9.3