Ver código fonte

项目外包发起重复BUG处理。

anderx 4 anos atrás
pai
commit
5f2dda6efc

+ 2 - 4
src/main/java/com/goafanti/common/mapper/TOrderMidMapper.xml

@@ -413,7 +413,8 @@
     a.total_amount totalAmount ,a.settlement_amount  settlementAmount ,b.order_receivables orderReceivables,b.legal_affairs legalAffairs,
     b.order_arrears orderArrears,b.dun_start_time dunStartTime,date_format(b.dun_start_time,'%Y-%m-%d %H:%i:%S')dunStartTimes
     <if test="type==1 or type==2 or type==3">
-      ,b.operation_time operationTime,date_format(b.operation_time,'%Y-%m-%d')operationDate,b.legal_affairs_type `type`
+      ,b.operation_time operationTime,date_format(b.operation_time,'%Y-%m-%d')operationDate,b.legal_affairs_type `type`,
+    b.legal_affairs_status status
     </if>
     from t_order_new a left join t_order_mid b on a.order_no =b.order_no
     <if test="shiro == 2">
@@ -472,9 +473,6 @@
   <select id="legalAffairsOrderCount" resultType="integer">
     select count(*)
     from t_order_new a left join t_order_mid b on a.order_no =b.order_no
-    <if test="type==3">
-      left join t_order_legal_affairs d on a.order_no=d.order_no
-    </if>
     <if test="shiro == 2">
       left join admin c on a.salesman_id =c.id
     </if>

+ 9 - 0
src/main/java/com/goafanti/order/bo/OutOrderLegalAffairsListBo.java

@@ -35,6 +35,15 @@ public class OutOrderLegalAffairsListBo {
     private String operationDate;
 
     private Integer type;
+    private Integer status;
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
 
     public Date getOperationTime() {
         return operationTime;

+ 7 - 5
src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java

@@ -23,6 +23,7 @@ import javax.servlet.http.HttpServletResponse;
 import com.goafanti.common.dao.*;
 import com.goafanti.common.model.*;
 import com.goafanti.order.bo.*;
+import com.goafanti.organization.bo.*;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.poi.xssf.usermodel.XSSFCell;
 import org.apache.poi.xssf.usermodel.XSSFRow;
@@ -67,10 +68,6 @@ import com.goafanti.order.enums.TaskState;
 import com.goafanti.order.enums.refundState;
 import com.goafanti.order.service.OrderNewService;
 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;
 import com.goafanti.patent.service.PatentNewService;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -1305,6 +1302,11 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	@Override
 	@Transactional
 	public int pushOutsourceProjectAudit(TOrderOutsource o) {
+		//前端加载缓慢避免重复提交
+		OrderOutsourceDtails ood=tOrderOutsourceMapper.selectByOrderNo(null,o.getTid().toString());
+		if (ood!=null){
+			return 1;
+		}
 		o.setRefundStatus(0);
 		o.setCreateTime(new Date());
 		if(o.getAmount()==null)o.setAmount(new BigDecimal(0));
@@ -1333,7 +1335,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 			o.setRefundStatus(1);
 		}
 		if (o.getId()==null) {
-			 tOrderOutsourceMapper.insertSelective(o);
+			tOrderOutsourceMapper.insertSelective(o);
 		}else {
 			tOrderOutsourceMapper.updateByPrimaryKeySelective(o);
 			//旧项目变更,如果驳回修改成新的项目变更