Merge remote-tracking branch 'origin/master'

This commit is contained in:
2026-01-07 13:42:46 +08:00
7 changed files with 42 additions and 4 deletions

View File

@@ -53,6 +53,10 @@ public class SetupFurTempServiceImpl implements ISetupFurTempService
@Override
public int insertSetupFurTemp(SetupFurTemp setupFurTemp)
{
//如果 String steelGrade 存在则不能新增
if (setupFurTempMapper.selectSetupFurTempBySteelGrade(setupFurTemp.getSteelGrade()) != null) {
throw new RuntimeException("该参数已存在");
}
setupFurTemp.setCreateTime(DateUtils.getNowDate());
return setupFurTempMapper.insertSetupFurTemp(setupFurTemp);
}

View File

@@ -53,6 +53,10 @@ public class SetupTensionServiceImpl implements ISetupTensionService
@Override
public int insertSetupTension(SetupTension setupTension)
{
//如果thick 和 yield_stren已存在那么就不需要插入
if(setupTensionMapper.selectSetupTensionByThick(setupTension.getThick(), setupTension.getYieldStren()) != null){
throw new RuntimeException("该参数已存在");
}
setupTension.setCreateTime(DateUtils.getNowDate());
return setupTensionMapper.insertSetupTension(setupTension);
}

View File

@@ -53,6 +53,10 @@ public class SetupTlServiceImpl implements ISetupTlService
@Override
public int insertSetupTl(SetupTl setupTl)
{
//如果thick 和 yield_stren已存在那么就不需要插入
if(setupTlMapper.selectSetupTlBySteelGrade(setupTl.getSteelGrade(), setupTl.getYieldStren(), setupTl.getThick()) != null){
throw new RuntimeException("该参数已存在");
}
setupTl.setCreateTime(DateUtils.getNowDate());
return setupTlMapper.insertSetupTl(setupTl);
}

View File

@@ -53,6 +53,10 @@ public class SetupTmBendforceServiceImpl implements ISetupTmBendforceService
@Override
public int insertSetupTmBendforce(SetupTmBendforce setupTmBendforce)
{
// 如果width 和 rollForce 在表里已存在则不能新增
if (setupTmBendforceMapper.selectSetupTmBendforceByWidth(setupTmBendforce.getWidth(),setupTmBendforce.getRollForce()) != null) {
throw new RuntimeException("该参数已存在");
}
setupTmBendforce.setCreateTime(DateUtils.getNowDate());
return setupTmBendforceMapper.insertSetupTmBendforce(setupTmBendforce);
}

View File

@@ -53,6 +53,10 @@ public class SetupTmMeshServiceImpl implements ISetupTmMeshService
@Override
public int insertSetupTmMesh(SetupTmMesh setupTmMesh)
{
// 如果steelGrade,yieldStren,thick 在表里已存在则不能新增
if (setupTmMeshMapper.selectSetupTmMeshBySteelGrade(setupTmMesh.getSteelGrade(), setupTmMesh.getYieldStren(), setupTmMesh.getThick()) != null) {
throw new RuntimeException("该参数已存在");
}
setupTmMesh.setCreateTime(DateUtils.getNowDate());
return setupTmMeshMapper.insertSetupTmMesh(setupTmMesh);
}

View File

@@ -53,6 +53,10 @@ public class SetupTmRollforceServiceImpl implements ISetupTmRollforceService
@Override
public int insertSetupTmRollforce(SetupTmRollforce setupTmRollforce)
{
//如果steelGrade,yieldStren,thick,elong 在表里已存在则不能新增
if (setupTmRollforceMapper.selectSetupTmRollforceBySteelGrade(setupTmRollforce.getSteelGrade(), setupTmRollforce.getYieldStren(), setupTmRollforce.getThick(), setupTmRollforce.getElong()) != null) {
throw new RuntimeException("该数据已存在");
}
setupTmRollforce.setCreateTime(DateUtils.getNowDate());
return setupTmRollforceMapper.insertSetupTmRollforce(setupTmRollforce);
}