|
@@ -8,6 +8,7 @@ import com.steerinfo.dil.util.DataChange;
|
|
import com.steerinfo.framework.controller.RESTfulResult;
|
|
import com.steerinfo.framework.controller.RESTfulResult;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@@ -92,10 +93,14 @@ public class BackgroundProcessingController extends BaseRESTfulController {
|
|
|
|
|
|
@ApiOperation(value = "更新运输订单状态接口")
|
|
@ApiOperation(value = "更新运输订单状态接口")
|
|
@PostMapping("updateOrderStatus")
|
|
@PostMapping("updateOrderStatus")
|
|
- public RESTfulResult updateOrderStatus(@RequestBody(required = false) Map<String,Object> map) {
|
|
|
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
|
+ public RESTfulResult updateOrderStatus(@RequestBody(required = false) Map<String,Object> map) throws Exception{
|
|
if (map.get("orderNumber") != null) {
|
|
if (map.get("orderNumber") != null) {
|
|
if (DataChange.dataToBigDecimal(map.get("orderStatus")).intValue() != 2) {
|
|
if (DataChange.dataToBigDecimal(map.get("orderStatus")).intValue() != 2) {
|
|
int i = backgroundProcessingMapper.updateOrderStatus(map);
|
|
int i = backgroundProcessingMapper.updateOrderStatus(map);
|
|
|
|
+ if(i > 1){
|
|
|
|
+ throw new Exception("该订单号有多个运单,不允许修改,请去数据库手动修改订单状态!");
|
|
|
|
+ }
|
|
return success(i);
|
|
return success(i);
|
|
}
|
|
}
|
|
}
|
|
}
|