dev:拆拼盘修改
This commit is contained in:
@@ -36,6 +36,22 @@ public class StIvtShutframeinvBcpController {
|
|||||||
return new ResponseEntity<>(HttpStatus.OK);
|
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
|
@GetMapping
|
||||||
@Log("查询拼盘单")
|
@Log("查询拼盘单")
|
||||||
@ApiOperation("查询拼盘单")
|
@ApiOperation("查询拼盘单")
|
||||||
|
|||||||
@@ -21,6 +21,10 @@ public interface IStIvtShutframeinvBcpService extends IService<StIvtShutframeinv
|
|||||||
|
|
||||||
void create (JSONObject jo);
|
void create (JSONObject jo);
|
||||||
|
|
||||||
|
void update(JSONObject map);
|
||||||
|
|
||||||
|
void delete(Long[] ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询
|
* 分页查询
|
||||||
* @param query,page /
|
* @param query,page /
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.github.pagehelper.Page;
|
import com.github.pagehelper.Page;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import io.jsonwebtoken.lang.Assert;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.nl.common.TableDataInfo;
|
import org.nl.common.TableDataInfo;
|
||||||
import org.nl.common.domain.query.PageQuery;
|
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.masterdata_manage.storage.service.storage.dao.StIvtBsrealstorattr;
|
||||||
import org.nl.wms.storage_manage.IOSEnum;
|
import org.nl.wms.storage_manage.IOSEnum;
|
||||||
import org.nl.wms.storage_manage.SHUTEnum;
|
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.IStIvtShutframedtlBcpService;
|
||||||
import org.nl.wms.storage_manage.semimanage.service.shutFrame.IStIvtShutframeinvBcpService;
|
import org.nl.wms.storage_manage.semimanage.service.shutFrame.IStIvtShutframeinvBcpService;
|
||||||
import org.nl.wms.storage_manage.semimanage.service.shutFrame.dao.StIvtShutframedtlBcp;
|
import org.nl.wms.storage_manage.semimanage.service.shutFrame.dao.StIvtShutframedtlBcp;
|
||||||
@@ -71,6 +73,33 @@ public class StIvtShutframeinvBcpServiceImpl extends ServiceImpl<StIvtShutframei
|
|||||||
return ivt_list;
|
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
|
@Override
|
||||||
public void create(JSONObject form) {
|
public void create(JSONObject form) {
|
||||||
JSONArray rows = form.getJSONArray("tableData");
|
JSONArray rows = form.getJSONArray("tableData");
|
||||||
@@ -87,6 +116,7 @@ public class StIvtShutframeinvBcpServiceImpl extends ServiceImpl<StIvtShutframei
|
|||||||
this.save(shutframeinvBcp);
|
this.save(shutframeinvBcp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private StIvtShutframeinvBcp packageMstForm(StIvtShutframeinvBcp shutMst, JSONObject whereJson, Boolean isUpdate) {
|
private StIvtShutframeinvBcp packageMstForm(StIvtShutframeinvBcp shutMst, JSONObject whereJson, Boolean isUpdate) {
|
||||||
if (!isUpdate) {
|
if (!isUpdate) {
|
||||||
|
|||||||
@@ -289,6 +289,7 @@ export default {
|
|||||||
this.tableData1 = []
|
this.tableData1 = []
|
||||||
this.form.detail_count = this.form.tableData.length
|
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 => {
|
shutframe.getBcpIvtInfo({ 'material_id': row.material_id, 'stor_id': this.form.stor_id }).then(res => {
|
||||||
this.tableData1 = res
|
this.tableData1 = res
|
||||||
this.right_flag = false
|
this.right_flag = false
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ export function del(ids) {
|
|||||||
|
|
||||||
export function edit(data) {
|
export function edit(data) {
|
||||||
return request({
|
return request({
|
||||||
url: 'api/shutframe',
|
url: 'api/shutframe/update',
|
||||||
method: 'put',
|
method: 'post',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user