Angular项目开发与构建指南:VT_HTBH_Admin手册

需积分: 9 0 下载量 183 浏览量 更新于2024-12-19 收藏 3.96MB ZIP 举报
资源摘要信息:"VT_HTBH_Admin是一个使用Angular框架开发的项目,其版本号为11.2.6。该项目主要面向开发服务器的操作和管理,其工作方式是基于Angular CLI(命令行接口)进行各种开发活动。下面,我将详细介绍该项目涉及的关键知识点,包括开发服务器的操作、代码脚手架的使用、项目构建、单元测试和端到端测试的执行以及Angular CLI的使用方法。 1. 开发服务器操作 开发服务器是开发过程中实时查看更改效果和调试代码的重要工具。在VT_HTBH_Admin项目中,开发服务器的操作是通过Angular CLI的ng serve命令来实现的。开发者在命令行中输入ng serve命令后,该服务器会自动启动,并默认在本地的4200端口上运行,开发者可以通过访问http://localhost:4200/在浏览器中查看项目效果。更关键的是,当开发者的源代码文件发生变化时,Angular CLI将自动重新构建和加载应用,这极大地提升了开发效率。 2. 代码脚手架 Angular CLI提供了一个强大的代码生成工具,即ng generate,简称为ng g。它允许开发者快速生成项目中所需的各类组件,比如Angular组件(component)、指令(directive)、管道(pipe)、服务(service)、类(class)、守卫(guard)、接口(interface)、枚举(enum)以及模块(module)。例如,ng generate component component-name命令将生成一个带有component-name命名的新组件。这种方式不仅提高了开发效率,还有助于保持代码结构的统一性和项目的可维护性。 3. 项目构建 项目构建是指将源代码文件转换为生产环境中可以使用的文件的过程。在VT_HTBH_Admin项目中,构建操作是通过运行ng build命令来完成的。构建过程结束后,所有的构建工件将存储在项目目录下的dist/文件夹中。如果需要构建生产版本,可以通过添加--prod标志来执行ng build --prod命令,这样可以启用Angular的AOT(Ahead-of-Time)编译和其他优化措施,以生成更高性能的生产构建。 4. 单元测试 单元测试是指针对程序最小单元(通常是函数或方法)进行的测试,目的是确保每个单元按照预期工作。在VT_HTBH_Admin项目中,单元测试的执行是通过运行ng test命令完成的。Angular CLI使用Karma测试运行器和Jasmine测试框架来执行测试,并提供详细的测试结果反馈,帮助开发者快速定位和修复代码中的问题。 5. 端到端测试 端到端测试(E2E测试)是模拟用户与应用程序的实际交互来验证应用程序的多个部分协同工作的测试。在VT_HTBH_Admin项目中,端到端测试的执行是通过运行ng e2e命令来完成的。Angular CLI使用Protractor框架来执行端到端测试,它能够模拟真实用户的交互行为,并验证不同组件之间的交互是否符合预期。 6. Angular CLI的进一步帮助 Angular CLI是Angular项目的命令行工具,它提供了很多快捷命令来简化开发流程。如果需要获得更多关于Angular CLI的帮助,可以使用ng help命令查看所有可用的命令及其描述。此外,用户也可以访问Angular CLI的官方文档页面获取更详细的帮助信息和使用指南。 7. TypeScript 该项目的开发语言是TypeScript,这是一种由微软开发的开源编程语言。TypeScript是JavaScript的一个超集,它添加了可选的静态类型和基于类的面向对象编程。由于TypeScript最终会被编译成纯JavaScript,因此它允许开发者在保持JavaScript的动态性和灵活性的同时,引入静态类型检查来减少运行时错误。" 总结以上信息,VT_HTBH_Admin项目是一个基于Angular框架和TypeScript开发的项目,它涵盖了从开发环境搭建到代码脚手架使用、项目构建、单元测试和端到端测试等整个开发流程的知识点。通过这些知识点的学习和应用,开发者可以更加高效地进行项目的开发、测试和部署。

