|
|
@ -10,6 +10,7 @@ import com.qs.serve.common.util.AuthContextUtils; |
|
|
|
import com.qs.serve.common.util.PageUtil; |
|
|
|
import com.qs.serve.common.util.CopierUtil; |
|
|
|
import com.qs.serve.common.util.StringUtils; |
|
|
|
import com.qs.serve.modules.sys.service.SysAttachService; |
|
|
|
import com.qs.serve.modules.tbs.common.dto.TbsBudgetChangeVo; |
|
|
|
import com.qs.serve.modules.tbs.entity.*; |
|
|
|
import com.qs.serve.modules.tbs.entity.so.TbsBudgetChangeSo; |
|
|
@ -20,6 +21,7 @@ import org.springframework.security.access.prepost.PreAuthorize; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
import javax.validation.Valid; |
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.stream.Collectors; |
|
|
@ -35,6 +37,7 @@ import java.util.stream.Collectors; |
|
|
|
@RequestMapping("tbs/budgetChange") |
|
|
|
public class TbsBudgetChangeController { |
|
|
|
|
|
|
|
private SysAttachService sysAttachService; |
|
|
|
private TbsBudgetChangeService tbsBudgetChangeService; |
|
|
|
private TbsBudgetChangeScheduleItemService tbsBudgetChangeScheduleItemService; |
|
|
|
private TbsBudgetChangeConditionService tbsBudgetChangeConditionService; |
|
|
@ -73,6 +76,12 @@ public class TbsBudgetChangeController { |
|
|
|
budgetChange.setChangeScheduleItemList(changeScheduleItemList); |
|
|
|
budgetChange.setChangeConditionList(map.get(0)); |
|
|
|
budgetChange.setOrgConditionList(map.get(1)); |
|
|
|
if(budgetChange.getNewAttachIds()!=null&&budgetChange.getNewAttachIds().length>0){ |
|
|
|
budgetChange.setNewAttachInfos(sysAttachService.listByIds(Arrays.asList(budgetChange.getNewAttachIds()))); |
|
|
|
} |
|
|
|
if(budgetChange.getOrgAttachIds()!=null&&budgetChange.getOrgAttachIds().length>0){ |
|
|
|
budgetChange.setOrgAttachInfos(sysAttachService.listByIds(Arrays.asList(budgetChange.getOrgAttachIds()))); |
|
|
|
} |
|
|
|
return R.ok(budgetChange); |
|
|
|
} |
|
|
|
|
|
|
@ -98,6 +107,10 @@ public class TbsBudgetChangeController { |
|
|
|
.map(TbsBudgetChangeScheduleItem::toNewObject).collect(Collectors.toList()); |
|
|
|
budgetChange.setChangeScheduleItemList(budgetChangeScheduleItemList); |
|
|
|
budgetChange.setChangeConditionList(budgetChangeConditions); |
|
|
|
if(budget.getAttachIds()!=null&&budget.getAttachIds().length>0){ |
|
|
|
budgetChange.setNewAttachIds(budget.getAttachIds()); |
|
|
|
budgetChange.setNewAttachInfos(sysAttachService.listByIds(Arrays.asList(budget.getAttachIds()))); |
|
|
|
} |
|
|
|
return R.ok(budgetChange); |
|
|
|
} |
|
|
|
|
|
|
|