sale-client 4.3.63 → 4.3.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/.gradle/5.2.1/fileHashes/fileHashes.lock +0 -0
  2. package/.gradle/9.3.0/checksums/checksums.lock +0 -0
  3. package/.gradle/9.3.0/fileHashes/fileHashes.lock +0 -0
  4. package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  5. package/.gradle/buildOutputCleanup/cache.properties +1 -1
  6. package/build/dev-server.js +7 -7
  7. package/package.json +1 -1
  8. package/src/filiale/jinhong/InsuranceTemp.vue +19 -37
  9. package/src/filiale/liaoyuan/ChangeMeter.vue +15 -9
  10. package/src/main.js +1 -1
  11. package/.gradle/6.7/executionHistory/executionHistory.lock +0 -0
  12. package/.gradle/6.7/fileHashes/fileHashes.lock +0 -0
  13. package/.gradle/9.0.0/checksums/checksums.lock +0 -0
  14. package/.gradle/9.0.0/fileChanges/last-build.bin +0 -0
  15. package/.gradle/9.0.0/fileHashes/fileHashes.bin +0 -0
  16. package/.gradle/9.0.0/fileHashes/fileHashes.lock +0 -0
  17. package/.gradle/9.0.0/gc.properties +0 -0
  18. package/.gradle/checksums/checksums.lock +0 -0
  19. package/.gradle/configuration-cache/gc.properties +0 -0
  20. package/.history/src/components/charge//346/211/271/351/207/217/346/226/260/345/273/272/346/255/243/345/274/217/346/210/267/346/241/243/346/241/210_/351/224/231/350/257/257/346/217/220/347/244/272/345/242/236/345/212/240/350/241/214/345/217/267_20260409222129.groovy +0 -418
  21. package/.history/src/components/charge//346/211/271/351/207/217/346/226/260/345/273/272/346/255/243/345/274/217/346/210/267/346/241/243/346/241/210_/351/224/231/350/257/257/346/217/220/347/244/272/345/242/236/345/212/240/350/241/214/345/217/267_20260409222230.groovy +0 -418
  22. package/.history/src/components/revenue/base/rightview/CardList_20260413150433.vue +0 -572
  23. package/.history/src/components/revenue/base/rightview/CardList_20260413154215.vue +0 -572
  24. package/hs_err_pid32452.log +0 -625
  25. package/hs_err_pid36896.log +0 -249
  26. package/src/components/charge//346/211/271/351/207/217/346/226/260/345/273/272/346/255/243/345/274/217/346/210/267/346/241/243/346/241/210_/351/224/231/350/257/257/346/217/220/347/244/272/345/242/236/345/212/240/350/241/214/345/217/267.groovy +0 -418
  27. /package/.gradle/{6.7 → 9.3.0}/fileChanges/last-build.bin +0 -0
  28. /package/.gradle/{6.7 → 9.3.0}/gc.properties +0 -0
@@ -1,2 +1,2 @@
1
- #Mon Mar 09 11:40:35 CST 2026
1
+ #Wed May 13 15:19:48 CST 2026
2
2
  gradle.version=5.2.1
@@ -1,7 +1,7 @@
1
1
  var path = require('path')
2
2
  var checkVersion = require('./versionCheck.js')
3
3
  checkVersion()
4
- const [ serverRul, localUrl ] = ['http://123.180.154.5:31467/', 'http://123.180.154.5:31467/']
4
+ const [ serverRul, localUrl ] = ['http://192.168.50.67:31567/', 'http://192.168.50.67:31567/']
5
5
  var merge = require('webpack-merge')
6
6
  var baseConfig = require('./webpack.dev.conf')
