|
|
@@ -124,6 +124,7 @@ import com.goafanti.order.service.OrderService;
|
|
|
import com.goafanti.organization.bo.OrganizationListOut;
|
|
|
import com.goafanti.organization.bo.OutPaymentNode;
|
|
|
import com.goafanti.organization.bo.OutThirdPartyCompany;
|
|
|
+import com.goafanti.organization.bo.ProjectTypePuls;
|
|
|
|
|
|
@Service
|
|
|
@EnableAsync
|
|
|
@@ -1322,16 +1323,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
BigDecimal tCount=new BigDecimal(0);
|
|
|
for (OutThirdPartyCompany op : list) {
|
|
|
tCount=tCount.add(new BigDecimal(op.getTotalAmount()));
|
|
|
- if(op.getOfficialCost()==1 && startType==1 && actualOfficial==0) {
|
|
|
- BigDecimal sum= new BigDecimal(0);
|
|
|
- if (op.getCostReduction()==0) {
|
|
|
- sum= new BigDecimal(op.getOfficialUnitPrice()).multiply(new BigDecimal(op.getQuantity()));
|
|
|
- tCount=tCount.add(sum);
|
|
|
- }else if (op.getCostReduction()==1) {
|
|
|
- sum= new BigDecimal(op.getReductionAmount()).multiply(new BigDecimal(op.getQuantity()));
|
|
|
- tCount=tCount.add(sum);
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
tTaskMidMapper.updateCostAmount(tid,tCount);
|
|
|
//计算订单成本
|
|
|
@@ -1340,6 +1331,17 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
for (TTaskMid tm : tlist) {
|
|
|
if (tm!=null&&tm.getCostAmount()!=null)oCount=oCount.add(tm.getCostAmount()==null?new BigDecimal(0):tm.getCostAmount());
|
|
|
}
|
|
|
+ //订单成本计算
|
|
|
+ ProjectTypePuls op= thirdPartyCompanyMapper.selectByTidPuls( tid);
|
|
|
+ if (op.getOfficialCost()==1) {
|
|
|
+ BigDecimal mCount=new BigDecimal(0);
|
|
|
+ if (op.getCostReduction()==0) {
|
|
|
+ mCount=op.getAmount().multiply(new BigDecimal(op.getQuantity()));
|
|
|
+ }else {
|
|
|
+ mCount=op.getProportion85().multiply(new BigDecimal(op.getQuantity()));
|
|
|
+ }
|
|
|
+ oCount=oCount.add(mCount);
|
|
|
+ }
|
|
|
tOrderMidMapper.updateCostAmount(tid,oCount);
|
|
|
}
|
|
|
|