Merge branch '0.8.X' of http://49.232.154.205:10100/DeXun/klp-oa into 0.8.X
This commit is contained in:
@@ -75,6 +75,16 @@ public class QcChemicalItemController extends BaseController {
|
||||
return toAjax(iQcChemicalItemService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量导入质量的化学成分明细
|
||||
*/
|
||||
@Log(title = "质量的化学成分明细", businessType = BusinessType.IMPORT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping("/batchImport")
|
||||
public R<Void> batchImport(@Validated @RequestBody List<QcChemicalItemBo> boList) {
|
||||
return toAjax(iQcChemicalItemService.insertByBoList(boList));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改质量的化学成分明细
|
||||
*/
|
||||
|
||||
@@ -75,6 +75,16 @@ public class QcPhysicalItemController extends BaseController {
|
||||
return toAjax(iQcPhysicalItemService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量导入物理性能明细
|
||||
*/
|
||||
@Log(title = "物理性能明细", businessType = BusinessType.IMPORT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping("/batchImport")
|
||||
public R<Void> batchImport(@Validated @RequestBody List<QcPhysicalItemBo> boList) {
|
||||
return toAjax(iQcPhysicalItemService.insertByBoList(boList));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物理性能明细
|
||||
*/
|
||||
|
||||
@@ -37,6 +37,11 @@ public interface IQcChemicalItemService {
|
||||
*/
|
||||
Boolean insertByBo(QcChemicalItemBo bo);
|
||||
|
||||
/**
|
||||
* 批量新增质量的化学成分明细
|
||||
*/
|
||||
Boolean insertByBoList(List<QcChemicalItemBo> boList);
|
||||
|
||||
/**
|
||||
* 修改质量的化学成分明细
|
||||
*/
|
||||
|
||||
@@ -37,6 +37,11 @@ public interface IQcPhysicalItemService {
|
||||
*/
|
||||
Boolean insertByBo(QcPhysicalItemBo bo);
|
||||
|
||||
/**
|
||||
* 批量新增物理性能明细
|
||||
*/
|
||||
Boolean insertByBoList(List<QcPhysicalItemBo> boList);
|
||||
|
||||
/**
|
||||
* 修改物理性能明细
|
||||
*/
|
||||
|
||||
@@ -22,6 +22,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
import java.util.stream.Collectors;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 质量的化学成分明细Service业务层处理
|
||||
@@ -110,6 +111,20 @@ public class QcChemicalItemServiceImpl implements IQcChemicalItemService {
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增质量的化学成分明细
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean insertByBoList(List<QcChemicalItemBo> boList) {
|
||||
if (boList == null || boList.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
List<QcChemicalItem> adds = BeanUtil.copyToList(boList, QcChemicalItem.class);
|
||||
baseMapper.insertBatch(adds);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改质量的化学成分明细
|
||||
*/
|
||||
|
||||
@@ -22,6 +22,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
import java.util.stream.Collectors;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 物理性能明细Service业务层处理
|
||||
@@ -111,6 +112,20 @@ public class QcPhysicalItemServiceImpl implements IQcPhysicalItemService {
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增物理性能明细
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean insertByBoList(List<QcPhysicalItemBo> boList) {
|
||||
if (boList == null || boList.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
List<QcPhysicalItem> qcPhysicalItems = BeanUtil.copyToList(boList, QcPhysicalItem.class);
|
||||
baseMapper.insertBatch(qcPhysicalItems);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物理性能明细
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user