3 Commits f7a3399e80 ... a80089eff5

Autore SHA1 Messaggio Data
  周壕 a80089eff5 调整累计产量查询语句,不显示当月数据 10 mesi fa
  周壕 f9606ec337 Merge remote-tracking branch 'origin/master' 10 mesi fa
  周壕 98ade0f41d 修改地图白屏问题,详情页面取消搜索框 10 mesi fa

+ 8 - 1
src/main/java/com/bowintek/practice/services/impl/FactWellServiceImpl.java

@@ -41,6 +41,9 @@ public class FactWellServiceImpl implements FactWellService {
     public List<FactWellGroupList> getDayGroupList(String wellId){
         Calendar calendar = Calendar.getInstance();
         calendar.setTime(getToDay()); // 设置当前天日期
+        calendar.set(Calendar.DAY_OF_MONTH, 1);
+        calendar.add(Calendar.DAY_OF_MONTH, -1);
+        //上月最后一天
         Date endTime = calendar.getTime();
 
         calendar.add(Calendar.DAY_OF_MONTH, -29);
@@ -81,11 +84,15 @@ public class FactWellServiceImpl implements FactWellService {
     public List<FactWellGroupList> getMonthGroupList(String wellId){
         Calendar calendar = Calendar.getInstance();
         calendar.setTime(getToDay());
+
         calendar.set(Calendar.DAY_OF_MONTH, 1);
-        //当月1号
+        calendar.add(Calendar.DAY_OF_MONTH, -1);
+        //上一月最后一天
         Date endTime = calendar.getTime();
+
         //11月前的1号
         calendar.add(Calendar.MONTH, -11);
+        calendar.set(Calendar.DAY_OF_MONTH, 1);
         Date startTime = calendar.getTime();
 
         return getMonthGroupList(wellId, startTime, endTime);

+ 1 - 1
src/main/resources/mapping/cquery/FactWellCQuery.xml

@@ -35,7 +35,7 @@
             MAX(t.fluid_prod_mon) fluid,
             0 watercut
         FROM (  SELECT wm.well_id,
-                    TO_CHAR(wm.prod_date , 'YYYY-MM-DD') prod_time_str,
+                    TO_CHAR(wm.prod_date , 'YYYY年MM月') prod_time_str,
                     COALESCE(wm.gas_prod_cum, 0) gas_prod_mon,
                     COALESCE(wm.oil_prod_cum, 0) oil_prod_mon,
                     COALESCE(wm.water_prod_cum, 0) water_prod_mon,

+ 4 - 4
src/main/resources/static/a4gis/index.html

@@ -187,19 +187,19 @@
       right: 20px;
     }
   </style>
-  <!--测试环境使用
+  <!--测试环境使用-->
   <link href='https://js.arcgis.com/3.27/esri/css/esri.css' rel='stylesheet' />
   <script src='jquery.min.js'></script>
   <script src='https://js.arcgis.com/3.27/init.js' type='text/javascript'></script>
   <script src='init-gmap.js?v=1.15.9' type='text/javascript'></script>
-  <script src='init-gcontrols.js?v=1.0.5' type='text/javascript'></script>-->
+  <script src='init-gcontrols.js?v=1.0.5' type='text/javascript'></script>
 
-  <!--正式环境使用-->
+  <!--正式环境使用
   <link href='http://a4.petrochina/gisapi/esri/css/esri.css' rel='stylesheet' />
   <script src='http://a4.petrochina/gisapi/third/jquery/jquery-1.9.1.min.js'></script>
   <script src='http://a4.petrochina/gisapi/init.js' type='text/javascript'></script>
   <script src='http://a4.petrochina/gisapi/lib/init-gmap.js?v=1.15.9' type='text/javascript'></script>
-  <script src='http://a4.petrochina/gisapi/lib/init-gcontrols.js?v=1.0.5' type='text/javascript'></script>
+  <script src='http://a4.petrochina/gisapi/lib/init-gcontrols.js?v=1.0.5' type='text/javascript'></script>-->
 
   <script>
     var map = null, app = { token: "d4b2b740-9814-4d75-9cda-dac96fc2bc10" };

+ 10 - 3
vue/src/components/basic/chart/chart-map.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="chart-map">
-    <div class="chart-map-input" v-if="wellId==null">
+    <div class="chart-map-input" v-if="isSearch">
       <a-auto-complete
         :dropdown-match-select-width="252"
         style="width: 300px"
@@ -35,7 +35,8 @@
 
   export  default defineComponent ({
     props:{
-      datas: null as any
+      datas: null as any,
+      isSearch : Boolean
     },
     name : 'ChartMap',
     data() {
@@ -69,10 +70,16 @@
           };
         });
       });
+
+      const isSearch = computed(() => {
+        return props.isSearch == null || props.isSearch == undefined ? true : props.isSearch
+      });
+
       return{
         datas,
         iframeSrc,
-        iframeRef
+        iframeRef,
+        isSearch
       }
     },
     mounted(){

+ 10 - 2
vue/src/views/wellinfo/detail.vue

@@ -328,7 +328,7 @@
       </template>
       <div v-if="cardSettings.cardGIS.expand">
         <div style="width:100%;height: 500px;margin-top:15px;">
-          <ChartMap :wellId="wellId"></ChartMap>
+          <ChartMap :datas="mapDatas"></ChartMap>
         </div>
       </div>
     </a-card>
@@ -402,7 +402,8 @@ export default defineComponent({
       historyAssignmentSummary: [],
       lastHistoryAssignment: {},
       historyAssignmentCount: 0,
-      dataIndexList: [] as any[]
+      dataIndexList: [] as any[],
+      mapDatas : [] as any
     });
 
     const loadData = async (id) => {
@@ -422,6 +423,13 @@ export default defineComponent({
         wellData.lastHistoryAssignment = data.lastHistoryAssignment ?? {};
         wellData.dataIndexList = data.dataIndexList;
         wellData.historyAssignmentCount = wellData.historyAssignmentSummary.reduce((total, it: any) => total + it.testing_num, 0);
+        wellData.mapDatas = [{
+          well_id : wellData.dataModel.well_id,
+          well_common_name : data.dataModel.well_common_name,
+          geo_description : data.dataModel.geo_description,
+          x : data.dataModel.well_coordinates_x,
+          y : data.dataModel.well_coordinates_y
+        }];
 
         fileOptions.businessType = wellData.dataIndexList.map(x => x.file_business_type);
         fileOptions.businessType = Array.from(new Set(fileOptions.businessType));

+ 1 - 1
vue/src/views/wellinfo/index.vue

@@ -286,7 +286,7 @@
                       @showSizeChange="(current,pageSize)=>handleTableChange({ current: current,pageSize: pageSize })"/>
       </a-spin>
       <div style="width:100%;height: 500px;margin-top:15px">
-        <ChartMap :datas="data"></ChartMap>
+        <ChartMap :datas="data" :isSearch="(true)"></ChartMap>
       </div>
     </div>
     <a-modal v-model:visible="isShowDoc" title="相关文档" :footer="null" @onCancel="isShowDoc=false">