33 lines
1.0 KiB
Java
33 lines
1.0 KiB
Java
|
package com.cim.idm.controller;
|
||
|
|
||
|
import com.alibaba.fastjson.JSON;
|
||
|
import com.alibaba.fastjson.JSONObject;
|
||
|
import com.cim.idm.model.DeliveryDto;
|
||
|
import com.cim.idm.service.IDeliveryService;
|
||
|
import com.cim.idm.utils.AjaxResult;
|
||
|
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||
|
import org.springframework.web.bind.annotation.RestController;
|
||
|
|
||
|
import javax.annotation.Resource;
|
||
|
|
||
|
@RestController
|
||
|
@RequestMapping("/delivery")
|
||
|
@EnableAutoConfiguration
|
||
|
public class DeliveryController {
|
||
|
|
||
|
@Resource
|
||
|
private IDeliveryService deliveryService;
|
||
|
|
||
|
/**
|
||
|
* 创建入库单
|
||
|
*/
|
||
|
@PostMapping(value = "/create")
|
||
|
public AjaxResult createDelivery(@RequestBody JSONObject in) {
|
||
|
DeliveryDto dto = JSON.toJavaObject(in, DeliveryDto.class);
|
||
|
return AjaxResult.me().setSuccess(true).setMessage(deliveryService.createDelivery(dto));
|
||
|
}
|
||
|
}
|