|
|
@@ -1321,7 +1321,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
}else {
|
|
|
tOrderOutsourceMapper.insertSelective(o);
|
|
|
}
|
|
|
- updateOrderCostAmount(o.getTid());
|
|
|
+ updateOrderCostAmount(o.getTid(),o.getStartType());
|
|
|
return 1;
|
|
|
}
|
|
|
|
|
|
@@ -1329,13 +1329,13 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
* 发起外包时,通过计算获取项目的成本,订单的成本
|
|
|
* @param tid
|
|
|
*/
|
|
|
- private void updateOrderCostAmount(Integer tid) {
|
|
|
+ private void updateOrderCostAmount(Integer tid,Integer startType) {
|
|
|
//计算项目成本
|
|
|
List<OutThirdPartyCompany>list=thirdPartyCompanyMapper.selectByTid(tid);
|
|
|
BigDecimal tCount=new BigDecimal(0);
|
|
|
for (OutThirdPartyCompany op : list) {
|
|
|
tCount=tCount.add(new BigDecimal(op.getTotalAmount()));
|
|
|
- if(op.getOfficialCost()==1) {
|
|
|
+ if(op.getOfficialCost()==1 && startType==1) {
|
|
|
BigDecimal sum= new BigDecimal(0);
|
|
|
if (op.getCostReduction()==0) {
|
|
|
sum= new BigDecimal(op.getOfficialUnitPrice()).multiply(new BigDecimal(op.getQuantity()));
|