|
|
@@ -4,6 +4,7 @@ package com.goafanti.order.service.impl;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.goafanti.admin.bo.AdminListBo;
|
|
|
import com.goafanti.admin.service.DepartmentService;
|
|
|
+import com.goafanti.business.bo.BusinessProjectBo;
|
|
|
import com.goafanti.common.bo.EmailBo;
|
|
|
import com.goafanti.common.bo.Error;
|
|
|
import com.goafanti.common.bo.OrderOperator;
|
|
|
@@ -244,25 +245,56 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
if (bp.getType()==ProjectType.HY.getCode()){
|
|
|
InputAddTask t2=new InputAddTask();
|
|
|
BeanUtils.copyProperties(t,t2);
|
|
|
- //会员项目替换
|
|
|
- if (t.getCommodityName().contains("财税")){
|
|
|
- String t2Name=t.getCommodityName().replaceAll("财税","技术");
|
|
|
- BusinessProject bp2=businessProjectMapper.selectByPrimaryBname(t2Name);
|
|
|
- if (bp2==null)return t;
|
|
|
- t2.setCommodityId(bp2.getId());
|
|
|
- t2.setCommodityName(bp2.getBname());
|
|
|
- }else if (t.getCommodityName().contains("技术")){
|
|
|
- String t2Name=t.getCommodityName().replaceAll("技术","财税");
|
|
|
- BusinessProject bp2=businessProjectMapper.selectByPrimaryBname(t2Name);
|
|
|
- if (bp2==null)return t;
|
|
|
- t2.setCommodityId(bp2.getId());
|
|
|
- t2.setCommodityName(bp2.getBname());
|
|
|
- }
|
|
|
- t2.setMain(0);
|
|
|
- t2.setCommodityPrice(new BigDecimal(0));
|
|
|
- t2.setId(null);
|
|
|
- addTTaskMember(t2);
|
|
|
- addTaskMid(t2);
|
|
|
+ if (t.getMemberType()==1){
|
|
|
+ //会员项目替换
|
|
|
+ if (t.getCommodityName().contains("财税")){
|
|
|
+ String t2Name=t.getCommodityName().replaceAll("财税","技术");
|
|
|
+ BusinessProject bp2=businessProjectMapper.selectByPrimaryBname(t2Name);
|
|
|
+ if (bp2==null)return t;
|
|
|
+ t2.setCommodityId(bp2.getId());
|
|
|
+ t2.setCommodityName(bp2.getBname());
|
|
|
+ }else if (t.getCommodityName().contains("技术")){
|
|
|
+ String t2Name=t.getCommodityName().replaceAll("技术","财税");
|
|
|
+ BusinessProject bp2=businessProjectMapper.selectByPrimaryBname(t2Name);
|
|
|
+ if (bp2==null)return t;
|
|
|
+ t2.setCommodityId(bp2.getId());
|
|
|
+ t2.setCommodityName(bp2.getBname());
|
|
|
+ }
|
|
|
+ t2.setMain(0);
|
|
|
+ t2.setCommodityPrice(new BigDecimal(0));
|
|
|
+ t2.setId(null);
|
|
|
+ addTTaskMember(t2);
|
|
|
+ addTaskMid(t2);
|
|
|
+ }
|
|
|
+ if(t.getAdditionalDeduction()==1){
|
|
|
+ //加计扣除
|
|
|
+ List<BusinessProjectBo> additionalDeductionList = businessProjectMapper.selectBusinessProjectByName("加计扣除", null);
|
|
|
+ for (BusinessProjectBo e : additionalDeductionList) {
|
|
|
+ t2.setCommodityId(e.getId());
|
|
|
+ t2.setCommodityName(e.getBname());
|
|
|
+ t2.setMain(0);
|
|
|
+ t2.setCommodityPrice(new BigDecimal(0));
|
|
|
+ t2.setId(null);
|
|
|
+ addTTaskMember(t2);
|
|
|
+ addTaskMid(t2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(t.getRdAwardsubsidy()==1){
|
|
|
+ //研发奖补
|
|
|
+ List<BusinessProjectBo> list = businessProjectMapper.selectBusinessProjectByName("研发奖补", null);
|
|
|
+ for (BusinessProjectBo e : list) {
|
|
|
+ t2.setCommodityId(e.getId());
|
|
|
+ t2.setCommodityName(e.getBname());
|
|
|
+ t2.setMain(0);
|
|
|
+ t2.setCommodityPrice(new BigDecimal(0));
|
|
|
+ t2.setId(null);
|
|
|
+ addTTaskMember(t2);
|
|
|
+ addTaskMid(t2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
return t;
|
|
|
}
|