|
@@ -1,5 +1,6 @@
|
|
|
package com.goafanti.order.service.impl;
|
|
package com.goafanti.order.service.impl;
|
|
|
|
|
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
@@ -7,6 +8,7 @@ import java.util.List;
|
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
import com.goafanti.common.dao.*;
|
|
import com.goafanti.common.dao.*;
|
|
|
|
|
+import com.goafanti.common.model.*;
|
|
|
import com.goafanti.order.bo.*;
|
|
import com.goafanti.order.bo.*;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -14,13 +16,6 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
import com.goafanti.common.enums.NoticeStatus;
|
|
import com.goafanti.common.enums.NoticeStatus;
|
|
|
import com.goafanti.common.enums.OrderLogProcess;
|
|
import com.goafanti.common.enums.OrderLogProcess;
|
|
|
-import com.goafanti.common.model.Admin;
|
|
|
|
|
-import com.goafanti.common.model.OutsourceLog;
|
|
|
|
|
-import com.goafanti.common.model.OutsourceOrganization;
|
|
|
|
|
-import com.goafanti.common.model.TOrderLog;
|
|
|
|
|
-import com.goafanti.common.model.TOrderNew;
|
|
|
|
|
-import com.goafanti.common.model.TOrderOutsource;
|
|
|
|
|
-import com.goafanti.common.model.TOrderTask;
|
|
|
|
|
import com.goafanti.core.mybatis.BaseMybatisDao;
|
|
import com.goafanti.core.mybatis.BaseMybatisDao;
|
|
|
import com.goafanti.core.mybatis.page.Pagination;
|
|
import com.goafanti.core.mybatis.page.Pagination;
|
|
|
import com.goafanti.core.shiro.token.TokenManager;
|
|
import com.goafanti.core.shiro.token.TokenManager;
|
|
@@ -53,6 +48,18 @@ public class OutsourceOrgServiceImpl extends BaseMybatisDao<TOrderOutsourceMapp
|
|
|
private OutsourceLogMapper outsourceLogMapper;
|
|
private OutsourceLogMapper outsourceLogMapper;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private OrderNewService OrderNewService;
|
|
private OrderNewService OrderNewService;
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private TTaskMidMapper tTaskMidMapper;
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private TOrderMidMapper tOrderMidMapper;
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public int addOutsourceOrg(OutsourceOrganization o) {
|
|
public int addOutsourceOrg(OutsourceOrganization o) {
|
|
|
return outsourceOrganizationMapper.insertSelective(o);
|
|
return outsourceOrganizationMapper.insertSelective(o);
|
|
@@ -109,7 +116,7 @@ public class OutsourceOrgServiceImpl extends BaseMybatisDao<TOrderOutsourceMapp
|
|
|
List<String> aids = new ArrayList<>();
|
|
List<String> aids = new ArrayList<>();
|
|
|
Integer type=null;
|
|
Integer type=null;
|
|
|
TOrderNew t2=tOrderNewMapper.selectByPrimaryKey(o.getOrderNo());
|
|
TOrderNew t2=tOrderNewMapper.selectByPrimaryKey(o.getOrderNo());
|
|
|
- //外包订单
|
|
|
|
|
|
|
+ //外包订单已删除
|
|
|
if (o.getType()==null||o.getType()==0) {
|
|
if (o.getType()==null||o.getType()==0) {
|
|
|
o.setType(0);
|
|
o.setType(0);
|
|
|
TOrderNew t=new TOrderNew();
|
|
TOrderNew t=new TOrderNew();
|
|
@@ -151,6 +158,7 @@ public class OutsourceOrgServiceImpl extends BaseMybatisDao<TOrderOutsourceMapp
|
|
|
type=NoticeStatus.PROJECT_OUTSOURCE_NO.getCode();
|
|
type=NoticeStatus.PROJECT_OUTSOURCE_NO.getCode();
|
|
|
ol.setStatus(2);
|
|
ol.setStatus(2);
|
|
|
addOrderLog(o.getOrderNo(),OrderLogProcess.XMWBBH.getCode(),o.getRemarks());
|
|
addOrderLog(o.getOrderNo(),OrderLogProcess.XMWBBH.getCode(),o.getRemarks());
|
|
|
|
|
+ pushRejectMid(o);
|
|
|
}
|
|
}
|
|
|
outsourceLogMapper.insertSelective(ol);
|
|
outsourceLogMapper.insertSelective(ol);
|
|
|
}
|
|
}
|
|
@@ -159,6 +167,15 @@ public class OutsourceOrgServiceImpl extends BaseMybatisDao<TOrderOutsourceMapp
|
|
|
return tOrderOutsourceMapper.updateByPrimaryKeySelective(o);
|
|
return tOrderOutsourceMapper.updateByPrimaryKeySelective(o);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ private void pushRejectMid(OrderOutsourceDtails o) {
|
|
|
|
|
+ TTaskMid tm=new TTaskMid();
|
|
|
|
|
+ tm.setTid(o.getTid());
|
|
|
|
|
+ tm.setCostAmount(new BigDecimal(0));
|
|
|
|
|
+ tm.setPartyAmount(new BigDecimal(0));
|
|
|
|
|
+ tTaskMidMapper.updateByTid(tm);
|
|
|
|
|
+ tOrderMidMapper.updateCostAmount(o.getOrderNo());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public void addOrderLog(String orderNo, Integer code,String remarks) {
|
|
public void addOrderLog(String orderNo, Integer code,String remarks) {
|
|
|
TOrderLog tl=new TOrderLog();
|
|
TOrderLog tl=new TOrderLog();
|
|
|
tl.setOrderNo(orderNo);
|
|
tl.setOrderNo(orderNo);
|