temp save here

本文介绍了一种基于PHP的购物车拣货系统实现方案。该系统通过计算购物车中商品的所需数量,并从库存中分配相应的商品进行拣货。拣货过程中会更新商品状态并生成拣货单。
<?php session_start();$session=session_id();?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>无标题文档</title>
</head>
<body>

<?php include("image/conn.php");
//计算batch号
$q5=$m->query("select max(batch) as batch from pick");
$r5=($q5->fetch_array(MYSQLI_USE_RESULT));
$batch=$r5['batch']+1;
//end 计算batch号

$q=$m->query("select I.name,I.number,I.style,I.color,I.size,sum(C.qty) as qty,C.input from cart C left join caseinfo I on C.number=I.number where C.status='0' and C.session='".$session."' group by I.style,I.size");//购物车需要的数量
while($r=$q->fetch_array(MYSQLI_USE_RESULT)){
	$qtyTemp=$r['qty'];
	$q2=$m->query("select I.number,I.pcs from inventory I left join caseinfo C on I.number=C.number where C.name=(select name from caseinfo where number='".$r[number]."') and C.style=(select style from caseinfo where number='".$r[number]."') and C.color=(select color from caseinfo where number='".$r[number]."') and C.size=(select size from caseInfo where number='".$r[number]."') and I.status='0' order by I.id");//库存里的数量
	while($r2=$q2->fetch_array(MYSQLI_USE_RESULT)){
		if($qtyTemp>=$r2['pcs']){
			$qtyTemp-=(int)$r2['pcs'];
			$m->query("insert into pick (batch,number,input) values ('".$batch."','".$r2['number']."','".$input."')");
			$m->query("update inventory set status='1' where number='".$r2['number']."'");
			$m->query("update caseinfo set status='2' where number='".$r2['number']."'");
			echo 'case pcs:'.$qtyTemp.'<br>';
			}
		else{
			$k=abs($qtyTemp);
			$qtyTemp-=(int)$r2['pcs'];
			$m->query("insert into pick (batch,number,pcs,input) values ('".$batch."','".$r2['number']."','".$k."','".$input."')");//放在拣货单

			$m->query("update inventory set status='1',batch='".$batch."',pick='".$k."' where number='".$r2['number']."'");//把原始的更新
			$m->query("update caseinfo set status='2' where number='".$r2['number']."'");
			//计算出剩下的数量与原库位
			$q7=$m->query("select weight,vol,pcs,location from inventory where number='".$r2['number']."' and id=(select min(id) from inventory where number='".$r2['number']."')");
			$r7=$q7->fetch_array(MYSQLI_USE_RESULT);
			$left=$r7[pcs]-$k;//把剩下的数量,变成新的箱子
			//end 数量与原为库位
			$m->query("insert into inventory (number,weight,vol,pcs,batch,location,op,input) values ('".$r2['number']."','".$r7[weight]."','".$r7[vol]."','".$left."','".$batch."','".$r7[location]."','".$_SESSION['auth']."','".$input."')");
			echo "insert into inventory (number,weight,vol,pcs,batch,location,op,input) values ('".$r2['number']."','".$r7[weight]."','".$r7[vol]."','".$left."','".$batch."','".$r7[location]."','".$_SESSION['auth']."','".$input."')<br>";
			echo 'rep-pick:'.$qtyTemp.'<br>';
			}
		if($qtyTemp<=0){
			$m->query("update cart set status='1' where session='".$session."'");
			break;}
		
		}
	}

