|
|
@@ -53,7 +53,6 @@ import com.goafanti.common.utils.excel.NewExcelUtil;
|
|
|
import com.goafanti.core.mybatis.BaseMybatisDao;
|
|
|
import com.goafanti.core.mybatis.page.Pagination;
|
|
|
import com.goafanti.core.shiro.token.TokenManager;
|
|
|
-import com.goafanti.order.bo.OrderOutsourceDtails;
|
|
|
import com.goafanti.order.bo.TOrderTaskDetailBo;
|
|
|
import com.goafanti.order.enums.NewOrderDunType;
|
|
|
import com.goafanti.order.enums.NewProjectStatus;
|
|
|
@@ -297,7 +296,7 @@ public class ThirdPartyCompanyServiceImpl extends BaseMybatisDao<ThirdPartyComp
|
|
|
outOrderPayment op=tOrderPaymentMapper.selectByidGetDetails(id);
|
|
|
op.setChooseType(type);
|
|
|
ThirdPartyCompany tpc=thirdPartyCompanyMapper.selectByPrimaryKey(tp.getTpcId());
|
|
|
- if(!op.getCompanyName().equals(tpc.getCompanyName()))op.setCompanyName(op.getCompanyName()+"("+tpc.getCompanyName()+")");
|
|
|
+ if(tp.getChooseType()!=2&&!op.getCompanyName().equals(tpc.getCompanyName()))op.setCompanyName(op.getCompanyName()+"("+tpc.getCompanyName()+")");
|
|
|
if (type==0) {//支付种类 0第三方 1催款 2官费
|
|
|
op.setInitialQuantity(tpc.getQuantity());
|
|
|
op.setInitialTotalAmount(tpc.getTotalAmount().toString());
|
|
|
@@ -419,22 +418,22 @@ public class ThirdPartyCompanyServiceImpl extends BaseMybatisDao<ThirdPartyComp
|
|
|
@Override
|
|
|
public List<outOrderPayment> selectOrderPayment(Integer id) {
|
|
|
List<outOrderPayment> list=tOrderPaymentMapper.selectByTid(id,null);
|
|
|
- if (!TokenManager.hasRole(AFTConstants.FINANCE)&&
|
|
|
- !TokenManager.hasRole(AFTConstants.FINANCE_MANAGER)&&
|
|
|
- !TokenManager.hasRole(AFTConstants.FINANCE_ADMIN)&&
|
|
|
- !TokenManager.hasRole(AFTConstants.OUTSOURCE_AUDITOR)) {
|
|
|
- outProjectBo op =null;
|
|
|
- if(!list.isEmpty()) op=tOrderOutsourceMapper.selectByTid(id);
|
|
|
- if (op!=null &&op.getStartType()!=null&&op.getStartType()==1) {
|
|
|
- if((op.getProjectType()==1&&op.getPatentType()==0)||(op.getProjectType()==2)) {
|
|
|
- for (outOrderPayment oc : list) {
|
|
|
- if (oc.getChooseType()!=2) {
|
|
|
- oc.setApplicationAmount("***");
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+// if (!TokenManager.hasRole(AFTConstants.FINANCE)&&
|
|
|
+// !TokenManager.hasRole(AFTConstants.FINANCE_MANAGER)&&
|
|
|
+// !TokenManager.hasRole(AFTConstants.FINANCE_ADMIN)&&
|
|
|
+// !TokenManager.hasRole(AFTConstants.OUTSOURCE_AUDITOR)) {
|
|
|
+// outProjectBo op =null;
|
|
|
+// if(!list.isEmpty()) op=tOrderOutsourceMapper.selectByTid(id);
|
|
|
+// if (op!=null &&op.getStartType()!=null&&op.getStartType()==1) {
|
|
|
+// if((op.getProjectType()==1&&op.getPatentType()==0)||(op.getProjectType()==2)) {
|
|
|
+// for (outOrderPayment oc : list) {
|
|
|
+// if (oc.getChooseType()!=2) {
|
|
|
+// oc.setApplicationAmount("***");
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
return list;
|
|
|
}
|
|
|
|
|
|
@@ -485,6 +484,8 @@ public class ThirdPartyCompanyServiceImpl extends BaseMybatisDao<ThirdPartyComp
|
|
|
|
|
|
@Override
|
|
|
public int checkPayment(TOrderPayment p) {
|
|
|
+ //没有填写申请金额的情况下计算金额
|
|
|
+ checkGetAmount(p);
|
|
|
if (p.getChooseType()==2) {
|
|
|
TOrderTask tot=tOrderTaskMapper.selectByPrimaryKey(p.getTid());
|
|
|
List<outOrderPayment> list2=tOrderPaymentMapper.selectByTid(p.getTid(),p.getChooseType());
|
|
|
@@ -496,8 +497,7 @@ public class ThirdPartyCompanyServiceImpl extends BaseMybatisDao<ThirdPartyComp
|
|
|
return -2;
|
|
|
}
|
|
|
}
|
|
|
- //没有填写申请金额的情况下计算金额
|
|
|
- checkGetAmount(p);
|
|
|
+
|
|
|
BigDecimal total=new BigDecimal(0);
|
|
|
BigDecimal a=p.getApplicationAmount()==null?new BigDecimal(0):p.getApplicationAmount();
|
|
|
List<outOrderPayment> list=new ArrayList<>();
|
|
|
@@ -883,11 +883,11 @@ public class ThirdPartyCompanyServiceImpl extends BaseMybatisDao<ThirdPartyComp
|
|
|
PaymentNode pn=paymentNodeMapper.selectByPrimaryKey(p.getNodeId());
|
|
|
count=pn.getUnitPrice().multiply(new BigDecimal(p.getQuantity()));
|
|
|
}else if (p.getChooseType()==2) {
|
|
|
- ProjectTypePuls ot=thirdPartyCompanyMapper.selectByTidPuls(p.getTid());
|
|
|
+ ProjectTypePuls ot=thirdPartyCompanyMapper.selectByTidGetDtails(p.getTid());
|
|
|
if (ot.getCostReduction()==0) {
|
|
|
- count=ot.getAmount().multiply(new BigDecimal(ot.getQuantity()));
|
|
|
+ count=ot.getOfficialAmount().multiply(new BigDecimal(p.getQuantity()));
|
|
|
}else {
|
|
|
- count=ot.getProportion85().multiply(new BigDecimal(ot.getQuantity()));
|
|
|
+ count=ot.getProportion85().multiply(new BigDecimal(p.getQuantity()));
|
|
|
}
|
|
|
}
|
|
|
p.setApplicationAmount(count);
|