Browse Source

入库接口的调整

master
djz8236 2 years ago
parent
commit
804915ac2c
  1. 14
      warehousing-system/project/wh-manage/src/main/java/com/wh/controller/purchasenew/PurchasenewController.java
  2. 2
      warehousing-system/project/wh-manage/src/main/resources/mappers/PurchasenewMapper.xml
  3. 3
      warehousing-system/project_web/src/components/instorehouse/putIn.vue

14
warehousing-system/project/wh-manage/src/main/java/com/wh/controller/purchasenew/PurchasenewController.java

@ -1,9 +1,6 @@
package com.wh.controller.purchasenew;
import com.wh.pojo.purchasenew.PurchasenewDetailsVo;
import com.wh.pojo.purchasenew.PurchasenewDto;
import com.wh.pojo.purchasenew.PurchasenewQuery;
import com.wh.pojo.purchasenew.PurchasenewVo;
import com.wh.pojo.purchasenew.*;
import com.wh.service.purchasenew.PurchasenewService;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
@ -12,6 +9,8 @@ import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@CrossOrigin
@RequestMapping("/purchasenew")
@ -26,6 +25,13 @@ public class PurchasenewController {
PagerVo<PurchasenewVo> pv = purchasenewService.listPageVo(pq);
return rb.success().setData(pv);
}
@ApiOperation("获取所有的采购订单")
@PostMapping("/listAll")
public ResultBean<List<Purchasenew>> listAll(){
ResultBean rb = ResultBean.fireFail();
List<Purchasenew> list = purchasenewService.list();
return rb.success().setData(list);
}
@ApiOperation("新增或修改")
@PostMapping("/save")

2
warehousing-system/project/wh-manage/src/main/resources/mappers/PurchasenewMapper.xml

@ -4,7 +4,7 @@
<!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} -->
<select id="selectPageVo" resultType="com.wh.pojo.purchasenew.PurchasenewVo">
SELECT * FROM purchasenew <where> ${ew.sqlSegment} </where>
SELECT * FROM purchasenew <where> ${ew.sqlSegment} </where> order by id desc
</select>
<select id="selectListAllVo" resultType="com.wh.pojo.purchasenew.PurchasenewVo">

3
warehousing-system/project_web/src/components/instorehouse/putIn.vue

@ -86,7 +86,8 @@ export default {
this.inStorehouse.createPerson = this.user
const now = new Date()
this.inStorehouse.inStorehouseId = 'IN' + now.getTime()
const { data: result } = await this.$http.post('/putIn/addInStorehouse', this.inStorehouse)
// const { data: result } = await this.$http.post('/putIn/addInStorehouse', this.inStorehouse)
const { data: result } = await this.$http.post('/input/addInStorehouse', this.inStorehouse)
if (result.status === 201) return this.$message.error('入库失败')
this.$message.success(result.data)
this.$refs.onPutInRuleForm.resetFields()

Loading…
Cancel
Save