Kaynağa Gözat

农事作物新增预产量字段

liuyaowen 10 ay önce
ebeveyn
işleme
7c544084e3

+ 18 - 0
src/main/java/com/yunfeiyun/agmp/fms/domain/FmsCrop.java

@@ -8,6 +8,7 @@ import lombok.Data;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 
+import javax.validation.constraints.Digits;
 import javax.validation.constraints.NotBlank;
 import java.math.BigDecimal;
 /**
@@ -71,8 +72,17 @@ public class FmsCrop extends BaseEntity
     private String videoIds;
     @Excel(name = "租户标识")
     private String tid;
+
     private BigDecimal cropInitialvalue;
 
+
+
+
+
+    @Excel(name = "作物预产量")
+    @Digits(integer = 8,fraction = 2,message = "作物预产量整数部分最大长度为8,小数部分最大长度为2")
+    private BigDecimal cropProduction;
+
     public String getCropMaintypeContent() {
         if (!StringUtils.isEmpty(this.cropMaintype)) {
             return DictUtils.getDictLabel("fms_crop_type", this.cropMaintype);
@@ -187,6 +197,14 @@ public class FmsCrop extends BaseEntity
         this.tid = tid;
     }
 
+
+    public BigDecimal getCropProduction() {
+        return cropProduction;
+    }
+    public void setCropProduction( BigDecimal cropProduction) {
+        this.cropProduction = cropProduction;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

+ 5 - 1
src/main/resources/mapper/FmsCropMapper.xml

@@ -5,7 +5,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 <mapper namespace="com.yunfeiyun.agmp.fms.mapper.FmsCropMapper">
 
     <sql id="selectFmsCropVo">
-        select cropId, cropName, cropType, cropMaintype, cropRcmdstatus, cropRemark, cropCreator, cropCreateddate, cropInitialvalue,tid from FmsCrop
+        select cropId, cropName, cropType, cropMaintype, cropRcmdstatus, cropRemark, cropCreator, cropCreateddate, cropInitialvalue,tid,cropProduction from FmsCrop
     </sql>
     <sql id="selectFmsCropHasResVo">
         select c.*,
@@ -25,6 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         cropCreator,
         cropCreateddate,
         cropInitialvalue,
+        cropProduction,
         tid,
         ( SELECT count( 1 ) FROM FmsPeriod p WHERE p.cropId = c.cropId ) count,
         ( SELECT sum( periodDays ) FROM FmsPeriod p WHERE p.cropId = c.cropId ) periodDays,
@@ -87,6 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="cropCreator != null">cropCreator,</if>
             <if test="cropCreateddate != null">cropCreateddate,</if>
             <if test="cropInitialvalue != null">cropInitialvalue,</if>
+            <if test="cropProduction != null">cropProduction,</if>
             <if test="tid != null">tid,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
@@ -99,6 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="cropCreator != null">#{cropCreator},</if>
             <if test="cropCreateddate != null">#{cropCreateddate},</if>
             <if test="cropInitialvalue != null">#{cropInitialvalue},</if>
+            <if test="cropProduction != null">#{cropProduction},</if>
             <if test="tid != null">#{tid},</if>
          </trim>
     </insert>
@@ -114,6 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="cropCreator != null">cropCreator = #{cropCreator},</if>
             <if test="cropCreateddate != null">cropCreateddate = #{cropCreateddate},</if>
             <if test="cropInitialvalue != null">cropInitialvalue = #{cropInitialvalue},</if>
+            <if test="cropProduction != null">cropProduction = #{cropProduction},</if>
             <if test="tid != null">tid = #{tid},</if>
         </trim>
         where cropId = #{cropId} and tid = #{tid}