fiddler 配置 追踪请求
用Reqable 替代fiddler 和postman
手动选择一个本机IP的代理 端口设置为8888
其他操作和另外两个软件几乎一致
1.博源整箱条码只有一个过站问题
--华为关联箱号查询
select hw.shipmentNum,hw.barcode,box.box_number,s.serial_number,s.lot_name,c.box_weight from HW_B2B_ASNLabel (nolock) hw
-- serial_number 为箱号 bing_sn 为华为asn
left join QS_BINDING (nolock) b on b.BINDING_SN=hw.barcode
left join CT_BOX_ITEMS (nolock) box on box.box_number=b.serial_number
left join ct_boxs (nolock) c on box.box_number=c.box_number
left join qs_serial_numbers (nolock) s on box.serial_number=s.serial_number
where
hw.shipmentNum='J23C13ANT'
-- 扩展同类型问题处理方式
--a.单条码跳站
create PROCEDURE [dbo].[jump_js]
@sn_id AS varchar(200) ,
@route_step_name AS varchar(200)
AS
BEGIN
declare @temp_sn varchar(100)
declare @route_step_id varchar(100)
select @temp_sn = serial_number from [Udit.sfc].dbo.QS_SERIAL_NUMBERS (nolock)
where serial_number_id=@sn_id
select @route_step_id =route_step_id from [Udit.sfc].dbo.qs_route_steps(nolock) where [name]=@route_step_name
if @temp_sn is null
begin
select @temp_sn+'条码不存在!' msg
end
else if @route_step_id is null
begin
select @route_step_name+'工序不存在!' msg
end
else
BEGIN
begin Try
begin TransAction
update [Udit.sfc].dbo.QS_SERIAL_NUMBERS set next_step_id = @route_step_id where serial_number = @temp_sn
-- 提交
commit TransAction
select @temp_sn +'跳站成功!下一站'+@route_step_name msg
end try
begin catch
-- 出错回滚
Rollback TransAction
select '跳站失败!' msg
end catch
END
END
--b.其他跳站,按工单跳站暂时不支持,一般没这种业务需求
ALTER PROCEDURE [dbo].[mix_jump_js]
@sn AS varchar(200) ,
@type as int, -- 1 单条码 2 拼版 3 箱号 4 工单
@route_step_name AS varchar(200)
AS
BEGIN
declare @temp_sn_id varchar(100)
declare @route_step_id varchar(100)
declare @tep_parent_id varchar(100)
declare @tep_sn varchar(100)
declare @tep_box varchar(100)
declare @tmp_lot varchar(100)
if @type=1
begin
select @temp_sn_id = serial_number_id from [Udit.sfc].dbo.QS_SERIAL_NUMBERS (nolock)
where serial_number=@sn
if @temp_sn_id is null
begin
select @sn+'条码不存在!' msg
end
exec jump_js @temp_sn_id,@route_step_name
end
if @type=2 -- 拼版
begin
select @temp_sn_id = serial_number_id from [Udit.sfc].dbo.QS_SERIAL_NUMBERS (nolock)
where serial_number=@sn
if @temp_sn_id is null
begin
select @sn+'条码不存在!' msg
end
else
begin
select @tep_parent_id = ParentItemInventoryID from [Udit.sfc].dbo.DW_PanelLinks (nolock)
where ChildItemInventoryID = @temp_sn_id
if @tep_parent_id is null
begin
select '找不到母版,无拼版关系!' msg
end
else
begin
declare @wiplist table
(
serial_number_id nvarchar(150)
)
insert @wiplist select ChildItemInventoryID from [Udit.sfc].dbo.DW_PanelLinks (nolock) where ParentItemInventoryID=@tep_parent_id
insert @wiplist select @tep_parent_id
while(exists(select top 1 1 from @wiplist))
begin
select top 1 @tep_sn=serial_number_id from @wiplist
exec jump_js @tep_sn,@route_step_name
delete from @wiplist where serial_number_id=@tep_sn
end
end
end
end
if @type=3 --箱号
begin
select top 1 @tep_box = box_number from ct_box_items (nolock) where box_number=@sn --此时sn为箱号
if @tep_box is null
begin
select @sn+'找不到箱号!' msg
end
else
begin
declare @box_items table
(
serial_number_id nvarchar(150)
)
insert @box_items select s.serial_number_id from ct_box_items (nolock) b
left join qs_serial_numbers (nolock) s on s.serial_number=b.serial_number where b.box_number=@tep_box
while(exists(select top 1 1 from @box_items))
begin
select top 1 @tep_sn=serial_number_id from @box_items
exec jump_js @tep_sn,@route_step_name
delete from @box_items where serial_number_id=@tep_sn
end
end
end
END
2.各种列名不存在,对象名不存在
根据下列查询结果看具体是哪个表
select a.name 表名 ,b.name 列名
from sys.columns b,sys.objects a
where object_name(b.object_id)=a.name
and b.name='Enabled'
3.博凯悦和丰诺产品已过站未分板问题处理方式
1.获取母版条码id
select ParentItemInventoryID from DW_PanelLinks where ChildItemInventoryID=@SERIAL_NUMBER_ID
2.获取子母版条码
select MODEL_NO 产品,LOT_NAME 工单,SERIAL_NUMBER 条码 from [Udit.SFC].[dbo].QS_SERIAL_NUMBERS (nolock)
where SERIAL_NUMBER_ID in(SELECT ChildItemInventoryID FROM DW_PanelLinkHistories where ParentItemInventoryID=@ParentItemInventoryID)
or SERIAL_NUMBER_ID in (ParentItemInventoryID)
3.将这些条码一起更新NEXT_STEP_ID ,如果完工还需更新serial_number_states 为 0
解除拼版关系存储, 输入任意一个子板条码即可
create PROCEDURE [dbo].[Unlinks]
@sn AS varchar(100)
AS
BEGIN
-- routine body goes here, e.g.
-- SELECT 'Navicat for SQL Server'
declare @temp_sn_id varchar(100)
declare @tep_parent_id varchar(100)
select @temp_sn_id = serial_number_id from [Udit.sfc].dbo.QS_SERIAL_NUMBERS (nolock)
where serial_number=@sn
if @temp_sn_id is null
begin
select '条码不存在!' msg
end
else
begin
select @tep_parent_id = ParentItemInventoryID from [Udit.sfc].dbo.DW_PanelLinks (nolock)
where ChildItemInventoryID = @temp_sn_id or (ParentItemInventoryID = @temp_sn_id)
if @tep_parent_id is null
begin
select '找不到母版,无需分板!' msg
end
else
BEGIN
begin Try
begin TransAction
-- 更新新serial_numbers panel_inde 为0
update [Udit.sfc].dbo.QS_SERIAL_NUMBERS
set panel_index = 0
where serial_number_id in(select ChildItemInventoryID from [Udit.sfc].dbo.DW_PanelLinks (nolock)
where ParentItemInventoryID = @tep_parent_id
)
-- 更新拼版模板状态为分板serial_number_state 为3
update [Udit.sfc].dbo.QS_SERIAL_NUMBERS
set serial_number_state = 3
where serial_number_id = @tep_parent_id
-- 插入拼版记录到历史表
INSERT INTO [dbo].[DW_PanelLinkHistories]([ID], [DateAdded_BaseDateTimeUTC],
[DateRemoved_BaseDateTimeUTC], [PositionX],[PositionY],[PositionZ],
[Operator], [ProductRouteTransactionID], [ParentItemInventoryID],
[ChildItemInventoryID], [PanelIndex])
select newid(),DateAdded_DateTime,
getdate(),[PositionX],[PositionY],[PositionZ],
'admin',ProductRouteTransactionID,[ParentItemInventoryID],
[ChildItemInventoryID],[PanelIndex]
from [Udit.sfc].dbo.DW_PanelLinks (nolock) where ParentItemInventoryID= @tep_parent_id
-- 删除拼版关系
delete [Udit.sfc].dbo.DW_PanelLinks where ParentItemInventoryID= @tep_parent_id
-- 提交
commit TransAction
select '解除拼版关系成功!' msg
end try
begin catch
-- 出错回滚
Rollback TransAction
select '解除拼版关系失败!' msg
end catch
END
end
END
4.某应用报错找问题步骤
1.找到界面,打开f12,重复一遍报错操作,查看网页里的请求,找到报错的请求和传参,检查数据是够异常,如果不能解决,提需求找开发处理
反编译工具
5.芒果db删条码
查条码
db.QS_SERIAL_NUMBERS.find({SERIAL_NUMBER:{$in:[
"CN0GVWW7SQC0034E1104A00"
]}});
删条码
db.QS_SERIAL_NUMBERS.remove({SERIAL_NUMBER:"CN0GVWW7SQC0034E1104A00"}, {justOne: true})
11.Pda升级方式(没源码,无需重新编译的情况)
1.到客户那里拿升级包,[dreamwaylink.wgt]文件
2.改后缀为.zip ,解压缩到本地
3.用Hbuilder x 打开,点击运行,在自己电脑跑起来
4.更改完成后,更改manifest.json文件的版本号,两处均要修改
5.然后再次压缩,更改文件名为[dreamwaylink.wgt]
6.先到客户备份原升级包,文件夹名为当天日期【20xxxx+原版本号(例如:5.7.6)】,然后将改好的文件更新到客户服务器version目录下,更改version.txt为最新版本号
6.博源特殊标签取值
create PROCEDURE [dbo].[n-box]
@start AS int ,
@end_num AS int ,
@box varchar(50)
AS
BEGIN
--取箱号里的1-n个条码,并排序
SELECT SN ,MAC,SEQ FROM (
select s.serial_number SN,Q.ASSEMBLY_SN MAC,row_number() over(order by B.serial_number) SEQ from qs_serial_numberS(nolock) s
left join ct_box_items b on s.serial_number=b.serial_number
left join QS_ASSEMBLY q on s.serial_number=q.serial_number
where
B.box_number=@box
)A
WHERE
SEQ >= @start and SEQ <= @end_num
ORDER BY SEQ
-- SELECT 'Navicat for SQL Server'
END
7.海业特殊标签取值
--序号
create PROCEDURE [dbo].[carton_index]
@box AS varchar(50)
AS
BEGIN
SELECT right('000'+convert(varchar,A1.SEQ),3) SEQ,
A1.BOX_NUMBER,
right('000'+convert(varchar,ceiling(cast(L.QUANTITY as float)/A1.box_size)),3) QUANTITY
FROM
qs_lots L ,
(
SELECT row_number() over(order by A1.box_number) SEQ,BOX_NUMBER,LOT_NAME,box_size
FROM CT_BOXS A1
WHERE LOT_NAME=(SELECT lot_name from ct_boxs where box_number=@box )
)A1
where A1.box_number=@box
AND L.LOT_NAME=A1.LOT_NAME
-- SELECT 'Navicat for SQL Server'
END
8.uid数据
select CONVERT(varchar,a.REEL_BARCODE) '条码', a.MATERIAL_NO
,'状态'= case when a.status='0' then '未上架' else '已上架' end
,a.QUANTITY 现有数量,a.InitialQuantity 初始数量, a.WAREHOUSE,a.AREA,a.LOT_NO,a.DATECODE,a.CREATE_TIME,a.CREATE_DATECODE
,a.DESCRIPTION '描述',a.SPECIFICATION '规格'
,b.Quality_Days '保质期天数'
, '过期剩余' =DATEDIFF(day,getdate(), a.ExpirationDate)
,a.ExpirationDate '过期时间'
from mms_reels a
left join mms_material b on a.MATERIAL_NO=b.MaterialCode
where
b.MaterialType <>'3962cea0-9ac5-484c-af1a-098c20b54287'
and (status=1 or status=0)
order by 状态
9.硕贝德标签问题
Content/business/Content/dobusiness/templete/NewOutStock.mrt
Content/business/Content/dobusiness/templete/OutStock.mrt
修改字段模板中变量类型
智联的模板目前是outStock.mrt
代码里面写的如果客户是SPEED,则调用outStock.mrt
天线没更新后端,调用的是NewOutStock.mrt
10.凯尔扣料记录查询
select a.[Identifier] PCBSN条码,a.WorkOrder,b.uid,c.lot_no ,c.MATERIAL_NO 物料编码
FROM [Udit.CHC].[dbo].[ItemTraceHistories](nolock) a left join [Udit.CHC].[dbo].[ItemTraceData](nolock) b on b.[Guid]=a.[PCheckingProductUID]
left join [Udit.Mms].[dbo].[mms_REELS](nolock) c on c.[REEL_BARCODE]= b.[UID]
where
a.Identifier in(
select serial_number from [Udit.SFC].dbo.ct_box_items where box_number in(select serial_number from [Udit.SFC].dbo.ct_box_items where box_number='C9200-585002102%230906000678')
)
特殊字符前端拦截问题处理
ValidateRequest="false"
硕贝德同步数据异常处理
有wip_id 没有neweid 的是未同步的数据
select s.lot_name ,s.SERIAL_NUMBER ,m.NeweID,t.WIP_ID ,r.name , m.keyname ,m.value ,
(case q.WIP_STATE when 0 then 'PASS' else 'Fail'end) WIP_STATE from
[Udit.SFC].dbo.qs_serial_numbers(nolock) s
left join [testdata].[dbo].testdataMainnew_asyn(nolock) t on s.SERIAL_NUMBER_ID=t.SERIAL_NUMBER_ID
left join [testdata].[dbo].[testdataFrom](nolock) m on t.NeweID=m.NeweID
left join [Udit.SFC].dbo.[QS_WIP](nolock) q on q.WIP_ID=t.WIP_ID
left join [Udit.SFC].dbo.QS_ROUTE_STEPS(nolock) r on q.ROUTE_STEP_id=r.ROUTE_STEP_ID
where r.name='成品组装-性能测试'
and q.MODEL_NO in('F-0L-80-0020-000-K0',
'F-0L-80-0029-000-K0',
'F-0L-80-0031-000-K0' ,
'F-0L-80-0024-000-K0'
)
--and q.lot_name='1312-Z240101212'
and m.NeweID is null
1.查询结果保留 wip_id 删除[testdataMainnew_asyn] 对应的wip_id 数据
2.芒果Db删除
批量修改
db.testdata.updateMany({wipID:{$in:[
'21406ce2-8b9b-4898-a1c6-122f24d98f2e',
'bde0df66-c1fd-4b3b-a99f-f8f1d7954dc2',
'3bd236ed-15cc-48fa-83e4-5790626ef0ff',
'398c239f-5ee8-433c-9f98-830c8c40d995'
]}},{
"$set":{
"state":0
}
},{"multi":true})
select * from Tooling_ResourceControl where code in('GD-300','GD-350','GD-250')
select * from mms_Expansion where pid='77215bd6-2977-4abf-92f8-5e6ec4d43280' and ftype='周期初始化次数'
作者:王世杰 创建时间:2023-09-04 11:00
最后编辑:王世杰 更新时间:2025-02-11 14:16
最后编辑:王世杰 更新时间:2025-02-11 14:16