Commit c75d4819 authored by 王飞's avatar 王飞

Merge branch 'gaoying' into 'dev'

Gaoying

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