Commit d4ca1cad by xin.yang

fix bug

parent 07ecb922
......@@ -202,7 +202,7 @@ namespace Siger.ApiACC.Controllers
throw new BadRequestException(RequestEnum.LocationNull);
}
var exsit = _autoLocationRepository.Get(q => q.projectId == ProjectId && q.status == (int)RowState.Valid &&
(q.fixturetools == req.fixturetoolid || q.locationid == req.locationid.ToInt()));
(q.fixturetools == fixturetool.guid || q.location_cid == req.locationid.ToInt()));
if(exsit != null)
{
throw new BadRequestException(RequestEnum.DataExist);
......@@ -258,7 +258,7 @@ namespace Siger.ApiACC.Controllers
throw new BadRequestException(RequestEnum.LocationNull);
}
var exsit = _autoLocationRepository.Get(q => q.projectId == ProjectId && q.status == (int)RowState.Valid &&
(q.fixturetools == req.fixturetoolid || q.locationid == req.locationid.ToInt()) && q.id != req.id);
(q.fixturetools == fixturetool.guid || q.location_cid == req.locationid.ToInt()) && q.id != req.id);
if (exsit != null)
{
throw new BadRequestException(RequestEnum.DataExist);
......
......@@ -268,7 +268,8 @@ CREATE TABLE IF NOT EXISTS `siger_automation_fixture_tools_product` (
CREATE TABLE IF NOT EXISTS `siger_automation_location` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`guid` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`locationid` int(11) NOT NULL DEFAULT 0 COMMENT '储位位置',
`location_cid` int(11) NOT NULL DEFAULT 0 COMMENT '储位自增ID',
`locationid` int(11) NOT NULL DEFAULT 0 COMMENT '储位位置',
`fixturetools` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '工装GUID',
`fixturename` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '工装GUID',
`productid` int(11) NULL DEFAULT 0 COMMENT '产品ID',
......
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