|
@@ -17,7 +17,6 @@ import com.goafanti.order.bo.*;
|
|
|
import com.goafanti.order.enums.salesTypes;
|
|
import com.goafanti.order.enums.salesTypes;
|
|
|
import com.goafanti.order.service.OrderAssistService;
|
|
import com.goafanti.order.service.OrderAssistService;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
-import org.apache.poi.ss.formula.constant.ErrorConstant;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@@ -41,12 +40,9 @@ public class AdminNewOrderApiController extends CertifyApiController {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private OrderAssistService orderAssistService;
|
|
private OrderAssistService orderAssistService;
|
|
|
@Value(value = "${upload.path}")
|
|
@Value(value = "${upload.path}")
|
|
|
- private String uploadPath = null;
|
|
|
|
|
|
|
+ private final String uploadPath = null;
|
|
|
/**
|
|
/**
|
|
|
* 创建订单、开单
|
|
* 创建订单、开单
|
|
|
- * @param uid
|
|
|
|
|
- * @param orderType
|
|
|
|
|
- * @return
|
|
|
|
|
*/
|
|
*/
|
|
|
@RequestMapping(value = "/createOrder",method = RequestMethod.POST)
|
|
@RequestMapping(value = "/createOrder",method = RequestMethod.POST)
|
|
|
public Result createOrder(String uid,Integer orderType,Integer salesType,String channelId,String other){
|
|
public Result createOrder(String uid,Integer orderType,Integer salesType,String channelId,String other){
|
|
@@ -63,7 +59,7 @@ public class AdminNewOrderApiController extends CertifyApiController {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","销售类型"));
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","销售类型"));
|
|
|
return res;
|
|
return res;
|
|
|
}else{
|
|
}else{
|
|
|
- if (salesType== salesTypes.qd.getCode()){
|
|
|
|
|
|
|
+ if (salesType.equals(salesTypes.qd.getCode()) ){
|
|
|
if (StringUtils.isBlank(channelId)){
|
|
if (StringUtils.isBlank(channelId)){
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","销售类型为渠道,渠道客户"));
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","销售类型为渠道,渠道客户"));
|
|
|
return res;
|
|
return res;
|
|
@@ -73,7 +69,7 @@ public class AdminNewOrderApiController extends CertifyApiController {
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if ((salesType== salesTypes.qt.getCode()||salesType== salesTypes.zjs.getCode())
|
|
|
|
|
|
|
+ if ((salesType.equals(salesTypes.qt.getCode()) ||salesType.equals(salesTypes.zjs.getCode()))
|
|
|
&&StringUtils.isBlank(other)){
|
|
&&StringUtils.isBlank(other)){
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","销售类型为转介绍或者其他,请简单描述"));
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","销售类型为转介绍或者其他,请简单描述"));
|
|
|
return res;
|
|
return res;
|
|
@@ -85,8 +81,6 @@ public class AdminNewOrderApiController extends CertifyApiController {
|
|
|
}
|
|
}
|
|
|
/**
|
|
/**
|
|
|
* 添加项目
|
|
* 添加项目
|
|
|
- * @param t
|
|
|
|
|
- * @return
|
|
|
|
|
*/
|
|
*/
|
|
|
@RequestMapping(value = "/addOrderTask",method = RequestMethod.POST)
|
|
@RequestMapping(value = "/addOrderTask",method = RequestMethod.POST)
|
|
|
public Result addOrderTask(TOrderTask t){
|
|
public Result addOrderTask(TOrderTask t){
|
|
@@ -103,8 +97,6 @@ public class AdminNewOrderApiController extends CertifyApiController {
|
|
|
}
|
|
}
|
|
|
/**
|
|
/**
|
|
|
* 修改项目(营销员)
|
|
* 修改项目(营销员)
|
|
|
- * @param t
|
|
|
|
|
- * @return
|
|
|
|
|
*/
|
|
*/
|
|
|
@RequestMapping(value = "/updateOrderTask",method = RequestMethod.POST)
|
|
@RequestMapping(value = "/updateOrderTask",method = RequestMethod.POST)
|
|
|
public Result updateOrderTask(TOrderTask t){
|
|
public Result updateOrderTask(TOrderTask t){
|
|
@@ -126,7 +118,6 @@ public class AdminNewOrderApiController extends CertifyApiController {
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 删除订单项目
|
|
* 删除订单项目
|
|
|
- * @return
|
|
|
|
|
*/
|
|
*/
|
|
|
@RequestMapping(value = "/deleteOrderTask",method = RequestMethod.POST)
|
|
@RequestMapping(value = "/deleteOrderTask",method = RequestMethod.POST)
|
|
|
public Result deleteOrderTask(Integer id){
|
|
public Result deleteOrderTask(Integer id){
|
|
@@ -139,7 +130,6 @@ public class AdminNewOrderApiController extends CertifyApiController {
|
|
|
}
|
|
}
|
|
|
/**
|
|
/**
|
|
|
* 删除订单
|
|
* 删除订单
|
|
|
- * @return
|
|
|
|
|
*/
|
|
*/
|
|
|
@RequestMapping(value = "/deleteOrderNew",method = RequestMethod.POST)
|
|
@RequestMapping(value = "/deleteOrderNew",method = RequestMethod.POST)
|
|
|
public Result deleteOrderNew(String orderNo){
|
|
public Result deleteOrderNew(String orderNo){
|
|
@@ -158,8 +148,6 @@ public class AdminNewOrderApiController extends CertifyApiController {
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 获取订单项目信息
|
|
* 获取订单项目信息
|
|
|
- * @param orderNo
|
|
|
|
|
- * @return
|
|
|
|
|
*/
|
|
*/
|
|
|
@RequestMapping(value = "/getOrderTask",method = RequestMethod.GET)
|
|
@RequestMapping(value = "/getOrderTask",method = RequestMethod.GET)
|
|
|
public Result getOrderTask(String orderNo){
|
|
public Result getOrderTask(String orderNo){
|
|
@@ -174,7 +162,6 @@ public class AdminNewOrderApiController extends CertifyApiController {
|
|
|
}
|
|
}
|
|
|
/**
|
|
/**
|
|
|
* 修改订单
|
|
* 修改订单
|
|
|
- * @return
|
|
|
|
|
*/
|
|
*/
|
|
|
@RequestMapping(value = "/updateServiceOrderNew",method = RequestMethod.POST)
|
|
@RequestMapping(value = "/updateServiceOrderNew",method = RequestMethod.POST)
|
|
|
public Result updateServiceOrder(TOrderNewWithBLOBs t,String isSubmit,String signDate){
|
|
public Result updateServiceOrder(TOrderNewWithBLOBs t,String isSubmit,String signDate){
|