|
|
@@ -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}
|