委托加工更新提交erp优化
This commit is contained in:
@@ -141,8 +141,6 @@ public class TmplInscBsnRelServiceImpl implements TmplInscBsnRelService {
|
||||
@Override
|
||||
public void getTmplInscBsnRelDetails(TmplInscBsnRelRespVO tmplInscBsnRelRespVO) {
|
||||
tmplInscBsnRelRespVO.setDeptIds(setDeptData(tmplInscBsnRelRespVO));//获取部门使用范围
|
||||
// tmplInscBsnRelRespVO.setInstanceItemRespVOS(setInstanceItemRespVOS(tmplInscBsnRelRespVO));//获取条款;
|
||||
// tmplInscBsnRelRespVO.setTemplateInstanceDataRespVOS(setTemplateInstanceDataRespVOS(tmplInscBsnRelRespVO)); // 实例字段
|
||||
//业务条款
|
||||
tmplInscBsnRelRespVO.setTmplInscItmBsnRespVOS(setTmplInscItmBsnRespVOS(tmplInscBsnRelRespVO));
|
||||
//业务字段
|
||||
@@ -150,10 +148,6 @@ public class TmplInscBsnRelServiceImpl implements TmplInscBsnRelService {
|
||||
if (!tmplInscBsnRelRespVO.getDeptIds().isEmpty()) {
|
||||
tmplInscBsnRelRespVO.setDeptRespVOS(deptApi.getDeptList(tmplInscBsnRelRespVO.getDeptIds().stream().map(Long::valueOf).toList()).getData()); // 部门详情
|
||||
}
|
||||
// TemplateInstanceRespVO templateInstance = SpringUtil.getBean(TemplateInstanceService.class).getTemplateInstance(tmplInscBsnRelRespVO.getInscId());
|
||||
// if (templateInstance != null) {
|
||||
// tmplInscBsnRelRespVO.setInscName(!templateInstance.getName().isEmpty() ? templateInstance.getName() : "分类未命名");
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -188,15 +182,7 @@ public class TmplInscBsnRelServiceImpl implements TmplInscBsnRelService {
|
||||
|
||||
//业务字段
|
||||
private List<TmplInscDatBsnRespVO> setTmplInscDatBsnRespVOS(TmplInscBsnRelRespVO tmplInscBsnRelRespVO) {
|
||||
List<TmplInscDatBsnRespVO> tmplInscDatBsnRespVOS = BeanUtils.toBean(SpringUtil.getBean(TmplInscDatBsnMapper.class).selectList(new LambdaQueryWrapper<TmplInscDatBsnDO>().eq(TmplInscDatBsnDO::getBsnId, tmplInscBsnRelRespVO.getId())), TmplInscDatBsnRespVO.class);
|
||||
|
||||
// tmplInscDatBsnRespVOS.forEach(tmplInscDatBsnRespVO -> tmplInscBsnRelRespVO.getTemplateInstanceDataRespVOS().forEach(templateInstanceDataRespVO -> {
|
||||
// if (templateInstanceDataRespVO.getId().toString().equals(tmplInscDatBsnRespVO.getInscFldId())) {
|
||||
// tmplInscDatBsnRespVO.setFldVal(templateInstanceDataRespVO.getFldKy());
|
||||
// tmplInscDatBsnRespVO.setFldKy(templateInstanceDataRespVO.getFldKy());
|
||||
// }
|
||||
// }));
|
||||
return tmplInscDatBsnRespVOS;
|
||||
return BeanUtils.toBean(SpringUtil.getBean(TmplInscDatBsnMapper.class).selectList(new LambdaQueryWrapper<TmplInscDatBsnDO>().eq(TmplInscDatBsnDO::getBsnId, tmplInscBsnRelRespVO.getId())), TmplInscDatBsnRespVO.class);
|
||||
}
|
||||
|
||||
// 实例数据
|
||||
|
||||
@@ -30,6 +30,7 @@ public interface TmplInscDatBsnService {
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateTmplInscDatBsn(@Valid TmplInscDatBsnSaveReqVO updateReqVO);
|
||||
void updateTmplInscDatBsnList(@Valid List<TmplInscDatBsnSaveReqVO> updateReqVOS);
|
||||
void updateTmplInscDatBsnBatch(@Valid List<TmplInscDatBsnSaveReqVO> updateReqVOS);
|
||||
|
||||
/**
|
||||
|
||||
@@ -66,6 +66,18 @@ public class TmplInscDatBsnServiceImpl implements TmplInscDatBsnService {
|
||||
tmplInscDatBsnMapper.insert(saveObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTmplInscDatBsnList(List<TmplInscDatBsnSaveReqVO> updateReqVOS) {
|
||||
// 校验存在
|
||||
// validateTmplInscDatBsnExists(updateReqVO.getId());
|
||||
// 物理删除旧记录
|
||||
tmplInscDatBsnMapper.physicalDeleteByBsnIds(updateReqVOS.stream().map(TmplInscDatBsnSaveReqVO::getBsnId).toList());
|
||||
|
||||
List<TmplInscDatBsnDO> beanList = BeanUtils.toBean(updateReqVOS, TmplInscDatBsnDO.class);
|
||||
beanList.forEach(bean -> bean.setId(null));
|
||||
tmplInscDatBsnMapper.insertBatch(beanList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTmplInscDatBsnBatch(List<TmplInscDatBsnSaveReqVO> updateReqVOS) {
|
||||
tmplInscDatBsnMapper.physicalDeleteByBsnIds(updateReqVOS.stream().map(TmplInscDatBsnSaveReqVO::getBsnId).toList());
|
||||
|
||||
Reference in New Issue
Block a user