Commit a0532dfd authored by ZWT's avatar ZWT

得到的

parent 7d84d8ce
......@@ -92,6 +92,8 @@ public class SpaceInstitutionDetailService extends SpaceOptimizeBaseService {
return XTransactionHelper.begin(context, () -> {
//新增间开配置
SpaceInstitutionDetailMapper mapper = context.getBean(SpaceInstitutionDetailMapper.class);
entity.setOptimizeState(1);
entity.setIsCurrentBasic(1);
mapper.insert(entity);
String institutionId = entity.getId();
List<CreateSpaceInstitutionWellheadInput> wellheadList = input.getWellheadList();
......
......@@ -53,7 +53,7 @@
ID=#{id}
</select>
<insert id="batchInsertList" parameterType="list">
<insert id="batchInsertList" parameterType="list" databaseId="MySQL">
INSERT INTO SPACE_INSTITUTION_DURATION (
ID,
CREATE_BY_ID,
......@@ -88,4 +88,46 @@
)
</foreach>
</insert>
<insert id="batchInsertList" parameterType="list" databaseId="Oracle">
INSERT ALL
<foreach collection="list" item="item">
INTO SPACE_INSTITUTION_DURATION (
ID,
CREATE_BY_ID,
CREATE_BY_NAME,
CREATE_TIME,
MODIFY_BY_ID,
MODIFY_BY_NAME,
MODIFY_TIME,
INSTITUTION_ID,
CONFIG_ID,
WELLHEAD_ID,
<if test="item.generationTypeKey != null and item.generationTypeKey != ''">
GENERATION_TYPE_KEY,
</if>
OPEN_WELL_TIME,
CLOSE_WELL_TIME
)
VALUES
(
#{item.id},
#{item.createById},
#{item.createByName},
#{item.createTime},
#{item.modifyById},
#{item.modifyByName},
#{item.modifyTime},
#{item.institutionId},
#{item.configId},
#{item.wellheadId},
<if test="item.generationTypeKey != null and item.generationTypeKey != ''">
#{item.generationTypeKey},
</if>
#{item.openWellTime},
#{item.closeWellTime}
)
</foreach>
SELECT * FROM DUAL
</insert>
</mapper>
\ No newline at end of file
......@@ -69,7 +69,7 @@
ID=#{id}
</select>
<insert id="batchInsertList" parameterType="list">
<insert id="batchInsertList" parameterType="list" databaseId="MySQL">
INSERT INTO SPACE_INSTITUTION_WELLHEAD (
ID,
CREATE_BY_ID,
......@@ -121,6 +121,88 @@
</foreach>
</insert>
<insert id="batchInsertList" parameterType="list" databaseId="Oracle">
INSERT ALL
<foreach collection="list" item="item">
INTO SPACE_INSTITUTION_WELLHEAD (
ID,
CREATE_BY_ID,
CREATE_BY_NAME,
CREATE_TIME,
MODIFY_BY_ID,
MODIFY_BY_NAME,
MODIFY_TIME,
INSTITUTION_ID,
WELLHEAD_ID,
WELL_NUMBER,
RUN_TYPE_KEY,
INTERVAL_TYPE_KEY,
INTERVAL_DESCRIBE,
START_SEQ
<if test="item.openWellDay != null">
, OPEN_WELL_DAY
</if>
<if test="item.closeWellDay != null">
, CLOSE_WELL_DAY
</if>
<if test="item.runDuration != null">
, RUN_DURATION
</if>
<if test="item.maxOpen != null">
, MAX_OPEN
</if>
<if test="item.minOpen != null">
, MIN_OPEN
</if>
<if test="item.maxClose != null">
, MAX_CLOSE
</if>
<if test="item.minClose != null">
, MIN_CLOSE
</if>
)
VALUES
(
#{item.id},
#{item.createById},
#{item.createByName},
#{item.createTime},
#{item.modifyById},
#{item.modifyByName},
#{item.modifyTime},
#{item.institutionId},
#{item.wellheadId},
#{item.wellNumber},
#{item.runTypeKey},
#{item.intervalTypeKey},
#{item.intervalDescribe},
#{item.startSeq}
<if test="item.openWellDay != null">
, #{item.openWellDay}
</if>
<if test="item.closeWellDay != null">
, #{item.closeWellDay}
</if>
<if test="item.runDuration != null">
, #{item.runDuration}
</if>
<if test="item.maxOpen != null">
, #{item.maxOpen}
</if>
<if test="item.minOpen != null">
, #{item.minOpen}
</if>
<if test="item.maxClose != null">
, #{item.maxClose}
</if>
<if test="item.minClose != null">
, #{item.minClose}
</if>
)
</foreach>
SELECT * FROM DUAL
</insert>
<select id="selectListByInstitutionIds" parameterType="pps.core.space.entity.SpaceInstitutionWellheadView"
resultMap="BaseResultMap">
SELECT
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment