chenc 4 年之前
父节点
当前提交
0ed4cf0e29

+ 14 - 41
package-lock.json

@@ -1719,7 +1719,6 @@
       "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz",
       "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==",
       "dev": true,
-      "optional": true,
       "requires": {
         "delegates": "^1.0.0",
         "readable-stream": "^2.0.6"
@@ -3215,8 +3214,7 @@
       "version": "1.1.0",
       "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
       "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",
-      "dev": true,
-      "optional": true
+      "dev": true
     },
     "constants-browserify": {
       "version": "1.0.0",
@@ -3851,8 +3849,7 @@
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
       "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=",
-      "dev": true,
-      "optional": true
+      "dev": true
     },
     "depd": {
       "version": "1.1.2",
@@ -5202,8 +5199,7 @@
         "ansi-regex": {
           "version": "2.1.1",
           "bundled": true,
-          "dev": true,
-          "optional": true
+          "dev": true
         },
         "aproba": {
           "version": "1.2.0",
@@ -5224,14 +5220,12 @@
         "balanced-match": {
           "version": "1.0.0",
           "bundled": true,
-          "dev": true,
-          "optional": true
+          "dev": true
         },
         "brace-expansion": {
           "version": "1.1.11",
           "bundled": true,
           "dev": true,
-          "optional": true,
           "requires": {
             "balanced-match": "^1.0.0",
             "concat-map": "0.0.1"
@@ -5246,20 +5240,17 @@
         "code-point-at": {
           "version": "1.1.0",
           "bundled": true,
-          "dev": true,
-          "optional": true
+          "dev": true
         },
         "concat-map": {
           "version": "0.0.1",
           "bundled": true,
-          "dev": true,
-          "optional": true
+          "dev": true
         },
         "console-control-strings": {
           "version": "1.1.0",
           "bundled": true,
-          "dev": true,
-          "optional": true
+          "dev": true
         },
         "core-util-is": {
           "version": "1.0.2",
@@ -5376,8 +5367,7 @@
         "inherits": {
           "version": "2.0.3",
           "bundled": true,
-          "dev": true,
-          "optional": true
+          "dev": true
         },
         "ini": {
           "version": "1.3.5",
@@ -5389,7 +5379,6 @@
           "version": "1.0.0",
           "bundled": true,
           "dev": true,
-          "optional": true,
           "requires": {
             "number-is-nan": "^1.0.0"
           }
@@ -5404,7 +5393,6 @@
           "version": "3.0.4",
           "bundled": true,
           "dev": true,
-          "optional": true,
           "requires": {
             "brace-expansion": "^1.1.7"
           }
@@ -5412,14 +5400,12 @@
         "minimist": {
           "version": "0.0.8",
           "bundled": true,
-          "dev": true,
-          "optional": true
+          "dev": true
         },
         "minipass": {
           "version": "2.3.5",
           "bundled": true,
           "dev": true,
-          "optional": true,
           "requires": {
             "safe-buffer": "^5.1.2",
             "yallist": "^3.0.0"
@@ -5438,7 +5424,6 @@
           "version": "0.5.1",
           "bundled": true,
           "dev": true,
-          "optional": true,
           "requires": {
             "minimist": "0.0.8"
           }
@@ -5519,8 +5504,7 @@
         "number-is-nan": {
           "version": "1.0.1",
           "bundled": true,
-          "dev": true,
-          "optional": true
+          "dev": true
         },
         "object-assign": {
           "version": "4.1.1",
@@ -5532,7 +5516,6 @@
           "version": "1.4.0",
           "bundled": true,
           "dev": true,
-          "optional": true,
           "requires": {
             "wrappy": "1"
           }
@@ -5618,8 +5601,7 @@
         "safe-buffer": {
           "version": "5.1.2",
           "bundled": true,
-          "dev": true,
-          "optional": true
+          "dev": true
         },
         "safer-buffer": {
           "version": "2.1.2",
@@ -5655,7 +5637,6 @@
           "version": "1.0.2",
           "bundled": true,
           "dev": true,
-          "optional": true,
           "requires": {
             "code-point-at": "^1.0.0",
             "is-fullwidth-code-point": "^1.0.0",
@@ -5675,7 +5656,6 @@
           "version": "3.0.1",
           "bundled": true,
           "dev": true,
-          "optional": true,
           "requires": {
             "ansi-regex": "^2.0.0"
           }
@@ -5719,14 +5699,12 @@
         "wrappy": {
           "version": "1.0.2",
           "bundled": true,
-          "dev": true,
-          "optional": true
+          "dev": true
         },
         "yallist": {
           "version": "3.0.3",
           "bundled": true,
-          "dev": true,
-          "optional": true
+          "dev": true
         }
       }
     },
@@ -5735,7 +5713,6 @@
       "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz",
       "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==",
       "dev": true,
-      "optional": true,
       "requires": {
         "graceful-fs": "^4.1.2",
         "inherits": "~2.0.0",
@@ -5764,7 +5741,6 @@
       "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
       "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
       "dev": true,
-      "optional": true,
       "requires": {
         "aproba": "^1.0.3",
         "console-control-strings": "^1.0.0",
@@ -6194,8 +6170,7 @@
       "version": "2.0.1",
       "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
       "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=",
-      "dev": true,
-      "optional": true
+      "dev": true
     },
     "has-value": {
       "version": "1.0.0",
@@ -9463,7 +9438,6 @@
       "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
       "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
       "dev": true,
-      "optional": true,
       "requires": {
         "are-we-there-yet": "~1.1.2",
         "console-control-strings": "~1.1.0",
@@ -15783,7 +15757,6 @@
       "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
       "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
       "dev": true,
-      "optional": true,
       "requires": {
         "string-width": "^1.0.2 || 2"
       }

+ 60 - 0
src/app/entity/fbs/fbs-working-statistics.ts

@@ -0,0 +1,60 @@
+import { Page } from '../page';
+
+export class FbsWorkingStatistics extends Page{
+  /**工时统计表主键*/
+	id?:string;
+	/**派工单主键*/
+	pkWorkshopDispatchList?:string;
+	/**人员编码*/
+	personnelCode?:string;
+	/**人员名称*/
+	personnelName?:string;
+	/**物料编码*/
+	materielCode?:string;
+	/**物料名称*/
+	materielName?:string;
+	/**物料id*/
+	materielId?:string;
+	/**工序行号*/
+	procedureNo?:string;
+	/**开工日期*/
+	startDate?:string;
+	/**完工日期*/
+	endDate?:string;
+	/**首次得到时间*/
+	firstTime?:string;
+	/**本流程使用工时*/
+	workingHours?:number;
+	/**最后调用时间*/
+	finalTime?:string;
+	/**完结信息(开工、下岗/暂停、实时报工)*/
+	finalInfo?:string;
+	/**完结状态(1-开工,2-下岗/暂停,3-实时报工)*/
+	finalState?:string;
+	/**生产线名称*/
+	productionLineName?:string;
+	/**删除标记0正常1删除*/
+	delFlag?:string;
+	/**订单号*/
+	orderNumber?:string;
+	/**订单id*/
+	orderId?:string;
+	/**合格数量*/
+	qualifiedNumber?:string;
+	/**报废数量 */
+	scrapNumber?:string;
+	/**报废原因*/
+	scrapInfo?:string;
+	/**拒绝数量*/
+	refuseNumber?:string;
+	/**拒绝原因*/
+	refuseInfo?:string;
+	/**0保存,1提交 */
+	state?:string;
+	//物料行号
+  rowNumber?:string;
+  
+  start?:string;
+  end?:string;
+
+}

+ 5 - 5
src/app/routes/dashboard/analysis/analysis.component.html

@@ -179,9 +179,9 @@
         <tr style="background-color:rgb(223, 223, 219)" *ngFor="let data of columnTable.data;let i = index">
           <ng-container *ngIf="data.projectName==='统计'">
           <td nzLeft="0px" style="background-color:rgb(223, 223, 219)"></td>
-          <td nzLeft="58px" style="background-color:rgb(223, 223, 219);font-weight:bolder" nzAlign="center">统计</td>
-          <td nzLeft="157px" style="background-color:rgb(223, 223, 219)"></td>
-          <td nzLeft="265px"></td>
+          <td nzLeft="58px" style="background-color:rgb(223, 223, 219);font-weight:bolder" nzAlign="center">剩余工时</td>
+          <td nzLeft="157px" style="background-color:rgb(223, 223, 219)" nzAlign="center">{{data.standardWorkingHoursTotal-data.manHoursCompletedTotal}}</td>
+          <td nzLeft="265px" style="background-color:rgb(223, 223, 219);font-weight:bolder" nzAlign="center">统计</td>
           <td  nzLeft="383px"></td>
           <td nzLeft="580px" nzAlign="center">{{data.numberOfTasksTotal}}</td>
           <td nzLeft="659px" nzAlign="center">{{data.standardWorkingHoursTotal}}</td>
@@ -211,9 +211,9 @@
           <!-- <td nzLeft="0px" colspan="5" rowSpan="8"></td> -->
           <td rowSpan="2" nzLeft="0px"></td>
           <td rowSpan="2" nzLeft="58px" nzAlign="center" style="font-weight:bolder">总达成率</td>
-          <td rowSpan="2" nzLeft="157px">{{achievementRateTotal}}%</td>
+          <td rowSpan="2" nzLeft="157px" nzAlign="center">{{achievementRateTotal}}%</td>
           <td rowSpan="2" nzLeft="265px" nzAlign="center" style="font-weight:bolder">总生产效率</td>
-          <td rowSpan="2" nzLeft="383px">{{productivityTotal}}%</td>
+          <td rowSpan="2" nzLeft="383px" nzAlign="center">{{productivityTotal}}%</td>
           <!-- <td>月计划达成率</td>
           <td>1.95%</td>
           <td>月生产效率</td>

+ 13 - 0
src/app/routes/fbs-scan-code/fbs-scan-code-routing.module.ts

@@ -0,0 +1,13 @@
+import { NgModule } from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+import { FbsScanCodeListComponent } from './list/list.component';
+
+const routes: Routes = [
+
+  { path: 'list', component: FbsScanCodeListComponent }];
+
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule]
+})
+export class FbsScanCodeRoutingModule { }

+ 21 - 0
src/app/routes/fbs-scan-code/fbs-scan-code.module.ts

@@ -0,0 +1,21 @@
+import { NgModule } from '@angular/core';
+import { SharedModule } from '@shared';
+import { FbsScanCodeRoutingModule } from './fbs-scan-code-routing.module';
+import { FbsScanCodeListComponent } from './list/list.component';
+
+const COMPONENTS = [
+  FbsScanCodeListComponent];
+const COMPONENTS_NOROUNT = [];
+
+@NgModule({
+  imports: [
+    SharedModule,
+    FbsScanCodeRoutingModule
+  ],
+  declarations: [
+    ...COMPONENTS,
+    ...COMPONENTS_NOROUNT
+  ],
+  entryComponents: COMPONENTS_NOROUNT
+})
+export class FbsScanCodeModule { }

+ 97 - 0
src/app/routes/fbs-scan-code/list/list.component.html

@@ -0,0 +1,97 @@
+<page-header [action]="phActionTpl">
+  <ng-template #phActionTpl>
+    <!-- <button (click)="add()" nz-button nzType="primary">新建</button> -->
+  </ng-template>
+</page-header>
+<nz-card>
+  <form nz-form>
+    <!-- 查询条件 -->
+    <div nz-row [nzGutter]="{xs:12,sm:15,md:29,lg: 36, xl: 40}">
+
+      <!-- 派工时间 -->
+      <div nz-col nzXs="24" nzSm="4" nzLg="8">
+        <nz-form-item class="nz-form-item">
+          <nz-form-label [nzSpan]="8">时间</nz-form-label>
+          <nz-form-control [nzSpan]="16">
+            <!-- <input [(ngModel)]="fbsWorkshopDispatchList.name" name="name" nz-input
+              placeholder="请输入" /> -->
+            <nz-date-picker name="fbsWorkshopDispatchList.start" [(ngModel)]="fbsWorkingStatistics.start"
+              nzPlaceHolder="请选择">
+            </nz-date-picker>
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+      <div nz-col nzXs="24" nzSm="4" nzLg="8">
+        <nz-form-item class="nz-form-item">
+          <nz-form-label [nzSpan]="8" [nzNoColon]="true"></nz-form-label>
+          <nz-form-control [nzSpan]="16">
+            <!-- <input [(ngModel)]="fbsWorkshopDispatchList.name" name="name" nz-input
+              placeholder="请输入" /> -->
+            <nz-date-picker name="fbsWorkshopDispatchList.end" [(ngModel)]="fbsWorkingStatistics.end"
+              nzPlaceHolder="请选择">
+            </nz-date-picker>
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+      <!-- 按钮 -->
+      <div nz-col nzXs="24" nzSm="4" nzLg="8">
+        <nz-form-item class="nz-form-item">
+          <nz-form-label [nzSpan]="2" [nzNoColon]="true"></nz-form-label>
+          <nz-form-control [nzSpan]="22" style="text-align: right;">
+            <!-- 查询 -->
+            <button nz-button nzType="primary" (click)="query()">查询</button>
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+    </div>
+    <div nz-row [nzGutter]="{xs:12,sm:15,md:29,lg: 36, xl: 40}">
+      <!-- 名称 -->
+      <div nz-col nzXs="24" nzSm="4" nzLg="8">
+        <nz-form-item class="nz-form-item">
+          <nz-form-label [nzSpan]="8">姓名</nz-form-label>
+          <nz-form-control [nzSpan]="16">
+            <nz-select [(ngModel)]="fbsWorkingStatistics.personnelCode" name="personnelCode" style="width: 100%"
+              nzShowSearch nzAllowClear nzPlaceHolder="请选择">
+              <ng-container *ngFor="let proper of properList">
+                <nz-option [nzLabel]="proper.personnelName" [nzValue]="proper.personnelCode"> </nz-option>
+              </ng-container>
+            </nz-select>
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+    </div>
+  </form>
+  <!-- 数据表 -->
+  <nz-table nzSize="small" class="buttonDistance" [nzData]="dataList" [nzLoading]="isLoading"
+    [nzFrontPagination]="false" #borderedTable [nzTotal]="page.total" [nzPageIndex]="page.current"
+    (nzPageIndexChange)="pageIndexChange($event)">
+    <thead>
+      <tr>
+        <th>人员编码</th>
+        <th>人员名称</th>
+        <th>订单号</th>
+        <th>物料编码</th>
+        <th>物料名称</th>
+        <th>上岗日期</th>
+        <th>下岗时间</th>
+        <th>扫码信息</th>
+        <th nzAlign="center">工时</th>
+        <th nzAlign="center">完成数量</th>
+      </tr>
+    </thead>
+    <tbody>
+      <tr *ngFor="let item of  borderedTable.data">
+        <td>{{item.personnelCode}}</td>
+        <td>{{item.personnelName}}</td>
+        <td>{{item.orderNumber}}</td>
+        <td>{{item.materielCode}}</td>
+        <td>{{item.materielName}}</td>
+        <td>{{item.firstTime}}</td>
+        <td>{{item.finalTime}}</td>
+        <td>{{item.finalInfo}}</td>
+        <td nzAlign="center">{{item.workingHours}}</td>
+        <td nzAlign="center">{{item.qualifiedNumber}}</td>
+      </tr>
+    </tbody>
+  </nz-table>
+</nz-card>

+ 24 - 0
src/app/routes/fbs-scan-code/list/list.component.spec.ts

@@ -0,0 +1,24 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import { FbsScanCodeListComponent } from './list.component';
+
+describe('FbsScanCodeListComponent', () => {
+  let component: FbsScanCodeListComponent;
+  let fixture: ComponentFixture<FbsScanCodeListComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ FbsScanCodeListComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(FbsScanCodeListComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 90 - 0
src/app/routes/fbs-scan-code/list/list.component.ts

@@ -0,0 +1,90 @@
+import { Component, OnInit, ViewChild } from '@angular/core';
+import { _HttpClient, ModalHelper } from '@delon/theme';
+import { STColumn, STComponent } from '@delon/abc';
+import { SFSchema } from '@delon/form';
+import { FbsWorkingStatistics } from 'app/entity/fbs/fbs-working-statistics';
+import { FbsWorkingStatisticsService } from 'app/services/fbs/fbs-working-statistics.service';
+import { FbsPersonnelService } from 'app/services/fbs/fbs-personnel.service';
+import { DatePipe } from '@angular/common';
+
+@Component({
+  selector: 'app-fbs-scan-code-list',
+  templateUrl: './list.component.html',
+})
+export class FbsScanCodeListComponent implements OnInit {
+  
+
+  constructor(
+    private fbsWorkingStatisticsService:FbsWorkingStatisticsService,
+    private fbsPersonnelService:FbsPersonnelService,
+    private datePipe:DatePipe
+  ) { }
+
+  ngOnInit() {
+    this.getList();
+    this.getProperList();
+   }
+
+
+  dataList = []; //表格数据
+  isLoading = false; //表格加载
+  //分页参数
+  page = {
+    total: 0,
+    current: 0,
+    size: 0,
+  };
+  fbsWorkingStatistics: FbsWorkingStatistics = {}; //派工单对象
+
+  /**
+   * 查询按钮
+   */
+  query() {
+    this.fbsWorkingStatistics.pageNo = 1;
+    //主数据刷新
+    this.getList();
+  }
+
+  // 按页码查询
+  pageIndexChange(event) {
+    this.fbsWorkingStatistics.pageNo = event;
+    //主数据刷新
+    this.getList();
+  }
+
+  /**
+   * 主数据查询
+   */
+  getList() {
+    this.isLoading = true;
+    //时间格式化
+    this.fbsWorkingStatistics.start = this.datePipe.transform(this.fbsWorkingStatistics.start, 'yyyy-MM-dd');
+    this.fbsWorkingStatistics.end = this.datePipe.transform(this.fbsWorkingStatistics.end, 'yyyy-MM-dd');
+    this.fbsWorkingStatisticsService.list(this.fbsWorkingStatistics).then(response => {
+      if (response.success) {
+        //查询成功
+        this.dataList = response.result.records; //表格数据
+        this.page = response.result; //分页数据
+        this.isLoading = false;
+      }
+    });
+  }
+
+   /**
+   * 初始化人员下拉数据集合
+   */
+  properList = [];
+  getProperList() {
+    // this.fbsWorkshopDispatchListService.getPerAndDerp().then((response)=>{
+    //   this.properList=response.result
+    // })
+    this.fbsPersonnelService.list({ pageSize: 1000 }).then(response => {
+      this.properList = response.result.records;
+    });
+  }
+
+  view(){
+
+  }
+
+}

+ 2 - 0
src/app/routes/routes-routing.module.ts

@@ -62,6 +62,8 @@ const routes: Routes = [
       { path: 'fbs-quality-qualification-rate', loadChildren: './fbs-quality-qualification-rate/fbs-quality-qualification-rate.module#FbsQualityQualificationRateModule' },
       //质量近六个月统计
       { path: 'fbs-personnel', loadChildren: './fbs-personnel/fbs-personnel.module#FbsPersonnelModule' },
+      //扫码记录
+      { path: 'fbs-fbs-scan-code', loadChildren: './fbs-scan-code/fbs-scan-code.module#FbsScanCodeModule' }
     ],
   },
   // 全屏布局

+ 0 - 12
src/app/services/fbs/fbs-personnel.service.spec.ts

@@ -1,12 +0,0 @@
-import { TestBed } from '@angular/core/testing';
-
-import { FbsPersonnelService } from './fbs-personnel.service';
-
-describe('FbsPersonnelService', () => {
-  beforeEach(() => TestBed.configureTestingModule({}));
-
-  it('should be created', () => {
-    const service: FbsPersonnelService = TestBed.get(FbsPersonnelService);
-    expect(service).toBeTruthy();
-  });
-});

+ 18 - 0
src/app/services/fbs/fbs-working-statistics.service.ts

@@ -0,0 +1,18 @@
+import { Injectable } from '@angular/core';
+import { HttpClient } from '@angular/common/http';
+import { BaseResponse } from 'app/entity/baseResponse';
+import { Result } from 'app/entity/Result';
+import { FbsWorkingStatistics } from 'app/entity/fbs/fbs-working-statistics';
+
+@Injectable({
+  providedIn: 'root'
+})
+export class FbsWorkingStatisticsService {
+
+  constructor(private http:HttpClient) { }
+  
+  // 查询
+  async list(body:any): Promise<BaseResponse<Result<FbsWorkingStatistics[]>>> {
+    return await this.http.get<BaseResponse<Result<FbsWorkingStatistics[]>>>('/workingStatistics/fbsWorkingStatistics/list',{params:body}).toPromise();
+  }
+}