© Silvaco Inc., 2018 go athena line x loc=0.0 spac=0.1 line x loc=0.2 spac=0.006 line x loc=0.4 spac=0.006 line x loc=0.6 spac=0.01 line y loc=0.0 spac=0.002 line y loc=0.2 spac=0.005 line y loc=0.5 spac=0.05 line y loc=0.8 spac=0.15 init orientation=100 c.phos=1e14 space.mul=2 #pwell formation including masking off of the nwell diffus time=30 temp=1000 dryo2 press=1.00 hcl=3 etch oxide thick=0.02 #P-well Implant implant boron dose=1e13 energy=100 pears diffus temp=1000 time=200 weto2 hcl=3 #N-well implant not shown - welldrive starts here diffus time=50 temp=1000 t.rate=4.000 dryo2 press=0.10 hcl=3 diffus time=220 temp=1200 nitro press=1 diffus time=90 temp=1200 t.rate=-4.444 nitro press=1 etch oxide all #sacrificial “cleaning” oxide diffus time=20 temp=1000 dryo2 press=1 hcl=3 etch oxide all #gate oxide grown here:- diffus time=11 temp=925 dryo2 press=1.00 hcl=3 Extract a design parameter extract name=“gateox” thickness oxide mat.occno=1 x.val=0.06 #vt adjust implant implant boron dose=9.5e11 energy=10 pearson depo poly thick=0.2 divi=10 #from now on the situation is 2-D etch poly left p1.x=0.35 method fermi compress diffuse time=3 temp=900 weto2 press=1.0 implant phosphor dose=3.0e13 energy=20 pearson depo oxide thick=0.120 divisions=8 etch oxide dry thick=0.120 implant arsenic dose=5.0e15 energy=50 pearson method fermi compress diffuse time=1 temp=900 nitro press=1.0 pattern s/d contact metal etch oxide left p1.x=0.2 deposit alumin thick=0.03 divi=2 etch alumin right p1.x=0.18 Extract design parameters extract final S/D Xj extract name=“nxj” xj silicon mat.occno=1 x.val=0.1 junc.occno=1 extract the N++ regions sheet resistance extract name=“n++ sheet rho” sheet.res material=“Silicon” mat.occno=1 x.val=0.05 region.occno=1 extract the sheet rho under the spacer, of the LDD region extract name=“ldd sheet rho” sheet.res material=“Silicon” mat.occno=1 x.val=0.3 region.occno=1 extract the surface conc under the channel. extract name=“chan surf conc” surf.conc impurity=“Net Doping” material=“Silicon” mat.occno=1 x.val=0.45 extract a curve of conductance versus bias. extract start material=“Polysilicon” mat.occno=1 bias=0.0 bias.step=0.2 bias.stop=2 x.val=0.45 extract done name=“sheet cond v bias” curve(bias,1dn.conduct material=“Silicon” mat.occno=1 region.occno=1) outfile=“extract.dat” extract the long chan Vt extract name=“n1dvt” 1dvt ntype vb=0.0 qss=1e10 x.val=0.18 structure mirror right electrode name=gate x=0.5 y=0.1 electrode name=source x=0.1 electrode name=drain x=1.1 electrode name=substrate backside structure outfile=mos1ex01_0.str plot the structure tonyplot mos1ex01_0.str -set mos1ex01_0.set ############# Vt Test : Returns Vt, Beta and Theta ################ go atlas set material models models cvt srh print contact name=gate n.poly interface qf=3e10 method newton solve init Bias the drain solve vdrain=0.1 Ramp the gate log outf=mos1ex01_1.log master solve vgate=0 vstep=0.25 vfinal=3.0 name=gate save outf=mos1ex01_1.str plot results tonyplot mos1ex01_1.log -set mos1ex01_1_log.set solve init solve vgate=0 save outf=solve_tmp1.str master solve vgate=0.25 save outf=solve_tmp2.str master solve vgate=0.5 save outf=solve_tmp3.str master solve vgate=1 save outf=solve_tmp4.str master solve vgate=2 save outf=solve_tmp5.str master solve vgate=3 save outf=solve_tmp6.str master load infile=solve_tmp1.str master log outf=mos_ids_1.log solve vdrain=0 vstep=0.25 vfinal=10 name=drain load infile=solve_tmp2.str master log outf=mos_ids_2.log solve vdrain=0 vstep=0.25 vfinal=10 name=drain load infile=solve_tmp3.str master log outf=mos_ids_3.log solve vdrain=0 vstep=0.25 vfinal=10 name=drain load infile=solve_tmp4.str master log outf=mos_ids_4.log solve vdrain=0 vstep=0.25 vfinal=10 name=drain load infile=solve_tmp5.str master log outf=mos_ids_5.log solve vdrain=0 vstep=0.25 vfinal=10 name=drain load infile=solve_tmp6.str master log outf=mos_ids_6.log solve vdrain=0 vstep=0.25 vfinal=10 name=drain tonyplot -overlay mos_ids_1.log mos_ids_2.log mos_ids_3.log mos_ids_4.log mos_ids_5.log mos_ids_6.log extract device parameters extract name=“nvt” (xintercept(maxslope(curve(abs(v.“gate”),abs(i.“drain”)))) - abs(ave(v.“drain”))/2.0) extract name=“nbeta” slope(maxslope(curve(abs(v.“gate”),abs(i.“drain”)))) * (1.0/abs(ave(v.“drain”))) extract name=“ntheta” ((max(abs(v.“drain”)) * " n b e t a " ) / m a x ( a b s ( i . " d r a i n " ) ) ) − ( 1.0 / ( m a x ( a b s ( v . " g a t e " ) ) − ( "nbeta")/max(abs(i."drain"))) −(1.0/(max(abs(v."gate"))−(“nvt”))) Quit 按照下面要求修改上面代码 运用atlas工具设计一个NMOS管, 在电流密度集中处网格加密;定义NMOSFET的模型,电极,计算方法; 转移特性:Vdrain:1V,3V; 输入输出特性:Vgate:0,0.25, 0.5, 1, 2, 3V, 电压0-10V. 通过tonyplot查看PN结的杂质浓度,电场分布,电子电流密度,空穴电流密度分布。 自己设计结构和模型 要求:沟道长度:0.18μm,Vth在0.5-0.7V之间 按照要求写出silvacoTCAD代码
06-22
# (c) Silvaco Inc., 2018 go athena # line x loc=0.0 spac=0.1 line x loc=0.2 spac=0.006 line x loc=0.4 spac=0.006 line x loc=0.6 spac=0.01 # line y loc=0.0 spac=0.002 line y loc=0.2 spac=0.005 line y loc=0.5 spac=0.05 line y loc=0.8 spac=0.15 # init orientation=100 c.phos=1e14 space.mul=2 #pwell formation including masking off of the nwell # diffus time=30 temp=1000 dryo2 press=1.00 hcl=3 # etch oxide thick=0.02 # #P-well Implant # implant boron dose=1e13 energy=100 pears # diffus temp=1000 time=200 weto2 hcl=3 # #N-well implant not shown - # # welldrive starts here diffus time=50 temp=1000 t.rate=4.000 dryo2 press=0.10 hcl=3 # diffus time=220 temp=1200 nitro press=1 # diffus time=90 temp=1200 t.rate=-4.444 nitro press=1 # etch oxide all # #sacrificial "cleaning" oxide diffus time=20 temp=1000 dryo2 press=1 hcl=3 # etch oxide all # #gate oxide grown here:- diffus time=11 temp=925 dryo2 press=1.00 hcl=3 # # Extract a design parameter extract name="gateox" thickness oxide mat.occno=1 x.val=0.06 # #vt adjust implant implant boron dose=9.5e11 energy=10 pearson # depo poly thick=0.2 divi=10 # #from now on the situation is 2-D # etch poly left p1.x=0.35 # method fermi compress diffuse time=3 temp=900 weto2 press=1.0 # implant phosphor dose=3.0e13 energy=20 pearson # depo oxide thick=0.120 divisions=8 # etch oxide dry thick=0.120 # implant arsenic dose=5.0e15 energy=50 pearson # method fermi compress diffuse time=1 temp=900 nitro press=1.0 # # pattern s/d contact metal etch oxide left p1.x=0.2 deposit alumin thick=0.03 divi=2 etch alumin right p1.x=0.18 # Extract design parameters # extract final S/D Xj extract name="nxj" xj silicon mat.occno=1 x.val=0.1 junc.occno=1 # extract the N++ regions sheet resistance extract name="n++ sheet rho" sheet.res material="Silicon" mat.occno=1 x.val=0.05 region.occno=1 # extract the sheet rho under the spacer, of the LDD region extract name="ldd sheet rho" sheet.res material="Silicon" \ mat.occno=1 x.val=0.3 region.occno=1 # extract the surface conc under the channel. extract name="chan surf conc" surf.conc impurity="Net Doping" \ material="Silicon" mat.occno=1 x.val=0.45 # extract a curve of conductance versus bias. extract start material="Polysilicon" mat.occno=1 \ bias=0.0 bias.step=0.2 bias.stop=2 x.val=0.45 extract done name="sheet cond v bias" \ curve(bias,1dn.conduct material="Silicon" mat.occno=1 region.occno=1)\ outfile="extract.dat" # extract the long chan Vt extract name="n1dvt" 1dvt ntype vb=0.0 qss=1e10 x.val=0.18 structure mirror right electrode name=gate x=0.5 y=0.1 electrode name=source x=0.1 electrode name=drain x=1.1 electrode name=substrate backside structure outfile=mos1ex01_0.str # plot the structure tonyplot mos1ex01_0.str -set mos1ex01_0.set ############# Vt Test : Returns Vt, Beta and Theta ################ go atlas # set material models models cvt srh print contact name=gate n.poly interface qf=3e10 method newton solve init # Bias the drain solve vdrain=0.1 # Ramp the gate log outf=mos1ex01_1.log master solve vgate=0 vstep=0.25 vfinal=3.0 name=gate save outf=mos1ex01_1.str # plot results tonyplot mos1ex01_1.log -set mos1ex01_1_log.set solve init solve vgate=0 save outf=solve_tmp1.str master solve vgate=0.25 save outf=solve_tmp2.str master solve vgate=0.5 save outf=solve_tmp3.str master solve vgate=1 save outf=solve_tmp4.str master solve vgate=2 save outf=solve_tmp5.str master solve vgate=3 save outf=solve_tmp6.str master load infile=solve_tmp1.str master log outf=mos_ids_1.log solve vdrain=0 vstep=0.25 vfinal=10 name=drain load infile=solve_tmp2.str master log outf=mos_ids_2.log solve vdrain=0 vstep=0.25 vfinal=10 name=drain load infile=solve_tmp3.str master log outf=mos_ids_3.log solve vdrain=0 vstep=0.25 vfinal=10 name=drain load infile=solve_tmp4.str master log outf=mos_ids_4.log solve vdrain=0 vstep=0.25 vfinal=10 name=drain load infile=solve_tmp5.str master log outf=mos_ids_5.log solve vdrain=0 vstep=0.25 vfinal=10 name=drain load infile=solve_tmp6.str master log outf=mos_ids_6.log solve vdrain=0 vstep=0.25 vfinal=10 name=drain tonyplot -overlay mos_ids_1.log mos_ids_2.log mos_ids_3.log mos_ids_4.log mos_ids_5.log mos_ids_6.log # extract device parameters extract name="nvt" (xintercept(maxslope(curve(abs(v."gate"),abs(i."drain")))) \ - abs(ave(v."drain"))/2.0) extract name="nbeta" slope(maxslope(curve(abs(v."gate"),abs(i."drain")))) \ * (1.0/abs(ave(v."drain"))) extract name="ntheta" ((max(abs(v."drain")) * $"nbeta")/max(abs(i."drain"))) \ - (1.0 / (max(abs(v."gate")) - ($"nvt"))) Quit 按照下面要求修改上面代码 运用atlas工具设计一个NMOS管, 在电流密度集中处网格加密;定义NMOSFET的模型,电极,计算方法; 转移特性:Vdrain:1V,3V; 输入输出特性:Vgate:0,0.25, 0.5, 1, 2, 3V, 电压0-10V. 通过tonyplot查看PN结的杂质浓度,电场分布,电子电流密度,空穴电流密度分布。 自己设计结构和模型 要求:沟道长度:0.18μm,Vth在0.5-0.7V之间 按照要求写出silvacoTCAD代码
06-22
# (c) Silvaco Inc., 2019 go athena # line x loc=0.0 spac=0.1 line x loc=0.2 spac=0.006 line x loc=0.4 spac=0.006 line x loc=0.6 spac=0.01 # line y loc=0.0 spac=0.002 line y loc=0.2 spac=0.005 line y loc=0.5 spac=0.05 line y loc=0.8 spac=0.15 # init orientation=100 c.phos=1e14 space.mul=2 #pwell formation including masking off of the nwell # diffus time=30 temp=1000 dryo2 press=1.00 hcl=3 # etch oxide thick=0.02 # #P-well Implant # implant boron dose=8e12 energy=100 pears # diffus temp=950 time=100 weto2 hcl=3 # #N-well implant not shown - # # welldrive starts here diffus time=50 temp=1000 t.rate=4.000 dryo2 press=0.10 hcl=3 # diffus time=220 temp=1200 nitro press=1 # diffus time=90 temp=1200 t.rate=-4.444 nitro press=1 # etch oxide all # #sacrificial "cleaning" oxide diffus time=20 temp=1000 dryo2 press=1 hcl=3 # etch oxide all # #gate oxide grown here:- diffus time=11 temp=925 dryo2 press=1.00 hcl=3 # # Extract a design parameter extract name="gateox" thickness oxide mat.occno=1 x.val=0.05 # #vt adjust implant implant boron dose=9.5e11 energy=10 pearson # depo poly thick=0.2 divi=10 # #from now on the situation is 2-D # etch poly left p1.x=0.35 # method fermi compress diffuse time=3 temp=900 weto2 press=1.0 # implant phosphor dose=3.0e13 energy=20 pearson # depo oxide thick=0.120 divisions=8 # etch oxide dry thick=0.120 # implant arsenic dose=5.0e15 energy=50 pearson # method fermi compress diffuse time=1 temp=900 nitro press=1.0 # # pattern s/d contact metal etch oxide left p1.x=0.2 deposit alumin thick=0.03 divi=2 etch alumin right p1.x=0.18 # Extract design parameters # extract final S/D Xj extract name="nxj" xj silicon mat.occno=1 x.val=0.1 junc.occno=1 # extract the N++ regions sheet resistance extract name="n++ sheet rho" sheet.res material="Silicon" mat.occno=1 x.val=0.05 region.occno=1 # extract the sheet rho under the spacer, of the LDD region extract name="ldd sheet rho" sheet.res material="Silicon" \ mat.occno=1 x.val=0.3 region.occno=1 # extract the surface conc under the channel. extract name="chan surf conc" surf.conc impurity="Net Doping" \ material="Silicon" mat.occno=1 x.val=0.45 # extract a curve of conductance versus bias. extract start material="Polysilicon" mat.occno=1 \ bias=0.0 bias.step=0.2 bias.stop=2 x.val=0.45 extract done name="sheet cond v bias" \ curve(bias,1dn.conduct material="Silicon" mat.occno=1 region.occno=1)\ outfile="extract.dat" # extract the long chan Vt extract name="n1dvt" 1dvt ntype vb=0.0 qss=1e10 x.val=0.49 structure mirror right electrode name=gate x=0.5 y=0.1 electrode name=source x=0.1 electrode name=drain x=1.1 electrode name=substrate backside structure outfile=mos1ex01_0.str # plot the structure tonyplot mos1ex01_0.str -set mos1ex01_0.set ############# Vt Test : Returns Vt, Beta and Theta ################ go atlas # set material models models cvt srh print contact name=gate n.poly interface qf=3e10 method newton solve init # Bias the drain solve vdrain=0.1 # Ramp the gate log outf=mos1ex01_1.log master solve vgate=0 vstep=0.25 vfinal=3.0 name=gate save outf=mos1ex01_1.str # plot results tonyplot mos1ex01_1.log -set mos1ex01_1_log.set # extract device parameters extract name="nvt" (xintercept(maxslope(curve(abs(v."gate"),abs(i."drain")))) \ - abs(ave(v."drain"))/2.0) extract name="nbeta" slope(maxslope(curve(abs(v."gate"),abs(i."drain")))) \ * (1.0/abs(ave(v."drain"))) extract name="ntheta" ((max(abs(v."drain")) * $"nbeta")/max(abs(i."drain"))) \ - (1.0 / (max(abs(v."gate")) - ($"nvt"))) quit修改上述代码,将其修改成实现目标NMOS参数(P型衬底、<100>晶向、LDD结构、1μm沟道长度、阈值电压0.6±0.06V),并提取所需参数和曲线。
06-23
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值