Procházet zdrojové kódy

Merge branch 'test' of jishutao/kede-server into prod

anderx před 5 roky
rodič
revize
cc7b7b2df8

+ 21 - 0
src/main/java/com/goafanti/order/controller/OutsourceOrgApiController.java

@@ -14,10 +14,12 @@ import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
 
 import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.CertifyApiController;
 import com.goafanti.common.model.OutsourceOrganization;
 import com.goafanti.common.model.TOrderOutsource;
+import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.order.bo.OrderOutsourceDtails;
 import com.goafanti.order.enums.OrderNewState;
 import com.goafanti.order.service.OrderNewService;
@@ -219,4 +221,23 @@ public class OutsourceOrgApiController extends CertifyApiController {
         return res;
     } 
     
+    
+    /**
+	 * 	超级管理员驳回
+	 */
+	@RequestMapping(value="/superAdminReject", method = RequestMethod.POST)
+	public Result superAdminReject(Integer id){
+		Result res=new Result();
+		if (null==id) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "外包编号","外包编号"));
+			return res;
+		}
+		if(!TokenManager.hasRole(AFTConstants.SUPERADMIN)) {
+			res.getError().add(buildError("","本驳回只允许超级管理员执行!"));
+			return res;
+		}
+		res.data(outsourceOrgService.updateSuperAdminReject(id));
+		return res;
+	}
+    
 }

+ 2 - 0
src/main/java/com/goafanti/order/service/OutsourceOrgService.java

@@ -33,5 +33,7 @@ public interface OutsourceOrgService {
 
 	List<OutOutsourceLog> selectOutsourceLog(Integer tid);
 
+	int updateSuperAdminReject(Integer id);
+
 	
 }

+ 24 - 0
src/main/java/com/goafanti/order/service/impl/OutsourceOrgServiceImpl.java

@@ -25,6 +25,7 @@ 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.page.Pagination;
@@ -193,5 +194,28 @@ public class OutsourceOrgServiceImpl  extends BaseMybatisDao<TOrderOutsourceMapp
 	public List<OutOutsourceLog> selectOutsourceLog(Integer tid) {
 		return outsourceLogMapper.selectByTid(tid);
 	}
+	@Override
+	public int updateSuperAdminReject(Integer id) {
+		TOrderOutsource tto=tOrderOutsourceMapper.selectByPrimaryKey(id);
+		//start_type 0外包 1供应商
+		if (tto.getStartType()==0) {
+			TOrderTask tt=new TOrderTask();
+			tt.setId(tto.getTid());
+			tt.setOutsource(0);
+			tOrderTaskMapper.updateByPrimaryKeySelective(tt);
+		}
+		OutsourceLog ol=new OutsourceLog();
+		ol.setTid(tto.getTid());
+		ol.setAid(TokenManager.getAdminId());
+		ol.setAname("超级管理员");
+		ol.setStatus(2);
+		ol.setCreateTime(new Date());
+		ol.setRemarks("超级管理员强制驳回");
+		outsourceLogMapper.insert(ol);
+		TOrderOutsource tto2=new  TOrderOutsource();
+		tto2.setId(id);
+		tto2.setRefundStatus(2);
+		return tOrderOutsourceMapper.updateByPrimaryKeySelective(tto2);
+	}
 
 }

+ 1 - 1
src/main/resources/props/config_local.properties

@@ -69,7 +69,7 @@ avatar.upload.host=//sb.jishutao.com/upload
 
 #连测试
 avatar.host=//static.jishutao.com
-static.host=//static.jishutao.com/1.1.58
+static.host=//static.jishutao.com/1.1.60
 
 upload.path=F:/data/public/upload
 upload.private.path=F:/data/private/upload

+ 1 - 1
src/main/resources/props/config_test.properties

@@ -59,7 +59,7 @@ user.private.max=1000
 #客户释放提醒
 user_remind_days=15
 
-static.host=//static.jishutao.com/1.1.59
+static.host=//static.jishutao.com/1.1.60
 portal.host=//static.jishutao.com/portal/2.0.6
 avatar.host=//static.jishutao.com
 avatar.upload.host=//static.jishutao.com/upload