|
|
@@ -242,33 +242,28 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
addTaskMid(t);
|
|
|
//如果是会员添加同性质不同项目
|
|
|
BusinessProject bp=businessProjectMapper.selectById(t.getCommodityId());
|
|
|
- if (bp.getType()==ProjectType.HY.getCode()){
|
|
|
- InputAddTask t2=new InputAddTask();
|
|
|
- BeanUtils.copyProperties(t,t2);
|
|
|
- if (t.getMemberType()==1){
|
|
|
+ InputAddTask t2=new InputAddTask();
|
|
|
+ BeanUtils.copyProperties(t,t2);
|
|
|
+ if (bp.getProjectType().equals(NewProjectTypeEnum.HT.getCode())){
|
|
|
+ if (t.getHtMember()==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());
|
|
|
+ List<BusinessProjectBo> additionalDeductionList = businessProjectMapper.selectByFirstBName("高新会员",1);
|
|
|
+ for (BusinessProjectBo e : additionalDeductionList) {
|
|
|
+ if(!e.getId().equals(t.getCommodityId())){
|
|
|
+ t2.setCommodityId(e.getId());
|
|
|
+ t2.setCommodityName(e.getBname());
|
|
|
+ t2.setMain(0);
|
|
|
+ t2.setCommodityPrice(new BigDecimal(0));
|
|
|
+ t2.setId(null);
|
|
|
+ addTTaskMember(t2);
|
|
|
+ addTaskMid(t2);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
- 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);
|
|
|
+ List<BusinessProjectBo> additionalDeductionList = businessProjectMapper.selectByFirstBName("加计扣除", 1);
|
|
|
for (BusinessProjectBo e : additionalDeductionList) {
|
|
|
t2.setCommodityId(e.getId());
|
|
|
t2.setCommodityName(e.getBname());
|
|
|
@@ -279,10 +274,9 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
addTaskMid(t2);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
if(t.getRdAwardsubsidy()==1){
|
|
|
//研发奖补
|
|
|
- List<BusinessProjectBo> list = businessProjectMapper.selectBusinessProjectByName("研发奖补", null);
|
|
|
+ List<BusinessProjectBo> list = businessProjectMapper.selectByFirstBName("研发奖补", 1);
|
|
|
for (BusinessProjectBo e : list) {
|
|
|
t2.setCommodityId(e.getId());
|
|
|
t2.setCommodityName(e.getBname());
|
|
|
@@ -293,8 +287,20 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
addTaskMid(t2);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+ }
|
|
|
+ if (bp.getProjectType().equals(NewProjectTypeEnum.SIMPLE.getCode())){
|
|
|
+ List<BusinessProjectBo> list = businessProjectMapper.selectByFirstBName("简单会员", 2);
|
|
|
+ for (BusinessProjectBo e : list) {
|
|
|
+ if(!e.getId().equals(t.getCommodityId())){
|
|
|
+ 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;
|
|
|
}
|