select * from (select t1.[id] as t1_id,t1.[requestId] as t1_requestId,t1.[htqsrq] as t1_htqsrq,t1.[htjzrq] as t1_htjzrq,t1.[htbh] as t1_htbh,t1.[gf] as t1_gf,t1.[xf] as t1_xf,t1.[rq] as t1_rq,t1.[fkfs] as t1_fkfs,t1.[formmodeid] as t1_formmodeid,t1.[modedatacreater] as t1_modedatacreater,t1.[modedatacreatertype] as t1_modedatacreatertype,t1.[modedatacreatedate] as t1_modedatacreatedate,t1.[modedatacreatetime] as t1_modedatacreatetime,t1.[modedatamodifier] as t1_modedatamodifier,t1.[modedatamodifydatetime] as t1_modedatamodifydatetime,t1.[form_biz_id] as t1_form_biz_id,t1.[MODEUUID] as t1_MODEUUID,t1.[htfj] as t1_htfj,t1.[zje] as t1_zje,t1.[ds] as t1_ds,t1.[zjedx] as t1_zjedx,t1.[cspp] as t1_cspp,t1.[yfk] as t1_yfk,t1.[gxid] as t1_gxid,t1.[bz] as t1_bz,t1.[gfqymc] as t1_gfqymc,t1.[gfjc] as t1_gfjc,t1.[bh] as t1_bh,t1.[jylx] as t1_jylx,t1.[cght] as t1_cght,t1.[yf] as t1_yf,t1.[yfk1] as t1_yfk1,t1.[yf11] as t1_yf11,t1.[nf] as t1_nf,t1.[rksj] as t1_rksj,t1.[cclx] as t1_cclx,t1.[cgbt] as t1_cgbt,t1.[yfk2] as t1_yfk2,t1.[sywf] as t1_sywf,t1.[yfbl] as t1_yfbl,t1.[fhbl] as t1_fhbl,t1.[yfh] as t1_yfh,t1.[sykf] as t1_sykf,t1.[hzsdlqys] as t1_hzsdlqys,t1.[sys_workflowid] as t1_sys_workflowid,t1.[cgqzyz] as t1_cgqzyz,t1.[htwjpdf] as t1_htwjpdf,t1.[cghtlc] as t1_cghtlc,t1.[htzt] as t1_htzt,t1.[qzfs] as t1_qzfs,t1.[htwjtp] as t1_htwjtp,t1.[cgqzlc] as t1_cgqzlc,t1.[sjfk] as t1_sjfk,t1.[ydkds] as t1_ydkds,t1.[chpt] as t1_chpt,t1.[lxdhchr] as t1_lxdhchr,t1.[gxsjkx] as t1_gxsjkx,t1.[hkzt] as t1_hkzt,t1.[lcfkd] as t1_lcfkd,t1.[fkzlcid] as t1_fkzlcid,t1.[mode_top_4] as t1_mode_top_4,t1.[cgdj] as t1_cgdj,t1.[mode_top_22] as t1_mode_top_22,t2.[id] as t2_id,t2.[mainid] as t2_mainid,t2.[sld] as t2_sld,t2.[ppcj] as t2_ppcj,t2.[hsdj] as t2_hsdj,t2.[bz] as t2_bz,t2.[je] as t2_je,t2.[xhggyt] as t2_xhggyt,t2.[mxgxid] as t2_mxgxid,t2.[dqkckc] as t2_dqkckc,t2.[rkhkc] as t2_rkhkc,t2.[yf] as t2_yf,t2.[yldjbhyf] as t2_yldjbhyf,SELECT year(rksj) as 年 FROM uf_gfht as cus_年年 from uf_gfht t1 INNER join uf_gfht_dt1 t2 on t1.id = t2.mainid) tmp1错在哪里

2023-05-14 上传

SELECT t1.id, t1.[kh] AS '客户', t1.[lrsj] AS '录入时间', t1.[htbh] AS '合同编号', t1.[rq] AS '签订日期', t1.[htqsrq] AS '起始日期', t1.[htjzrq] AS '截止日期', t1.[zjey] AS '总金额', t1.[hjzld] AS '总吨数', t1.[lrsj] AS '创建时间', t1.[chpt] AS '撮合平台', CAST ( t1.[htwj] AS VARCHAR ( MAX ) ) AS '合同文件', STUFF( ( SELECT ',' + CONVERT ( VARCHAR, CASE WHEN ISNUMERIC( REPLACE( t2.ppcs, ',', '' ) ) = 1 THEN CAST ( REPLACE( t2.ppcs, ',', '' ) AS FLOAT ) END ) FROM uf_xsht_dt1 t2 WHERE t1.id = t2.mainid FOR XML PATH ( '' ) ), 1, 1, '' ) AS '品牌', STUFF( ( SELECT ' ' + CONVERT ( VARCHAR, CASE WHEN ISNUMERIC( REPLACE( t2.hsdjyd, ' ', '' ) ) = 1 THEN CAST ( REPLACE( t2.hsdjyd, ' ', '' ) AS FLOAT ) END ) FROM uf_xsht_dt1 t2 WHERE t1.id = t2.mainid FOR XML PATH ( '' ) ), 1, 1, '' ) AS '销售单价', (SELECT SUM(sjfk) FROM uf_xshksj2 WHERE cght = t1.id) AS '实际已收', (SELECT SUM(hkje) FROM uf_xshksj2 WHERE cght = t1.id) AS '已收货款', (SELECT SUM(sjfk) FROM uf_xshksj2 WHERE kxlx = 0 AND cght = t1.id) AS '订金', CASE WHEN ((SELECT SUM(ISNULL(hkje, 0)) FROM uf_xshksj2 WHERE cght = t1.id) + (SELECT SUM(ISNULL(sjfk, 0)) FROM uf_xshksj2 WHERE kxlx = 0 AND cght = t1.id)) < t1.[zjey] THEN (SELECT SUM(ISNULL(hkje, 0)) FROM uf_xshksj2 WHERE cght = t1.id) / t1.[zjey] ELSE ((SELECT SUM(ISNULL(hkje, 0)) FROM uf_xshksj2 WHERE cght = t1.id) + (SELECT SUM(ISNULL(sjfk, 0)) FROM uf_xshksj2 WHERE kxlx = 0 AND cght = t1.id)) / t1.[zjey] END AS '已收比例' FROM uf_xsht t1 INNER JOIN uf_xsht_dt1 t2 ON t1.id = t2.mainid LEFT JOIN uf_xshksj2 t3 ON t1.id = t3.cght GROUP BY t1.id, t1.[kh], t1.[lrsj], t1.[htbh], t1.[rq], t1.[htqsrq], t1.[htjzrq], t1.[zjey], t1.[hjzld], t1.[chpt], CAST ( t1.[htwj] AS VARCHAR ( MAX ) );为什么只有第一个有数据

