Commit 28d35711 authored by wdy's avatar wdy

Merge branch 'dev' of http://gitlab.91isoft.com:90/wangfei/vehicle-quality-review into wangdingyi

parents 40a0e8b1 c75d4819
......@@ -71,9 +71,11 @@ public class SampleManagementServiceImpl extends ServiceImpl<SampleManagementMap
public int insertSampleManagement(Sample sampleManagement)
{
// 判断车辆识别码是否重复
int dentificationCode = sampleManagementMapper.selectIdentificationCodeCount(sampleManagement);
if(dentificationCode>0){
throw new ServiceException("车辆识别码已存在");
if(Sample.SAMPLE_FLAG_CAR.equals(sampleManagement.getFlag())){
int dentificationCode = sampleManagementMapper.selectIdentificationCodeCount(sampleManagement);
if(dentificationCode>0){
throw new ServiceException("车辆识别码已存在");
}
}
// 判断样品编号是否存在
int sampleNumber = sampleManagementMapper.selectSampleNumberCount(sampleManagement);
......@@ -95,9 +97,11 @@ public class SampleManagementServiceImpl extends ServiceImpl<SampleManagementMap
public int updateSampleManagement(Sample sampleManagement)
{
// 判断车辆识别码是否重复
int dentificationCode = sampleManagementMapper.selectIdentificationCodeCount(sampleManagement);
if(dentificationCode>0){
throw new ServiceException("车辆识别码已存在");
if(Sample.SAMPLE_FLAG_CAR.equals(sampleManagement.getFlag())){
int dentificationCode = sampleManagementMapper.selectIdentificationCodeCount(sampleManagement);
if(dentificationCode>0){
throw new ServiceException("车辆识别码已存在");
}
}
// 判断样品编号是否存在
int sampleNumber = sampleManagementMapper.selectSampleNumberCount(sampleManagement);
......
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