|
|
@@ -44,10 +44,11 @@
|
|
|
<result property="techStartProcess" column="tech_start_process" jdbcType="INTEGER"/>
|
|
|
<result property="addressName" column="address_name" jdbcType="VARCHAR"/>
|
|
|
<result property="assistProcess" column="assist_process" jdbcType="INTEGER"/>
|
|
|
+ <result property="alone" column="alone" jdbcType="INTEGER"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="PublicReleaseAllSql">
|
|
|
- id, aid, release_start, release_end, remarks, annex_url, status, create_time, pid, pname, duration, valid_date, supplement, audit_info, plan, expected_effect, next_plan, type, order_no, update_time, update_status, assist, assist_aid, assist_aid_name, main_id, main_name, reject_name, assistant_aid, assistant_name, public_again, audit_time, new_user, sign_sum, user_names, object_type, public_type, district_name, clock_in, tech_start_process, address_name, assist_process
|
|
|
+ id, aid, release_start, release_end, remarks, annex_url, status, create_time, pid, pname, duration, valid_date, supplement, audit_info, plan, expected_effect, next_plan, type, order_no, update_time, update_status, assist, assist_aid, assist_aid_name, main_id, main_name, reject_name, assistant_aid, assistant_name, public_again, audit_time, new_user, sign_sum, user_names, object_type, public_type, district_name, clock_in, tech_start_process, address_name, assist_process, alone
|
|
|
</sql>
|
|
|
|
|
|
<!--查询单个-->
|
|
|
@@ -188,6 +189,9 @@
|
|
|
<if test="assistProcess != null">
|
|
|
and assist_process = #{assistProcess}
|
|
|
</if>
|
|
|
+ <if test="alone != null">
|
|
|
+ and alone = #{alone}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
<if test="page_sql != null">
|
|
|
${page_sql}
|
|
|
@@ -322,6 +326,9 @@
|
|
|
<if test="assistProcess != null">
|
|
|
and assist_process = #{assistProcess}
|
|
|
</if>
|
|
|
+ <if test="alone != null">
|
|
|
+ and alone = #{alone}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
@@ -332,103 +339,13 @@
|
|
|
order_no, update_time, update_status, assist, assist_aid, assist_aid_name, main_id,
|
|
|
main_name, reject_name, assistant_aid, assistant_name, public_again, audit_time,
|
|
|
new_user, sign_sum, user_names, object_type, public_type, district_name, clock_in,
|
|
|
- tech_start_process, address_name, assist_process)
|
|
|
+ tech_start_process, address_name, assist_process, alone)
|
|
|
values (#{aid}, #{releaseStart}, #{releaseEnd}, #{remarks}, #{annexUrl}, #{status}, #{createTime}, #{pid},
|
|
|
#{pname}, #{duration}, #{validDate}, #{supplement}, #{auditInfo}, #{plan}, #{expectedEffect},
|
|
|
#{nextPlan}, #{type}, #{orderNo}, #{updateTime}, #{updateStatus}, #{assist}, #{assistAid},
|
|
|
#{assistAidName}, #{mainId}, #{mainName}, #{rejectName}, #{assistantAid}, #{assistantName},
|
|
|
#{publicAgain}, #{auditTime}, #{newUser}, #{signSum}, #{userNames}, #{objectType}, #{publicType},
|
|
|
- #{districtName}, #{clockIn}, #{techStartProcess}, #{addressName}, #{assistProcess})
|
|
|
- </insert>
|
|
|
-
|
|
|
- <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.PublicRelease" useGeneratedKeys="true">
|
|
|
- insert into public_release
|
|
|
- <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="id != null">id,</if>
|
|
|
- <if test="aid != null">aid,</if>
|
|
|
- <if test="releaseStart != null">release_start,</if>
|
|
|
- <if test="releaseEnd != null">release_end,</if>
|
|
|
- <if test="remarks != null">remarks,</if>
|
|
|
- <if test="annexUrl != null">annex_url,</if>
|
|
|
- <if test="status != null">status,</if>
|
|
|
- <if test="createTime != null">create_time,</if>
|
|
|
- <if test="pid != null">pid,</if>
|
|
|
- <if test="pname != null">pname,</if>
|
|
|
- <if test="duration != null">duration,</if>
|
|
|
- <if test="validDate != null">valid_date,</if>
|
|
|
- <if test="supplement != null">supplement,</if>
|
|
|
- <if test="auditInfo != null">audit_info,</if>
|
|
|
- <if test="plan != null">plan,</if>
|
|
|
- <if test="expectedEffect != null">expected_effect,</if>
|
|
|
- <if test="nextPlan != null">next_plan,</if>
|
|
|
- <if test="type != null">type,</if>
|
|
|
- <if test="orderNo != null">order_no,</if>
|
|
|
- <if test="updateTime != null">update_time,</if>
|
|
|
- <if test="updateStatus != null">update_status,</if>
|
|
|
- <if test="assist != null">assist,</if>
|
|
|
- <if test="assistAid != null">assist_aid,</if>
|
|
|
- <if test="assistAidName != null">assist_aid_name,</if>
|
|
|
- <if test="mainId != null">main_id,</if>
|
|
|
- <if test="mainName != null">main_name,</if>
|
|
|
- <if test="rejectName != null">reject_name,</if>
|
|
|
- <if test="assistantAid != null">assistant_aid,</if>
|
|
|
- <if test="assistantName != null">assistant_name,</if>
|
|
|
- <if test="publicAgain != null">public_again,</if>
|
|
|
- <if test="auditTime != null">audit_time,</if>
|
|
|
- <if test="newUser != null">new_user,</if>
|
|
|
- <if test="signSum != null">sign_sum,</if>
|
|
|
- <if test="userNames != null">user_names,</if>
|
|
|
- <if test="objectType != null">object_type,</if>
|
|
|
- <if test="publicType != null">public_type,</if>
|
|
|
- <if test="districtName != null">district_name,</if>
|
|
|
- <if test="clockIn != null">clock_in,</if>
|
|
|
- <if test="techStartProcess != null">tech_start_process,</if>
|
|
|
- <if test="addressName != null">address_name,</if>
|
|
|
- <if test="assistProcess != null">assist_process,</if>
|
|
|
- </trim>
|
|
|
- <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="id != null">#{id,jdbcType=INTEGER},</if>
|
|
|
- <if test="aid != null">#{aid,jdbcType=VARCHAR},</if>
|
|
|
- <if test="releaseStart != null">#{releaseStart,jdbcType=TIMESTAMP},</if>
|
|
|
- <if test="releaseEnd != null">#{releaseEnd,jdbcType=TIMESTAMP},</if>
|
|
|
- <if test="remarks != null">#{remarks,jdbcType=VARCHAR},</if>
|
|
|
- <if test="annexUrl != null">#{annexUrl,jdbcType=VARCHAR},</if>
|
|
|
- <if test="status != null">#{status,jdbcType=INTEGER},</if>
|
|
|
- <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
|
|
|
- <if test="pid != null">#{pid,jdbcType=VARCHAR},</if>
|
|
|
- <if test="pname != null">#{pname,jdbcType=VARCHAR},</if>
|
|
|
- <if test="duration != null">#{duration,jdbcType=DOUBLE},</if>
|
|
|
- <if test="validDate != null">#{validDate,jdbcType=VARCHAR},</if>
|
|
|
- <if test="supplement != null">#{supplement,jdbcType=VARCHAR},</if>
|
|
|
- <if test="auditInfo != null">#{auditInfo,jdbcType=VARCHAR},</if>
|
|
|
- <if test="plan != null">#{plan,jdbcType=VARCHAR},</if>
|
|
|
- <if test="expectedEffect != null">#{expectedEffect,jdbcType=VARCHAR},</if>
|
|
|
- <if test="nextPlan != null">#{nextPlan,jdbcType=VARCHAR},</if>
|
|
|
- <if test="type != null">#{type,jdbcType=INTEGER},</if>
|
|
|
- <if test="orderNo != null">#{orderNo,jdbcType=VARCHAR},</if>
|
|
|
- <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
|
|
|
- <if test="updateStatus != null">#{updateStatus,jdbcType=INTEGER},</if>
|
|
|
- <if test="assist != null">#{assist,jdbcType=INTEGER},</if>
|
|
|
- <if test="assistAid != null">#{assistAid,jdbcType=VARCHAR},</if>
|
|
|
- <if test="assistAidName != null">#{assistAidName,jdbcType=VARCHAR},</if>
|
|
|
- <if test="mainId != null">#{mainId,jdbcType=INTEGER},</if>
|
|
|
- <if test="mainName != null">#{mainName,jdbcType=VARCHAR},</if>
|
|
|
- <if test="rejectName != null">#{rejectName,jdbcType=VARCHAR},</if>
|
|
|
- <if test="assistantAid != null">#{assistantAid,jdbcType=VARCHAR},</if>
|
|
|
- <if test="assistantName != null">#{assistantName,jdbcType=VARCHAR},</if>
|
|
|
- <if test="publicAgain != null">#{publicAgain,jdbcType=INTEGER},</if>
|
|
|
- <if test="auditTime != null">#{auditTime,jdbcType=TIMESTAMP},</if>
|
|
|
- <if test="newUser != null">#{newUser,jdbcType=VARCHAR},</if>
|
|
|
- <if test="signSum != null">#{signSum,jdbcType=VARCHAR},</if>
|
|
|
- <if test="userNames != null">#{userNames,jdbcType=VARCHAR},</if>
|
|
|
- <if test="objectType != null">#{objectType,jdbcType=INTEGER},</if>
|
|
|
- <if test="publicType != null">#{publicType,jdbcType=INTEGER},</if>
|
|
|
- <if test="districtName != null">#{districtName,jdbcType=VARCHAR},</if>
|
|
|
- <if test="clockIn != null">#{clockIn,jdbcType=INTEGER},</if>
|
|
|
- <if test="techStartProcess != null">#{techStartProcess,jdbcType=INTEGER},</if>
|
|
|
- <if test="addressName != null">#{addressName,jdbcType=VARCHAR},</if>
|
|
|
- <if test="assistProcess != null">#{assistProcess,jdbcType=INTEGER}</if>
|
|
|
- </trim>
|
|
|
+ #{districtName}, #{clockIn}, #{techStartProcess}, #{addressName}, #{assistProcess}, #{alone})
|
|
|
</insert>
|
|
|
|
|
|
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
|
|
@@ -436,7 +353,7 @@
|
|
|
duration, valid_date, supplement, audit_info, plan, expected_effect, next_plan, type, order_no, update_time,
|
|
|
update_status, assist, assist_aid, assist_aid_name, main_id, main_name, reject_name, assistant_aid,
|
|
|
assistant_name, public_again, audit_time, new_user, sign_sum, user_names, object_type, public_type,
|
|
|
- district_name, clock_in, tech_start_process, address_name, assist_process)
|
|
|
+ district_name, clock_in, tech_start_process, address_name, assist_process, alone)
|
|
|
values
|
|
|
<foreach collection="entities" item="entity" separator=",">
|
|
|
(#{entity.aid}, #{entity.releaseStart}, #{entity.releaseEnd}, #{entity.remarks}, #{entity.annexUrl},
|
|
|
@@ -447,7 +364,7 @@
|
|
|
#{entity.rejectName}, #{entity.assistantAid}, #{entity.assistantName}, #{entity.publicAgain},
|
|
|
#{entity.auditTime}, #{entity.newUser}, #{entity.signSum}, #{entity.userNames}, #{entity.objectType},
|
|
|
#{entity.publicType}, #{entity.districtName}, #{entity.clockIn}, #{entity.techStartProcess},
|
|
|
- #{entity.addressName}, #{entity.assistProcess})
|
|
|
+ #{entity.addressName}, #{entity.assistProcess}, #{entity.alone})
|
|
|
</foreach>
|
|
|
</insert>
|
|
|
|
|
|
@@ -456,7 +373,7 @@
|
|
|
duration, valid_date, supplement, audit_info, plan, expected_effect, next_plan, type, order_no, update_time,
|
|
|
update_status, assist, assist_aid, assist_aid_name, main_id, main_name, reject_name, assistant_aid,
|
|
|
assistant_name, public_again, audit_time, new_user, sign_sum, user_names, object_type, public_type,
|
|
|
- district_name, clock_in, tech_start_process, address_name, assist_process)
|
|
|
+ district_name, clock_in, tech_start_process, address_name, assist_process, alone)
|
|
|
values
|
|
|
<foreach collection="entities" item="entity" separator=",">
|
|
|
(#{entity.aid}, #{entity.releaseStart}, #{entity.releaseEnd}, #{entity.remarks}, #{entity.annexUrl},
|
|
|
@@ -467,7 +384,7 @@
|
|
|
#{entity.rejectName}, #{entity.assistantAid}, #{entity.assistantName}, #{entity.publicAgain},
|
|
|
#{entity.auditTime}, #{entity.newUser}, #{entity.signSum}, #{entity.userNames}, #{entity.objectType},
|
|
|
#{entity.publicType}, #{entity.districtName}, #{entity.clockIn}, #{entity.techStartProcess},
|
|
|
- #{entity.addressName}, #{entity.assistProcess})
|
|
|
+ #{entity.addressName}, #{entity.assistProcess}, #{entity.alone})
|
|
|
</foreach>
|
|
|
on duplicate key update
|
|
|
aid = values(aid),
|
|
|
@@ -509,7 +426,8 @@
|
|
|
clock_in = values(clock_in),
|
|
|
tech_start_process = values(tech_start_process),
|
|
|
address_name = values(address_name),
|
|
|
- assist_process = values(assist_process)
|
|
|
+ assist_process = values(assist_process),
|
|
|
+ alone = values(alone)
|
|
|
</insert>
|
|
|
|
|
|
<!--通过主键修改数据-->
|
|
|
@@ -594,10 +512,10 @@
|
|
|
<if test="rejectName != null and rejectName != ''">
|
|
|
reject_name = #{rejectName},
|
|
|
</if>
|
|
|
- <if test="assistantAid != null and assistantAid != ''">
|
|
|
+ <if test="assistantAid != null ">
|
|
|
assistant_aid = #{assistantAid},
|
|
|
</if>
|
|
|
- <if test="assistantName != null and assistantName != ''">
|
|
|
+ <if test="assistantName != null">
|
|
|
assistant_name = #{assistantName},
|
|
|
</if>
|
|
|
<if test="publicAgain != null">
|
|
|
@@ -636,6 +554,9 @@
|
|
|
<if test="assistProcess != null">
|
|
|
assist_process = #{assistProcess},
|
|
|
</if>
|
|
|
+ <if test="alone != null">
|
|
|
+ alone = #{alone},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id}
|
|
|
</update>
|
|
|
@@ -646,6 +567,103 @@
|
|
|
from public_release
|
|
|
where id = #{id}
|
|
|
</delete>
|
|
|
+ <delete id="deleteByMainId">
|
|
|
+ delete from public_release where main_id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+
|
|
|
+ <!--注意增删字段需要单独处理-->
|
|
|
+ <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.PublicRelease" useGeneratedKeys="true">
|
|
|
+ insert into public_release
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">id,</if>
|
|
|
+ <if test="aid != null">aid,</if>
|
|
|
+ <if test="releaseStart != null">release_start,</if>
|
|
|
+ <if test="releaseEnd != null">release_end,</if>
|
|
|
+ <if test="remarks != null">remarks,</if>
|
|
|
+ <if test="annexUrl != null">annex_url,</if>
|
|
|
+ <if test="status != null">status,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="pid != null">pid,</if>
|
|
|
+ <if test="pname != null">pname,</if>
|
|
|
+ <if test="duration != null">duration,</if>
|
|
|
+ <if test="validDate != null">valid_date,</if>
|
|
|
+ <if test="supplement != null">supplement,</if>
|
|
|
+ <if test="auditInfo != null">audit_info,</if>
|
|
|
+ <if test="plan != null">plan,</if>
|
|
|
+ <if test="expectedEffect != null">expected_effect,</if>
|
|
|
+ <if test="nextPlan != null">next_plan,</if>
|
|
|
+ <if test="type != null">type,</if>
|
|
|
+ <if test="orderNo != null">order_no,</if>
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
+ <if test="updateStatus != null">update_status,</if>
|
|
|
+ <if test="assist != null">assist,</if>
|
|
|
+ <if test="assistAid != null">assist_aid,</if>
|
|
|
+ <if test="assistAidName != null">assist_aid_name,</if>
|
|
|
+ <if test="mainId != null">main_id,</if>
|
|
|
+ <if test="mainName != null">main_name,</if>
|
|
|
+ <if test="rejectName != null">reject_name,</if>
|
|
|
+ <if test="assistantAid != null">assistant_aid,</if>
|
|
|
+ <if test="assistantName != null">assistant_name,</if>
|
|
|
+ <if test="publicAgain != null">public_again,</if>
|
|
|
+ <if test="auditTime != null">audit_time,</if>
|
|
|
+ <if test="newUser != null">new_user,</if>
|
|
|
+ <if test="signSum != null">sign_sum,</if>
|
|
|
+ <if test="userNames != null">user_names,</if>
|
|
|
+ <if test="objectType != null">object_type,</if>
|
|
|
+ <if test="publicType != null">public_type,</if>
|
|
|
+ <if test="districtName != null">district_name,</if>
|
|
|
+ <if test="clockIn != null">clock_in,</if>
|
|
|
+ <if test="techStartProcess != null">tech_start_process,</if>
|
|
|
+ <if test="addressName != null">address_name,</if>
|
|
|
+ <if test="assistProcess != null">assist_process,</if>
|
|
|
+ <if test="alone != null">alone,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">#{id,jdbcType=INTEGER},</if>
|
|
|
+ <if test="aid != null">#{aid,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="releaseStart != null">#{releaseStart,jdbcType=TIMESTAMP},</if>
|
|
|
+ <if test="releaseEnd != null">#{releaseEnd,jdbcType=TIMESTAMP},</if>
|
|
|
+ <if test="remarks != null">#{remarks,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="annexUrl != null">#{annexUrl,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="status != null">#{status,jdbcType=INTEGER},</if>
|
|
|
+ <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
|
|
|
+ <if test="pid != null">#{pid,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="pname != null">#{pname,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="duration != null">#{duration,jdbcType=DOUBLE},</if>
|
|
|
+ <if test="validDate != null">#{validDate,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="supplement != null">#{supplement,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="auditInfo != null">#{auditInfo,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="plan != null">#{plan,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="expectedEffect != null">#{expectedEffect,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="nextPlan != null">#{nextPlan,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="type != null">#{type,jdbcType=INTEGER},</if>
|
|
|
+ <if test="orderNo != null">#{orderNo,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
|
|
|
+ <if test="updateStatus != null">#{updateStatus,jdbcType=INTEGER},</if>
|
|
|
+ <if test="assist != null">#{assist,jdbcType=INTEGER},</if>
|
|
|
+ <if test="assistAid != null">#{assistAid,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="assistAidName != null">#{assistAidName,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="mainId != null">#{mainId,jdbcType=INTEGER},</if>
|
|
|
+ <if test="mainName != null">#{mainName,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="rejectName != null">#{rejectName,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="assistantAid != null">#{assistantAid,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="assistantName != null">#{assistantName,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="publicAgain != null">#{publicAgain,jdbcType=INTEGER},</if>
|
|
|
+ <if test="auditTime != null">#{auditTime,jdbcType=TIMESTAMP},</if>
|
|
|
+ <if test="newUser != null">#{newUser,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="signSum != null">#{signSum,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="userNames != null">#{userNames,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="objectType != null">#{objectType,jdbcType=INTEGER},</if>
|
|
|
+ <if test="publicType != null">#{publicType,jdbcType=INTEGER},</if>
|
|
|
+ <if test="districtName != null">#{districtName,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="clockIn != null">#{clockIn,jdbcType=INTEGER},</if>
|
|
|
+ <if test="techStartProcess != null">#{techStartProcess,jdbcType=INTEGER},</if>
|
|
|
+ <if test="addressName != null">#{addressName,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="assistProcess != null">#{assistProcess,jdbcType=INTEGER},</if>
|
|
|
+ <if test="alone != null">#{alone,jdbcType=INTEGER},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
|
|
|
<update id="updateSignByAidAndUid">
|
|
|
update public_release_details a left join public_release b on a.prid =b.id
|
|
|
@@ -660,7 +678,7 @@
|
|
|
date_format(a.release_end ,'%Y-%m-%d %H:%i:%S') releaseEnds,date_format(a.create_time ,'%Y-%m-%d %H:%i:%S') createTimes,a.status,
|
|
|
date_format(a.update_time ,'%Y-%m-%d %H:%i:%S') updateTimes,a.update_status updateStatus,a.district_name districtName,
|
|
|
a.assist,a.assist_aid assistAid,a.assist_aid_name assistAidName,a.type,a.main_name mainName,a.reject_name rejectName,
|
|
|
- a.assistant_aid assistantAid ,a.assistant_name assistantName,a.public_again publicAgain,a.user_names userNames,
|
|
|
+ a.assistant_aid assistantAid ,a.assistant_name assistantName,a.public_again publicAgain,a.user_names userNames,a.alone,
|
|
|
ea.total_amount expenseAmount ,a.clock_in clockIn,a.assist_process assistProcess,a.tech_start_process techStartProcess
|
|
|
from public_release a left join admin c on a.aid =c.id
|
|
|
left join expense_account ea ON a.id = ea.prid AND ea.status IN (0, 1, 2, 3)
|
|
|
@@ -690,16 +708,16 @@
|
|
|
<if test="type==0">
|
|
|
and a.public_type in (0,1,2,3)
|
|
|
<if test="assist ==0">
|
|
|
- and a.assist in(0,1)
|
|
|
+ and a.assist in(0,1,4)
|
|
|
</if>
|
|
|
<if test="assist == 2">
|
|
|
- and a.assist =2
|
|
|
+ and a.assist in (2,4)
|
|
|
</if>
|
|
|
<if test="assist == 3">
|
|
|
and a.assist =3
|
|
|
</if>
|
|
|
<if test="assist ==4">
|
|
|
- and a.assist in (2,3)
|
|
|
+ and a.assist in (2,3,4)
|
|
|
</if>
|
|
|
<if test="assistType ==1">
|
|
|
and a.assist in(0,1,2)
|
|
|
@@ -741,16 +759,14 @@
|
|
|
<if test="type==4">
|
|
|
and a.assist in(0,1)
|
|
|
and e.aid = #{aid}
|
|
|
- and a.status=1
|
|
|
- <if test="status==null">and a.public_type in (1,2) </if>
|
|
|
- <if test="status==1">and a.public_type in (1) </if>
|
|
|
+ <if test="status==null"> and a.public_type in (1,2) </if>
|
|
|
+ <if test="status==1">and a.status=1 and a.public_type in (1) </if>
|
|
|
<if test="status==2">and a.public_type in (2) </if>
|
|
|
</if>
|
|
|
<if test="type==5">
|
|
|
and e.aid =#{aid}
|
|
|
- and a.status=1
|
|
|
<if test="status==null">and a.tech_start_process in (1,2) </if>
|
|
|
- <if test="status==1">and a.tech_start_process in (1) </if>
|
|
|
+ <if test="status==1">and a.status=1 and a.tech_start_process in (1) </if>
|
|
|
<if test="status==2">and a.tech_start_process in (2) </if>
|
|
|
</if>
|
|
|
<if test="type==6">
|
|
|
@@ -799,7 +815,7 @@
|
|
|
<select id="selectDtails" resultType="com.goafanti.weChat.bo.OutPublicRelease">
|
|
|
select a.id,c.name aname,date_format(a.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,a.update_time updateTime,a.user_names userNames,
|
|
|
date_format(a.release_end ,'%Y-%m-%d %H:%i:%S') releaseEnds,date_format(a.create_time ,'%Y-%m-%d %H:%i:%S') createTimes,a.status,a.assist_process assistProcess,
|
|
|
- a.annex_url annexUrl ,a.remarks,a.duration ,a.valid_date validDate ,a.aid ,c.superior_id suprId,a.tech_start_process techStartProcess,
|
|
|
+ a.annex_url annexUrl ,a.remarks,a.duration ,a.valid_date validDate ,a.aid ,c.superior_id suprId,a.tech_start_process techStartProcess,a.alone,
|
|
|
a.plan ,a.expected_effect expectedEffect,a.next_plan nextPlan,c.reviewer,a.type,a.order_no orderNo,d.contract_no contractNo,a.address_name addressName,
|
|
|
date_format(a.update_time ,'%Y-%m-%d %H:%i:%S') updateTimes,a.update_Status updateStatus,a.assist,a.assist_aid assistAid,a.assist_aid_name assistAidName,
|
|
|
a.main_name mainName,a.assistant_aid assistantAid,a.assistant_name assistantName,a.public_again publicAhain,x.uids,a.public_type publicType,c2.name reviewerName
|
|
|
@@ -873,10 +889,9 @@
|
|
|
</if>
|
|
|
group by aid)x
|
|
|
</select>
|
|
|
-
|
|
|
<select id="listPublicDtails" resultType="com.goafanti.weChat.bo.OutPublicDtails">
|
|
|
select a.id prdId,b.id,a.district_name districtName ,c.name aname,a.duration ,b.status ,b.annex_url annexUrl,a.photo_url photoUrl,d.nickname userName,
|
|
|
- date_format(a.clock_in_time ,'%Y-%m-%d %H:%i:%S') clockInTimes,a.clock_in clockIn ,b.remarks ,b.supplement ,b.`type` ,b.object_type objectType ,
|
|
|
+ date_format(a.clock_in_time ,'%Y-%m-%d %H:%i:%S') clockInTimes,a.clock_in clockIn ,b.remarks ,b.supplement ,b.`type` ,b.object_type objectType ,b.alone,
|
|
|
date_format(b.create_time ,'%Y-%m-%d %H:%i:%S') createTimes,b.audit_info auditInfo,date_format(b.audit_time ,'%Y-%m-%d %H:%i:%S') auditTimes,
|
|
|
date_format(b.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,date_format(b.release_end ,'%Y-%m-%d %H:%i:%S') releaseEnds,a.address_name addressName,
|
|
|
b.plan ,b.next_plan nextPlan ,b.expected_effect expectedEffect,b.update_status updateStatus,b.assist_aid_name assistAidName,
|
|
|
@@ -974,12 +989,7 @@
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
- <select id="checkTime" resultType="java.lang.Integer">
|
|
|
- select id from public_release where aid=#{aid} and status in (0,1,2)
|
|
|
- and ( (release_start >= #{start} and release_start < #{end})
|
|
|
- or (release_start < #{start} and release_end > #{start})
|
|
|
- or (release_start < #{end} and release_end > #{end}))
|
|
|
- </select>
|
|
|
+
|
|
|
<select id="getTimeUserFollow" resultType="com.goafanti.common.model.OutPublicReleaseCount">
|
|
|
select e.id province,d.id depId,a.aid,a.uid,a.new_user newUser ,1 quantity from (select a.aid,b.uid,b.new_user from public_release a
|
|
|
left join public_release_details b on a.id=b.prid
|
|
|
@@ -1159,17 +1169,35 @@
|
|
|
</select>
|
|
|
<select id="selectByMainIdAndReviewer" resultMap="PublicReleaseMap">
|
|
|
select
|
|
|
- a.id, a.aid, a.release_start, a.release_end, a.remarks, a.annex_url, a.status, a.create_time, a.pid, a.pname, a.duration, a.valid_date, a.supplement, a.audit_info, a.plan, a.expected_effect, a.next_plan, a.type, a.order_no, a.update_time, a.update_status, a.assist, a.assist_aid, a.assist_aid_name, a.main_id, a.main_name
|
|
|
+ a.id, a.aid, a.release_start, a.release_end, a.remarks, a.annex_url, a.status, a.create_time, a.pid, a.pname, a.duration, a.valid_date, a.supplement, a.audit_info, a.plan, a.expected_effect, a.next_plan, a.type, a.order_no, a.update_time, a.update_status, a.assist, a.assist_aid, a.assist_aid_name, a.main_id, a.main_name
|
|
|
from public_release a left join admin_public_reviewer b on a.aid =b.aid and b.type=1
|
|
|
where a.main_id = #{id}
|
|
|
- and b.reviewer_id = #{reviewerId}
|
|
|
+ and b.reviewer_id = #{reviewerId}
|
|
|
</select>
|
|
|
<select id="selectDetailsByPrid" resultType="com.goafanti.common.model.PublicReleaseDetails">
|
|
|
select
|
|
|
- a.id, a.prid, a.uid
|
|
|
+ a.id, a.prid, a.uid
|
|
|
from public_release_details a
|
|
|
where a.prid = #{prid}
|
|
|
</select>
|
|
|
-</mapper>
|
|
|
+ <select id="checkTime" resultMap="PublicReleaseMap">
|
|
|
+ select
|
|
|
+ <include refid="PublicReleaseAllSql"/>
|
|
|
+ from public_release where aid=#{aid} and status in (0,1,2)
|
|
|
+ and (alone in (0,1) or (alone=2 and assist=2))
|
|
|
+ and ( (release_start >= #{start} and release_start <= #{end})
|
|
|
+ or (release_start < #{start} and release_end > #{start})
|
|
|
+ or (release_start < #{end} and release_end > #{end}))
|
|
|
+ </select>
|
|
|
+ <select id="checkTech" resultMap="PublicReleaseMap">
|
|
|
+ select
|
|
|
+ <include refid="PublicReleaseAllSql"/>
|
|
|
+ from public_release where status =1 and `type` =0 and assist =1
|
|
|
+ and FIND_IN_SET(#{aid},assist_aid)
|
|
|
+ and ( (release_start >= #{start} and release_start <= #{end})
|
|
|
+ or (release_start < #{start} and release_end > #{start})
|
|
|
+ or (release_start < #{end} and release_end > #{end}))
|
|
|
+ </select>
|
|
|
|
|
|
+</mapper>
|
|
|
|