id, `uid`, aid, release_start, release_end, remarks, annex_url, user_name, longitude,
latitude, `status`, create_time, clock_in, clock_in_time, photo_url, pid, pname,
ufid, duration, valid_date, new_user, sign_sum, main_status, supplement, audit_info,
`plan`, expected_effect, next_plan, `type`, order_no
delete from public_release
where id = #{id,jdbcType=INTEGER}
insert into public_release (`uid`, aid, release_start,
release_end, remarks, annex_url,
user_name, longitude, latitude,
`status`, create_time, clock_in,
clock_in_time, photo_url, pid,
pname, ufid, duration,
valid_date, new_user, sign_sum,
main_status, supplement, audit_info,
`plan`, expected_effect, next_plan,
`type`, order_no)
values (#{uid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, #{releaseStart,jdbcType=TIMESTAMP},
#{releaseEnd,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, #{annexUrl,jdbcType=VARCHAR},
#{userName,jdbcType=VARCHAR}, #{longitude,jdbcType=VARCHAR}, #{latitude,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{clockIn,jdbcType=INTEGER},
#{clockInTime,jdbcType=TIMESTAMP}, #{photoUrl,jdbcType=VARCHAR}, #{pid,jdbcType=VARCHAR},
#{pname,jdbcType=VARCHAR}, #{ufid,jdbcType=VARCHAR}, #{duration,jdbcType=DOUBLE},
#{validDate,jdbcType=VARCHAR}, #{newUser,jdbcType=INTEGER}, #{signSum,jdbcType=INTEGER},
#{mainStatus,jdbcType=INTEGER}, #{supplement,jdbcType=VARCHAR}, #{auditInfo,jdbcType=VARCHAR},
#{plan,jdbcType=VARCHAR}, #{expectedEffect,jdbcType=VARCHAR}, #{nextPlan,jdbcType=VARCHAR},
#{type,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR})
insert into public_release
`uid`,
aid,
release_start,
release_end,
remarks,
annex_url,
user_name,
longitude,
latitude,
`status`,
create_time,
clock_in,
clock_in_time,
photo_url,
pid,
pname,
ufid,
duration,
valid_date,
new_user,
sign_sum,
main_status,
supplement,
audit_info,
`plan`,
expected_effect,
next_plan,
`type`,
order_no,
#{uid,jdbcType=VARCHAR},
#{aid,jdbcType=VARCHAR},
#{releaseStart,jdbcType=TIMESTAMP},
#{releaseEnd,jdbcType=TIMESTAMP},
#{remarks,jdbcType=VARCHAR},
#{annexUrl,jdbcType=VARCHAR},
#{userName,jdbcType=VARCHAR},
#{longitude,jdbcType=VARCHAR},
#{latitude,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP},
#{clockIn,jdbcType=INTEGER},
#{clockInTime,jdbcType=TIMESTAMP},
#{photoUrl,jdbcType=VARCHAR},
#{pid,jdbcType=VARCHAR},
#{pname,jdbcType=VARCHAR},
#{ufid,jdbcType=VARCHAR},
#{duration,jdbcType=DOUBLE},
#{validDate,jdbcType=VARCHAR},
#{newUser,jdbcType=INTEGER},
#{signSum,jdbcType=INTEGER},
#{mainStatus,jdbcType=INTEGER},
#{supplement,jdbcType=VARCHAR},
#{auditInfo,jdbcType=VARCHAR},
#{plan,jdbcType=VARCHAR},
#{expectedEffect,jdbcType=VARCHAR},
#{nextPlan,jdbcType=VARCHAR},
#{type,jdbcType=INTEGER},
#{orderNo,jdbcType=VARCHAR},
update public_release
`uid` = #{uid,jdbcType=VARCHAR},
aid = #{aid,jdbcType=VARCHAR},
release_start = #{releaseStart,jdbcType=TIMESTAMP},
release_end = #{releaseEnd,jdbcType=TIMESTAMP},
remarks = #{remarks,jdbcType=VARCHAR},
annex_url = #{annexUrl,jdbcType=VARCHAR},
user_name = #{userName,jdbcType=VARCHAR},
longitude = #{longitude,jdbcType=VARCHAR},
latitude = #{latitude,jdbcType=VARCHAR},
`status` = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
clock_in = #{clockIn,jdbcType=INTEGER},
clock_in_time = #{clockInTime,jdbcType=TIMESTAMP},
photo_url = #{photoUrl,jdbcType=VARCHAR},
pid = #{pid,jdbcType=VARCHAR},
pname = #{pname,jdbcType=VARCHAR},
ufid = #{ufid,jdbcType=VARCHAR},
duration = #{duration,jdbcType=DOUBLE},
valid_date = #{validDate,jdbcType=VARCHAR},
new_user = #{newUser,jdbcType=INTEGER},
sign_sum = #{signSum,jdbcType=INTEGER},
main_status = #{mainStatus,jdbcType=INTEGER},
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},
where id = #{id,jdbcType=INTEGER}
update public_release
set `uid` = #{uid,jdbcType=VARCHAR},
aid = #{aid,jdbcType=VARCHAR},
release_start = #{releaseStart,jdbcType=TIMESTAMP},
release_end = #{releaseEnd,jdbcType=TIMESTAMP},
remarks = #{remarks,jdbcType=VARCHAR},
annex_url = #{annexUrl,jdbcType=VARCHAR},
user_name = #{userName,jdbcType=VARCHAR},
longitude = #{longitude,jdbcType=VARCHAR},
latitude = #{latitude,jdbcType=VARCHAR},
`status` = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
clock_in = #{clockIn,jdbcType=INTEGER},
clock_in_time = #{clockInTime,jdbcType=TIMESTAMP},
photo_url = #{photoUrl,jdbcType=VARCHAR},
pid = #{pid,jdbcType=VARCHAR},
pname = #{pname,jdbcType=VARCHAR},
ufid = #{ufid,jdbcType=VARCHAR},
duration = #{duration,jdbcType=DOUBLE},
valid_date = #{validDate,jdbcType=VARCHAR},
new_user = #{newUser,jdbcType=INTEGER},
sign_sum = #{signSum,jdbcType=INTEGER},
main_status = #{mainStatus,jdbcType=INTEGER},
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}
where id = #{id,jdbcType=INTEGER}
update public_release a ,(select max(create_time)create_time from public_release
where aid= #{aid} and uid=#{uid} and main_status =1 group by aid,uid)b
set a.sign_sum =a.sign_sum +1
where a.aid =#{aid} and a.uid =#{uid} and a.main_status =1 and a.create_time =b.create_time