7
7
  var devConfig = {
@@ -50,12 +50,12 @@ var devConfig = {
50
50
  '/rs/pay': {
51
51
  target: 'http://localhost:8080'
52
52
  },
53
- // '/api/af-revenue': {
54
- // pathRewrite: {
55
- // '/api/af-revenue': '/af-revenue'
56
- // },
57
- // target: "http://localhost:8080"
58
- // },
53
+ '/api/af-revenue': {
54
+ pathRewrite: {
55
+ '/api/af-revenue': '/'
56
+ },
57
+ target: "http://localhost:9026"
58
+ },
59
59
  '/api': {
60
60
  target: serverRul
61
61
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "4.3.63",
3
+ "version": "4.3.65",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -110,31 +110,26 @@ export default {
110
110
  if (this.row.f_ins_stop_date && this.row.f_ins_stop_date > Util.toStandardTimeString()) {
111
111
  this.model.f_ins_start_date = this.row.f_ins_stop_date
112
112
  } else {
113
- this.model.f_ins_start_date = Util.toStandardTimeString()
113
+ // 获取明天 00:00:00 的标准时间
114
+ let tomorrow = new Date()
115
+ tomorrow.setDate(tomorrow.getDate() + 1)
116
+ let year = tomorrow.getFullYear()
117
+ let month = (tomorrow.getMonth() + 1).toString().padStart(2, '0')
118
+ let date = tomorrow.getDate().toString().padStart(2, '0')
119
+ // 固定时间 00:00:00
120
+ let nextDayTime = `${year}-${month}-${date} 00:00:00`
121
+ this.model.f_ins_start_date = nextDayTime
114
122
  }
115
123
  },
116
124
  watch: {
117
125
  'model.f_ins_start_date' (val) {
118
126
  if (val && this.model.f_salecount) {
119
127
  let tx = new Date(val)
120
- let tmp = {
121
- year: tx.getFullYear(),
122
- month: tx.getMonth() + 1,
123
- day: tx.getDate()
124
- }
125
- let tmpdate = new Date((tmp.year + (this.model.f_salecount - 0)) + '-' + (tmp.month < 10 ? '0' + tmp.month : tmp.month) + '-' + (tmp.day < 10 ? '0' + tmp.day : tmp.day))
126
- let date
127
- if (tmp.month < (tmpdate.getMonth() + 1)) {
128
- date = new Date(tmpdate.getTime() - 24 * 60 * 60 * 1000 * 2)
129
- } else {
130
- date = new Date(tmpdate.getTime() - 24 * 60 * 60 * 1000)
131
- }
132
- let jt = {
133
- year: date.getFullYear(),
134
- month: date.getMonth() + 1,
135
- day: date.getDate()
136
- }
137
- this.model.f_expiration_date = jt.year + '-' + (jt.month < 10 ? '0' + jt.month : jt.month) + '-' + (jt.day < 10 ? '0' + jt.day : jt.day)
128
+ // 核心:年份 +1,保持月日不变,时间 00:00:00
129
+ let nextYear = tx.getFullYear() + this.model.f_salecount
130
+ let month = (tx.getMonth() + 1).toString().padStart(2, '0')
131
+ let day = tx.getDate().toString().padStart(2, '0')
132
+ this.model.f_expiration_date = `${nextYear}-${month}-${day} 00:00:00`
138
133
  }
139
134
  },
140
135
  'model.f_money' (val) {
@@ -148,24 +143,11 @@ export default {
148
143
  this.f_salecount.dctest = false
149
144
  } else if (val && this.model.f_ins_start_date) {
150
145
  let tx = new Date(this.model.f_ins_start_date)
151
- let tmp = {
152
- year: tx.getFullYear(),
153
- month: tx.getMonth() + 1,
154
- day: tx.getDate()
155
- }
156
- let tmpdate = new Date((tmp.year + (val - 0)) + '-' + (tmp.month < 10 ? '0' + tmp.month : tmp.month) + '-' + (tmp.day < 10 ? '0' + tmp.day : tmp.day))
157
- let date
158
- if (tmp.month < (tmpdate.getMonth() + 1)) {
159
- date = new Date(tmpdate.getTime() - 24 * 60 * 60 * 1000 * 2)
160
- } else {
161
- date = new Date(tmpdate.getTime() - 24 * 60 * 60 * 1000)
162
- }
163
- let jt = {
164
- year: date.getFullYear(),
165
- month: date.getMonth() + 1,
166
- day: date.getDate()
167
- }
168
- this.model.f_expiration_date = jt.year + '-' + (jt.month < 10 ? '0' + jt.month : jt.month) + '-' + (jt.day < 10 ? '0' + jt.day : jt.day)
146
+ let nextYear = tx.getFullYear() + Number(val)
147
+ let month = (tx.getMonth() + 1).toString().padStart(2, '0')
148
+ let day = tx.getDate().toString().padStart(2, '0')
149
+ // 结束日期 = 下一年同一天 00:00:00
150
+ this.model.f_expiration_date = `${nextYear}-${month}-${day} 00:00:00`
169
151
  this.f_salecount.dctest = true
170
152
  } else {
171
153
  this.f_salecount.dctest = true
@@ -184,10 +184,10 @@
184
184
  </div>
185
185
  </div>
186
186
  <div style="text-align:right;height:auto;">
187
- <button class="button_search" type="button" v-if="!config.hasAudit" @click="confirmbefore(confirm)" :disabled="(!meterinfo&& !model.f_type.includes('清零'))||!$v.valid"
187
+ <button class="button_search" type="button" v-if="!config.hasAudit" @click="confirmbefore('confirm')" :disabled="(!meterinfo&& !model.f_type.includes('清零'))||!$v.valid"
188
188
  >确认
189
189
  </button>
190
- <button class="button_search" type="button" v-if="config.hasAudit" @click="confirmbefore(audit)" :disabled="(!meterinfo&& !model.f_type.includes('清零'))||!$v.valid"
190
+ <button class="button_search" type="button" v-if="config.hasAudit" @click="confirmbefore('audit')" :disabled="(!meterinfo&& !model.f_type.includes('清零'))||!$v.valid"
191
191
  >发起审核
192
192
  </button>
193
193
  <button class="button_clear" type="button" @click="clean()" >取消
@@ -355,7 +355,7 @@ export default {
355
355
  return
356
356
  }
357
357
  }
358
- if (this.model.metermessage.f_meter_type[0] != '机表') {
358
+ if (this.model.metermessage.f_meter_type[0] == '机表') {
359
359
  console.log('进来了')
360
360
  if (this.books.data.length > 0) {
361
361
  console.log('进来了2')
@@ -410,7 +410,11 @@ export default {
410
410
  if (this.model.metermessage.f_meter_type[0] != '机表') {
411
411
  this.$dispatch('refresh')
412
412
  } else {
413
- this.saveobj(type)
413
+ if (type === 'confirm') {
414
+ this.saveobj()
415
+ } else {
416
+ this.auditData()
417
+ }
414
418
  }
415
419
  })
416
420
  } else {
@@ -421,6 +425,7 @@ export default {
421
425
  if (this.row.f_meter_type.includes('气量卡表') && (this.model.f_using_base_old > (this.row.f_total_gas + this.row.f_initial_base + this.row.f_remanent_gas))) {
422
426
  await this.$showMessage(`该表可能存在超用,请确定是否继续进行换表操作!!!,或者取消进入超用收费!`, ['confirm', 'cancel']).then((res) => {
423
427
  if (res === 'confirm') {
428
+ console.log(type)
424
429
  if (type === 'confirm') {
425
430
  this.saveobj()
426
431
  } else {
@@ -526,6 +531,7 @@ export default {
526
531
  for (let row of this.resid) {
527
532
  param.push(row.id)
528
533
  }
534
+ data.config.hasArrearsChange = true
529
535
  this.model.files = param
530
536
  this.$resetpost('api/af-revenue/logic/mobile_changeMeter', data, {
531
537
  resolveMsg: null,
@@ -792,11 +798,11 @@ export default {
792
798
  )
793
799
  console.log('获取到的欠费记录', books)
794
800
  this.books = books
795
- // 如果是机表验证是否有欠费
796
- if ((this.row.f_balance - 0) < 0 || this.books.data.length > 0) {
797
- this.$showAlert('该表有欠费,请到机表缴费界面进行缴费', 'warning', 3000)
798
- this.$dispatch('button-specifies', {name: '机表收费', value: 'machine-charge'}, this.row)
799
- }
801
+ // // 如果是机表验证是否有欠费
802
+ // if ((this.row.f_balance - 0) < 0 || this.books.data.length > 0) {
803
+ // this.$showAlert('该表有欠费,请到机表缴费界面进行缴费', 'warning', 3000)
804
+ // this.$dispatch('button-specifies', {name: '机表收费', value: 'machine-charge'}, this.row)
805
+ // }
800
806
  }
801
807
  },
802
808
 
package/src/main.js CHANGED
@@ -2,7 +2,7 @@ import Vue from 'vue'
2
2
  import all from 'vue-client/src/all'
3
3
  import App from './App'
4
4
  import system from 'system-clients/src/system'
5
- import FilialeSale from './filiale/jinhong/sale'
5
+ import FilialeSale from './filiale/liaoyuan/sale'
6
6
  import sale from './sale'
7
7
  import address from 'address-client/src/address'
8
8
  import ldap from 'ldap-clients/src/ldap'
File without changes
Binary file
File without changes
@@ -1,418 +0,0 @@
1
- // 功能: 批量新建正式用户档案
2
- // 版本: 1.0
3
- // 参数:{"data":{"filepath":"E://files/1.xlsx","f_operator":"admin","f_operatorid":"240728","f_orgid":"453","f_orgname":"临沂公司","f_depid":"1561","f_depname":"河东营业厅"}}
4
- //
5
- // 修改时间: 2026-03-09
6
- // 修改内容: 错误提示增加行号显示,便于定位问题数据,并保存错误信息到t_handerror表
7
-
8
-
9
- log.info("----------------------开始时间{dateTools.getNow2()}------------------------------"),
10
- //读取传入的excel文件
11
- allUserInfo = data.datas,
12
- log.info("===={allUserInfo}"),
13
- len = 1,
14
- errorlen = 0,
15
- // 错误数据集合(用于落表 t_handerror)
16
- errorData = [],
17
- // 暂存小区验证信息
18
- areaExist = {},
19
- // 暂存气表品牌验证信息
20
- gasBrandExist = {},
21
- // 暂存气表型号验证信息
22
- gasModelExist = {},
23
- // 暂存气价验证信息
24
- priceTypeExist = {},
25
-
26
- allUserInfo.length()>0:(
27
- allUserInfo.each(
28
- flag = "1",
29
- saveData = {},
30
- saveData.t_user_address = {},
31
- saveData.t_userinfo = {},
32
- saveData.t_userfiles = {},
33
- // 错误行基础信息
34
- errorrow = {
35
- f_operator_type: "批量建档",
36
- f_orgid: data.f_orgid,
37
- f_orgname: data.f_orgname,
38
- f_depid: data.f_depid,
39
- f_depname: data.f_depname,
40
- f_operator: data.f_operator,
41
- f_operatorid: data.f_operatorid
42
- },
43
- saveData.t_user_address.f_operator = data.userData.currUserName,
44
- saveData.t_user_address.f_create_person = data.userData.currUserName,
45
- saveData.t_user_address.f_operatorid = data.userData.currUserId,
46
- saveData.t_user_address.f_orgid = data.userData.orgId,
47
- saveData.t_user_address.f_orgname = data.userData.orgName,
48
- saveData.t_user_address.f_depid = data.userData.depId,
49
- saveData.t_user_address.f_depname = data.userData.depName,
50
-
51
- saveData.t_user_address.f_building = row.f_building ,
52
- saveData.t_user_address.f_unit = row.f_unit,
53
- saveData.t_user_address.f_floor = row.f_floor,
54
- saveData.t_user_address.f_room = row.f_room,
55
- saveData.t_user_address.f_street = row.f_street,
56
- saveData.t_user_address.f_pcd = row.f_pcd,
57
-
58
- saveData.t_user_address.f_residential_area = row.f_residential_area ,
59
-
60
- ENV.tenantName == "aode" :(
61
- saveData.t_user_address.f_filiale = data.userData.orgId
62
- ),(
63
- saveData.t_user_address.f_filiale = data.userData.orgName
64
- ),
65
- saveData.t_user_address.f_filialeid = data.userData.orgId,
66
- saveData.t_user_address.f_create_date = dateTools.getNow2(),
67
- saveData.t_user_address.f_comments = "sign",
68
- authorizesql = "",
69
- //验证地址是否进行导入,如果导入使用导入的地址即可
70
- //榆林榆川不进行地址校验
71
- ENV.tenantName != "yuchuan2" || ENV.tenantName != "yuchuan" : (
72
- //地址不存在需要新建地址
73
- queryAreaSql = " select id,f_pcd_id,f_pcd,f_street,f_street_id from t_area where f_residential_area = '{row.f_residential_area}'",
74
- // 如果有省市区加上省市区条件
75
- row.f_pcd != null && row.f_pcd != "" :(
76
- queryAreaSql = "{queryAreaSql} and f_pcd = '{row.f_pcd}'"
77
- ),null,
78
- // 如果有街道加上街道条件
79
- row.f_street != null && row.f_street != "" :(
80
- queryAreaSql = "{queryAreaSql} and f_street = '{row.f_street}'"
81
- ),null,
82
- ENV.tenantName == "aode" :(
83
- queryAreaSql = "{queryAreaSql} and f_filialeid = '{data.userData.orgId}'"
84
- ),(
85
- queryAreaSql = "{queryAreaSql} and f_orgid = '{data.userData.orgId}'"
86
- ),
87
- areaExist.has(row.f_residential_area) : (
88
- newaddressinfo = areaExist.get(row.f_residential_area)
89
- ),(
90
- newaddressinfo = sql.querySQL("queryAreaSql",queryAreaSql)
91
- ),
92
- newaddressinfo.length() == 1 : (
93
- areaExist.put(row.f_residential_area, newaddressinfo),
94
- saveData.t_user_address.f_residential_area_id = newaddressinfo[0].id,
95
- saveData.t_user_address.f_pcd_id = newaddressinfo[0].f_pcd_id,
96
- saveData.t_user_address.f_pcd = newaddressinfo[0].f_pcd,
97
- saveData.t_user_address.f_street_id = newaddressinfo[0].f_street_id,
98
- saveData.t_user_address.f_street = newaddressinfo[0].f_street
99
- ), newaddressinfo.length() > 1: (
100
- flag = "0",
101
- errorrow.f_address = saveData.t_user_address.f_residential_area,
102
- errorrow.f_operator_date = dateTools.getNow2(),
103
- row.f_pcd == null || row.f_pcd || "" : (
104
- errorrow.f_operator_info = "{len}行数据:查询到小区信息不唯一,请完善省市区信息之后重试"
105
- ),row.f_street == null || row.f_street || "" : (
106
- errorrow.f_operator_info = "{len}行数据:查询到小区信息不唯一,请完善街道信息之后重试"
107
- ),(
108
- errorrow.f_operator_info = "{len}行数据:查询到小区信息不唯一,请检查数据"
109
- ),
110
- errorData.put(errorrow)
111
- ), (
112
- flag = "0",
113
- errorrow.f_address = row.f_residential_area,
114
- errorrow.f_operator_date = dateTools.getNow2(),
115
- errorrow.f_operator_info = "{len}行数据:小区不存在,请检查数据(小区名称:{row.f_residential_area})",
116
- errorData.put(errorrow)
117
- ),
118
- row.f_address== null || row.f_address == "" : (
119
- saveData.t_user_address.f_address = "",
120
- saveData.t_user_address.f_street != null : (
121
- saveData.t_user_address.f_address = "{saveData.t_user_address.f_address}{saveData.t_user_address.f_street}"
122
- ),null,
123
- row.f_residential_area != null : (
124
- saveData.t_user_address.f_address = "{saveData.t_user_address.f_address}{row.f_residential_area}"
125
- ),null,
126
- row.f_building != null : (
127
- saveData.t_user_address.f_building_suffix = row.f_building_suffix != null && row.f_building_suffix != "" : row.f_building_suffix, "栋" ,
128
- saveData.t_user_address.f_address = "{saveData.t_user_address.f_address}{row.f_building}{saveData.t_user_address.f_building_suffix}"
129
- ),null,
130
- row.f_unit != null : (
131
- saveData.t_user_address.f_unit_suffix = row.f_unit_suffix != null && row.f_unit_suffix != "" : row.f_unit_suffix, "单元" ,
132
- saveData.t_user_address.f_address = "{saveData.t_user_address.f_address}{row.f_unit}{saveData.t_user_address.f_unit_suffix}"
133
- ),null,
134
- row.f_floor != null : (
135
- saveData.t_user_address.f_floor_suffix = row.f_floor_suffix != null && row.f_floor_suffix != "" : row.f_floor_suffix, "层" ,
136
- saveData.t_user_address.f_address = "{saveData.t_user_address.f_address}{row.f_floor}{saveData.t_user_address.f_floor_suffix}"
137
- ),null,
138
- row.f_room != null : (
139
- saveData.t_user_address.f_room_suffix = row.f_room_suffix != null && row.f_room_suffix != "" : row.f_room_suffix, "室" ,
140
- saveData.t_user_address.f_address = "{saveData.t_user_address.f_address}{row.f_room}{saveData.t_user_address.f_room_suffix}"
141
- ),null
142
- ),null,
143
-
144
- // 验证地址是否重复
145
- queryAddress = sql.querySQL("v3_query_sql","
146
- select id from t_user_address
147
- where f_residential_area = '{row.f_residential_area != null : row.f_residential_area , ""}'
148
- {saveData.t_user_address.f_pcd != null : " and f_pcd = '{saveData.t_user_address.f_pcd}'", " and ( f_pcd is null or f_pcd = '')" }
149
- {saveData.t_user_address.f_street != null : " and f_street = '{saveData.t_user_address.f_street}'", " and ( f_street is null or f_street = '')" }
150
- {row.f_unit != null : " and f_unit = '{row.f_unit}'", " and ( f_unit is null or f_unit = '')" }
151
- {row.f_building != null : " and f_building = '{row.f_building}'", " and ( f_building is null or f_building = '')" }
152
- {row.f_floor != null : " and f_floor = '{row.f_floor}'", " and ( f_floor is null or f_floor = '')" }
153
- {row.f_room != null : " and f_room = '{row.f_room}'", " and ( f_room is null or f_room = '')" }
154
- and f_address = '{saveData.t_user_address.f_address}'
155
- "
156
- ),
157
- queryAddress.length() > 0 :(
158
- flag = "0",
159
- errorrow.f_address = saveData.t_user_address.f_address,
160
- errorrow.f_operator_date = dateTools.getNow2(),
161
- queryAddress.length() == 1 :(
162
- queryAddress[0].f_userinfo_id == "" || queryAddress[0].f_userinfo_id == null :(
163
- saveData.t_user_address.id = queryAddress[0].id
164
- ),(
165
- errorrow.f_operator_info = "{len}行数据:地址已被使用,地址信息:{saveData.t_user_address.f_address}",
166
- errorData.put(errorrow)
167
- )
168
- ),(
169
- errorrow.f_operator_info = "{len}行数据:地址重复,地址信息:{saveData.t_user_address.f_address}",
170
- errorData.put(errorrow)
171
- )
172
- ),null
173
- ),null,
174
-
175
- saveData.t_userinfo.f_operator = data.userData.currUserName,
176
- saveData.t_userinfo.f_operatorid = data.userData.currUserId,
177
- saveData.t_userinfo.f_createfile_date = dateTools.getNow2(),
178
- saveData.t_userinfo.f_orgid = data.userData.orgId,
179
- saveData.t_userinfo.f_orgname = data.userData.orgName,
180
- saveData.t_userinfo.f_depid = data.userData.depId,
181
- saveData.t_userinfo.f_depname = data.userData.depName,
182
- saveData.t_userinfo.f_operator_record = data.userData.currUserName,
183
- saveData.t_userinfo.f_operatorid_record = data.userData.currUserId,
184
- saveData.t_userinfo.f_orgid_record = data.userData.orgId,
185
- saveData.t_userinfo.f_orgname_record = data.userData.orgName,
186
- saveData.t_userinfo.f_depid_record = data.userData.depId,
187
- saveData.t_userinfo.f_depname_record = data.userData.depName,
188
- saveData.t_userinfo.f_userinfo_id = null,
189
- saveData.t_userinfo.f_filialeid = data.userData.orgId,
190
- saveData.t_userinfo.f_user_name = row.f_user_name,
191
- saveData.t_userinfo.f_user_phone = row.f_user_phone,
192
- saveData.t_userinfo.f_userinfo_code = row.f_userinfo_code,
193
- saveData.t_userinfo.f_idnumber = row.f_idnumber,
194
- saveData.t_userinfo.f_people_num = row.f_people_num,
195
- saveData.t_userinfo.f_contract_id = row.f_contract_id,
196
- saveData.t_userinfo.f_gas_date = row.f_gas_date,
197
- saveData.t_userinfo.f_install_date = row.f_install_date,
198
- saveData.t_userinfo.f_install_person = row.f_install_person,
199
- saveData.t_userinfo.f_address = saveData.t_user_address.f_address,
200
- row.has("f_user_state") && row.f_user_state != null : (
201
- saveData.t_userinfo.f_user_state = row.f_user_state
202
- ),(
203
- saveData.t_userinfo.f_user_state = "正常"
204
- ),
205
- saveData.t_userinfo.f_credentials = row.f_credentials,
206
- row.f_user_name == null:(
207
- saveData.t_userinfo.f_user_name = ""
208
- ),null,
209
- allGasBrand = [],
210
-
211
- row.f_meter_brand != null : (
212
- gasBrandExist.has(row.f_meter_brand):(
213
- allGasBrand = gasBrandExist.get(row.f_meter_brand)
214
- ),(
215
- allGasBrand = sql.querySQL("v3_query_sql"," select * from t_gasbrand where cast(id as varchar) = '{row.f_meter_brand}' or f_meter_brand = '{row.f_meter_brand}'")
216
- )
217
- ),(
218
- saveData.t_userinfo.f_user_state != "预备" : (
219
- flag = "0",
220
- errorrow.f_address = row.f_residential_area,
221
- errorrow.f_operator_date = dateTools.getNow2(),
222
- errorrow.f_operator_info = "{len}行数据:气表品牌不存在,请检查!(气表品牌:{row.f_meter_brand})",
223
- errorData.put(errorrow)
224
- ), null
225
- ),
226
- allGasModel = [],
227
- row.f_meter_style != null && allGasBrand.length()>0:(
228
- gasModelExist.has(row.f_meter_style):(
229
- allGasModel = gasModelExist.get(row.f_meter_style)
230
- ),(
231
- allGasModel= sql.querySQL("v3_query_sql"," select id from t_gasmodel where f_gasbrand_id = '{allGasBrand[0].id}' and (cast(id as varchar) = '{row.f_meter_style}' or f_meter_style = '{row.f_meter_style}') ")
232
- )
233
- ),(
234
- saveData.t_userinfo.f_user_state != "预备" : (
235
- flag = "0",
236
- errorrow.f_address = row.f_residential_area,
237
- errorrow.f_operator_date = dateTools.getNow2(),
238
- errorrow.f_operator_info = "{len}行数据:气表型号不存在,请检查!(气表型号:{row.f_meter_style})",
239
- errorData.put(errorrow)
240
- ), null
241
- ),
242
- alladjutable=[],
243
- allPriceType =[],
244
- ENV.tenantName != "yuchuan2" || ENV.tenantName != "yuchuan" : (
245
- row.f_price_name != null:(
246
- priceTypeExist.has(row.f_price_name):(
247
- allPriceType = priceTypeExist.get(row.f_price_name)
248
- ),(
249
- allPriceType = sql.querySQL("v3_query_sql","
250
- select * from t_stairprice where f_price_name='{row.f_price_name}' and f_state='有效'
251
- and f_filialeid='{data.userData.orgId}'
252
- and (GETDATE()>f_perform_date and GETDATE()<f_end_date)"
253
- )
254
- )
255
- ),(
256
- saveData.t_userinfo.f_user_state != "预备" : (
257
- flag = "0",
258
- errorrow.f_address = row.f_residential_area,
259
- errorrow.f_operator_date = dateTools.getNow2(),
260
- errorrow.f_operator_info = "{len}行数据:未设置气价名称,请检查!(气价名称:{row.f_price_name})",
261
- errorData.put(errorrow)
262
- ), null
263
- )
264
- ),null,
265
- //验证数据
266
- allGasBrand.length() == 1:(
267
- gasBrandExist.put(row.f_meter_brand, allGasBrand),
268
- saveData.t_userfiles.f_gasbrand_id = allGasBrand[0].id,
269
- saveData.t_userfiles.f_meter_classify = allGasBrand[0].f_meter_type
270
- ),(
271
- (saveData.t_userinfo.f_user_state == "预备" && allGasBrand.length() != 1 && row.f_meter_brand != null) || saveData.t_userinfo.f_user_state != "预备": (
272
- flag = "0",
273
- errorrow.f_address = row.f_residential_area,
274
- errorrow.f_operator_date = dateTools.getNow2(),
275
- errorrow.f_operator_info = "{len}行数据:气表品牌错误,请检查!(气表品牌:{row.f_meter_brand})",
276
- errorData.put(errorrow)
277
- ),null
278
- ),
279
- allGasModel.length() == 1:(
280
- gasModelExist.put(row.f_meter_style, allGasModel),
281
- saveData.t_userfiles.f_gasmodel_id = allGasModel[0].id
282
- ),(
283
- (saveData.t_userinfo.f_user_state == "预备" && allGasModel.length() != 1 && row.f_meter_style != null) || saveData.t_userinfo.f_user_state != "预备" : (
284
- flag = "0",
285
- errorrow.f_address = row.f_residential_area,
286
- errorrow.f_operator_date = dateTools.getNow2(),
287
- errorrow.f_operator_info = "{len}行数据:气表型号错误,请检查!(气表型号:{row.f_meter_style})",
288
- errorData.put(errorrow)
289
- ),null
290
- ),
291
- ENV.tenantName != "yuchuan2" || ENV.tenantName != "yuchuan" : (
292
- alladjutable.length()==1:(
293
- saveData.t_userfiles.f_adjustable_id = alladjutable[0].id
294
- ),null,
295
- allPriceType.length()==1:(
296
- priceTypeExist.put(row.f_price_name, allPriceType),
297
- saveData.t_userfiles.f_price_id = allPriceType[0].f_price_id
298
- ),(
299
- (saveData.t_userinfo.f_user_state == "预备" && allPriceType.length() != 1 && row.f_price_name != null) || saveData.t_userinfo.f_user_state != "预备" : (
300
- flag = "0",
301
- errorrow.f_address = row.f_residential_area,
302
- errorrow.f_operator_date = dateTools.getNow2(),
303
- errorrow.f_operator_info = "{len}行数据:气价不存在或气价类型错误,请检查!(气价名称:{row.f_price_name})",
304
- errorData.put(errorrow)
305
- ),null
306
- )
307
- ),null,
308
- // 表号查询的数据多最后验证表号
309
- row.has("f_meternumber") && row.f_meternumber != "" :(
310
- meternumberV= sql.querySQL("v3_query_sql","
311
- select f_user_id from t_userfiles where f_gasbrand_id='{allGasBrand[0].id}' and f_meternumber = '{row.f_meternumber}'"
312
- ),
313
- meternumberV.length()>0:(
314
- flag = "0",
315
- errorrow.f_address = row.f_residential_area,
316
- errorrow.f_operator_date = dateTools.getNow2(),
317
- errorrow.f_operator_info = "{len}行数据:表号重复,请检查!(表号:{row.f_meternumber})",
318
- errorData.put(errorrow)
319
- ),null
320
- ),null,
321
- ENV.tenantName == "huaran" :(
322
- // 验证表计信息是否存在
323
- row.has("f_meternumber") && row.f_meternumber != "" : (
324
- meterInfo = sql.querySQL("v3_query_sql","
325
- select id from t_meterinfo
326
- where f_meter_brand='{allGasBrand[0].f_meter_brand}' and f_meternumber = '{row.f_meternumber}'"
327
- ),
328
- meterInfo.length() == 0:(
329
- flag = "0",
330
- errorrow.f_address = row.f_residential_area,
331
- errorrow.f_operator_date = dateTools.getNow2(),
332
- errorrow.f_operator_info = "{len}行数据:表具信息在表计信息中不存在,请检查!(表号:{row.f_meternumber})",
333
- errorData.put(errorrow)
334
- ),null
335
- ),null
336
- ),null,
337
- // 判断flag,如果为1则保存数据,否则记录错误数
338
- flag == "1":(
339
- saveData.t_userfiles.f_table_state = "正常",
340
- saveData.t_userfiles.f_whether_hairpin = "未发",
341
- saveData.t_userfiles.f_input_person = data.userData.currUserName,
342
- saveData.t_userfiles.f_input_date = dateTools.getNow2(),
343
- saveData.t_userfiles.f_card_password = "",
344
- saveData.t_userfiles.f_operator = data.userData.currUserName,
345
- saveData.t_userfiles.f_operatorid = data.userData.currUserId,
346
- saveData.t_userfiles.f_orgid =data.userData.orgId,
347
- saveData.t_userfiles.f_orgname =data.userData.orgName,
348
- saveData.t_userfiles.f_depid = data.userData.depId,
349
- saveData.t_userfiles.f_depname = data.userData.depName,
350
- saveData.t_userfiles.f_filialeid = data.userData.orgId,
351
- saveData.t_userfiles.f_meternumber = row.f_meternumber,
352
- saveData.t_userfiles.f_initial_base = row.f_initial_base,
353
- saveData.t_userfiles.f_metertitles = row.f_metertitles,
354
- saveData.t_userfiles.f_aroundmeter = row.f_aroundmeter,
355
- saveData.t_userfiles.img = {},
356
- saveData.t_userfiles.img.content="",
357
- saveData.t_userfiles.img.filename="",
358
- saveData.t_userfiles.devicesinfo =jsonTools.getArray(),
359
- saveData.t_userfiles = saveData.t_userfiles,
360
- saveData.t_user_address.f_price_id= saveData.t_userfiles.f_price_id,
361
- saveData.t_user_address.f_operate_date = dateTools.getNow2(),
362
- row = jsonTools.addJSON(row, saveData)
363
- ),(
364
- errorlen = errorlen + 1
365
- ),
366
- //保存地址数据
367
- len = len+1
368
- )
369
- ),null,
370
-
371
- // 批量存储错误数据到 t_handerror(分批插入,每批最多1000条)
372
- errorData.length()>0:(
373
- ENV.tenantName == "aode" :(
374
- batchSize = 1000,
375
- totalCount = errorData.length(),
376
- batchCount = (totalCount + batchSize - 1) / batchSize,
377
- log.info("错误数据共{totalCount}条,需要分{batchCount}批插入"),
378
- i = 0,
379
- batchCount > 0:(
380
- batchCount.each(
381
- startIdx = i * batchSize,
382
- endIdx = (i + 1) * batchSize > totalCount ? totalCount : (i + 1) * batchSize,
383
- batchData = errorData.subList(startIdx, endIdx),
384
- batchValues = settleToolsAoDe.getAllsomeValue(batchData),
385
- batchFields = settleToolsAoDe.getAllsomFields(batchData),
386
- log.info("插入第{i+1}批数据,从第{startIdx}条到第{endIdx}条"),
387
- sql.execSQL("v3_sql_name","
388
- insert into t_handerror{batchFields} values{batchValues}
389
- "),
390
- i = i + 1
391
- )
392
- )
393
- ),(
394
- batchSize = 1000,
395
- totalCount = errorData.length(),
396
- batchCount = (totalCount + batchSize - 1) / batchSize,
397
- log.info("错误数据共{totalCount}条,需要分{batchCount}批插入"),
398
- i = 0,
399
- batchCount > 0:(
400
- batchCount.each(
401
- startIdx = i * batchSize,
402
- endIdx = (i + 1) * batchSize > totalCount ? totalCount : (i + 1) * batchSize,
403
- batchData = errorData.subList(startIdx, endIdx),
404
- batchValues = settleTools.getAllsomeValue(batchData),
405
- batchFields = settleTools.getAllsomFields(batchData),
406
- log.info("插入第{i+1}批数据,从第{startIdx}条到第{endIdx}条"),
407
- sql.execSQL("v3_sql_name","
408
- insert into t_handerror{batchFields} values{batchValues}
409
- "),
410
- i = i + 1
411
- )
412
- )
413
- )
414
- ),null,
415
- allCount = allUserInfo.length(),
416
- successnum = allCount - errorlen,
417
- log.info("----------------------结束时间{dateTools.getNow2()}------------------------------"),
418
- throw "批量建档完成!共处理{allCount}条,成功{successnum}条,失败{errorlen}条"