Skip to content

Commit

Permalink
chore:12月14日
Browse files Browse the repository at this point in the history
  • Loading branch information
aehyok committed Dec 14, 2024
1 parent d6a3165 commit e9d92c9
Show file tree
Hide file tree
Showing 3 changed files with 315 additions and 2 deletions.
3 changes: 1 addition & 2 deletions docs/javascript/2024-11-22-台账.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ select * from ImportTemplate
select * from TableSchema
## 表字段泪飙 (包含TableSchemaId)
select * from ColumnSchema
select * from ColumnSchema
## 通过IsSearch来设置是否可以作为查询字段
SELECT * FROM ColumnSchema S WHERE S.IsSearch = 1
Expand Down
143 changes: 143 additions & 0 deletions docs/javascript/2024-12-13-散装油迁移.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
select CAST(t.Id AS CHAR(19)) as tid, t.* from MonitorTask t where t.name like '%开散装油证明%'

## 散装油 任务Id = `1801833127413444608`

select CAST(s.Id AS CHAR(19)) as tid, s.* from MonitorRecord s where s.MonitorTaskId = 1859829378117562368 order by s.CreatedAt desc limit 1000

select
CAST(l.CurrentRegionId AS CHAR(19)) as CurrentRegionId,
CAST(l.NextRegionId AS CHAR(19)) as NextRegionId,
CAST(l.CurrentRoleId AS CHAR(19)) as CurrentRoleId,
CAST(l.NextRoleId AS CHAR(19)) as NextRoleId from MonitorRecordLog l where l.MonitorRecordId = 1867147619353260032

select count(*) from MonitorRecordReply




## 加油站角色Id 1801831060200361984
select CAST(r.Id AS CHAR(19)) as pp, r.* from Role r where r.Code like '%jyz%'

## 运维管理角色 1739469981923581952
select CAST(r.Id AS CHAR(19)) as pp, r.* from Role r where r.Code like '%root%'

## 审核测试角色 1825826628824207360
select CAST(r.Id AS CHAR(19)) as pp, r.* from Role r where r.Code ='shcsjs'


## 来凤县区域Id 1739469963384758272
select * from Region w where w.Id = 1739469963384758272

## 三坝村区域Id 1822103466693234688
select CAST(w.Id AS CHAR(19)) as pp, w.* from Region w where w.Name like '%三坝村村民委员会%'

## 散装油老任务的Id=1801833127413444608


## 散装油新任务的Id = 1859829378117562368

select CAST(t.Id AS CHAR(19)) as tid, t.* from MonitorTask t where t.Id = 1859829378117562368

##
select * from MonitorRecord r where r.MonitorTaskId = 1859829378117562368

## 将历史数据修改为已删除
update MonitorRecord set IsDeleted = 1 where MonitorTaskId = 1859829378117562368
---1801833127413444608


## 区域Id 1822102519103492096 蓝河村村民委员会
select * from Region where Id = 1822102519103492096






## 批量插入填报记录数据
INSERT INTO MonitorRecord (
Id
,MonitorTaskId
,WriteStatus
,RegionId
,UserId
,IsDeleted
,CreatedAt
,CreatedBy
,UpdatedAt
,UpdatedBy
,Remark
,BusinessFormId
,OpenId
,IsAnonymous
)
SELECT
Id+1
,1859829378117562368
,WriteStatus
,RegionId
,UserId
,IsDeleted
,CreatedAt
,CreatedBy
,UpdatedAt
,UpdatedBy
,Remark
,BusinessFormId
,OpenId
,IsAnonymous
FROM MonitorRecord
WHERE MonitorTaskId = 1801833127413444608

## 批量插入填报回复记录数据
INSERT INTO MonitorRecordLog (
Id
,MonitorRecordId
,IsHistory
,WriteStatus
,IsDeleted
,CreatedAt
,CreatedBy
,UpdatedAt
,UpdatedBy
,Remark
,CurrentRegionId
,CurrentRoleId
,NextRegionId
,NextRoleId
,AuditContent
,AuditMediaIds
)
SELECT
Id
,MonitorRecordId+1
, 0
, 2
,IsDeleted
,CreatedAt
,CreatedBy
,UpdatedAt
,UpdatedBy
,Remark
,RegionId
,0
,0
,0
,ReplyContent
,ReplyMediaIds
FROM MonitorRecordReply

查找到所有的加油站角色,区域审核数据
select * from MonitorRecordLog l where l.CurrentRegionId = 1739469963384758272


将加油站审核数据进行批量修改(确定加油站审核角色)
update MonitorRecordLog set WriteStatus = 3, CurrentRoleId = 1739469981923581952, BusinessName = '加油审核' where CurrentRegionId = 1739469963384758272


## 查看所有非加油站角色数据,村委审核数据
select * from MonitorRecordLog l where l.CurrentRegionId != 1739469963384758272

