PLAN_ID, PLAN_DATE, PLAN_NAME, SALE_AREA_ID, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED
t.PLAN_ID, t.PLAN_DATE, t.PLAN_NAME, t.SALE_AREA_ID, t.INSERT_USERNAME, t.INSERT_TIME,
t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED
SELECT FROM AMS_SALE_PLAN
SELECT FROM AMS_SALE_PLAN t
and PLAN_ID = #{planId}
and TO_CHAR(PLAN_DATE,'yyyy-MM-dd') = #{planDate}
and PLAN_NAME = #{planName}
and SALE_AREA_ID = #{saleAreaId}
and INSERT_USERNAME = #{insertUsername}
and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
and UPDATE_USERNAME = #{updateUsername}
and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
and DELETED = #{deleted}
and PLAN_ID = #{planId}
and TO_CHAR(PLAN_DATE,'yyyy-MM-dd') = #{planDate}
and PLAN_NAME LIKE '%${planName}%'
and SALE_AREA_ID = #{saleAreaId}
and INSERT_USERNAME LIKE '%${insertUsername}%'
and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
and UPDATE_USERNAME LIKE '%${updateUsername}%'
and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
and DELETED = #{deleted}
delete from AMS_SALE_PLAN
where PLAN_ID = #{planId,jdbcType=DECIMAL}
delete from AMS_SALE_PLAN
where 1!=1
or TO_CHAR(PLAN_DATE,'yyyy-MM-dd') = '#{planDate}'
or PLAN_NAME = #{planName}
or SALE_AREA_ID = #{saleAreaId}
or INSERT_USERNAME = #{insertUsername}
or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
or UPDATE_USERNAME = #{updateUsername}
or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
or DELETED = #{deleted}
insert into AMS_SALE_PLAN (PLAN_ID, PLAN_DATE, PLAN_NAME,
SALE_AREA_ID, INSERT_USERNAME, INSERT_TIME,
UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
DELETED)
values (#{planId,jdbcType=DECIMAL}, #{planDate,jdbcType=TIMESTAMP}, #{planName,jdbcType=VARCHAR},
#{saleAreaId,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
#{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},
#{deleted,jdbcType=DECIMAL})
insert into AMS_SALE_PLAN
PLAN_ID,
PLAN_DATE,
PLAN_NAME,
SALE_AREA_ID,
INSERT_USERNAME,
INSERT_TIME,
UPDATE_USERNAME,
UPDATE_TIME,
INSERT_UPDATE_REMARK,
DELETED,
#{planId,jdbcType=DECIMAL},
#{planDate,jdbcType=TIMESTAMP},
#{planName,jdbcType=VARCHAR},
#{saleAreaId,jdbcType=DECIMAL},
#{insertUsername,jdbcType=VARCHAR},
#{insertTime,jdbcType=TIMESTAMP},
#{updateUsername,jdbcType=VARCHAR},
#{updateTime,jdbcType=TIMESTAMP},
#{insertUpdateRemark,jdbcType=VARCHAR},
#{deleted,jdbcType=DECIMAL},
update AMS_SALE_PLAN
set PLAN_DATE = #{planDate,jdbcType=TIMESTAMP},
PLAN_NAME = #{planName,jdbcType=VARCHAR},
SALE_AREA_ID = #{saleAreaId,jdbcType=DECIMAL},
INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
DELETED = #{deleted,jdbcType=DECIMAL}
where PLAN_ID = #{planId,jdbcType=DECIMAL}
update AMS_SALE_PLAN
PLAN_DATE = #{planDate,jdbcType=TIMESTAMP},
PLAN_NAME = #{planName,jdbcType=VARCHAR},
SALE_AREA_ID = #{saleAreaId,jdbcType=DECIMAL},
INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
DELETED = #{deleted,jdbcType=DECIMAL},
where PLAN_ID = #{planId,jdbcType=DECIMAL}
insert into AMS_SALE_PLAN
(PLAN_ID,
PLAN_DATE, PLAN_NAME, SALE_AREA_ID,
INSERT_USERNAME, INSERT_TIME,
UPDATE_USERNAME, UPDATE_TIME,
INSERT_UPDATE_REMARK, DELETED)
(
select
#{item.planId,jdbcType=DECIMAL},
#{item.planDate,jdbcType=TIMESTAMP}, #{item.planName,jdbcType=VARCHAR}, #{item.saleAreaId,jdbcType=DECIMAL},
#{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
#{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
#{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.deleted,jdbcType=DECIMAL} from dual
)
update AMS_SALE_PLAN
set
PLAN_ID=
when #{item.planId,jdbcType=DECIMAL} then #{item.planId,jdbcType=DECIMAL}
,PLAN_DATE=
when #{item.planId,jdbcType=DECIMAL} then #{item.planDate,jdbcType=TIMESTAMP}
,PLAN_NAME=
when #{item.planId,jdbcType=DECIMAL} then #{item.planName,jdbcType=VARCHAR}
,SALE_AREA_ID=
when #{item.planId,jdbcType=DECIMAL} then #{item.saleAreaId,jdbcType=DECIMAL}
,INSERT_USERNAME=
when #{item.planId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
,INSERT_TIME=
when #{item.planId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
,UPDATE_USERNAME=
when #{item.planId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
,UPDATE_TIME=
when #{item.planId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
,INSERT_UPDATE_REMARK=
when #{item.planId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
,DELETED=
when #{item.planId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
where PLAN_ID in
#{item.planId,jdbcType=DECIMAL}
delete from AMS_SALE_PLAN
where PLAN_ID in
#{id}
order by "${orderField}"
${orderType}