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 SchProdScheduleItemController extends BaseController {
|
|||||||
return toAjax(iSchProdScheduleItemService.insertByBo(bo));
|
return toAjax(iSchProdScheduleItemService.insertByBo(bo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量新增排产单主加明细可合并
|
||||||
|
*/
|
||||||
|
@Log(title = "排产单主加明细可合并", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping("/batch")
|
||||||
|
public R<Void> addBatch(@Validated(AddGroup.class) @RequestBody List<SchProdScheduleItemBo> boList) {
|
||||||
|
return toAjax(iSchProdScheduleItemService.insertBatchByBo(boList));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改排产单主加明细可合并
|
* 修改排产单主加明细可合并
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -42,6 +42,11 @@ public interface ISchProdScheduleItemService {
|
|||||||
*/
|
*/
|
||||||
Boolean updateByBo(SchProdScheduleItemBo bo);
|
Boolean updateByBo(SchProdScheduleItemBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量新增排产单主加明细可合并
|
||||||
|
*/
|
||||||
|
Boolean insertBatchByBo(List<SchProdScheduleItemBo> boList);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验并批量删除排产单主加明细可合并信息
|
* 校验并批量删除排产单主加明细可合并信息
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import com.klp.flow.domain.SchProdScheduleItem;
|
|||||||
import com.klp.flow.mapper.SchProdScheduleItemMapper;
|
import com.klp.flow.mapper.SchProdScheduleItemMapper;
|
||||||
import com.klp.flow.service.ISchProdScheduleItemService;
|
import com.klp.flow.service.ISchProdScheduleItemService;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
@@ -110,6 +111,26 @@ public class SchProdScheduleItemServiceImpl implements ISchProdScheduleItemServi
|
|||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量新增排产单主加明细可合并
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean insertBatchByBo(List<SchProdScheduleItemBo> boList) {
|
||||||
|
List<SchProdScheduleItem> addList = new ArrayList<>(boList.size());
|
||||||
|
for (SchProdScheduleItemBo bo : boList) {
|
||||||
|
SchProdScheduleItem add = BeanUtil.toBean(bo, SchProdScheduleItem.class);
|
||||||
|
validEntityBeforeSave(add);
|
||||||
|
addList.add(add);
|
||||||
|
}
|
||||||
|
boolean flag = baseMapper.insertBatch(addList);
|
||||||
|
if (flag) {
|
||||||
|
for (int i = 0; i < boList.size(); i++) {
|
||||||
|
boList.get(i).setScheduleId(addList.get(i).getScheduleId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改排产单主加明细可合并
|
* 修改排产单主加明细可合并
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user