|
@@ -0,0 +1,61 @@
|
|
|
|
+package org.springblade.control.service.impl;
|
|
|
|
+
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
+import lombok.AllArgsConstructor;
|
|
|
|
+import org.springblade.common.utils.CommonUtil;
|
|
|
|
+import org.springblade.control.dto.ControlProjectInfoDTO;
|
|
|
|
+import org.springblade.control.dto.ProjectCostBudgetStatsDTO;
|
|
|
|
+import org.springblade.control.entity.ControlProjectInfo;
|
|
|
|
+import org.springblade.control.entity.PlanRelationReturned;
|
|
|
|
+import org.springblade.control.entity.ProjectCostBudget;
|
|
|
|
+import org.springblade.control.entity.ProjectCostBudgetStats;
|
|
|
|
+import org.springblade.control.mapper.PlanRelationReturnedMapper;
|
|
|
|
+import org.springblade.control.mapper.ProjectCostBudgetMapper;
|
|
|
|
+import org.springblade.control.mapper.ProjectInfoMapper;
|
|
|
|
+import org.springblade.control.service.IPlanRelationReturnedService;
|
|
|
|
+import org.springblade.control.service.IProjectCostBudgetService;
|
|
|
|
+import org.springblade.control.vo.ControlProjectInfoVO;
|
|
|
|
+import org.springblade.control.vo.ProjectCostBudgetVO;
|
|
|
|
+import org.springblade.control.vo.ProjectCostBudgetVO2;
|
|
|
|
+import org.springblade.control.vo.ProjectCostBudgetVO3;
|
|
|
|
+import org.springblade.core.mp.base.BaseServiceImpl;
|
|
|
|
+import org.springblade.core.mp.support.Query;
|
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
|
+
|
|
|
|
+import java.math.BigDecimal;
|
|
|
|
+import java.time.LocalDate;
|
|
|
|
+import java.util.*;
|
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * @Param
|
|
|
|
+ * @Author wangwl
|
|
|
|
+ * @Date 2023/5/12 9:43
|
|
|
|
+ **/
|
|
|
|
+@Service
|
|
|
|
+@AllArgsConstructor
|
|
|
|
+public class PlanRelationReturnedServiceImpl extends BaseServiceImpl<PlanRelationReturnedMapper, PlanRelationReturned> implements IPlanRelationReturnedService {
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 计划关联回款
|
|
|
|
+ */
|
|
|
|
+ @Override
|
|
|
|
+ public String relationPlanAndReturned(Long returnedId, Long planId, Integer type) {
|
|
|
|
+ //关联类型:0取消关联,1关联
|
|
|
|
+ if (type == 1){
|
|
|
|
+ PlanRelationReturned relation = new PlanRelationReturned();
|
|
|
|
+ relation.setPlanId(planId);
|
|
|
|
+ relation.setReturnedId(returnedId);
|
|
|
|
+ baseMapper.insert(relation);
|
|
|
|
+ return "关联成功";
|
|
|
|
+ }else {
|
|
|
|
+ baseMapper.deleteRelation(returnedId,planId);
|
|
|
|
+ return "取消成功";
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|