首检添加数据看板
This commit is contained in:
@@ -1,18 +1,7 @@
|
||||
using Infrastructure.Extensions;
|
||||
using JinianNet.JNTemplate;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Text.Json;
|
||||
using ZR.Admin.WebApi.Extensions;
|
||||
using ZR.Admin.WebApi.Filters;
|
||||
using ZR.Model.mes.md;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using ZR.Model.mes.pro;
|
||||
using ZR.Model.MES.pro.DTO;
|
||||
using ZR.Service.mes.pro;
|
||||
using ZR.Service.mes.pro.IService;
|
||||
using ZR.Service.MES.md;
|
||||
|
||||
|
||||
namespace ZR.Admin.WebApi.Controllers.MES.pro
|
||||
@@ -53,7 +42,7 @@ namespace ZR.Admin.WebApi.Controllers.MES.pro
|
||||
/// <param name="week"></param>
|
||||
/// <param name="date"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
|
||||
[HttpGet("GetGanttList")]
|
||||
public IActionResult GetGanttList(int year = -1, int week = -1, int date = -1)
|
||||
{
|
||||
@@ -141,7 +130,7 @@ namespace ZR.Admin.WebApi.Controllers.MES.pro
|
||||
int sum = 0;
|
||||
foreach (ProWorkorderSortDTO item in parameter)
|
||||
{
|
||||
if(!string.IsNullOrEmpty(item.id))
|
||||
if (!string.IsNullOrEmpty(item.id))
|
||||
{
|
||||
int data = proWorkorderService.SortWorkorderSchedule(item.id, item.order);
|
||||
sum += data;
|
||||
|
||||
@@ -1,21 +1,11 @@
|
||||
using Infrastructure.Extensions;
|
||||
using JinianNet.JNTemplate;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using MiniExcelLibs;
|
||||
using Model.DBModel;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using SqlSugar;
|
||||
using System.Text.Json;
|
||||
using ZR.Admin.WebApi.Extensions;
|
||||
using ZR.Admin.WebApi.Filters;
|
||||
|
||||
using ZR.Model.MES.pro;
|
||||
using ZR.Model.MES.pro.DTO;
|
||||
using ZR.Service.mes.pro;
|
||||
using ZR.Service.mes.pro.IService;
|
||||
using static System.Runtime.InteropServices.JavaScript.JSType;
|
||||
|
||||
namespace ZR.Admin.WebApi.Controllers.mes.pro
|
||||
{
|
||||
@@ -44,7 +34,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.pro
|
||||
return ToResponse(new ApiResult(200, "success", data));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[HttpGet("getWorkoderList_piliang")]
|
||||
@@ -148,7 +138,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.pro
|
||||
item.Date = date;
|
||||
}
|
||||
var final_list = list.Where(it => !it.BlankNumber.Contains("圈数"))
|
||||
.Where(it => !(it.BlankNumber == "" && it.FinishedPartNumber == "" && it.ProductDescription == "" && it.Specifications == "" && it.CylinderNumber == "" && it.Remark1 == "" && it.Remark2== "" && it.Remark3 == "" && it.Remark4== ""&&it.ClientWorkorder==""))
|
||||
.Where(it => !(it.BlankNumber == "" && it.FinishedPartNumber == "" && it.ProductDescription == "" && it.Specifications == "" && it.CylinderNumber == "" && it.Remark1 == "" && it.Remark2 == "" && it.Remark3 == "" && it.Remark4 == "" && it.ClientWorkorder == ""))
|
||||
.ToList();
|
||||
|
||||
string result = proWorkorderService.ImportExceldata(final_list);
|
||||
@@ -271,8 +261,8 @@ namespace ZR.Admin.WebApi.Controllers.mes.pro
|
||||
{
|
||||
|
||||
data = proWorkorderService.UpdateworkorderSort(id, (int)sort);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
return ToResponse(new ApiResult(200, "success", data));
|
||||
@@ -290,7 +280,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.pro
|
||||
public IActionResult UpdateSort2(string oldId, int oldSort, string newId, int newSort)
|
||||
{
|
||||
int result = 0;
|
||||
if (string.IsNullOrEmpty(oldId)&& string.IsNullOrEmpty(newId))
|
||||
if (string.IsNullOrEmpty(oldId) && string.IsNullOrEmpty(newId))
|
||||
{
|
||||
return ToResponse(new ApiResult(400, "updateSortError", "排序参数异常"));
|
||||
}
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using ZR.Admin.WebApi.Extensions;
|
||||
using ZR.Model.mes.md;
|
||||
using ZR.Model.mes.pro;
|
||||
using ZR.Service.mes.pro.IService;
|
||||
using ZR.Service.MES.md;
|
||||
|
||||
namespace ZR.Admin.WebApi.Controllers.MES.pro
|
||||
{
|
||||
@@ -30,9 +27,9 @@ namespace ZR.Admin.WebApi.Controllers.MES.pro
|
||||
/// <param name="color">颜色</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("list")]
|
||||
public IActionResult List(int pageNum, int pageSize, int year=-1, int week=-1, string partNumber = "", string color = "")
|
||||
public IActionResult List(int pageNum, int pageSize, int year = -1, int week = -1, string partNumber = "", string color = "")
|
||||
{
|
||||
(List<ProWorkplan>,int) data = proWorkplanService.GetAllData(pageNum, pageSize, year, week, partNumber, color);
|
||||
(List<ProWorkplan>, int) data = proWorkplanService.GetAllData(pageNum, pageSize, year, week, partNumber, color);
|
||||
|
||||
return ToResponse(new ApiResult(200, "success", data));
|
||||
}
|
||||
@@ -46,7 +43,7 @@ namespace ZR.Admin.WebApi.Controllers.MES.pro
|
||||
public IActionResult AddWorkPlan([FromBody] ProWorkplan proWorkplan)
|
||||
{
|
||||
int data = 0;
|
||||
if (proWorkplan!=null)
|
||||
if (proWorkplan != null)
|
||||
{
|
||||
proWorkplan.ToCreate(HttpContext);
|
||||
data = proWorkplanService.AddWorkPlan(proWorkplan);
|
||||
@@ -68,7 +65,7 @@ namespace ZR.Admin.WebApi.Controllers.MES.pro
|
||||
{
|
||||
proWorkplan.ToUpdate(HttpContext);
|
||||
data = proWorkplanService.UpdateWorkPlan(proWorkplan);
|
||||
|
||||
|
||||
}
|
||||
|
||||
return ToResponse(new ApiResult(200, "success", data));
|
||||
@@ -137,7 +134,7 @@ namespace ZR.Admin.WebApi.Controllers.MES.pro
|
||||
List<ProWorkorder> lstWorkorder = proWorkplanService.GetWorkorderListByPlanId(workPlanId);
|
||||
|
||||
// 计算所有工单的数量和,生产计划的数量:比较
|
||||
if(lstWorkplan!=null && lstWorkplan.Count==1)
|
||||
if (lstWorkplan != null && lstWorkplan.Count == 1)
|
||||
{
|
||||
int countWorkplan = int.Parse(lstWorkplan[0].ActualplanNumber.Trim());
|
||||
|
||||
@@ -152,7 +149,7 @@ namespace ZR.Admin.WebApi.Controllers.MES.pro
|
||||
countWorkorder += proWorkorder.Actualnumber.GetValueOrDefault();
|
||||
|
||||
// 计划数>0 计划数要大于等于当前工单总数
|
||||
if(countWorkplan > 0 && (countWorkplan>= countWorkorder))
|
||||
if (countWorkplan > 0 && (countWorkplan >= countWorkorder))
|
||||
{
|
||||
proWorkorder.Partnumber = lstWorkplan[0].Partnumber;
|
||||
proWorkorder.ToCreate(HttpContext);
|
||||
@@ -197,7 +194,7 @@ namespace ZR.Admin.WebApi.Controllers.MES.pro
|
||||
ProWorkorder currentWorkorder = null;
|
||||
foreach (ProWorkorder item in lstWorkorder)
|
||||
{
|
||||
if(item.Id.Equals(workorderId)) // 找到当前工单ID的对象
|
||||
if (item.Id.Equals(workorderId)) // 找到当前工单ID的对象
|
||||
{
|
||||
//if(!string.IsNullOrEmpty(item.Wrokerorder_status)) isArrange = item.Isarrange;
|
||||
isArrange = item.Wrokerorder_status.ToString();
|
||||
@@ -223,7 +220,7 @@ namespace ZR.Admin.WebApi.Controllers.MES.pro
|
||||
{
|
||||
countWorkorder += item.Actualnumber.GetValueOrDefault();
|
||||
}
|
||||
if(currentWorkorder!=null) countWorkorder -= currentWorkorder.Actualnumber.GetValueOrDefault(); // 减去当前工单的数值
|
||||
if (currentWorkorder != null) countWorkorder -= currentWorkorder.Actualnumber.GetValueOrDefault(); // 减去当前工单的数值
|
||||
|
||||
// 再加上要更新的值
|
||||
countWorkorder += proWorkorder.Actualnumber.GetValueOrDefault();
|
||||
@@ -241,7 +238,7 @@ namespace ZR.Admin.WebApi.Controllers.MES.pro
|
||||
}
|
||||
}
|
||||
else data = 3;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -277,7 +274,7 @@ namespace ZR.Admin.WebApi.Controllers.MES.pro
|
||||
}
|
||||
else data = 3;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return ToResponse(new ApiResult(200, "success", data));
|
||||
|
||||
@@ -1,21 +1,8 @@
|
||||
using Aliyun.OSS;
|
||||
using AutoMapper.Configuration.Conventions;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Hosting.Internal;
|
||||
using MimeKit;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using MiniExcelLibs;
|
||||
using MiniExcelLibs.OpenXml;
|
||||
using Model.DBModel;
|
||||
using Org.BouncyCastle.Crypto.IO;
|
||||
using System.IO;
|
||||
using ZR.Admin.WebApi.Extensions;
|
||||
using ZR.Admin.WebApi.Filters;
|
||||
using ZR.Model;
|
||||
using ZR.Model.mes.pro;
|
||||
using ZR.Model.MES.pro.DTO;
|
||||
using ZR.Model.System;
|
||||
using ZR.Model.System.Dto;
|
||||
using ZR.Service.mes.pro;
|
||||
using ZR.Service.mes.pro.IService;
|
||||
|
||||
namespace ZR.Admin.WebApi.Controllers.mes.pro
|
||||
@@ -90,13 +77,13 @@ namespace ZR.Admin.WebApi.Controllers.mes.pro
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("deleteAll")]
|
||||
public IActionResult DeleteAllItem(int? year,int? week)
|
||||
public IActionResult DeleteAllItem(int? year, int? week)
|
||||
{
|
||||
int data = 0;
|
||||
if (week!=null&&week>0)
|
||||
if (week != null && week > 0)
|
||||
{
|
||||
if (year != null && year > 0)
|
||||
data = proWorkplanService.DeleteAllWorkPlan((int)year,(int)week);
|
||||
data = proWorkplanService.DeleteAllWorkPlan((int)year, (int)week);
|
||||
}
|
||||
|
||||
return ToResponse(new ApiResult(200, "success", data));
|
||||
@@ -185,7 +172,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.pro
|
||||
targetFileStream.Write(buffer, 0, bytesRead);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//读取列表数据
|
||||
@@ -214,7 +201,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.pro
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return ToResponse(ResultCode.GLOBAL_ERROR,"内容错误,请仔细检测格式,并联系管理员"+ex.Message);
|
||||
return ToResponse(ResultCode.GLOBAL_ERROR, "内容错误,请仔细检测格式,并联系管理员" + ex.Message);
|
||||
}
|
||||
}
|
||||
return SUCCESS(null);
|
||||
@@ -257,7 +244,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.pro
|
||||
return ToResponse(new ApiResult(500, ex.Message, 0));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using ZR.Admin.WebApi.Extensions;
|
||||
using ZR.Admin.WebApi.Filters;
|
||||
using ZR.Service.mes.pro.IService;
|
||||
using ZR.Model.MES.pro.DTO;
|
||||
using ZR.Model.mes.pro;
|
||||
using ZR.Model.MES.pro.DTO;
|
||||
using ZR.Service.mes.pro.IService;
|
||||
|
||||
//创建时间:2024-05-20
|
||||
namespace ZR.Admin.WebApi.Controllers
|
||||
@@ -49,7 +49,7 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
public IActionResult GetWmPackingrecord(long Id)
|
||||
{
|
||||
var response = _WmPackingrecordService.GetInfo(Id);
|
||||
|
||||
|
||||
var info = response.Adapt<WmPackingrecord>();
|
||||
return SUCCESS(info);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user