dev:拆拼盘修改

This commit is contained in:
2023-05-31 19:36:19 +08:00
parent 31e9e2c3c0
commit 8fc96a773d
5 changed files with 53 additions and 2 deletions

View File

@@ -36,6 +36,22 @@ public class StIvtShutframeinvBcpController {
return new ResponseEntity<>(HttpStatus.OK);
}
@PostMapping("/update")
@Log("修改拼盘单")
@ApiOperation("修改拼盘单")
public ResponseEntity<Object> update(@RequestBody JSONObject whereJson) {
shutframeinvBcpService.update(whereJson);
return new ResponseEntity<>(HttpStatus.OK);
}
@PostMapping("/delete")
@Log("删除入库单")
@ApiOperation("删除入库单")
public ResponseEntity<Object> delete(@RequestBody Long[] ids){
shutframeinvBcpService.delete(ids);
return new ResponseEntity<>(HttpStatus.OK);
}
@GetMapping
@Log("查询拼盘单")
@ApiOperation("查询拼盘单")

View File

@@ -21,6 +21,10 @@ public interface IStIvtShutframeinvBcpService extends IService<StIvtShutframeinv
void create (JSONObject jo);
void update(JSONObject map);
void delete(Long[] ids);
/**
* 分页查询
* @param query,page /

View File

@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import io.jsonwebtoken.lang.Assert;
import org.jetbrains.annotations.NotNull;
import org.nl.common.TableDataInfo;
import org.nl.common.domain.query.PageQuery;
@@ -21,6 +22,7 @@ import org.nl.wms.masterdata_manage.storage.service.storage.IStIvtBsrealstorattr
import org.nl.wms.masterdata_manage.storage.service.storage.dao.StIvtBsrealstorattr;
import org.nl.wms.storage_manage.IOSEnum;
import org.nl.wms.storage_manage.SHUTEnum;
import org.nl.wms.storage_manage.rawmanage.service.iostorInv.dao.StIvtIostorinvYl;
import org.nl.wms.storage_manage.semimanage.service.shutFrame.IStIvtShutframedtlBcpService;
import org.nl.wms.storage_manage.semimanage.service.shutFrame.IStIvtShutframeinvBcpService;
import org.nl.wms.storage_manage.semimanage.service.shutFrame.dao.StIvtShutframedtlBcp;
@@ -71,6 +73,33 @@ public class StIvtShutframeinvBcpServiceImpl extends ServiceImpl<StIvtShutframei
return ivt_list;
}
@Override
public void delete(Long[] ids) {
for (Long id : ids) {
StIvtShutframeinvBcp dao = this.getOne(new QueryWrapper<StIvtShutframeinvBcp>().eq("shutframeinv_id", id));
dao.setIs_delete(true);
this.updateById(dao);
}
}
@Override
public void update(JSONObject form) {
Assert.notNull(new Object[]{form, form.get("shutframeinv_id")}, "请求参数不能为空");
StIvtShutframeinvBcp mst = form.toJavaObject(StIvtShutframeinvBcp.class);
mst.setUpdate_optid(SecurityUtils.getCurrentUserId());
mst.setUpdate_optname(SecurityUtils.getCurrentNickName());
mst.setUpdate_time(DateUtil.now());
JSONArray rows = form.getJSONArray("tableData");
if (ObjectUtil.isEmpty(rows)) throw new BadRequestException("请求参数不能为空");
// 调用明细表 插入/更新方法
int i = shutframedtlBcpService.create(rows, mst.getShutframeinv_id());
mst.setDetail_count(BigDecimal.valueOf(i));
this.updateById(mst);
}
@Override
public void create(JSONObject form) {
JSONArray rows = form.getJSONArray("tableData");
@@ -87,6 +116,7 @@ public class StIvtShutframeinvBcpServiceImpl extends ServiceImpl<StIvtShutframei
this.save(shutframeinvBcp);
}
@NotNull
private StIvtShutframeinvBcp packageMstForm(StIvtShutframeinvBcp shutMst, JSONObject whereJson, Boolean isUpdate) {
if (!isUpdate) {

View File

@@ -289,6 +289,7 @@ export default {
this.tableData1 = []
this.form.detail_count = this.form.tableData.length
this.form.tableData = []
shutframe.getBcpIvtInfo({ 'material_id': row.material_id, 'stor_id': this.form.stor_id }).then(res => {
this.tableData1 = res
this.right_flag = false

View File

@@ -18,8 +18,8 @@ export function del(ids) {
export function edit(data) {
return request({
url: 'api/shutframe',
method: 'put',
url: 'api/shutframe/update',
method: 'post',
data
})
}