Commit 2884190f by xin.yang

fix bug

parent 657f60cf
......@@ -724,6 +724,17 @@ export default {
'9000499': '储位层级错误',
'9000500': '该类别绑定了储位,不能删除',
'9000501': '该仓库绑定了储位,不能删除',
'9000502': '请填写工装类型',
'9000503': '请填写管理类型',
'9000504': '请填写工装名称',
'9000505': '请填写工装料号',
'9000506': '请填写工装编号',
'9000507': '请填写规格型号',
'9000508': '请填写数量',
'9000509': '请填写状态',
'9000510': '数量必须是整数',
'9000511': '管理类型填写单件或批次',
'9000512': '状态填写可用或停用',
'9100000': 'Departments cannot be empty',
'9100001': 'Position cannot be empty',
......
......@@ -751,6 +751,17 @@ export default {
'9000499': '储位层级错误',
'9000500': '该类别绑定了储位,不能删除',
'9000501': '该仓库绑定了储位,不能删除',
'9000502': '请填写工装类型',
'9000503': '请填写管理类型',
'9000504': '请填写工装名称',
'9000505': '请填写工装料号',
'9000506': '请填写工装编号',
'9000507': '请填写规格型号',
'9000508': '请填写数量',
'9000509': '请填写状态',
'9000510': '数量必须是整数',
'9000511': '管理类型填写单件或批次',
'9000512': '状态填写可用或停用',
'9100000': '部门不能为空',
......
......@@ -1488,5 +1488,39 @@ namespace Siger.Middlelayer.Common
[Description("该仓库绑定了储位,不能删除")]
WavehouseBindLocationData,
[Description("请填写工装类型")]
PleaseInputFixtureCategory,
[Description("请填写管理类型")]
PleaseInputManageType,
[Description("请填写工装名称")]
PleaseInputFixtureName,
[Description("请填写工装料号")]
PleaseInputFixtureCode,
[Description("请填写工装编号")]
PleaseInputPartNumber,
[Description("请填写规格型号")]
PleaseInputSpecfication,
[Description("请填写数量")]
PleaseInputNumber,
[Description("请填写状态")]
PleaseInputStatus,
[Description("数量必须是整数")]
NumberPleaseInputInt,
[Description("管理类型填写单件或批次")]
ManageTypeInputSingleOrBatch,
[Description("状态填写可用或停用")]
StatusInputUsefulOrDisabled,
}
}
......@@ -142,11 +142,54 @@ namespace Siger.Middlelayer.AccRepository.Repositories
{
rowIndex++;
if (string.IsNullOrEmpty(item.PartNumber) || string.IsNullOrEmpty(item.Code) || string.IsNullOrEmpty(item.Name) || string.IsNullOrEmpty(item.Catgeory) ||
string.IsNullOrEmpty(item.Manage) || string.IsNullOrEmpty(item.Number) || string.IsNullOrEmpty(item.Status) || string.IsNullOrEmpty(item.Specfication))
if (string.IsNullOrEmpty(item.Catgeory))
{
errors.Add($"{rowIndex},{(int)RequestEnum.ParameterMiss}");
errors.Add($"{rowIndex},{(int)RequestEnum.PleaseInputFixtureCategory}");
}
if (string.IsNullOrEmpty(item.Manage))
{
errors.Add($"{rowIndex},{(int)RequestEnum.PleaseInputManageType}");
}
if (string.IsNullOrEmpty(item.Name))
{
errors.Add($"{rowIndex},{(int)RequestEnum.PleaseInputFixtureName}");
}
if (string.IsNullOrEmpty(item.PartNumber))
{
errors.Add($"{rowIndex},{(int)RequestEnum.PleaseInputPartNumber}");
}
if (string.IsNullOrEmpty(item.Code))
{
errors.Add($"{rowIndex},{(int)RequestEnum.PleaseInputFixtureCode}");
}
if (string.IsNullOrEmpty(item.Specfication))
{
errors.Add($"{rowIndex},{(int)RequestEnum.PleaseInputSpecfication}");
}
if (string.IsNullOrEmpty(item.Number))
{
errors.Add($"{rowIndex},{(int)RequestEnum.PleaseInputNumber}");
}
if (string.IsNullOrEmpty(item.Status))
{
errors.Add($"{rowIndex},{(int)RequestEnum.PleaseInputStatus}");
}
if(!int.TryParse(item.Number, out int number))
{
errors.Add($"{rowIndex},{(int)RequestEnum.NumberPleaseInputInt}");
}
if (item.Manage.Trim() != "单件" && item.Manage.Trim() != "批次")
{
errors.Add($"{rowIndex},{(int)RequestEnum.ManageTypeInputSingleOrBatch}");
}
if (item.Status.Trim() != "可用" && item.Status.Trim() != "停用")
{
errors.Add($"{rowIndex},{(int)RequestEnum.StatusInputUsefulOrDisabled}");
}
var data = _context.siger_automation_fixture_tools.FirstOrDefault(q => q.projectId == projectid && q.code == item.Code);
if (data != null)
{
......@@ -172,7 +215,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
{
guid = Guid.NewGuid().ToString(),
category = category.guid,
managetype = item.Manage == "单件" ? 1 : 2,
managetype = item.Manage.Trim() == "单件" ? 1 : 2,
partnumber = item.PartNumber,
name = item.Name,
specification = item.Specfication,
......@@ -182,7 +225,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
filename = "",
code = item.Code,
projectId = projectid,
status = item.Status == "可用" ? (int)RowState.Valid : (int)RowState.Invalid,
status = item.Status.Trim() == "可用" ? (int)RowState.Valid : (int)RowState.Invalid,
createtime = DateTime.Now,
updatetime = DateTime.Now,
creator = userid,
......
......@@ -449,6 +449,6 @@ CREATE TABLE `siger_automation_fixture_tools_moniter` (
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
ALTER TABLE siger_wms_storage_location ADD COLUMN locationid int(11) NOT NULL DEFAULT 0 COMMENT '储位ID';
SET FOREIGN_KEY_CHECKS = 1;
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