Commit ca08ddf1 by yiyu.li
parents 05f61f16 cbf895c3
......@@ -25,7 +25,7 @@
</div>
<div class="searchBtn">
<Button type="primary" class="twoWord" icon="ios-search" @click="tosearch()">{{ $t(1001) }}</Button>
<!-- <Button type="success" class="twoWord" icon="md-add-circle" @click="add()">{{$t('1002')}}</Button> -->
<Button type="success" class="twoWord" icon="md-add-circle" @click="add()">{{$t('1002')}}</Button>
<!-- <Button type="warning" class="twoWord" icon="ios-create-outline" @click="edit()">{{$t('1003')}}</Button>
<Button type="error" class="twoWord intervalRight" icon="md-close-circle" @click="dele()">{{ $t(1004) }}</Button>
<Button type="primary" class="fourWord" icon="md-download" @click="loadexcel()">{{$t('1005')}}</Button>
......@@ -74,6 +74,69 @@
</div>
</div>
<Modal class="newModalClass" v-model="addmodal" :styles="{width:'650px'}">
<p slot="header">
<span v-show="type==1">{{$t('1002')}}</span>
<span v-show="type==2">{{$t('1003')}}</span>
</p>
<div style="">
<div class="filter">
<label>工装类型:</label>
<Cascader class="searchSelect" :data="frockTypeTree" change-on-select v-model="parentType" @on-change="changeFrockType1"></Cascader>
</div>
<div class="filter">
<label><i>*</i>管理类型:</label>
<Select v-model="mtype" clearable class="searchSelect">
<Option :value="1">单件</Option>
<Option :value="2">批次</Option>
</Select>
</div>
<div class="filter">
<label><i>*</i>工装名称:</label>
<Input type="text" class="searchInput" v-model="frockname" />
</div>
<div class="filter">
<label><i>*</i>工装料号:</label>
<Input type="text" class="searchInput" v-model="frockno" />
</div>
<div class="filter">
<label><i>*</i>工装编号:</label>
<Input type="text" class="searchInput" v-model="frockcode" />
</div>
<div class="filter">
<label><i>*</i>数量:</label>
<InputNumber type="text" class="searchInput" :formatter="value => `${parseInt(value)}`" v-model="num" />
</div>
<div class="filter">
<label><i>*</i>状态:</label>
<RadioGroup v-model="addstatus">
<Radio label="1"><span>可用</span></Radio>
<Radio label="0"><span>停用</span></Radio>
</RadioGroup>
</div>
<div class="filter">
<label>备注:</label>
<Input type="text" class="searchInput" v-model="remark" />
</div>
<div class="filter">
<label>上传文件:</label>
<div class="frockUploadFile">
<Upload
:before-upload="handleUpload"
:on-success="handleSuccess"
:on-error="handleError"
:headers="headers"
:action="fileAction">
<Button class="UFbtn" icon="ios-cloud-upload-outline" :title="filename">{{filename?filename:'上传文件'}}</Button>
</Upload>
</div>
</div>
</div>
<div slot="footer">
<Button type="text" size="large" @click="this.addmodal=false">{{$t('1033')}}</Button>
<Button type="primary" size="large" @click="addPost()">{{$t('1011')}}</Button>
</div>
</Modal>
</div>
</template>
<script>
......@@ -154,6 +217,30 @@ export default {
key:''
}
],
//弹窗
addmodal:false,
type:0,//1添加 2编辑
parentType:[],//父级类型
parentTypeid:'',
frockTypename:'',//工装类型名称
mtype:'',//管理类型
frockname:'',//工装名称
frockno:'',//工装料号
frockcode:'',//工装编号
num:0,
addstatus:'1',//状态 1可用 0停用
remark:'',//备注
filename: '',//文件名称
fileurl:'',//文件路径
loadingStatus: false,
fileAction: this.axios.publicPath + "config/upload/UploadImage",
headers: {
token: localStorage.getItem("token"),
timestamp: localStorage.getItem("timestamp"),
nonce: localStorage.getItem("nonce"),
sign: localStorage.getItem("sign"),
},
}
},
created(){
......@@ -194,6 +281,26 @@ export default {
this.frockTypeid = value[value.length - 1];
}
},
changeFrockType1(value){
this.parentTypeid = "";
if(value!=undefined && value.length){
this.parentTypeid = value[value.length - 1];
}
},
//获取工装列表
getFrocks(){
// this.axios.request({
// url: "/fms/accountInfo/frockList",
// method: "get",
// })
// .then((res) => {
// this.frockList = [];
// let data = res.data.data;
// if (res.data.ret == 1&&Array.isArray(data)&&data.length) {
// this.frockList = data;
// }
// });
},
tosearch(){
this.page = 1;
this.pagesize = 10;
......@@ -201,14 +308,16 @@ export default {
},
search(toexcel){
let params = {
frockTypeid:this.frockTypeid,//工装类型id
frockTypeid:this.frockType,//工装类型id
frockid:this.frockCode, //工装id
staus:this.status, //0停用 1可用
page:this.page,
pagesize:this.pagesize,
toexcel:toexcel //0查询 1导出
}
this.detailobj = {};
// this.axios.request({
// url: "/fms/typeMaintenance/search",
// url: "/fms/accountInfo/search",
// params,
// method: "get",
// })
......@@ -232,6 +341,31 @@ export default {
// }
// });
},
add(){
this.type = 1;
this.addmodal = true;
},
handleUpload (file) {
this.file = file;
return false;
},
handleSuccess (res) {
console.log(222222)
console.log(res)
this.loadingStatus = true;
setTimeout(() => {
this.file = null;
this.loadingStatus = false;
this.$Message.success('Success')
}, 1500);
},
handleError(error){
console.log(1111111)
console.log(error)
},
addPost(){
},
handleRowChange(currentRow, oldCurrentRow) {
this.detailobj = currentRow;
},
......@@ -247,6 +381,13 @@ export default {
}
}
</script>
<style>
<style lang="less" scoped>
.frockUploadFile{
display:inline-block;
.UFbtn{
width:140px;
height:29px;
line-height: 15px;
}
}
</style>
\ No newline at end of file
[DbSetting]
UseOneDb=false
DbConnection=Server=mysql.siger-data.com;port=3306;database=sigerlaisi;charset=utf8;uid=siger;password=Siger_123
DbConnectionKM=Server=mysql.siger-data.com;port=3306;charset=utf8;uid=siger;password=Siger_123
DbConnectionTrace=Server=mysql.siger-data.com;port=3306;database=155_155;charset=utf8;uid=siger;password=Siger_123;Allow User Variables=True;
[RedisSetting]
ConnectionString=redis.siger-data.com,password=ky701@YH.com,ssl=false,writeBuffer=10240
PoolSize=1
DefaultDatabase=0
TokenExpiryMinutes=130
[DbClusterSetting]
ClusterConnection=Server=172.8.10.109;port=3306;database=siger;charset=utf8;uid=siger;password=Siger_123
ClusterConnectionKM=Server=172.8.10.109;port=3306;charset=utf8;uid=siger;password=Siger_123
RedisHost=172.8.10.105:7000;172.8.10.105:7001;172.8.10.106:7002;172.8.10.106:7003;172.8.10.107:7004;172.8.10.107:7005
[Task]
Start=0
[LogSetting]
Type=1
[FileSetting]
PhysicalFolder=TemporaryFiles
RequestPath=Files
[ConsulEnabledSetting]
Enabled=0
[PythonPathSetting]
PyPath=/root/miniconda3/bin/python3.7
[Register]
License=a7OIdILhmFICTay3U+952Fx1vl6vzT4T5E/Fto5zrNgoK49j3zOoU/H2ppaP/Jd8xLR6tJY7jgXCoXJCe09PNN7sjDTpRRCUkxWgCIuDhWRGERvo7HTEPA==
AppKey="123123"
\ No newline at end of file
[program:9MiddlerServer]
command=dotnet Siger.Middlelayer.ApiGateway.dll --port 8100
directory=/usr/local/server
environment=ASPNETCORE__ENVIRONMENT=Production
user=root
stopsignal=INT
autostart=true
autorestart=true
startsecs=3
[program:9ConfigServer]
command=dotnet Siger.ApiConfig.dll --port 8101
directory=/usr/local/server
environment=ASPNETCORE__ENVIRONMENT=Production
user=root
stopsignal=INT
autostart=true
autorestart=true
startsecs=3
[program:9CncServer]
command=dotnet Siger.ApiCNC.dll --port 8102
directory=/usr/local/server
environment=ASPNETCORE__ENVIRONMENT=Production
user=root
stopsignal=INT
autostart=true
autorestart=true
startsecs=3
[program:9DncServer]
command=dotnet Siger.ApiDNC.dll --port 8103
directory=/usr/local/server
environment=ASPNETCORE__ENVIRONMENT=Production
user=root
stopsignal=INT
autostart=true
autorestart=true
startsecs=3
[program:9EsopServer]
command=dotnet Siger.ApiEsop.dll --port 8104
directory=/usr/local/server
environment=ASPNETCORE__ENVIRONMENT=Production
user=root
stopsignal=INT
autostart=true
autorestart=true
[program:9TpmServer]
command=dotnet Siger.ApiTPM.dll --port 8105
directory=/usr/local/server
environment=ASPNETCORE__ENVIRONMENT=Production
user=root
stopsignal=INT
autostart=true
autorestart=true
startsecs=3
[program:9ACCServer]
command=dotnet Siger.ApiACC.dll --port 8106
directory=/usr/local/server
environment=ASPNETCORE__ENVIRONMENT=Production
user=root
stopsignal=INT
autostart=true
autorestart=true
startsecs=3
[program:9QMSServer]
command=dotnet Siger.ApiQMS.dll --port 8107
directory=/usr/local/server
environment=ASPNETCORE__ENVIRONMENT=Production
user=root
stopsignal=INT
autostart=true
autorestart=true
startsecs=3
[program:9WMSServer]
command=dotnet Siger.ApiWMS.dll --port 8108
directory=/usr/local/server
environment=ASPNETCORE__ENVIRONMENT=Production
user=root
stopsignal=INT
autostart=true
autorestart=true
startsecs=3
[program:CL2MiddlerServer]
command=dotnet Siger.Middlelayer.ApiGateway.dll --port 7405
directory=/usr/local/server
environment=ASPNETCORE__ENVIRONMENT=Production
user=root
stopsignal=INT
autostart=true
autorestart=true
startsecs=3
[program:CL2ConfigServer]
command=dotnet Siger.ApiConfig.dll --port 7402
directory=/usr/local/server
environment=ASPNETCORE__ENVIRONMENT=Production
user=root
stopsignal=INT
autostart=true
autorestart=true
startsecs=3
[program:CL2TpmServer]
command=dotnet Siger.ApiTPM.dll --port 7415
directory=/usr/local/server
environment=ASPNETCORE__ENVIRONMENT=Production
user=root
stopsignal=INT
autostart=true
autorestart=true
startsecs=3
[program:CL2QMSServer]
command=dotnet Siger.ApiQMS.dll --port 7416
directory=/usr/local/server
environment=ASPNETCORE__ENVIRONMENT=Production
user=root
stopsignal=INT
autostart=true
autorestart=true
startsecs=3
[program:CL2DashboardServer]
command=dotnet Siger.ApiDashboard.dll --port 7417
directory=/usr/local/server
environment=ASPNETCORE__ENVIRONMENT=Production
user=root
stopsignal=INT
autostart=true
autorestart=true
startsecs=3
[program:CL2CNCServer]
command=dotnet Siger.ApiCNC.dll --port 7401
directory=/usr/local/server
environment=ASPNETCORE__ENVIRONMENT=Production
user=root
stopsignal=INT
autostart=true
autorestart=true
startsecs=3
[program:CL2ChanglingServer]
command=dotnet Siger.ApiChangLing.dll --port 7408
directory=/usr/local/server
environment=ASPNETCORE__ENVIRONMENT=Production
user=root
stopsignal=INT
autostart=true
autorestart=true
startsecs=3
[program:CL2DNCServer]
command=dotnet Siger.ApiDNC.dll --port 7406
directory=/usr/local/server
environment=ASPNETCORE__ENVIRONMENT=Production
user=root
stopsignal=INT
autostart=true
autorestart=true
startsecs=3
[program:9MiddlerServer]
command=dotnet Siger.Middlelayer.ApiGateway.dll --port 8100
directory=/usr/local/server
environment=ASPNETCORE__ENVIRONMENT=Production
user=root
stopsignal=INT
autostart=true
autorestart=true
startsecs=3
[program:9ConfigServer]
command=dotnet Siger.ApiConfig.dll --port 8101
directory=/usr/local/server
environment=ASPNETCORE__ENVIRONMENT=Production
user=root
stopsignal=INT
autostart=true
autorestart=true
startsecs=3
[program:9CncServer]
command=dotnet Siger.ApiCNC.dll --port 8102
directory=/usr/local/server
environment=ASPNETCORE__ENVIRONMENT=Production
user=root
stopsignal=INT
autostart=true
autorestart=true
startsecs=3
[program:9DncServer]
command=dotnet Siger.ApiDNC.dll --port 8103
directory=/usr/local/server
environment=ASPNETCORE__ENVIRONMENT=Production
user=root
stopsignal=INT
autostart=true
autorestart=true
startsecs=3
[program:9EsopServer]
command=dotnet Siger.ApiEsop.dll --port 8104
directory=/usr/local/server
environment=ASPNETCORE__ENVIRONMENT=Production
user=root
stopsignal=INT
autostart=true
autorestart=true
[program:9ACCServer]
command=dotnet Siger.ApiACC.dll --port 8106
directory=/usr/local/server
environment=ASPNETCORE__ENVIRONMENT=Production
user=root
stopsignal=INT
autostart=true
autorestart=true
startsecs=3
[program:9QMSServer]
command=dotnet Siger.ApiQMS.dll --port 8107
directory=/usr/local/server
environment=ASPNETCORE__ENVIRONMENT=Production
user=root
stopsignal=INT
autostart=true
autorestart=true
startsecs=3
[program:9WMSServer]
command=dotnet Siger.ApiWMS.dll --port 8108
directory=/usr/local/server
environment=ASPNETCORE__ENVIRONMENT=Production
user=root
stopsignal=INT
autostart=true
autorestart=true
startsecs=3
\ No newline at end of file
user root;
worker_processes 2;
error_log /usr/local/nginx/logs/nginx_error.log crit;
worker_rlimit_nofile 51200;
pid /usr/local/nginx/conf/nginx.pid;
events {
use epoll;
worker_connections 8000;
}
http {
include mime.types;
default_type application/octet-stream;
server_names_hash_bucket_size 3526;
server_names_hash_max_size 4096;
log_format combined_realip '$remote_addr $http_x_forwarded_for [$time_local]'
'$host "$request_uri" $status'
'"$http_referer" "$http_user_agent"';
sendfile on;
tcp_nopush on;
keepalive_timeout 300;
client_header_timeout 3m;
client_body_timeout 3m;
send_timeout 3m;
connection_pool_size 256;
client_header_buffer_size 16k;
large_client_header_buffers 8 4k;
fastcgi_buffers 8 128k;
request_pool_size 4k;
output_buffers 4 32k;
postpone_output 1460;
client_max_body_size 200m;
client_body_buffer_size 256k;
fastcgi_intercept_errors on;
tcp_nodelay on;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 8k;
gzip_comp_level 5;
gzip_http_version 1.1;
gzip_types text/plain application/x-javascript text/css text/htm application/xml;
#servers
upstream node{
server 127.0.0.1:8100;
}
upstream hehong{
server 127.0.0.1:18105;
}
server {
listen 80;
location / {
root html;
index index.html index.html;
}
location /onestop {
alias /usr/local/nginx/html;
index index.html index.html;
}
location ~^/apis/{
rewrite ^/apis/(.*)$ /$1 break;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://node;
}
location /onestop/apis{
rewrite ^/onestop/apis/(.*)$ /$1 break;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://node;
}
}
server {
listen 8080;
location / {
root /usr/local/nginx/hehong_html;
}
location ~^/apis/{
rewrite ^/apis/(.*)$ /$1 break;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://hehong;
}
}
}
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using Microsoft.AspNetCore.Mvc;
using Siger.ApiCommon.Result;
using Siger.Middlelayer.AccRepository.Entities;
using Siger.Middlelayer.AccRepository.Repositories.Interface;
using Siger.Middlelayer.AccRepository.Response;
using Siger.Middlelayer.AccRepository.Request;
using Siger.Middlelayer.Common;
using Siger.Middlelayer.Common.Extensions;
using Siger.Middlelayer.Repository.Repositories.Interface;
using Siger.Middlelayer.Repository;
using Siger.Middlelayer.Repository.Extensions;
using System.Linq;
using Siger.Middlelayer.Repository.Entities;
namespace Siger.ApiACC.Controllers
{
public class AutomationLocationController : BaseController
{
private readonly IUnitOfWork _unitOfWork;
private readonly IAutomationFixtureToolsCategoryRepository _toolsCategoryRepository;
private readonly IAutomationFixtureToolsRepository _toolsRepository;
private readonly IAutomationLocationRepository _autoLocationRepository;
private readonly ISigerTrMaterialsRepository _materialsRepository;
public AutomationLocationController(IUnitOfWork unitOfWork, IAutomationFixtureToolsCategoryRepository toolsCategoryRepository,
IAutomationFixtureToolsRepository toolsRepository, IAutomationLocationRepository autoLocationRepository,
ISigerTrMaterialsRepository materialsRepository)
{
_unitOfWork = unitOfWork;
_toolsCategoryRepository = toolsCategoryRepository;
_toolsRepository = toolsRepository;
_autoLocationRepository = autoLocationRepository;
_materialsRepository = materialsRepository;
}
public IActionResult GetPageList(string wavehouseid, string locationid, int page, int pagesize)
{
var data = _autoLocationRepository.GetPagedList(wavehouseid.ToInt(), locationid.ToInt(), ProjectId, page, pagesize);
return new PagedObjectResult(data.Data, data.Total, page, pagesize);
}
[HttpPost]
public IActionResult Add([FromBody]RequestAddAutomationLocation req)
{
if (string.IsNullOrEmpty(req.locationid) || string.IsNullOrEmpty(req.fixturetoolid) || string.IsNullOrEmpty(req.materialid))
{
throw new BadRequestException(RequestEnum.ParameterMiss);
}
var fixturetool = _toolsRepository.Get(q => q.id == req.fixturetoolid.ToInt() && q.projectId == ProjectId && q.status == (int)RowState.Valid);
if (fixturetool == null)
{
throw new BadRequestException(RequestEnum.FixtureToolNotFound);
}
var location = _autoLocationRepository.GetLocation(req.locationid.ToInt(), ProjectId);
if (location == null)
{
throw new BadRequestException(RequestEnum.LocationNull);
}
var material = _materialsRepository.Get(q => q.id == req.materialid.ToInt() && q.projectId == ProjectId && q.status == (int)RowState.Valid);
var data = _autoLocationRepository.Get(q => q.projectId == ProjectId && q.status == (int)RowState.Valid && q.fixturetools == fixturetool.guid &&
q.locationid == req.locationid.ToInt());
if (data != null)
{
throw new BadRequestException(RequestEnum.DataExist);
}
var state = 1;
if (fixturetool != null && material == null)
{
state = 1;//有工装 无工件
}
else if(fixturetool != null && material != null)
{
state = 2;//有工装 有工件
}
var entity = new siger_automation_location
{
guid = Guid.NewGuid().ToString(),
locationid = req.locationid.ToInt(),
fixturetools = fixturetool.guid,
materialid = req.materialid.ToInt(),
processid = req.processid.ToInt(),
materialstate = state,
attachment = req.fileurl,
filename = req.filename,
remark = req.remark,
projectId = ProjectId,
updatetime = DateTime.Now,
updator = UserId,
};
_autoLocationRepository.Insert(entity);
if (_unitOfWork.Commit() > 0)
{
return new ObjectResult(CommonEnum.Succefull);
}
else
{
throw new BadRequestException(CommonEnum.Fail);
}
}
[HttpPost]
public IActionResult Update([FromBody]RequestUpdateAutomationLocation req)
{
if (string.IsNullOrEmpty(req.locationid) || string.IsNullOrEmpty(req.fixturetoolid) || string.IsNullOrEmpty(req.materialid))
{
throw new BadRequestException(RequestEnum.ParameterMiss);
}
var entity = _autoLocationRepository.Get(q => q.id == req.id && q.projectId == ProjectId && q.status == (int)RowState.Valid);
var fixturetool = _toolsRepository.Get(q => q.id == req.fixturetoolid.ToInt() && q.projectId == ProjectId && q.status == (int)RowState.Valid);
if (fixturetool == null)
{
throw new BadRequestException(RequestEnum.FixtureToolNotFound);
}
var location = _autoLocationRepository.GetLocation(req.locationid.ToInt(), ProjectId);
if (location == null)
{
throw new BadRequestException(RequestEnum.LocationNull);
}
var material = _materialsRepository.Get(q => q.id == req.materialid.ToInt() && q.projectId == ProjectId && q.status == (int)RowState.Valid);
var data = _autoLocationRepository.Get(q => q.projectId == ProjectId && q.status == (int)RowState.Valid && q.fixturetools == fixturetool.guid &&
q.locationid == req.locationid.ToInt() && q.id != req.id);
if (data != null)
{
throw new BadRequestException(RequestEnum.DataExist);
}
var state = 1;
if (fixturetool != null && material == null)
{
state = 1;//有工装 无工件
}
else if (fixturetool != null && material != null)
{
state = 2;//有工装 有工件
}
entity.locationid = req.locationid.ToInt();
entity.fixturetools = fixturetool.guid;
entity.materialid = req.materialid.ToInt();
entity.processid = req.processid.ToInt();
entity.materialstate = state;
entity.attachment = req.fileurl;
entity.filename = req.filename;
entity.remark = req.remark;
entity.updatetime = DateTime.Now;
entity.updator = UserId;
_autoLocationRepository.Update(entity);
if (_unitOfWork.Commit() > 0)
{
return new ObjectResult(CommonEnum.Succefull);
}
else
{
throw new BadRequestException(CommonEnum.Fail);
}
}
[HttpGet]
public IActionResult Delete(int id)
{
var entity = _autoLocationRepository.Get(q => q.projectId == ProjectId && q.status == (int)RowState.Valid && q.id == id);
if (entity == null)
{
throw new BadRequestException(CommonEnum.RecordNotFound);
}
entity.status = (int)RowState.Invalid;
_autoLocationRepository.Update(entity);
if (_unitOfWork.Commit() > 0)
{
return new ObjectResult(CommonEnum.Succefull);
}
else
{
throw new BadRequestException(CommonEnum.Fail);
}
}
[HttpPost]
public IActionResult Deletes([FromBody]RequestDeleteRange req)
{
if (req.ids == null || !req.ids.Any())
{
throw new BadRequestException(RequestEnum.ParameterMiss);
}
var entities = _autoLocationRepository.GetList(t =>
req.ids.Contains(t.id) && t.projectId == ProjectId && t.status == (int)RowState.Valid).ToList();
if (!entities.Any())
{
throw new BadRequestException(CommonEnum.RecordNotFound);
}
foreach (var entity in entities)
{
entity.status = (int)RowState.Invalid;
_autoLocationRepository.Update(entity);
}
if (_unitOfWork.Commit() > 0)
return new ObjectResult(CommonEnum.Succefull);
throw new BadRequestException(CommonEnum.Fail);
}
}
}
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using Microsoft.AspNetCore.Mvc;
using Siger.ApiCommon.Result;
using Siger.Middlelayer.AccRepository.Entities;
using Siger.Middlelayer.AccRepository.Repositories.Interface;
using Siger.Middlelayer.AccRepository.Response;
using Siger.Middlelayer.AccRepository.Request;
using Siger.Middlelayer.Common;
using Siger.Middlelayer.Common.Extensions;
using Siger.Middlelayer.Repository.Repositories.Interface;
using Siger.Middlelayer.Repository;
using Siger.Middlelayer.Repository.Extensions;
using System.Linq;
using Siger.Middlelayer.Repository.Entities;
namespace Siger.ApiACC.Controllers
{
public class FixtureToolsAssemblyController : BaseController
{
private readonly IUnitOfWork _unitOfWork;
private readonly IAutomationFixtureToolsCategoryRepository _toolsCategoryRepository;
private readonly IAutomationFixtureToolsRepository _toolsRepository;
private readonly IAutomationFixtureToolsAssemblyRepository _toolsAssemblyRepository;
public FixtureToolsAssemblyController(IUnitOfWork unitOfWork, IAutomationFixtureToolsCategoryRepository toolsCategoryRepository,
IAutomationFixtureToolsRepository toolsRepository, IAutomationFixtureToolsAssemblyRepository toolsAssemblyRepository)
{
_unitOfWork = unitOfWork;
_toolsCategoryRepository = toolsCategoryRepository;
_toolsRepository = toolsRepository;
_toolsAssemblyRepository = toolsAssemblyRepository;
}
[HttpGet]
public IActionResult GetPageList(string category, string code, string name, int projectid, int page, int pagesize)
{
var data = _toolsAssemblyRepository.GetPagedList(category.ToInt(), code, name, ProjectId, page, pagesize);
return new PagedObjectResult(data.Data, data.Total, page, pagesize);
}
[HttpGet]
public IActionResult GetDetail(string id)
{
var data = _toolsAssemblyRepository.GetDetailList(id.ToInt(), ProjectId);
return new ObjectResult(data);
}
[HttpPost]
public IActionResult Add([FromBody]RequestAddFixtureToolAssembly req)
{
if (string.IsNullOrEmpty(req.fixturetoolid))
{
throw new BadRequestException(RequestEnum.ParameterMiss);
}
var parent = _toolsRepository.Get(q => q.id == req.parentid.ToInt() && q.projectId == ProjectId && q.status == (int)RowState.Valid);
var son = _toolsRepository.Get(q => q.id == req.fixturetoolid.ToInt() && q.projectId == ProjectId && q.status == (int)RowState.Valid);
if (son == null)
{
throw new BadRequestException(RequestEnum.FixtureToolNotFound);
}
var parentGuid = parent?.guid ?? "";
var exsit = _toolsAssemblyRepository.Get(q => q.projectId == ProjectId && q.status == (int)RowState.Valid && q.son == son.guid && q.parent == parentGuid);
if (exsit != null)
{
throw new BadRequestException(RequestEnum.DataExist);
}
var entity = new siger_automation_fixture_tools_assembly
{
guid = Guid.NewGuid().ToString(),
parent = parent?.guid ?? "",
son = son.guid,
creator = UserId,
createtime = DateTime.Now,
attachment = req.fileurl,
filename = req.filename,
projectId = ProjectId,
updatetime = DateTime.Now,
updator = UserId,
};
_toolsAssemblyRepository.Insert(entity);
if (_unitOfWork.Commit() > 0)
{
return new ObjectResult(CommonEnum.Succefull);
}
else
{
throw new BadRequestException(CommonEnum.Fail);
}
}
[HttpPost]
public IActionResult Update([FromBody]RequestUpdateFixtureToolAssembly req)
{
if (string.IsNullOrEmpty(req.fixturetoolid))
{
throw new BadRequestException(RequestEnum.ParameterMiss);
}
var entity = _toolsAssemblyRepository.Get(q => q.projectId == ProjectId && q.status == (int)RowState.Valid && q.id == req.id);
if(entity == null)
{
throw new BadRequestException(CommonEnum.RecordNotFound);
}
var parent = _toolsRepository.Get(q => q.id == req.parentid.ToInt() && q.projectId == ProjectId && q.status == (int)RowState.Valid);
var son = _toolsRepository.Get(q => q.id == req.fixturetoolid.ToInt() && q.projectId == ProjectId && q.status == (int)RowState.Valid);
if (son == null)
{
throw new BadRequestException(RequestEnum.FixtureToolNotFound);
}
var parentGuid = parent?.guid ?? "";
var exsit = _toolsAssemblyRepository.Get(q => q.projectId == ProjectId && q.status == (int)RowState.Valid && q.son == son.guid && q.parent == parentGuid &&
q.id != req.id);
if (exsit != null)
{
throw new BadRequestException(RequestEnum.DataExist);
}
entity.parent = parent?.guid ?? "";
entity.son = son.guid;
entity.attachment = req.fileurl;
entity.filename = req.filename;
entity.updatetime = DateTime.Now;
entity.updator = UserId;
_toolsAssemblyRepository.Update(entity);
if (_unitOfWork.Commit() > 0)
{
return new ObjectResult(CommonEnum.Succefull);
}
else
{
throw new BadRequestException(CommonEnum.Fail);
}
}
}
}
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using Microsoft.AspNetCore.Mvc;
using Siger.ApiCommon.Result;
using Siger.Middlelayer.AccRepository.Entities;
using Siger.Middlelayer.AccRepository.Repositories.Interface;
using Siger.Middlelayer.AccRepository.Response;
using Siger.Middlelayer.AccRepository.Request;
using Siger.Middlelayer.Common;
using Siger.Middlelayer.Common.Extensions;
using Siger.Middlelayer.Repository.Repositories.Interface;
using Siger.Middlelayer.Repository;
using Siger.Middlelayer.Repository.Extensions;
using System.Linq;
using Siger.Middlelayer.Repository.Entities;
namespace Siger.ApiACC.Controllers
{
public class FixtureToolsProductController : BaseController
{
private readonly IUnitOfWork _unitOfWork;
private readonly IAutomationFixtureToolsCategoryRepository _toolsCategoryRepository;
private readonly IAutomationFixtureToolsRepository _toolsRepository;
private readonly IAutomationFixtureToolsProductRepository _toolsProductRepository;
private readonly ISigerProjectProductRepository _productRepository;
public FixtureToolsProductController(IUnitOfWork unitOfWork, IAutomationFixtureToolsCategoryRepository toolsCategoryRepository,
IAutomationFixtureToolsRepository toolsRepository, IAutomationFixtureToolsProductRepository toolsProductRepository,
ISigerProjectProductRepository productRepository)
{
_unitOfWork = unitOfWork;
_toolsCategoryRepository = toolsCategoryRepository;
_toolsRepository = toolsRepository;
_toolsProductRepository = toolsProductRepository;
_productRepository = productRepository;
}
public IActionResult GetPageList(string category, string tool, string product, int page, int pagesize)
{
var data = _toolsProductRepository.GetPagedList(category.ToInt(), tool.ToInt(), product.ToInt(), ProjectId, page, pagesize);
return new PagedObjectResult(data.Data, data.Total, page, pagesize);
}
[HttpPost]
public IActionResult Add([FromBody]RequestAddFixtureToolsProduct req)
{
if(string.IsNullOrEmpty(req.fixturetoolid) || string.IsNullOrEmpty(req.productid))
{
throw new BadRequestException(RequestEnum.ParameterMiss);
}
var fixtureTool = _toolsRepository.Get(q => q.projectId == ProjectId && q.status == (int)RowState.Valid && q.id == req.fixturetoolid.ToInt());
if(fixtureTool == null)
{
throw new BadRequestException(RequestEnum.FixtureToolNotFound);
}
var product = _productRepository.Get(q => q.projectid == ProjectId && q.status == (int)RowState.Valid && q.id == req.productid.ToInt());
if(product == null)
{
throw new BadRequestException(RequestEnum.ProductNotFound);
}
var data = _toolsProductRepository.Get(q => q.projectId == ProjectId && q.status == (int)RowState.Valid && (q.fixturetools == fixtureTool.guid ||
q.productid == req.productid.ToInt()));
if (data != null)
{
throw new BadRequestException(RequestEnum.DataExist);
}
var entity = new siger_automation_fixture_tools_product
{
guid = Guid.NewGuid().ToString(),
fixturetools = fixtureTool.guid,
remark=req.remark,
productid=req.productid.ToInt(),
projectId = ProjectId,
createtime = DateTime.Now,
updatetime = DateTime.Now,
creator = UserId,
updator = UserId,
};
_toolsProductRepository.Insert(entity);
if (_unitOfWork.Commit() > 0)
{
return new ObjectResult(CommonEnum.Succefull);
}
else
{
throw new BadRequestException(CommonEnum.Fail);
}
}
[HttpPost]
public IActionResult Update([FromBody]RequestUpdateFixtureToolsProduct req)
{
if (string.IsNullOrEmpty(req.fixturetoolid) || string.IsNullOrEmpty(req.productid))
{
throw new BadRequestException(RequestEnum.ParameterMiss);
}
var entity = _toolsProductRepository.Get(q => q.projectId == ProjectId && q.status == (int)RowState.Valid && q.id == req.id);
if(entity == null)
{
throw new BadRequestException(CommonEnum.RecordNotFound);
}
var fixtureTool = _toolsRepository.Get(q => q.projectId == ProjectId && q.status == (int)RowState.Valid && q.id == req.fixturetoolid.ToInt());
if (fixtureTool == null)
{
throw new BadRequestException(RequestEnum.FixtureToolNotFound);
}
var product = _productRepository.Get(q => q.projectid == ProjectId && q.status == (int)RowState.Valid && q.id == req.productid.ToInt());
if (product == null)
{
throw new BadRequestException(RequestEnum.ProductNotFound);
}
var data = _toolsProductRepository.Get(q => q.projectId == ProjectId && q.status == (int)RowState.Valid && (q.fixturetools == fixtureTool.guid ||
q.productid == req.productid.ToInt()) && q.id != req.id);
if (data != null)
{
throw new BadRequestException(RequestEnum.DataExist);
}
entity.fixturetools = fixtureTool.guid;
entity.remark = req.remark;
entity.productid = req.productid.ToInt();
entity.updatetime = DateTime.Now;
entity.updator = UserId;
_toolsProductRepository.Insert(entity);
if (_unitOfWork.Commit() > 0)
{
return new ObjectResult(CommonEnum.Succefull);
}
else
{
throw new BadRequestException(CommonEnum.Fail);
}
}
[HttpGet]
public IActionResult Delete(int id)
{
var entity = _toolsProductRepository.Get(q => q.projectId == ProjectId && q.status == (int)RowState.Valid && q.id == id);
if (entity == null)
{
throw new BadRequestException(CommonEnum.RecordNotFound);
}
entity.status = (int)RowState.Invalid;
_toolsProductRepository.Update(entity);
if (_unitOfWork.Commit() > 0)
{
return new ObjectResult(CommonEnum.Succefull);
}
else
{
throw new BadRequestException(CommonEnum.Fail);
}
}
[HttpPost]
public IActionResult Deletes([FromBody]RequestDeleteRange req)
{
if (req.ids == null || !req.ids.Any())
{
throw new BadRequestException(RequestEnum.ParameterMiss);
}
var entities = _toolsProductRepository.GetList(t =>
req.ids.Contains(t.id) && t.projectId == ProjectId && t.status == (int)RowState.Valid).ToList();
if (!entities.Any())
{
throw new BadRequestException(CommonEnum.RecordNotFound);
}
foreach (var entity in entities)
{
entity.status = (int)RowState.Invalid;
_toolsProductRepository.Update(entity);
}
if (_unitOfWork.Commit() > 0)
return new ObjectResult(CommonEnum.Succefull);
throw new BadRequestException(CommonEnum.Fail);
}
}
}
......@@ -63,6 +63,12 @@ namespace Siger.Middlelayer.Common
/// 罗美特分类
/// </summary>
public const string FlowMetek = "FlowMetek";
/// <summary>
/// MES 自动线类型
/// </summary>
public const string Automation = "automation";
}
public class AccDictCostNoProjectId
......@@ -102,4 +108,6 @@ namespace Siger.Middlelayer.Common
/// </summary>
public const string outgoing_type = "outgoing_type";
}
}
......@@ -28,5 +28,18 @@ namespace Siger.Middlelayer.Share.Constant
/// 表头 工站
/// </summary>
public const string EleHeader = "EleHeader";
/// <summary>
/// automation key:清洗工站
/// </summary>
public const string CleanStation = "CleanStation";
/// <summary>
/// key:上料工站
/// </summary>
public const string UploadloadStation = "UploadloadStation";
/// <summary>
/// key:下料工站
/// </summary>
public const string DownloadStation = "DownloadStation";
}
}
......@@ -314,7 +314,9 @@ namespace Siger.Middlelayer.Common.ModuleEnum
[Description("序号规则未配置")]
SerinumCfgEmpty,
[Description("序号已全部生成")]
SerinumFull
SerinumFull,
[Description("该任务状态已经完成")]
AutoTaskDone
......
......@@ -8,7 +8,7 @@ namespace Siger.Middlelayer.Share.Enum.ModuleEnum
public class Automation
{
/// <summary>
/// 任务触发类型
/// 任务触发方式 1 手动 2 自动
/// </summary>
public enum TaskTrigerType
{
......@@ -61,6 +61,17 @@ namespace Siger.Middlelayer.Share.Enum.ModuleEnum
/// </summary>
Complated = 3
}
/// <summary>
/// 动作类型 1:load 2:Unload
/// </summary>
public enum TaskActionType
{
[Description("Load")]
Load =1,
[Description("Unload")]
Unload =2
}
/// <summary>
/// 动作
/// </summary>
......@@ -69,38 +80,53 @@ namespace Siger.Middlelayer.Share.Enum.ModuleEnum
/// <summary>
/// 立库->上下料工站
/// </summary>
[Description("立库->上下料工站")]
FirstStep=1,
[Description("立库->上下料")]
Step_LK_SXLW=1,
/// <summary>
/// 上下料工站->立库
/// </summary>
[Description("上下料工站->立库")]
SecondStep =2,
[Description("上下料->立库")]
Step_SXLW_LK =2,
/// <summary>
/// 立库->加工中心
/// </summary>
[Description("立库->加工中心")]
ThirdStep =3,
Step_LK_JGZX =3,
/// <summary>
/// 加工中心->清洗机
/// </summary>
[Description("加工中心->清洗机")]
FourStep =4,
Step_JGZX_QXJ =4,
/// <summary>
/// 立库->抽检工位
/// </summary>
[Description("立库->抽检工位")]
FiveStep =5,
[Description("立库->抽检")]
Step_LK_CJT =5,
/// <summary>
/// 抽检工位->上下料工站
/// </summary>
[Description("抽检工位->上下料工站")]
SixStep =6,
[Description("抽检台->上下料位")]
Step_CJT_SXLW =6,
/// <summary>
/// 清洗机->立库
/// </summary>
[Description("清洗机->立库")]
Step_QXJ_LK =7,
/// <summary>
/// 加工中心->立库
/// </summary>
[Description("加工中心->立库")]
Step_JGZX_LK =8,
/// <summary>
/// 抽检台->立库
/// </summary>
[Description("抽检台->立库")]
Step_CJT_LK = 9,
/// <summary>
/// 清洗剂->立库
/// 清洗机->加工中心
/// </summary>
[Description("清洗剂->立库")]
SevenStep =7
[Description("清洗机->加工中心")]
Step_QXJ_JGZX = 10,
}
}
}
......@@ -1464,5 +1464,11 @@ namespace Siger.Middlelayer.Common
[Description("未找到储位类别")]
LocationTypeNotFound,
[Description("未找到工装类别")]
FixtureToolCatgeoryNotFound,
[Description("未找到工装信息")]
FixtureToolNotFound,
}
}
......@@ -150,6 +150,15 @@ namespace Siger.Middlelayer.AccRepository
public DbSet<siger_automation_fixture_tools_category> siger_automation_fixture_tools_category { get; set; }
public DbSet<siger_automation_fixture_tools_assembly> siger_automation_fixture_tools_assembly { get; set; }
public DbSet<siger_automation_fixture_tools> siger_automation_fixture_tools { get; set; }
public DbSet<siger_automation_fixture_tools_product> siger_automation_fixture_tools_product { get; set; }
public DbSet<siger_automation_location> siger_automation_location { get; set; }
public DbSet<siger_automation_section_property> siger_automation_section_property { get; set; }
public DbSet<siger_automation_section_route> siger_automation_section_route { get; set; }
public DbSet<siger_automation_task_list> siger_automation_task_list { get; set; }
public DbSet<siger_wms_storage> siger_wms_storage { get; set; }
public DbSet<siger_wms_storage_location> siger_wms_storage_location { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace Siger.Middlelayer.AccRepository.Entities
{
/// <summary>
/// 工装台账信息
/// </summary>
public class siger_automation_fixture_tools : AccEntityBase
{
public string guid { get; set; }
/// <summary>
/// 工装类别
/// </summary>
public string category { get; set; }
/// <summary>
/// 管理类型
/// </summary>
public int managetype { get; set; }
/// <summary>
/// 工装料号
/// </summary>
public string partnumber { get; set; }
/// <summary>
/// 工装名称
/// </summary>
public string name { get; set; }
/// <summary>
/// 规格型号
/// </summary>
public string specification { get; set; }
/// <summary>
/// 数量
/// </summary>
public int number { get; set; }
/// <summary>
/// 备注
/// </summary>
public string remark { get; set; }
/// <summary>
/// 附件
/// </summary>
public string attachment { get; set; }
public string filename { get; set; }
/// <summary>
/// 工装编号
/// </summary>
public string code { get; set; }
public DateTime createtime { get; set; }
public int creator { get; set; }
public int updator { get; set; }
public DateTime? updatetime { get; set; }
public string extend1 { get; set; }
}
}
......@@ -4,20 +4,34 @@ using System.Text;
namespace Siger.Middlelayer.AccRepository.Entities
{
/// <summary>
/// 工装装配信息
/// </summary>
public class siger_automation_fixture_tools_assembly : AccEntityBase
{
public string name { get; set; }
public string guid { get; set; }
/// <summary>
/// 父工装GUID
/// </summary>
public string parent { get; set; }
/// <summary>
/// 工装GUID
/// </summary>
public string son { get; set; }
/// <summary>
/// 附件
/// </summary>
public string attachment { get; set; }
public string fileurl { get; set; }
/// <summary>
/// 附件名称
/// </summary>
public string filename { get; set; }
public int creator { get; set; }
public DateTime createTime { get; set; }
public DateTime createtime { get; set; }
public int updator { get; set; }
public DateTime? updateTime { get; set; }
public DateTime? updatetime { get; set; }
public string extend1 { get; set; }
}
......
using System;
using System.Collections.Generic;
using System.Text;
namespace Siger.Middlelayer.AccRepository.Entities
{
/// <summary>
/// 工装对应产品
/// </summary>
public class siger_automation_fixture_tools_product : AccEntityBase
{
public string guid { get; set; }
/// <summary>
/// 工装GUID
/// </summary>
public string fixturetools { get; set; }
/// <summary>
/// 产品ID
/// </summary>
public int productid { get; set; }
/// <summary>
/// 备注
/// </summary>
public string remark { get; set; }
public DateTime createtime { get; set; }
public int creator { get; set; }
public int updator { get; set; }
public DateTime? updatetime { get; set; }
public string extend1 { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace Siger.Middlelayer.AccRepository.Entities
{
/// <summary>
/// 储位信息
/// </summary>
public class siger_automation_location : AccEntityBase
{
public string guid { get; set; }
/// <summary>
/// 储位位置
/// </summary>
public int locationid { get; set; }
/// <summary>
/// 工装GUID
/// </summary>
public string fixturetools { get; set; }
/// <summary>
/// 物料ID
/// </summary>
public int materialid { get; set; }
/// <summary>
/// 工序ID
/// </summary>
public int processid { get; set; }
/// <summary>
/// 物料状态
/// </summary>
public int materialstate { get; set; }
/// <summary>
/// 附件
/// </summary>
public string attachment { get; set; }
public string filename { get; set; }
/// <summary>
/// 备注
/// </summary>
public string remark { get; set; }
public int updator { get; set; }
public DateTime? updatetime { get; set; }
public string extend1 { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace Siger.Middlelayer.AccRepository.Entities
{
/// <summary>
/// 工位属性
/// </summary>
public class siger_automation_section_property : AccEntityBase
{
public string guid { get; set; }
/// <summary>
/// 工位ID
/// </summary>
public int sectionid { get; set; }
/// <summary>
/// 1:上下料工位2:加工工位3:检验工位4:装配工位5:存储工位
/// </summary>
public int propertytype { get; set; }
/// <summary>
/// 0:不是上料1:是上料
/// </summary>
public string upload { get; set; }
/// <summary>
/// 0:不是下料1:是下料
/// </summary>
public string down { get; set; }
public DateTime createtime { get; set; }
public DateTime? updatetime { get; set; }
public string extend1 { get; set; }
}
}
......@@ -9,7 +9,13 @@ namespace Siger.Middlelayer.AccRepository.Entities
/// </summary>
public class siger_automation_machine_status:AccEntityBase
{
public string guid { get; set; }
/// <summary>
/// 工位ID
/// </summary>
public int section { get; set; }
/// <summary>
/// 设备ID
/// </summary>
public int machineid { get; set; }
/// <summary>
/// 1可用 0不可用
......
using System;
using System.Collections.Generic;
using System.Text;
namespace Siger.Middlelayer.AccRepository.Entities
{
/// <summary>
/// 自动线路径
/// </summary>
public class siger_automation_section_route : AccEntityBase
{
public string guid { get; set; }
/// <summary>
/// 产线
/// </summary>
public int sectionid { get; set; }
/// <summary>
/// 开始工位
/// </summary>
public int startsection { get; set; }
/// <summary>
/// 目标工位
/// </summary>
public int endsection { get; set; }
public DateTime createtime { get; set; }
public DateTime? updatetime { get; set; }
public string extend1 { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Text;
using static Siger.Middlelayer.Share.Enum.ModuleEnum.Automation;
namespace Siger.Middlelayer.AccRepository.Entities
{
/// <summary>
/// 工装台账信息
/// </summary>
public class siger_automation_task_list : AccEntityBase
{
public string guid { get; set; }
/// <summary>
/// 工位ID
/// </summary>
public int sectionid { get; set; }
/// <summary>
/// 触发方式
/// </summary>
public TaskTrigerType trigger { get; set; }
/// <summary>
/// 任务类型
/// </summary>
public TaskActionType tasktype { get; set; }
/// <summary>
/// 工件ID
/// </summary>
public int materialid { get; set; }
/// <summary>
/// 工单号
/// </summary>
public string ordercode { get; set; }
/// <summary>
/// 产品ID
/// </summary>
public int productid { get; set; }
/// <summary>
/// 工序ID
/// </summary>
public int processid { get; set; }
/// <summary>
/// 程序号
/// </summary>
public string programnumber { get; set; }
/// <summary>
/// 储位位置
/// </summary>
public int locationid { get; set; }
/// <summary>
/// 工装GUID
/// </summary>
public int fixturetools { get; set; }
/// <summary>
/// 动作类型 1 手动 2 自动
/// </summary>
public TaskTrigerType actiontype { get; set; }
/// <summary>
/// 动作
/// </summary>
public TaskAction action { get; set; }
/// <summary>
/// 是否已下发PLC 0:未下发 1:已下发
/// </summary>
public int send { get; set; }
/// <summary>
/// 触发时间
/// </summary>
public DateTime triggertime { get; set; }
/// <summary>
/// 完成时间
/// </summary>
public DateTime? completetime { get; set; }
/// <summary>
/// 操作人
/// </summary>
public int operater { get; set; }
/// <summary>
/// 操作时间
/// </summary>
public DateTime? operatetime { get; set; }
/// <summary>
/// 备注
/// </summary>
public string remark { get; set; }
public string extend1 { get; set; }
}
}
//-----------------------------------------------------------------------
// <copyright file=" siger_wms_storage.cs" company="xxxx Enterprises">
// * Copyright (C) 2019 xxxx Enterprises All Rights Reserved
// * version : 4.0.30319.42000
// * author : auto generated by T4
// * FileName: siger_wms_storage.cs
// * history : Created by T4 04/01/2019 09:14:26
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
namespace Siger.Middlelayer.AccRepository.Entities
{
/// <summary>
/// siger_wms_storage Entity Model
/// </summary>
public class siger_wms_storage : AccEntityBase
{
/// <summary>
/// 分类
/// </summary>
public int typeid { get; set; }
/// <summary>
/// 仓库名称
/// </summary>
public string name { get; set; }
/// <summary>
/// 编号
/// </summary>
public string serial_number { get; set; }
/// <summary>
/// 仓库详细地址
/// </summary>
public string address { get; set; }
/// <summary>
/// 联系人
/// </summary>
public string manager { get; set; }
/// <summary>
///
/// </summary>
public int creator { get; set; }
/// <summary>
///
/// </summary>
public DateTime create_time { get; set; }
/// <summary>
///
/// </summary>
public int updator { get; set; }
/// <summary>
///
/// </summary>
public DateTime update_time { get; set; }
public string description { get; set; }
public string phone { get; set; }
public string mobile { get; set; }
public string option { get; set; }
}
}
//-----------------------------------------------------------------------
// <copyright file=" siger_wms_storage_location.cs" company="xxxx Enterprises">
// * Copyright (C) 2019 xxxx Enterprises All Rights Reserved
// * version : 4.0.30319.42000
// * author : auto generated by T4
// * FileName: siger_wms_storage_location.cs
// * history : Created by T4 04/01/2019 09:14:26
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
namespace Siger.Middlelayer.AccRepository.Entities
{
/// <summary>
/// siger_wms_storage_location Entity Model
/// </summary>
public class siger_wms_storage_location : AccEntityBase
{
/// <summary>
/// 仓库id
/// </summary>
public int storageid { get; set; }
/// <summary>
/// 父类
/// </summary>
public int parentid { get; set; }
/// <summary>
///
/// </summary>
public string name { get; set; }
/// <summary>
/// 区分层级 区域1,货架2,层号3,位置4
/// </summary>
public int level { get; set; }
/// <summary>
/// 分类
/// </summary>
public int typeid { get; set; }
/// <summary>
/// 储位编号-只有level=4才有
/// </summary>
public string serial_number { get; set; }
/// <summary>
///
/// </summary>
public int creator { get; set; }
/// <summary>
///
/// </summary>
public DateTime create_time { get; set; }
/// <summary>
///
/// </summary>
public int updator { get; set; }
/// <summary>
///
/// </summary>
public DateTime update_time { get; set; }
public string option { get; set; }
public string realname { get; set; }
public int locationid { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using Microsoft.EntityFrameworkCore;
using Siger.Middlelayer.AccRepository.Entities;
using Siger.Middlelayer.AccRepository.Repositories.Interface;
using Siger.Middlelayer.AccRepository.Response;
using Siger.Middlelayer.Common;
using Siger.Middlelayer.Repository.Data.Acc;
using Siger.Middlelayer.Repository.Extensions;
using Siger.Middlelayer.Repository.Paged;
namespace Siger.Middlelayer.AccRepository.Repositories
......@@ -16,5 +20,88 @@ namespace Siger.Middlelayer.AccRepository.Repositories
{
_context = context;
}
public IPagedCollectionResult<ResponseAumationFixtureToolsAssembly> GetPagedList(int category, string code, string name, int projectid, int page, int pagesize)
{
var query = from q in _context.siger_automation_fixture_tools_assembly
join t1 in _context.siger_automation_fixture_tools on q.parent equals t1.guid into tt1
from t1 in tt1.DefaultIfEmpty()
join c1 in _context.siger_automation_fixture_tools_category on t1.category equals c1.guid
join t2 in _context.siger_automation_fixture_tools on q.son equals t2.guid
join c2 in _context.siger_automation_fixture_tools_category on t2.category equals c2.guid
join u in _context.siger_project_user on q.updator equals u.mid into uu
from u in uu.DefaultIfEmpty()
where q.projectId == projectid && q.status == (int)RowState.Valid && string.IsNullOrEmpty(q.parent)
select new ResponseAumationFixtureToolsAssembly
{
id = q.id,
parentid = t1 == null ? 0 : t1.id,
parentname = t1.name ?? "",
fixturetoolid = t2.id,
name = t2.name,
code = t2.code,
partnumber = t2.partnumber,
specfication = t2.specification,
updator = u.name ?? "",
status = q.status,
fileurl = q.attachment,
filename = q.filename,
categoryid = c2.id,
category = c2.name,
updatetime = q.updatetime.HasValue && q.updatetime > DateTime.MinValue ? q.updatetime.Value.ToString(ParameterConstant.DateTimeFormat) : ""
};
Expression<Func<ResponseAumationFixtureToolsAssembly, bool>> categoryExpression = f => true;
if (category > 0)
{
categoryExpression = q => q.categoryid == category;
}
Expression<Func<ResponseAumationFixtureToolsAssembly, bool>> codeExpression = f => true;
if (!string.IsNullOrEmpty(code))
{
categoryExpression = q => q.code.Contains(code);
}
Expression<Func<ResponseAumationFixtureToolsAssembly, bool>> nameExpression = f => true;
if (!string.IsNullOrEmpty(name))
{
nameExpression = q => q.name.Contains(name);
}
var expression = categoryExpression.And(codeExpression).And(nameExpression);
var entities = query.Where(expression).OrderByDescending(q => q.id).Skip((page - 1) * pagesize).Take(pagesize).AsNoTracking().ToList();
var totalCount = query.Where(expression).Count();
return new PagedCollectionResult<ResponseAumationFixtureToolsAssembly>(entities, totalCount);
}
public IEnumerable<ResponseAumationFixtureToolsAssembly> GetDetailList(int id, int projectid)
{
var query = from q in _context.siger_automation_fixture_tools_assembly
join t1 in _context.siger_automation_fixture_tools on q.parent equals t1.guid into tt1
from t1 in tt1.DefaultIfEmpty()
join c1 in _context.siger_automation_fixture_tools_category on t1.category equals c1.guid
join t2 in _context.siger_automation_fixture_tools on q.son equals t2.guid
join c2 in _context.siger_automation_fixture_tools_category on t2.category equals c2.guid
join u in _context.siger_project_user on q.updator equals u.mid into uu
from u in uu.DefaultIfEmpty()
where q.projectId == projectid && q.status == (int)RowState.Valid && q.id == id
select new ResponseAumationFixtureToolsAssembly
{
id = q.id,
parentid = t1 == null ? 0 : t1.id,
parentname = t1.name ?? "",
fixturetoolid = t2.id,
name = t2.name,
code = t2.code,
partnumber = t2.partnumber,
specfication = t2.specification,
updator = u.name ?? "",
status = q.status,
fileurl = q.attachment,
filename = q.filename,
categoryid = c2.id,
category = c2.name,
updatetime = q.updatetime.HasValue && q.updatetime > DateTime.MinValue ? q.updatetime.Value.ToString(ParameterConstant.DateTimeFormat) : ""
};
var entities = query.OrderByDescending(q => q.id).AsNoTracking().ToList();
return entities;
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using Microsoft.EntityFrameworkCore;
......@@ -23,7 +24,8 @@ namespace Siger.Middlelayer.AccRepository.Repositories
{
Expression<Func<ResponseFixtureToolsCategory, bool>> FunNum = f => true;
var query = from q in _context.siger_automation_fixture_tools_category
join p in _context.siger_automation_fixture_tools_category on q.parent equals p.guid
join p in _context.siger_automation_fixture_tools_category on q.parent equals p.guid into pp
from p in pp.DefaultIfEmpty()
where q.projectId == projectid && q.status == (int)RowState.Valid
select new ResponseFixtureToolsCategory
{
......
using System;
using System.Linq;
using System.Linq.Expressions;
using Microsoft.EntityFrameworkCore;
using Siger.Middlelayer.AccRepository.Entities;
using Siger.Middlelayer.AccRepository.Repositories.Interface;
using Siger.Middlelayer.AccRepository.Response;
using Siger.Middlelayer.Common;
using Siger.Middlelayer.Repository.Data.Acc;
using Siger.Middlelayer.Repository.Extensions;
using Siger.Middlelayer.Repository.Paged;
namespace Siger.Middlelayer.AccRepository.Repositories
{
internal class AutomationFixtureToolsProductRepository : AccRepositoryBase<siger_automation_fixture_tools_product>, IAutomationFixtureToolsProductRepository
{
private ApiAccDbContext _context;
public AutomationFixtureToolsProductRepository(ApiAccDbContext context) : base(context)
{
_context = context;
}
public IPagedCollectionResult<ResponseAumationFixtureToolsProduct> GetPagedList(int category, int tool, int product, int projectid, int page, int pagesize)
{
var query = from q in _context.siger_automation_fixture_tools_product
join t in _context.siger_automation_fixture_tools on q.fixturetools equals t.guid
join c in _context.siger_automation_fixture_tools_category on t.category equals c.guid
join p in _context.siger_project_product on q.productid equals p.id
join u in _context.siger_project_user on q.updator equals u.mid into uu
from u in uu.DefaultIfEmpty()
where q.projectId == projectid && q.status == (int)RowState.Valid
select new ResponseAumationFixtureToolsProduct
{
id = q.id,
categoryid=c.id,
categoryname=c.name,
fixturetoolid = t.id,
fixturetool = t.name,
productid = q.productid,
productname = p.name,
remark = q.remark,
updator = q.updator,
updatetime = q.updatetime.HasValue && q.updatetime > DateTime.MinValue ? q.updatetime.Value.ToString(ParameterConstant.DateTimeFormat) : ""
};
Expression<Func<ResponseAumationFixtureToolsProduct, bool>> categoryExpression = f => true;
if (category > 0)
{
categoryExpression = q => q.categoryid == category;
}
Expression<Func<ResponseAumationFixtureToolsProduct, bool>> toolExpression = f => true;
if (tool > 0)
{
toolExpression = q => q.fixturetoolid == tool;
}
Expression<Func<ResponseAumationFixtureToolsProduct, bool>> productExpression = f => true;
if (product > 0)
{
productExpression = q => q.productid == product;
}
var expression = categoryExpression.And(toolExpression).And(productExpression);
var entities = query.Where(expression).OrderByDescending(q => q.id).Skip((page - 1) * pagesize).Take(pagesize).AsNoTracking().ToList();
var totalCount = query.Where(expression).Count();
return new PagedCollectionResult<ResponseAumationFixtureToolsProduct>(entities, totalCount);
}
}
}
using System;
using System.Linq;
using System.Linq.Expressions;
using Microsoft.EntityFrameworkCore;
using Siger.Middlelayer.AccRepository.Entities;
using Siger.Middlelayer.AccRepository.Repositories.Interface;
using Siger.Middlelayer.AccRepository.Response;
using Siger.Middlelayer.Common;
using Siger.Middlelayer.Repository.Data.Acc;
using Siger.Middlelayer.Repository.Extensions;
using Siger.Middlelayer.Repository.Paged;
namespace Siger.Middlelayer.AccRepository.Repositories
{
internal class AutomationFixtureToolsRepository : AccRepositoryBase<siger_automation_fixture_tools>, IAutomationFixtureToolsRepository
{
private ApiAccDbContext _context;
public AutomationFixtureToolsRepository(ApiAccDbContext context) : base(context)
{
_context = context;
}
public IPagedCollectionResult<ResponseFixtureTools> GetPagedList(int category, string code, string name, int state,
int projectid, int page, int pagesize)
{
var query = from q in _context.siger_automation_fixture_tools
join p in _context.siger_automation_fixture_tools_category on q.category equals p.guid
join u in _context.siger_project_user on q.updator equals u.mid into uu
from u in uu.DefaultIfEmpty()
where q.projectId == projectid && q.status == (int)RowState.Valid
select new ResponseFixtureTools
{
id = q.id,
name = q.name,
guid = q.guid,
categoryid = p.id,
category = p.name,
managetype = q.managetype,
partnumber = q.partnumber,
specification = q.specification,
number = q.number,
remark = q.remark,
fileurl = q.attachment ?? "",
filename = q.filename ?? "",
code = q.code,
updator = u.name ?? "",
status = q.status,
updatetime = q.updatetime.HasValue && q.updatetime > DateTime.MinValue ? q.updatetime.Value.ToString(ParameterConstant.DateTimeFormat) : ""
};
Expression<Func<ResponseFixtureTools, bool>> categoryExpression = f => true;
if (category > 0)
{
categoryExpression = q => q.categoryid == category;
}
Expression<Func<ResponseFixtureTools, bool>> codeExpression = f => true;
if (!string.IsNullOrEmpty(code))
{
categoryExpression = q => q.code.Contains(code);
}
Expression<Func<ResponseFixtureTools, bool>> nameExpression = f => true;
if (!string.IsNullOrEmpty(name))
{
nameExpression = q => q.name.Contains(name);
}
Expression<Func<ResponseFixtureTools, bool>> stateExpression = f => true;
if (state >= 0)
{
stateExpression = q => q.status == state;
}
var expression = categoryExpression.And(codeExpression).And(nameExpression).And(stateExpression);
var entities = query.Where(expression).OrderByDescending(q => q.id).Skip((page - 1) * pagesize).Take(pagesize).AsNoTracking().ToList();
var totalCount = query.Where(expression).Count();
return new PagedCollectionResult<ResponseFixtureTools>(entities, totalCount);
}
}
}
using System;
using System.Linq;
using System.Linq.Expressions;
using Microsoft.EntityFrameworkCore;
using Siger.Middlelayer.AccRepository.Entities;
using Siger.Middlelayer.AccRepository.Repositories.Interface;
using Siger.Middlelayer.AccRepository.Response;
using Siger.Middlelayer.Common;
using Siger.Middlelayer.Repository.Data.Acc;
using Siger.Middlelayer.Repository.Extensions;
using Siger.Middlelayer.Repository.Paged;
namespace Siger.Middlelayer.AccRepository.Repositories
{
internal class AutomationLocationRepository : AccRepositoryBase<siger_automation_location>, IAutomationLocationRepository
{
private ApiAccDbContext _context;
public AutomationLocationRepository(ApiAccDbContext context) : base(context)
{
_context = context;
}
public IPagedCollectionResult<ResponseAutomationLocation> GetPagedList(int wavehouseid, int locationid, int projectid, int page, int pagesize)
{
var query = from q in _context.siger_automation_location
join t in _context.siger_automation_fixture_tools on q.fixturetools equals t.guid
join c in _context.siger_automation_fixture_tools_category on t.category equals c.guid
join l in _context.siger_wms_storage_location on q.locationid equals l.locationid
join w in _context.siger_wms_storage on l.storageid equals w.id
join m in _context.siger_tr_assist_materials on q.materialid equals m.id
join p in _context.siger_project_process on q.processid equals p.id into pp
from p in pp.DefaultIfEmpty()
join u in _context.siger_project_user on q.updator equals u.mid into uu
from u in uu.DefaultIfEmpty()
where q.projectId == projectid && q.status == (int)RowState.Valid
select new ResponseAutomationLocation
{
id = q.id,
locationid = l.id,
location = l.name,
wavehouseid = w.id,
wavehouse = w.name,
fixturetoolid = t.id,
fixturetool = t.name,
category = c.name,
code = t.code,
specfication = t.specification,
materialid = q.materialid,
materialcode = m.pn,
processid = q.processid,
processnumber = p == null ? 0 : p.Process_Seq,
processname = p.Process_name ?? "",
materialstate = q.materialstate,
fileurl = q.attachment ?? "",
filename = q.filename ?? "",
remark = q.remark,
updator = u.name ?? "",
status = q.status,
updatetime = q.updatetime.HasValue && q.updatetime > DateTime.MinValue ? q.updatetime.Value.ToString(ParameterConstant.DateTimeFormat) : ""
};
Expression<Func<ResponseAutomationLocation, bool>> wavehouseidExpression = f => true;
if (wavehouseid > 0)
{
wavehouseidExpression = q => q.wavehouseid == wavehouseid;
}
Expression<Func<ResponseAutomationLocation, bool>> locationidExpression = f => true;
if (locationid > 0)
{
locationidExpression = q => q.locationid == locationid;
}
var expression = wavehouseidExpression.And(locationidExpression);
var entities = query.Where(expression).OrderByDescending(q => q.id).Skip((page - 1) * pagesize).Take(pagesize).AsNoTracking().ToList();
var totalCount = query.Where(expression).Count();
return new PagedCollectionResult<ResponseAutomationLocation>(entities, totalCount);
}
public siger_wms_storage_location GetLocation(int id, int projectid)
{
return _context.siger_wms_storage_location.FirstOrDefault(q => q.locationid == id && q.projectId == projectid && q.status == (int)RowState.Valid);
}
}
}
using System;
using System.Linq;
using System.Linq.Expressions;
using Microsoft.EntityFrameworkCore;
using Siger.Middlelayer.AccRepository.Entities;
using Siger.Middlelayer.AccRepository.Repositories.Interface;
using Siger.Middlelayer.Repository.Data.Acc;
using Siger.Middlelayer.Repository.Paged;
namespace Siger.Middlelayer.AccRepository.Repositories
{
internal class AutomationSectionPropertyRepository : AccRepositoryBase<siger_automation_section_property>, IAutomationSectionPropertyRepository
{
private ApiAccDbContext _context;
public AutomationSectionPropertyRepository(ApiAccDbContext context) : base(context)
{
_context = context;
}
}
}
using System;
using System.Linq;
using System.Linq.Expressions;
using Microsoft.EntityFrameworkCore;
using Siger.Middlelayer.AccRepository.Entities;
using Siger.Middlelayer.AccRepository.Repositories.Interface;
using Siger.Middlelayer.Repository.Data.Acc;
using Siger.Middlelayer.Repository.Paged;
namespace Siger.Middlelayer.AccRepository.Repositories
{
internal class AutomationSectionRouteRepository : AccRepositoryBase<siger_automation_section_route>, IAutomationSectionRouteRepository
{
private ApiAccDbContext _context;
public AutomationSectionRouteRepository(ApiAccDbContext context) : base(context)
{
_context = context;
}
}
}
using System;
using System.Linq;
using System.Linq.Expressions;
using Microsoft.EntityFrameworkCore;
using Siger.Middlelayer.AccRepository.Entities;
using Siger.Middlelayer.AccRepository.Repositories.Interface;
using Siger.Middlelayer.Repository.Data.Acc;
using Siger.Middlelayer.Repository.Paged;
namespace Siger.Middlelayer.AccRepository.Repositories
{
internal class AutomationTaskListRepository : AccRepositoryBase<siger_automation_task_list>, IAutomationTaskListRepository
{
private ApiAccDbContext _context;
public AutomationTaskListRepository(ApiAccDbContext context) : base(context)
{
_context = context;
}
}
}
using Siger.Middlelayer.AccRepository.Entities;
using Siger.Middlelayer.AccRepository.Response;
using Siger.Middlelayer.Repository.Data.Acc;
using Siger.Middlelayer.Repository.Paged;
using System.Collections.Generic;
namespace Siger.Middlelayer.AccRepository.Repositories.Interface
{
public interface IAutomationFixtureToolsAssemblyRepository : IAccRepositoryBase<siger_automation_fixture_tools_assembly>
{
IPagedCollectionResult<ResponseAumationFixtureToolsAssembly> GetPagedList(int category, string code, string name, int projectid, int page, int pagesize);
IEnumerable<ResponseAumationFixtureToolsAssembly> GetDetailList(int id, int projectid);
}
}
using Siger.Middlelayer.AccRepository.Entities;
using Siger.Middlelayer.AccRepository.Response;
using Siger.Middlelayer.Repository.Data.Acc;
using Siger.Middlelayer.Repository.Paged;
namespace Siger.Middlelayer.AccRepository.Repositories.Interface
{
public interface IAutomationFixtureToolsProductRepository : IAccRepositoryBase<siger_automation_fixture_tools_product>
{
IPagedCollectionResult<ResponseAumationFixtureToolsProduct> GetPagedList(int category, int tool, int product, int projectid, int page, int pagesize);
}
}
using Siger.Middlelayer.AccRepository.Entities;
using Siger.Middlelayer.AccRepository.Response;
using Siger.Middlelayer.Repository.Data.Acc;
using Siger.Middlelayer.Repository.Paged;
namespace Siger.Middlelayer.AccRepository.Repositories.Interface
{
public interface IAutomationFixtureToolsRepository : IAccRepositoryBase<siger_automation_fixture_tools>
{
IPagedCollectionResult<ResponseFixtureTools> GetPagedList(int category, string code, string name, int state,
int projectid, int page, int pagesize);
}
}
using Siger.Middlelayer.AccRepository.Entities;
using Siger.Middlelayer.AccRepository.Response;
using Siger.Middlelayer.Repository.Data.Acc;
using Siger.Middlelayer.Repository.Paged;
namespace Siger.Middlelayer.AccRepository.Repositories.Interface
{
public interface IAutomationLocationRepository : IAccRepositoryBase<siger_automation_location>
{
IPagedCollectionResult<ResponseAutomationLocation> GetPagedList(int wavehouseid, int locationid, int projectid, int page, int pagesize);
siger_wms_storage_location GetLocation(int id, int projectid);
}
}
using Siger.Middlelayer.AccRepository.Entities;
using Siger.Middlelayer.Repository.Data.Acc;
using Siger.Middlelayer.Repository.Paged;
namespace Siger.Middlelayer.AccRepository.Repositories.Interface
{
public interface IAutomationSectionPropertyRepository : IAccRepositoryBase<siger_automation_section_property>
{
}
}
using Siger.Middlelayer.AccRepository.Entities;
using Siger.Middlelayer.Repository.Data.Acc;
using Siger.Middlelayer.Repository.Paged;
namespace Siger.Middlelayer.AccRepository.Repositories.Interface
{
public interface IAutomationSectionRouteRepository : IAccRepositoryBase<siger_automation_section_route>
{
}
}
using Siger.Middlelayer.AccRepository.Entities;
using Siger.Middlelayer.Repository.Data.Acc;
using Siger.Middlelayer.Repository.Paged;
namespace Siger.Middlelayer.AccRepository.Repositories.Interface
{
public interface IAutomationTaskListRepository : IAccRepositoryBase<siger_automation_task_list>
{
}
}
......@@ -22,4 +22,122 @@ namespace Siger.Middlelayer.AccRepository.Request
{
public List<int> ids { get; set; } = new List<int>();
}
public class RequestAddFixtureTools
{
/// <summary>
/// 工装类别
/// </summary>
public string categoryid { get; set; }
/// <summary>
/// 管理类型
/// </summary>
public string managetype { get; set; }
/// <summary>
/// 工装料号
/// </summary>
public string partnumber { get; set; }
/// <summary>
/// 工装名称
/// </summary>
public string name { get; set; }
/// <summary>
/// 规格型号
/// </summary>
public string specifition { get; set; }
/// <summary>
/// 数量
/// </summary>
public string number { get; set; }
/// <summary>
/// 备注
/// </summary>
public string remark { get; set; }
/// <summary>
/// 附件
/// </summary>
public string fileurl { get; set; }
public string filename { get; set; }
/// <summary>
/// 工装编号
/// </summary>
public string code { get; set; }
}
public class RequestUpdateFixtureTools : RequestAddFixtureTools
{
public int id { get; set; }
}
public class RequestAddFixtureToolsProduct
{
/// <summary>
/// 工装ID
/// </summary>
public string fixturetoolid { get; set; }
/// <summary>
/// 产品ID
/// </summary>
public string productid { get; set; }
/// <summary>
/// 备注
/// </summary>
public string remark { get; set; }
}
public class RequestUpdateFixtureToolsProduct : RequestAddFixtureToolsProduct
{
public int id { get; set; }
}
public class RequestAddAutomationLocation
{
/// <summary>
/// 储位位置
/// </summary>
public string locationid { get; set; }
/// <summary>
/// 工装ID
/// </summary>
public string fixturetoolid { get; set; }
/// <summary>
/// 物料ID
/// </summary>
public string materialid { get; set; }
/// <summary>
/// 工序ID
/// </summary>
public string processid { get; set; }
/// <summary>
/// 附件
/// </summary>
public string fileurl { get; set; }
public string filename { get; set; }
/// <summary>
/// 备注
/// </summary>
public string remark { get; set; }
}
public class RequestUpdateAutomationLocation : RequestAddAutomationLocation
{
public int id { get; set; }
}
public class RequestAddFixtureToolAssembly
{
public string parentid { get; set; }
public string fixturetoolid { get; set; }
public string fileurl { get; set; }
public string filename { get; set; }
}
public class RequestUpdateFixtureToolAssembly : RequestAddFixtureToolAssembly
{
public int id { get; set; }
}
}
......@@ -18,11 +18,109 @@ namespace Siger.Middlelayer.AccRepository.Response
public string parent { get; set; }
public DateTime time { get; set; }s
public DateTime time { get; set; }
public string createtime { get; set; }
public string updatetime { get; set; }
public string extend1 { get; set; }
}
public class ResponseFixtureTools
{
public int id { get; set; }
public string guid { get; set; }
/// <summary>
/// 工装类别ID
/// </summary>
public int categoryid { get; set; }
/// <summary>
/// 工装类别名称
/// </summary>
public string category { get; set; }
/// <summary>
/// 管理类型
/// </summary>
public int managetype { get; set; }
/// <summary>
/// 工装料号
/// </summary>
public string partnumber { get; set; }
/// <summary>
/// 工装名称
/// </summary>
public string name { get; set; }
/// <summary>
/// 规格型号
/// </summary>
public string specification { get; set; }
/// <summary>
/// 数量
/// </summary>
public int number { get; set; }
/// <summary>
/// 备注
/// </summary>
public string remark { get; set; }
/// <summary>
/// 附件
/// </summary>
public string fileurl { get; set; }
public string filename { get; set; }
/// <summary>
/// 工装编号
/// </summary>
public string code { get; set; }
public string updator { get; set; }
public int status { get; set; }
public string updatetime { get; set; }
}
public class ResponseAumationFixtureToolsProduct
{
public int id { get; set; }
public int categoryid { get; set; }
public string categoryname { get; set; }
/// <summary>
/// 工装ID
/// </summary>
public int fixturetoolid { get; set; }
public string fixturetool { get; set; }
/// <summary>
/// 产品ID
/// </summary>
public int productid { get; set; }
public string productname { get; set; }
/// <summary>
/// 备注
/// </summary>
public string remark { get; set; }
public int updator { get; set; }
public string updatetime { get; set; }
}
public class ResponseAumationFixtureToolsAssembly
{
public int id { get; set; }
public int parentid { get; set; }
public string parentname { get; set; }
public int categoryid { get; set; }
public string category { get; set; }
public int fixturetoolid { get; set; }
public string partnumber { get; set; }
public string name { get; set; }
public string specfication { get; set; }
public string code { get; set; }
public string updator { get; set; }
public string updatetime { get; set; }
public int status { get; set; }
public string fileurl { get; set; }
public string filename { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace Siger.Middlelayer.AccRepository.Response
{
public class ResponseAutomationLocation
{
public int id { get; set; }
/// <summary>
/// 储位位置
/// </summary>
public int locationid { get; set; }
public string location { get; set; }
public int wavehouseid { get; set; }
public string wavehouse { get; set; }
/// <summary>
/// 工装ID
/// </summary>
public int fixturetoolid { get; set; }
public string fixturetool { get; set; }
public string category { get; set; }
public string code { get; set; }
public string specfication { get; set; }
/// <summary>
/// 物料ID
/// </summary>
public int materialid { get; set; }
public string materialcode { get; set; }
/// <summary>
/// 工序ID
/// </summary>
public int processid { get; set; }
public int processnumber { get; set; }
public string processname { get; set; }
/// <summary>
/// 物料状态
/// </summary>
public int materialstate { get; set; }
/// <summary>
/// 附件
/// </summary>
public string fileurl { get; set; }
public string filename { get; set; }
/// <summary>
/// 备注
/// </summary>
public string remark { get; set; }
public string updator { get; set; }
public string updatetime { get; set; }
public int status { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace Siger.Middlelayer.AccRepository.Response
{
public class FixtureToolsCategoryTree
{
public int value { get; set; }
public string label { get; set; }
public List<FixtureToolsCategoryTree> children = new List<FixtureToolsCategoryTree>();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment