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
delete from public_release
where id = #{id,jdbcType=INTEGER}
insert into public_release
( 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)
values (#{id,jdbcType=INTEGER},#{aid,jdbcType=VARCHAR},#{releaseStart,jdbcType=TIMESTAMP}
,#{releaseEnd,jdbcType=TIMESTAMP},#{remarks,jdbcType=VARCHAR},#{annexUrl,jdbcType=VARCHAR}
,#{status,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{pid,jdbcType=VARCHAR}
,#{pname,jdbcType=VARCHAR},#{duration,jdbcType=DOUBLE},#{validDate,jdbcType=VARCHAR}
,#{supplement,jdbcType=VARCHAR},#{auditInfo,jdbcType=VARCHAR},#{plan,jdbcType=VARCHAR}
,#{expectedEffect,jdbcType=VARCHAR},#{nextPlan,jdbcType=VARCHAR},#{type,jdbcType=INTEGER}
,#{orderNo,jdbcType=VARCHAR},#{updateTime,jdbcType=TIMESTAMP},#{updateStatus,jdbcType=INTEGER}
,#{assist,jdbcType=INTEGER},#{assistAid,jdbcType=VARCHAR},#{assistAidName,jdbcType=VARCHAR}
,#{mainId,jdbcType=INTEGER},#{mainName,jdbcType=VARCHAR},#{rejectName,jdbcType=VARCHAR}
,#{assistantAid,jdbcType=VARCHAR},#{assistantName,jdbcType=VARCHAR},#{publicAgain,jdbcType=INTEGER}
,#{auditTime,jdbcType=TIMESTAMP},#{newUser,jdbcType=VARCHAR},#{signSum,jdbcType=VARCHAR}
,#{userNames,jdbcType=VARCHAR},#{objectType,jdbcType=INTEGER},#{publicType,jdbcType=INTEGER}
,#{districtName,jdbcType=VARCHAR},#{clockIn,jdbcType=INTEGER},#{techStartProcess,jdbcType=INTEGER}
,#{addressName,jdbcType=VARCHAR})
insert into public_release
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,
#{id,jdbcType=INTEGER},
#{aid,jdbcType=VARCHAR},
#{releaseStart,jdbcType=TIMESTAMP},
#{releaseEnd,jdbcType=TIMESTAMP},
#{remarks,jdbcType=VARCHAR},
#{annexUrl,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP},
#{pid,jdbcType=VARCHAR},
#{pname,jdbcType=VARCHAR},
#{duration,jdbcType=DOUBLE},
#{validDate,jdbcType=VARCHAR},
#{supplement,jdbcType=VARCHAR},
#{auditInfo,jdbcType=VARCHAR},
#{plan,jdbcType=VARCHAR},
#{expectedEffect,jdbcType=VARCHAR},
#{nextPlan,jdbcType=VARCHAR},
#{type,jdbcType=INTEGER},
#{orderNo,jdbcType=VARCHAR},
#{updateTime,jdbcType=TIMESTAMP},
#{updateStatus,jdbcType=INTEGER},
#{assist,jdbcType=INTEGER},
#{assistAid,jdbcType=VARCHAR},
#{assistAidName,jdbcType=VARCHAR},
#{mainId,jdbcType=INTEGER},
#{mainName,jdbcType=VARCHAR},
#{rejectName,jdbcType=VARCHAR},
#{assistantAid,jdbcType=VARCHAR},
#{assistantName,jdbcType=VARCHAR},
#{publicAgain,jdbcType=INTEGER},
#{auditTime,jdbcType=TIMESTAMP},
#{newUser,jdbcType=VARCHAR},
#{signSum,jdbcType=VARCHAR},
#{userNames,jdbcType=VARCHAR},
#{objectType,jdbcType=INTEGER},
#{publicType,jdbcType=INTEGER},
#{districtName,jdbcType=VARCHAR},
#{clockIn,jdbcType=INTEGER},
#{techStartProcess,jdbcType=INTEGER},
#{addressName,jdbcType=VARCHAR},
update public_release
aid = #{aid,jdbcType=VARCHAR},
release_start = #{releaseStart,jdbcType=TIMESTAMP},
release_end = #{releaseEnd,jdbcType=TIMESTAMP},
remarks = #{remarks,jdbcType=VARCHAR},
annex_url = #{annexUrl,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
pid = #{pid,jdbcType=VARCHAR},
pname = #{pname,jdbcType=VARCHAR},
duration = #{duration,jdbcType=DOUBLE},
valid_date = #{validDate,jdbcType=VARCHAR},
supplement = #{supplement,jdbcType=VARCHAR},
audit_info = #{auditInfo,jdbcType=VARCHAR},
plan = #{plan,jdbcType=VARCHAR},
expected_effect = #{expectedEffect,jdbcType=VARCHAR},
next_plan = #{nextPlan,jdbcType=VARCHAR},
type = #{type,jdbcType=INTEGER},
order_no = #{orderNo,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP},
update_status = #{updateStatus,jdbcType=INTEGER},
assist = #{assist,jdbcType=INTEGER},
assist_aid = #{assistAid,jdbcType=VARCHAR},
assist_aid_name = #{assistAidName,jdbcType=VARCHAR},
main_id = #{mainId,jdbcType=INTEGER},
main_name = #{mainName,jdbcType=VARCHAR},
reject_name = #{rejectName,jdbcType=VARCHAR},
assistant_aid = #{assistantAid,jdbcType=VARCHAR},
assistant_name = #{assistantName,jdbcType=VARCHAR},
public_again = #{publicAgain,jdbcType=INTEGER},
audit_time = #{auditTime,jdbcType=TIMESTAMP},
new_user = #{newUser,jdbcType=VARCHAR},
sign_sum = #{signSum,jdbcType=VARCHAR},
user_names = #{userNames,jdbcType=VARCHAR},
object_type = #{objectType,jdbcType=INTEGER},
public_type = #{publicType,jdbcType=INTEGER},
district_name = #{districtName,jdbcType=VARCHAR},
clock_in = #{clockIn,jdbcType=INTEGER},
tech_start_process = #{techStartProcess,jdbcType=INTEGER},
address_name = #{addressName,jdbcType=VARCHAR},
where id = #{id,jdbcType=INTEGER}
update public_release
set
aid = #{aid,jdbcType=VARCHAR},
release_start = #{releaseStart,jdbcType=TIMESTAMP},
release_end = #{releaseEnd,jdbcType=TIMESTAMP},
remarks = #{remarks,jdbcType=VARCHAR},
annex_url = #{annexUrl,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
pid = #{pid,jdbcType=VARCHAR},
pname = #{pname,jdbcType=VARCHAR},
duration = #{duration,jdbcType=DOUBLE},
valid_date = #{validDate,jdbcType=VARCHAR},
supplement = #{supplement,jdbcType=VARCHAR},
audit_info = #{auditInfo,jdbcType=VARCHAR},
plan = #{plan,jdbcType=VARCHAR},
expected_effect = #{expectedEffect,jdbcType=VARCHAR},
next_plan = #{nextPlan,jdbcType=VARCHAR},
type = #{type,jdbcType=INTEGER},
order_no = #{orderNo,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP},
update_status = #{updateStatus,jdbcType=INTEGER},
assist = #{assist,jdbcType=INTEGER},
assist_aid = #{assistAid,jdbcType=VARCHAR},
assist_aid_name = #{assistAidName,jdbcType=VARCHAR},
main_id = #{mainId,jdbcType=INTEGER},
main_name = #{mainName,jdbcType=VARCHAR},
reject_name = #{rejectName,jdbcType=VARCHAR},
assistant_aid = #{assistantAid,jdbcType=VARCHAR},
assistant_name = #{assistantName,jdbcType=VARCHAR},
public_again = #{publicAgain,jdbcType=INTEGER},
audit_time = #{auditTime,jdbcType=TIMESTAMP},
new_user = #{newUser,jdbcType=VARCHAR},
sign_sum = #{signSum,jdbcType=VARCHAR},
user_names = #{userNames,jdbcType=VARCHAR},
object_type = #{objectType,jdbcType=INTEGER},
public_type = #{publicType,jdbcType=INTEGER},
district_name = #{districtName,jdbcType=VARCHAR},
clock_in = #{clockIn,jdbcType=INTEGER},
tech_start_process = #{techStartProcess,jdbcType=INTEGER},
address_name = #{addressName,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
update public_release_details a left join public_release b on a.prid =b.id
left join `user` c on a.uid=c.id
set a.sign_sum =a.sign_sum +1
where a.uid= #{uid} and a.main_status =1 and b.aid= #{aid}
and a.public_type in (0,1,2,3)
and a.assist in(0,1)
and a.assist =2
and a.assist =3
and a.assist in (2,3)
and a.assist in(0,1,2)
and a.aid= #{aid}
and a.status in (0,1,2,4)
and a.public_type in (0,2)
and a.assist in(0,1)
and a.tech_start_process in (0,2)
and apr.reviewer_id = #{aid} and apr.type=0
and a.public_type in (0,2)
and a.assist in(0,1)
and d.manager_id = #{aid}
and a.public_type in (0,2)
and a.assist=2
and a.aid= #{aid}
and a.type = #{type}
and a.assist in(0,1)
and e.aid = #{aid}
and a.status=1
and a.public_type in (1,2)
and a.public_type in (1)
and a.public_type in (2)
and e.aid =#{aid}
and a.status=1
and a.tech_start_process in (1,2)
and a.tech_start_process in (1)
and a.tech_start_process in (2)
and a.type=3 and a.assist=2
and apr.reviewer_id= #{aid} and apr.type=1
and a.clock_in =#{clockIn}
and a.release_start < #{clockTime} and a.release_end > #{clockTime}
and a.release_start BETWEEN #{releaseStarts} and #{publicEnd}
and e.nickname like concat('%',#{userName},'%')
and a.status = #{status}
update public_release set status= #{status}
where main_id= #{mainId}
and type= #{type}
and aid= #{aid}