update MonitorRecordLog set WriteStatus = 5, CurrentRoleId = 1825826628824207360, BusinessName = '村委审核' where CurrentRegionId != 1739469963384758272


171 changes: 171 additions & 0 deletions docs/javascript/2024-12-14-散装油迁移-his.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
select CAST(t.Id AS CHAR(19)) as tid, t.* from MonitorTask t where t.name like '%开散装油证明%'

## 散装油 任务Id = `1801833127413444608`

select CAST(s.Id AS CHAR(19)) as tid, s.* from MonitorRecord s where s.MonitorTaskId = 1859829378117562368 order by s.CreatedAt desc limit 1000

select
CAST(l.CurrentRegionId AS CHAR(19)) as CurrentRegionId,
CAST(l.NextRegionId AS CHAR(19)) as NextRegionId,
CAST(l.CurrentRoleId AS CHAR(19)) as CurrentRoleId,
CAST(l.NextRoleId AS CHAR(19)) as NextRoleId from MonitorRecordLog l where l.MonitorRecordId = 1867147619353260032

select count(*) from MonitorRecordReply




## 加油站角色Id 1801831060200361984
select CAST(r.Id AS CHAR(19)) as pp, r.* from Role r where r.Code like '%jyz%'

## 运维管理角色 1739469981923581952
select CAST(r.Id AS CHAR(19)) as pp, r.* from Role r where r.Code like '%root%'

## 审核测试角色 1825826628824207360
select CAST(r.Id AS CHAR(19)) as pp, r.* from Role r where r.Code ='shcsjs'


## 来凤县区域Id 1739469963384758272
select * from Region w where w.Id = 1739469963384758272

## 三坝村区域Id 1822103466693234688
select CAST(w.Id AS CHAR(19)) as pp, w.* from Region w where w.Name like '%三坝村村民委员会%'

## 散装油老任务的Id=1801833127413444608


## 散装油新任务的Id = 1859829378117562368

select CAST(t.Id AS CHAR(19)) as tid, t.* from MonitorTask t where t.Id = 1859829378117562368

##
select * from MonitorRecord r where r.MonitorTaskId = 1859829378117562368

## 将历史数据修改为已删除
update MonitorRecord set IsDeleted = 1 where MonitorTaskId = 1859829378117562368
---1801833127413444608


## 区域Id 1822102519103492096 蓝河村村民委员会
select * from Region where Id = 1822102519103492096






## 批量插入填报记录数据
INSERT INTO MonitorRecord (
Id
,MonitorTaskId
,WriteStatus
,RegionId
,UserId
,IsDeleted
,CreatedAt
,CreatedBy
,UpdatedAt
,UpdatedBy
,Remark
,BusinessFormId
,OpenId
,IsAnonymous
)
SELECT
Id+1
,1859829378117562368
,WriteStatus
,RegionId
,UserId
,IsDeleted
,CreatedAt
,CreatedBy
,UpdatedAt
,UpdatedBy
,Remark
,BusinessFormId
,OpenId
,IsAnonymous
FROM MonitorRecord
WHERE MonitorTaskId = 1801833127413444608

## 批量插入填报回复记录数据
INSERT INTO MonitorRecordLog (
Id
,MonitorRecordId
,IsHistory
,WriteStatus
,IsDeleted
,CreatedAt
,CreatedBy
,UpdatedAt
,UpdatedBy
,Remark
,CurrentRegionId
,CurrentRoleId
,NextRegionId
,NextRoleId
,AuditContent
,AuditMediaIds
)
SELECT
Id
,MonitorRecordId+1
, 0
, 2
,IsDeleted
,CreatedAt
,CreatedBy
,UpdatedAt
,UpdatedBy
,Remark
,RegionId
,0
,0
,0
,ReplyContent
,ReplyMediaIds
FROM MonitorRecordReply

查找到所有的加油站角色,区域审核数据
select * from MonitorRecordLog l where l.CurrentRegionId = 1739469963384758272


将加油站审核数据进行批量修改(确定加油站审核角色)
update MonitorRecordLog set WriteStatus = 3, CurrentRoleId = 1739469981923581952, BusinessName = '加油审核' where CurrentRegionId = 1739469963384758272


## 查看所有非加油站角色数据,村委审核数据
select * from MonitorRecordLog l where l.CurrentRegionId != 1739469963384758272

update MonitorRecordLog set WriteStatus = 5, CurrentRoleId = 1825826628824207360, BusinessName = '村委审核' where CurrentRegionId != 1739469963384758272

INSERT INTO datareport_1859829378750902272 (
id,
taskid,
c1,
c2,
c3,
c4,
createby,
updateby,
createtime,
updatetime
)
SELECT
id,
taskid,
c1,
c2,
c3,
c4,
createby,
updateby,
createtime,
updatetime
FROM datareport_1801833127438610432

修改其中taskid


update MonitorTask set Id = 1859829378117562368 where Id = 1859829378117562368

0 comments on commit e9d92c9

Please sign in to comment.