Forráskód Böngészése

系统检查增加修改的元素

欧阳劲驰 1 hónapja
szülő
commit
c6bb8c0d00

+ 8 - 8
src/main/java/com/shkpr/service/alambizplugin/dbdao/mapper/GisSurveyLayerApplyMapper.java

@@ -16,36 +16,36 @@ import org.apache.ibatis.cursor.Cursor;
 @Mapper
 public interface GisSurveyLayerApplyMapper {
     /**
-     * 根据项目id查询新增点
+     * 根据项目id查询新增/修改
      *
      * @param projId 项目id
      * @return 点集合
      */
-    Cursor<GisSurveyLayerApplyPoint> findAddPointByProjId(@Param("projId") String projId);
+    Cursor<GisSurveyLayerApplyPoint> findAddUpdatePointByProjId(@Param("projId") String projId);
 
     /**
-     * 根据项目id查询新增线
+     * 根据项目id查询新增/修改线
      *
      * @param projId 项目id
      * @return 线集合
      */
-    Cursor<GisSurveyLayerApplyLine> findAddLineByProjId(@Param("projId") String projId);
+    Cursor<GisSurveyLayerApplyLine> findAddUpdateLineByProjId(@Param("projId") String projId);
 
     /**
-     * 根据任务id查询新增点
+     * 根据任务id查询新增/修改
      *
      * @param jobId 任务id
      * @return 点集合
      */
-    Cursor<GisSurveyLayerApplyPoint> findAddPointByJobId(@Param("jobId") String jobId);
+    Cursor<GisSurveyLayerApplyPoint> findAddUpdatePointByJobId(@Param("jobId") String jobId);
 
     /**
-     * 根据任务id查询新增线
+     * 根据任务id查询新增/修改线
      *
      * @param jobId 任务id
      * @return 线集合
      */
-    Cursor<GisSurveyLayerApplyLine> findAddLineByJobId(@Param("jobId") String jobId);
+    Cursor<GisSurveyLayerApplyLine> findAddUpdateLineByJobId(@Param("jobId") String jobId);
 
     /**
      * 根据任务id和类型查询

+ 4 - 4
src/main/java/com/shkpr/service/alambizplugin/dbdao/services/GisSurveyLayerApplyServiceImpl.java

@@ -71,7 +71,7 @@ public class GisSurveyLayerApplyServiceImpl implements GisSurveyLayerApplyServic
         );
         long begin = System.currentTimeMillis();
         //获取游标
-        try (Cursor<GisSurveyLayerApplyPoint> cursor = layerApplyMapper.findAddPointByProjId(projId)) {
+        try (Cursor<GisSurveyLayerApplyPoint> cursor = layerApplyMapper.findAddUpdatePointByProjId(projId)) {
             //迭代游标
             for (GisSurveyLayerApplyPoint point : cursor) {
                 //检查线程中断,并响应
@@ -118,7 +118,7 @@ public class GisSurveyLayerApplyServiceImpl implements GisSurveyLayerApplyServic
         );
         long begin = System.currentTimeMillis();
         //获取游标
-        try (Cursor<GisSurveyLayerApplyLine> cursor = layerApplyMapper.findAddLineByProjId(projId)) {
+        try (Cursor<GisSurveyLayerApplyLine> cursor = layerApplyMapper.findAddUpdateLineByProjId(projId)) {
             //迭代游标
             for (GisSurveyLayerApplyLine point : cursor) {
                 //检查线程中断,并响应
@@ -165,7 +165,7 @@ public class GisSurveyLayerApplyServiceImpl implements GisSurveyLayerApplyServic
         );
         long begin = System.currentTimeMillis();
         //获取游标
-        try (Cursor<GisSurveyLayerApplyPoint> cursor = layerApplyMapper.findAddPointByJobId(jobId)) {
+        try (Cursor<GisSurveyLayerApplyPoint> cursor = layerApplyMapper.findAddUpdatePointByJobId(jobId)) {
             //迭代游标
             for (GisSurveyLayerApplyPoint gisSurveyLayerApplyPoint : cursor) {
                 //检查线程中断,并响应
@@ -212,7 +212,7 @@ public class GisSurveyLayerApplyServiceImpl implements GisSurveyLayerApplyServic
         );
         long begin = System.currentTimeMillis();
         //获取游标
-        try (Cursor<GisSurveyLayerApplyLine> cursor = layerApplyMapper.findAddLineByJobId(jobId)) {
+        try (Cursor<GisSurveyLayerApplyLine> cursor = layerApplyMapper.findAddUpdateLineByJobId(jobId)) {
             //迭代游标
             for (GisSurveyLayerApplyLine line : cursor) {
                 //检查线程中断,并响应

+ 8 - 8
src/main/resources/mapper/GisSurveyLayerApplyMapper.xml

@@ -61,7 +61,7 @@
         <result column="survey_length" jdbcType="VARCHAR" property="surveyLength"/>
     </resultMap>
 
-    <select id="findAddPointByProjId" fetchSize="3000" resultMap="Point">
+    <select id="findAddUpdatePointByProjId" fetchSize="3000" resultMap="Point">
         select la.code, la.job_id, la.layer, la.kind, la.gis, la.apply, la.source, la.elevation, la.no,
         case when lt.name is null then
         (select td.name from k2_type_define td where td.key = la.layer and td.kind = 7)
@@ -72,10 +72,10 @@
         left join k3_gis_metadata_layer_template lt on pit.nature = lt.nature and la.layer = lt.key
         where pit.uid = #{projId,jdbcType=VARCHAR}
         and jo.disused = 0
-        and la.apply = 'add' and la.kind = 'point'
+        and (la.apply = 'add' or la.apply = 'update') and la.kind = 'point'
     </select>
 
-    <select id="findAddLineByProjId" fetchSize="3000" resultMap="Line">
+    <select id="findAddUpdateLineByProjId" fetchSize="3000" resultMap="Line">
         select la.code, la.job_id, la.layer, la.kind, la.apply, la.source, la.up_node, la.down_node,
         un.no as up_no, dn.no as down_no,
         case when un.code is not null and dn.code is not null then concat('[', un.gis, ',', dn.gis, ']') else la.gis end
@@ -97,10 +97,10 @@
         left join k3_gis_metadata_layer_template lt on pit.nature = lt.nature and la.layer = lt.key
         where pit.uid = #{projId,jdbcType=VARCHAR}
         and jo.disused = 0
-        and la.apply = 'add' and la.kind = 'line';
+        and (la.apply = 'add' or la.apply = 'update') and la.kind = 'line';
     </select>
 
-    <select id="findAddPointByJobId" fetchSize="3000" resultMap="Point">
+    <select id="findAddUpdatePointByJobId" fetchSize="3000" resultMap="Point">
         select la.code, la.job_id, la.layer, la.kind, la.gis, la.apply, la.source, la.elevation, la.no,
         case when lt.name is null then
         (select td.name from k2_type_define td where td.key = la.layer and td.kind = 7)
@@ -110,10 +110,10 @@
         join k3_gis_survey_project_info pit on jo.proj_id = pit.uid
         left join k3_gis_metadata_layer_template lt on pit.nature = lt.nature and la.layer = lt.key
         where jo.uid = #{jobId,jdbcType=VARCHAR}
-        and la.apply = 'add' and la.kind = 'point'
+        and (la.apply = 'add' or la.apply = 'update') and la.kind = 'point'
     </select>
 
-    <select id="findAddLineByJobId" fetchSize="3000" resultMap="Line">
+    <select id="findAddUpdateLineByJobId" fetchSize="3000" resultMap="Line">
         select la.code, la.job_id, la.layer, la.kind, la.apply, la.source, la.up_node, la.down_node,
         un.no as up_no, dn.no as down_no,
         case when un.code is not null and dn.code is not null then concat('[', un.gis, ',', dn.gis, ']') else la.gis end
@@ -134,7 +134,7 @@
         'survey_length'
         left join k3_gis_metadata_layer_template lt on pit.nature = lt.nature and la.layer = lt.key
         where jo.uid = #{jobId,jdbcType=VARCHAR}
-        and la.apply = 'add' and la.kind = 'line';
+        and (la.apply = 'add' or la.apply = 'update') and la.kind = 'line';
     </select>
 
     <select id="findAllByJobIdAndKind" fetchSize="3000" resultMap="BaseResultMap">