2025-03-26 09:06:23 +08:00
|
|
|
package com.cim.idm.controller;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.cim.idm.model.DeliveryDto;
|
2025-03-26 10:32:09 +08:00
|
|
|
import com.cim.idm.model.PageDto;
|
2025-03-26 09:06:23 +08:00
|
|
|
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));
|
|
|
|
}
|
2025-03-26 10:32:09 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取采购单
|
|
|
|
*/
|
|
|
|
@PostMapping(value = "/getPurchase")
|
|
|
|
public AjaxResult getPurchase(@RequestBody PageDto in) {
|
|
|
|
return AjaxResult.me().setSuccess(true).setResultObj(deliveryService.getPurchase(in));
|
|
|
|
}
|
2025-03-26 09:06:23 +08:00
|
|
|
}
|