|
|
|
@ -576,6 +576,13 @@ public class QcServiceImpl implements QcService { |
|
|
|
**/ |
|
|
|
@Override |
|
|
|
public void templateUpdate(QcTemplateData data) { |
|
|
|
// 获得 site 和 bu |
|
|
|
if (data.getBu().split("_").length >= 2 ) { |
|
|
|
data.setSite(data.getBu().split("_")[0]); |
|
|
|
data.setBuNo(data.getBu().split("_")[1]); |
|
|
|
} else { |
|
|
|
throw new RuntimeException("工厂和部门有误!"); |
|
|
|
} |
|
|
|
List<QcTemplateData> checkTemplateOnlyOne = qcMapper.checkTemplateOnlyOne(data); |
|
|
|
if (checkTemplateOnlyOne.isEmpty()) { |
|
|
|
throw new RuntimeException("该检验模板不存在,请刷新数据!"); |
|
|
|
|