2023-07-14 上传

SELECT t1.id, t1.[kh] AS '客户', t1.[lrsj] AS '录入时间', t1.[htbh] AS '合同编号', t1.[rq] AS '签订日期', t1.[htqsrq] AS '起始日期', t1.[htjzrq] AS '截止日期', t1.[zjey] AS '总金额', t1.[hjzld] AS '总吨数', t1.[lrsj] AS '创建时间', t1.[chpt] AS '撮合平台', CAST ( t1.[htwj] AS VARCHAR ( MAX ) ) AS '合同文件', STUFF( ( SELECT ',' + CONVERT ( VARCHAR, CASE WHEN ISNUMERIC( REPLACE( t2.ppcs, ',', '' ) ) = 1 THEN CAST ( REPLACE( t2.ppcs, ',', '' ) AS FLOAT ) END ) FROM uf_xsht_dt1 t2 WHERE t1.id = t2.mainid FOR XML PATH ( '' ) ), 1, 1, '' ) AS '品牌', STUFF( ( SELECT ' ' + CONVERT ( VARCHAR, CASE WHEN ISNUMERIC( REPLACE( t2.hsdjyd, ' ', '' ) ) = 1 THEN CAST ( REPLACE( t2.hsdjyd, ' ', '' ) AS FLOAT ) END ) FROM uf_xsht_dt1 t2 WHERE t1.id = t2.mainid FOR XML PATH ( '' ) ), 1, 1, '' ) AS '销售单价', (SELECT SUM ( sjfk ) from uf_xshksj2 WHERE cght=t1.id ) AS '实际已收', (SELECT SUM ( hkje ) from uf_xshksj2 WHERE cght=t1.id ) AS '已收货款', ( SELECT SUM( sjfk ) FROM uf_xshksj2 WHERE kxlx = 0 AND cght = t1.id ) AS '订金', CASE WHEN ((SELECT SUM (ISNULL( hkje,0) ) from uf_xshksj2 WHERE cght=t1.id ) + (SELECT SUM(ISNULL(sjfk, 0)) FROM uf_xshksj2 WHERE kxlx = 0 AND cght = t1.id)) < t1.[zjey] THEN ((SELECT SUM ( ISNULL( hkje,0)) from uf_xshksj2 WHERE cght=t1.id ) / t1.[zjey]) ELSE ((SELECT SUM ( ISNULL( hkje,0) ) from uf_xshksj2 WHERE cght=t1.id ) + (SELECT SUM(ISNULL(sjfk, 0)) FROM uf_xshksj2 WHERE kxlx = 0 AND cght = t1.id)) / t1.[zjey] END AS '已收比例' FROM uf_xsht t1 INNER JOIN uf_xsht_dt1 t2 ON t1.id = t2.mainid LEFT JOIN uf_xshksj2 t3 ON t1.id = t3.cght GROUP BY t1.id, t1.[kh], t1.[lrsj], t1.[htbh], t1.[rq], t1.[htqsrq], t1.[htjzrq], t1.[zjey], t1.[hjzld], t1.[chpt], CAST ( t1.[htwj] AS VARCHAR ( MAX ) )中为什么已付比例除了第一个有值 ,其他却显示空值

2023-07-13 上传