task5.go 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582
  1. // Copyright 2019 getensh.com. All rights reserved.
  2. // Use of this source code is governed by getensh.com.
  3. package task
  4. import (
  5. "adm-dws/apis"
  6. "adm-dws/consts"
  7. "adm-dws/model"
  8. "encoding/json"
  9. "gorm.io/gorm"
  10. "strconv"
  11. "strings"
  12. )
  13. func supplementDws5(old, new *model.Dws5) bool {
  14. isSupple := false
  15. if old.CertificateNumber == "" && new.CertificateNumber != "" {
  16. isSupple = true
  17. old.CertificateNumber = new.CertificateNumber
  18. }
  19. if old.CertificateDate == "" && new.CertificateDate != "" {
  20. isSupple = true
  21. old.CertificateDate = new.CertificateDate
  22. }
  23. if old.VehicleManufacturer == "" && new.VehicleManufacturer != "" {
  24. isSupple = true
  25. old.VehicleManufacturer = new.VehicleManufacturer
  26. }
  27. if old.BrandName == "" && new.BrandName != "" {
  28. isSupple = true
  29. old.BrandName = new.BrandName
  30. }
  31. if old.ModelNo == "" && new.ModelNo != "" {
  32. isSupple = true
  33. old.ModelNo = new.ModelNo
  34. }
  35. if old.VehicleBodyColorDetail == "" && new.VehicleBodyColorDetail != "" {
  36. isSupple = true
  37. old.VehicleBodyColorDetail = new.VehicleBodyColorDetail
  38. }
  39. if old.ChassisModel == "" && new.ChassisModel != "" {
  40. isSupple = true
  41. old.ChassisModel = new.ChassisModel
  42. }
  43. if old.ChassisId == "" && new.ChassisId != "" {
  44. isSupple = true
  45. old.ChassisId = new.ChassisId
  46. }
  47. if old.ChassisCertificateNumber == "" && new.ChassisCertificateNumber != "" {
  48. isSupple = true
  49. old.ChassisCertificateNumber = new.ChassisCertificateNumber
  50. }
  51. if old.EngineType == "" && new.EngineType != "" {
  52. isSupple = true
  53. old.EngineType = new.EngineType
  54. }
  55. if old.EngineNo == "" && new.EngineNo != "" {
  56. isSupple = true
  57. old.EngineNo = new.EngineNo
  58. }
  59. if old.FuelTypeDetail == "" && new.FuelTypeDetail != "" {
  60. isSupple = true
  61. old.FuelTypeDetail = new.FuelTypeDetail
  62. }
  63. if (old.Displacement == "" || old.Displacement == "0") && new.Displacement != "" {
  64. isSupple = true
  65. old.Displacement = new.Displacement
  66. }
  67. if (old.DisplacementL == "" || old.DisplacementL == "0") && new.DisplacementL != "" {
  68. isSupple = true
  69. old.DisplacementL = new.DisplacementL
  70. }
  71. // TODO 洗数据专用,洗完删除
  72. if new.DisplacementL != "" {
  73. /*if !strings.HasSuffix(old.Displacement ,"000"){
  74. isSupple = true
  75. old.DisplacementL = new.DisplacementL
  76. }*/
  77. isSupple = true
  78. old.DisplacementL = new.DisplacementL
  79. }
  80. if (old.RatedPower == "" || old.RatedPower == "0") && new.RatedPower != "" {
  81. isSupple = true
  82. old.RatedPower = new.RatedPower
  83. }
  84. if old.EmissionStandard == "" && new.EmissionStandard != "" {
  85. isSupple = true
  86. old.EmissionStandard = new.EmissionStandard
  87. }
  88. if (old.OilWear == "" || old.OilWear == "0") && new.OilWear != "" {
  89. isSupple = true
  90. old.OilWear = new.OilWear
  91. }
  92. if (old.Long == "" || old.Long == "0") && new.Long != "" {
  93. isSupple = true
  94. old.Long = new.Long
  95. }
  96. if (old.Wide == "" || old.Wide == "0") && new.Wide != "" {
  97. isSupple = true
  98. old.Wide = new.Wide
  99. }
  100. if (old.High == "" || old.High == "0") && new.High != "" {
  101. isSupple = true
  102. old.High = new.High
  103. }
  104. if (old.CargoLong == "" || old.CargoLong == "0") && new.CargoLong != "" {
  105. isSupple = true
  106. old.CargoLong = new.CargoLong
  107. }
  108. if (old.CargoWide == "" || old.CargoWide == "0") && new.CargoWide != "" {
  109. isSupple = true
  110. old.CargoWide = new.CargoWide
  111. }
  112. if (old.CargoHigh == "" || old.CargoHigh == "0") && new.CargoHigh != "" {
  113. isSupple = true
  114. old.CargoHigh = new.CargoHigh
  115. }
  116. if (old.NumberOfLeafSprings == "" || old.NumberOfLeafSprings == "0") && new.NumberOfLeafSprings != "" {
  117. isSupple = true
  118. old.NumberOfLeafSprings = new.NumberOfLeafSprings
  119. }
  120. if (old.TyreNumber == "" || old.TyreNumber == "0") && new.TyreNumber != "" {
  121. isSupple = true
  122. old.TyreNumber = new.TyreNumber
  123. }
  124. if (old.TyreSize == "" || old.TyreSize == "0") && new.TyreSize != "" {
  125. isSupple = true
  126. old.TyreSize = new.TyreSize
  127. }
  128. if (old.FrontWheelDistance == "" || old.FrontWheelDistance == "0") && new.FrontWheelDistance != "" {
  129. isSupple = true
  130. old.FrontWheelDistance = new.FrontWheelDistance
  131. }
  132. if (old.BackWheelDistance == "" || old.BackWheelDistance == "0") && new.BackWheelDistance != "" {
  133. isSupple = true
  134. old.BackWheelDistance = new.BackWheelDistance
  135. }
  136. if (old.WheelBase == "" || old.WheelBase == "0") && new.WheelBase != "" {
  137. isSupple = true
  138. old.WheelBase = new.WheelBase
  139. }
  140. if (old.AxleWeight == "" || old.AxleWeight == "0") && new.AxleWeight != "" {
  141. isSupple = true
  142. old.AxleWeight = new.AxleWeight
  143. }
  144. if (old.AxleNumber == "" || old.AxleNumber == "0") && new.AxleNumber != "" {
  145. isSupple = true
  146. // 非整数不存
  147. _, err := strconv.Atoi(new.AxleNumber)
  148. if err == nil {
  149. old.AxleNumber = new.AxleNumber
  150. }
  151. }
  152. if old.SteeringMode == "" && new.SteeringMode != "" {
  153. isSupple = true
  154. old.SteeringMode = new.SteeringMode
  155. }
  156. if (old.GrossMass == "" || old.GrossMass == "0") && new.GrossMass != "" {
  157. isSupple = true
  158. old.GrossMass = new.GrossMass
  159. }
  160. if (old.UnladenMass == "" || old.UnladenMass == "0") && new.UnladenMass != "" {
  161. isSupple = true
  162. old.UnladenMass = new.UnladenMass
  163. }
  164. if (old.ApprovedLoad == "" || old.ApprovedLoad == "0") && new.ApprovedLoad != "" {
  165. isSupple = true
  166. old.ApprovedLoad = new.ApprovedLoad
  167. }
  168. if old.LoadMassCoefficient == "" && new.LoadMassCoefficient != "" {
  169. isSupple = true
  170. old.LoadMassCoefficient = new.LoadMassCoefficient
  171. }
  172. if (old.TractionMass == "" || old.TractionMass == "0") && new.TractionMass != "" {
  173. isSupple = true
  174. old.TractionMass = new.TractionMass
  175. }
  176. if (old.SemitrailerSaddleMaxAllowGrossMass == "" || old.SemitrailerSaddleMaxAllowGrossMass == "0") && new.SemitrailerSaddleMaxAllowGrossMass != "" {
  177. isSupple = true
  178. old.SemitrailerSaddleMaxAllowGrossMass = new.SemitrailerSaddleMaxAllowGrossMass
  179. }
  180. if (old.NumberOfPassengers == "" || old.NumberOfPassengers == "0") && new.NumberOfPassengers != "" {
  181. isSupple = true
  182. old.NumberOfPassengers = new.NumberOfPassengers
  183. }
  184. if (old.ApprovedNumber == "" || old.ApprovedNumber == "0") && new.ApprovedNumber != "" {
  185. isSupple = true
  186. old.ApprovedNumber = new.ApprovedNumber
  187. }
  188. if (old.TopSpeed == "" || old.TopSpeed == "0") && new.TopSpeed != "" {
  189. isSupple = true
  190. old.TopSpeed = new.TopSpeed
  191. }
  192. if old.ReleaseDate == "" && new.ReleaseDate != "" {
  193. isSupple = true
  194. old.ReleaseDate = new.ReleaseDate
  195. }
  196. return isSupple
  197. }
  198. func supplementDws5ByDws16(old *model.Dws5, new *model.Dws16) bool {
  199. isSupple := false
  200. if old.BrandName == "" && new.BrandName != "" {
  201. isSupple = true
  202. old.BrandName = strings.Split(new.BrandName, ",")[0]
  203. }
  204. if old.ModelNo == "" && new.ModelNo != "" {
  205. isSupple = true
  206. old.ModelNo = strings.Split(new.ModelNo, ",")[0]
  207. }
  208. if old.EmissionStandard == "" && new.EmissionStandard != "" {
  209. isSupple = true
  210. old.EmissionStandard = strings.Split(new.EmissionStandard, ",")[0]
  211. }
  212. if (old.Long == "" || old.Long == "0") && new.Long != "" {
  213. isSupple = true
  214. old.Long = strings.Split(new.Long, ",")[0]
  215. }
  216. if (old.Wide == "" || old.Wide == "0") && new.Wide != "" {
  217. isSupple = true
  218. old.Wide = strings.Split(new.Wide, ",")[0]
  219. }
  220. if (old.High == "" || old.High == "0") && new.High != "" {
  221. isSupple = true
  222. old.High = strings.Split(new.High, ",")[0]
  223. }
  224. if (old.CargoLong == "" || old.CargoLong == "0") && new.CargoLong != "" {
  225. isSupple = true
  226. old.CargoLong = strings.Split(new.CargoLong, ",")[0]
  227. }
  228. if (old.CargoWide == "" || old.CargoWide == "0") && new.CargoWide != "" {
  229. isSupple = true
  230. old.CargoWide = strings.Split(new.CargoWide, ",")[0]
  231. }
  232. if (old.CargoHigh == "" || old.CargoHigh == "0") && new.CargoHigh != "" {
  233. isSupple = true
  234. old.CargoHigh = strings.Split(new.CargoHigh, ",")[0]
  235. }
  236. if (old.NumberOfLeafSprings == "" || old.NumberOfLeafSprings == "0") && new.NumberOfLeafSprings != "" {
  237. isSupple = true
  238. old.NumberOfLeafSprings = strings.Split(new.NumberOfLeafSprings, ",")[0]
  239. }
  240. if (old.TyreNumber == "" || old.TyreNumber == "0") && new.TyreNumber != "" {
  241. isSupple = true
  242. old.TyreNumber = strings.Split(new.TyreNumber, ",")[0]
  243. }
  244. if (old.TyreSize == "" || old.TyreSize == "0") && new.TyreSize != "" {
  245. isSupple = true
  246. old.TyreSize = strings.Split(new.TyreSize, ",")[0]
  247. }
  248. if (old.FrontWheelDistance == "" || old.FrontWheelDistance == "0") && new.FrontWheelDistance != "" {
  249. isSupple = true
  250. old.FrontWheelDistance = strings.Split(new.FrontWheelDistance, ",")[0]
  251. }
  252. if (old.BackWheelDistance == "" || old.BackWheelDistance == "0") && new.BackWheelDistance != "" {
  253. isSupple = true
  254. old.BackWheelDistance = strings.Split(new.BackWheelDistance, ",")[0]
  255. }
  256. if (old.AxleWeight == "" || old.AxleWeight == "0") && new.AxleWeight != "" {
  257. isSupple = true
  258. old.AxleWeight = strings.Split(new.AxleWeight, ",")[0]
  259. }
  260. if (old.AxleNumber == "" || old.AxleNumber == "0") && new.AxleNumber != "" {
  261. isSupple = true
  262. // 非整数不存
  263. _, err := strconv.Atoi(strings.Split(new.AxleNumber, ",")[0])
  264. if err == nil {
  265. old.AxleNumber = strings.Split(new.AxleNumber, ",")[0]
  266. }
  267. }
  268. if old.SteeringMode == "" && new.SteeringMode != "" {
  269. isSupple = true
  270. old.SteeringMode = strings.Split(new.SteeringMode, ",")[0]
  271. }
  272. if (old.GrossMass == "" || old.GrossMass == "0") && new.GrossMass != "" {
  273. isSupple = true
  274. old.GrossMass = strings.Split(new.GrossMass, ",")[0]
  275. }
  276. if (old.UnladenMass == "" || old.UnladenMass == "0") && new.UnladenMass != "" {
  277. isSupple = true
  278. old.UnladenMass = strings.Split(new.UnladenMass, ",")[0]
  279. }
  280. if (old.ApprovedLoad == "" || old.ApprovedLoad == "0") && new.ApprovedLoad != "" {
  281. isSupple = true
  282. old.ApprovedLoad = strings.Split(new.ApprovedLoad, ",")[0]
  283. }
  284. if (old.LoadMassCoefficient == "" || old.LoadMassCoefficient == "0") && new.LoadMassCoefficient != "" {
  285. isSupple = true
  286. old.LoadMassCoefficient = strings.Split(new.LoadMassCoefficient, ",")[0]
  287. }
  288. if (old.TractionMass == "" || old.TractionMass == "0") && new.TractionMass != "" {
  289. isSupple = true
  290. old.TractionMass = strings.Split(new.TractionMass, ",")[0]
  291. }
  292. if (old.SemitrailerSaddleMaxAllowGrossMass == "" || old.SemitrailerSaddleMaxAllowGrossMass == "0") && new.SemitrailerSaddleMaxAllowGrossMass != "" {
  293. isSupple = true
  294. old.SemitrailerSaddleMaxAllowGrossMass = strings.Split(new.SemitrailerSaddleMaxAllowGrossMass, ",")[0]
  295. }
  296. if (old.NumberOfPassengers == "" || old.NumberOfPassengers == "0") && new.NumberOfPassengers != "" {
  297. isSupple = true
  298. old.NumberOfPassengers = strings.Split(new.NumberOfPassengers, ",")[0]
  299. }
  300. if (old.ApprovedNumber == "" || old.ApprovedNumber == "0") && new.ApprovedNumber != "" {
  301. isSupple = true
  302. old.ApprovedNumber = strings.Split(new.ApprovedNumber, ",")[0]
  303. }
  304. if (old.TopSpeed == "" || old.TopSpeed == "0") && new.TopSpeed != "" {
  305. isSupple = true
  306. old.TopSpeed = strings.Split(new.TopSpeed, ",")[0]
  307. }
  308. if old.FuelTypeDetail == "" && new.FuelTypeDetail != "" {
  309. isSupple = true
  310. old.FuelTypeDetail = new.FuelTypeDetail
  311. }
  312. if (old.WheelBase == "" || old.WheelBase == "0") && new.Wheelbase != "" {
  313. isSupple = true
  314. old.WheelBase = new.Wheelbase
  315. }
  316. return isSupple
  317. }
  318. func checkIsNeedSupple(old *model.Dws5) bool {
  319. isSupple := false
  320. if old.BrandName == "" {
  321. isSupple = true
  322. return isSupple
  323. }
  324. if old.ModelNo == "" {
  325. isSupple = true
  326. return isSupple
  327. }
  328. if old.EmissionStandard == "" {
  329. isSupple = true
  330. return isSupple
  331. }
  332. if old.Long == "" || old.Long == "0" {
  333. isSupple = true
  334. return isSupple
  335. }
  336. if old.Wide == "" || old.Wide == "0" {
  337. isSupple = true
  338. return isSupple
  339. }
  340. if old.High == "" || old.High == "0" {
  341. isSupple = true
  342. return isSupple
  343. }
  344. if old.CargoLong == "" || old.CargoLong == "0" {
  345. isSupple = true
  346. return isSupple
  347. }
  348. if old.CargoWide == "" || old.CargoWide == "0" {
  349. isSupple = true
  350. return isSupple
  351. }
  352. if old.CargoHigh == "" || old.CargoHigh == "0" {
  353. isSupple = true
  354. return isSupple
  355. }
  356. if old.NumberOfLeafSprings == "" || old.NumberOfLeafSprings == "0" {
  357. isSupple = true
  358. return isSupple
  359. }
  360. if old.TyreNumber == "" || old.TyreNumber == "0" {
  361. isSupple = true
  362. return isSupple
  363. }
  364. if old.TyreSize == "" || old.TyreSize == "0" {
  365. isSupple = true
  366. return isSupple
  367. }
  368. if old.FrontWheelDistance == "" || old.FrontWheelDistance == "0" {
  369. isSupple = true
  370. return isSupple
  371. }
  372. if old.BackWheelDistance == "" || old.BackWheelDistance == "0" {
  373. isSupple = true
  374. return isSupple
  375. }
  376. if old.AxleWeight == "" || old.AxleWeight == "0" {
  377. isSupple = true
  378. return isSupple
  379. }
  380. if old.AxleNumber == "" || old.AxleNumber == "0" {
  381. isSupple = true
  382. return isSupple
  383. }
  384. if old.SteeringMode == "" || old.SteeringMode == "0" {
  385. isSupple = true
  386. return isSupple
  387. }
  388. if old.GrossMass == "" || old.GrossMass == "0" {
  389. isSupple = true
  390. return isSupple
  391. }
  392. if old.UnladenMass == "" || old.UnladenMass == "0" {
  393. isSupple = true
  394. return isSupple
  395. }
  396. if old.ApprovedLoad == "" || old.ApprovedLoad == "0" {
  397. isSupple = true
  398. return isSupple
  399. }
  400. if old.LoadMassCoefficient == "" || old.LoadMassCoefficient == "0" {
  401. isSupple = true
  402. return isSupple
  403. }
  404. if old.TractionMass == "" || old.TractionMass == "0" {
  405. isSupple = true
  406. return isSupple
  407. }
  408. if old.SemitrailerSaddleMaxAllowGrossMass == "" || old.SemitrailerSaddleMaxAllowGrossMass == "0" {
  409. isSupple = true
  410. return isSupple
  411. }
  412. if old.NumberOfPassengers == "" || old.NumberOfPassengers == "0" {
  413. isSupple = true
  414. return isSupple
  415. }
  416. if old.ApprovedNumber == "" || old.ApprovedNumber == "0" {
  417. isSupple = true
  418. return isSupple
  419. }
  420. if old.TopSpeed == "" || old.TopSpeed == "0" {
  421. isSupple = true
  422. return isSupple
  423. }
  424. if old.WheelBase == "" || old.WheelBase == "0" {
  425. isSupple = true
  426. return isSupple
  427. }
  428. if old.FuelTypeDetail == "" {
  429. isSupple = true
  430. return isSupple
  431. }
  432. return isSupple
  433. }
  434. func suppleByDws16(db *gorm.DB, dws5 *model.Dws5) bool {
  435. isSupple := false
  436. if dws5.ModelNo == "" {
  437. vinRule := ""
  438. if len(dws5.Vin) > 8 {
  439. vinRule = dws5.Vin[0:8]
  440. }
  441. if vinRule == "" {
  442. return isSupple
  443. }
  444. dws11 := &model.Dws11{}
  445. err := dws11.Query(db, map[string]interface{}{"vin_rule": vinRule})
  446. if err != nil {
  447. return isSupple
  448. }
  449. isSupple = true
  450. dws5.ModelNo = dws11.ModelNo
  451. }
  452. dws16 := &model.Dws16{}
  453. err := dws16.QueryDesc(db, map[string]interface{}{"model_no": dws5.ModelNo})
  454. if err != nil {
  455. return isSupple
  456. }
  457. isSupple1 := supplementDws5ByDws16(dws5, dws16)
  458. if isSupple1 {
  459. isSupple = isSupple1
  460. }
  461. return isSupple
  462. }
  463. // 合格证信息
  464. func Dws5Task(db *gorm.DB, dwsMessage *apis.DwsMessage, outputSourceCode string) (adsMsgList []*apis.AdsMessage, dwsMsgList []*apis.DwsMessage, err error) {
  465. dws5 := &model.Dws5{}
  466. err = json.Unmarshal([]byte(dwsMessage.Content), dws5)
  467. if err != nil {
  468. return nil, nil, nil
  469. }
  470. if dws5.Vin == "" || (dws5.EngineNo == "" && dws5.ModelNo == "") {
  471. return nil, nil, nil
  472. }
  473. // 排量转换排量参数如果能被10整除则数据/1000入排量(L)字段, 其他入排量(ml)字段
  474. if dws5.Displacement != "" && dws5.DisplacementL == "" {
  475. displacement, _ := strconv.Atoi(dws5.Displacement)
  476. if displacement%1000 == 0 {
  477. displacement = displacement / 1000
  478. dws5.DisplacementL = strconv.Itoa(displacement)
  479. }
  480. }
  481. // 获取style id
  482. /*if dws5.ThridStyleId != ""{
  483. dws13 := &model.Dws13{}
  484. err = dws13.Query(db,map[string]interface{}{"thrid_style_id":dws5.ThridStyleId})
  485. if err == nil {
  486. if dws13.StyleId != "" {
  487. dws5.StyleId = dws13.StyleId
  488. }
  489. }
  490. }*/
  491. oldDws5 := &model.Dws5{}
  492. err = oldDws5.Query(db, map[string]interface{}{"vin": dws5.Vin})
  493. if err == nil {
  494. //oldDws5.StyleId = dws5.StyleId
  495. // 有数据
  496. isSupple := supplementDws5(oldDws5, dws5)
  497. isNeed := checkIsNeedSupple(oldDws5)
  498. if isNeed {
  499. isSupple1 := suppleByDws16(db, oldDws5)
  500. if isSupple1 {
  501. isSupple = isSupple1
  502. }
  503. }
  504. if isSupple {
  505. err = oldDws5.Update(db)
  506. if err != nil {
  507. return nil, nil, err
  508. }
  509. } else {
  510. return nil, nil, nil
  511. }
  512. } else {
  513. if err == gorm.ErrRecordNotFound {
  514. // 没有数据
  515. isNeed := checkIsNeedSupple(dws5)
  516. if isNeed {
  517. suppleByDws16(db, dws5)
  518. }
  519. err = dws5.Insert(db)
  520. if err != nil {
  521. if !strings.Contains(err.Error(), "Duplicate") {
  522. return nil, nil, err
  523. }
  524. }
  525. oldDws5 = dws5
  526. } else {
  527. // 数据库错误
  528. return nil, nil, err
  529. }
  530. }
  531. // 补充dws1号牌种类
  532. dws4, _ := SupplementDws1PlateType(db, oldDws5.Vin, oldDws5.Long, oldDws5.ApprovedNumber, oldDws5.GrossMass)
  533. if dws4 != nil {
  534. dwsMsg := NewDwsMessage(dwsMessage, outputSourceCode)
  535. dwsMsgByte, _ := json.Marshal(*dws4)
  536. dwsMsg.Content = string(dwsMsgByte)
  537. adsMsgs, _, err := Dws1Task(db, dwsMsg, consts.SOURCEDWS1)
  538. if err == nil {
  539. adsMsgList = append(adsMsgList, adsMsgs...)
  540. }
  541. }
  542. adsMsg := NewAdsMessage(dwsMessage, outputSourceCode, consts.ACTIONINSERT)
  543. msgByte, _ := json.Marshal(*oldDws5)
  544. adsMsg.Content = string(msgByte)
  545. adsMsgList = append(adsMsgList, adsMsg)
  546. return adsMsgList, dwsMsgList, nil
  547. }