rev:原材料库存,桶标签优化
This commit is contained in:
@@ -4,20 +4,21 @@ package org.nl.wms.basedata.master.rest;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.annotation.Log;
|
||||
import org.nl.wms.basedata.master.eum.RecordStatusEnum;
|
||||
import org.nl.wms.basedata.master.service.BucketrecordService;
|
||||
import org.nl.wms.basedata.master.service.dto.BucketrecordDto;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.nl.annotation.Log;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import java.util.Map;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* @author Liuxy
|
||||
@@ -97,4 +98,13 @@ public class BucketrecordController {
|
||||
public ResponseEntity<Object> getIvtList() {
|
||||
return new ResponseEntity<>(bucketrecordService.getIvtList(),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PutMapping("/delIvt")
|
||||
@Log("删除库存")
|
||||
@ApiOperation("删除库存")
|
||||
//@PreAuthorize("@el.check('store:edit')")
|
||||
public ResponseEntity<Object> delIvt(@RequestBody JSONObject json) {
|
||||
bucketrecordService.delIvt(json);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
package org.nl.wms.basedata.master.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.wms.basedata.master.service.dto.BucketrecordDto;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
@@ -79,4 +80,10 @@ public interface BucketrecordService {
|
||||
* 获取库存等级
|
||||
*/
|
||||
JSONArray getIvtList();
|
||||
|
||||
/**
|
||||
* 删除库存
|
||||
* @param whereJson 入参
|
||||
*/
|
||||
void delIvt(JSONObject whereJson);
|
||||
}
|
||||
|
||||
@@ -214,4 +214,11 @@ wo.update(json);
|
||||
return jsonArr;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void delIvt(JSONObject whereJson) {
|
||||
WQLObject.getWQLObject("st_ivt_structivt")
|
||||
.delete("stockrecord_id = '"+whereJson.getString("stockrecord_id")+"'");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -74,6 +74,7 @@
|
||||
ivt.frozen_qty,
|
||||
ivt.warehousing_qty,
|
||||
ivt.qty_unit_name,
|
||||
ivt.stockrecord_id,
|
||||
ivt.instorage_time
|
||||
FROM
|
||||
ST_IVT_StructIvt ivt
|
||||
|
||||
Reference in New Issue
Block a user