rev:拆拼盘修改
This commit is contained in:
@@ -65,5 +65,13 @@ public class StIvtShutframeinvBcpController {
|
|||||||
public ResponseEntity<Object> getBillDtl(@RequestBody JSONObject jo) {
|
public ResponseEntity<Object> getBillDtl(@RequestBody JSONObject jo) {
|
||||||
return new ResponseEntity<>(shutframeinvBcpService.getBillDtl(jo), HttpStatus.OK);
|
return new ResponseEntity<>(shutframeinvBcpService.getBillDtl(jo), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/confirm")
|
||||||
|
@Log("拼盘确认")
|
||||||
|
@ApiOperation("拼盘确认")
|
||||||
|
public ResponseEntity<Object> confirm(@RequestBody JSONObject jo) {
|
||||||
|
shutframeinvBcpService.confirm(jo);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,5 +34,7 @@ public interface IStIvtShutframeinvBcpService extends IService<StIvtShutframeinv
|
|||||||
|
|
||||||
List<Map> getBillDtl(JSONObject jo);
|
List<Map> getBillDtl(JSONObject jo);
|
||||||
|
|
||||||
|
void confirm(JSONObject jo);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,15 +34,13 @@ import java.util.LinkedList;
|
|||||||
@Service
|
@Service
|
||||||
public class StIvtShutframedtlBcpServiceImpl extends ServiceImpl<StIvtShutframedtlBcpMapper, StIvtShutframedtlBcp> implements IStIvtShutframedtlBcpService {
|
public class StIvtShutframedtlBcpServiceImpl extends ServiceImpl<StIvtShutframedtlBcpMapper, StIvtShutframedtlBcp> implements IStIvtShutframedtlBcpService {
|
||||||
|
|
||||||
private StIvtStructattr first_struct;
|
|
||||||
|
|
||||||
private StIvtStructattr last_struct;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IStIvtStructattrService structattrService;
|
private IStIvtStructattrService structattrService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int create(JSONArray rows, String shutframeinv_id) {
|
public int create(JSONArray rows, String shutframeinv_id) {
|
||||||
|
StIvtStructattr first_struct = null;
|
||||||
|
StIvtStructattr last_struct = null;
|
||||||
int total_qty = 1;
|
int total_qty = 1;
|
||||||
|
|
||||||
if (rows.size() > 0 && StringUtils.isNotEmpty(shutframeinv_id)) {
|
if (rows.size() > 0 && StringUtils.isNotEmpty(shutframeinv_id)) {
|
||||||
@@ -100,6 +98,6 @@ public class StIvtShutframedtlBcpServiceImpl extends ServiceImpl<StIvtShutframed
|
|||||||
total_qty++;
|
total_qty++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return total_qty;
|
return total_qty--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package org.nl.wms.storage_manage.semimanage.service.shutFrame.impl;
|
|||||||
|
|
||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.NumberUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
@@ -29,6 +30,8 @@ import org.nl.wms.storage_manage.semimanage.service.shutFrame.dao.StIvtShutframe
|
|||||||
import org.nl.wms.storage_manage.semimanage.service.shutFrame.dao.StIvtShutframeinvBcp;
|
import org.nl.wms.storage_manage.semimanage.service.shutFrame.dao.StIvtShutframeinvBcp;
|
||||||
import org.nl.wms.storage_manage.semimanage.service.shutFrame.dao.mapper.StIvtShutframeinvBcpMapper;
|
import org.nl.wms.storage_manage.semimanage.service.shutFrame.dao.mapper.StIvtShutframeinvBcpMapper;
|
||||||
import org.nl.wms.storage_manage.semimanage.service.shutFrame.dto.ShutQuery;
|
import org.nl.wms.storage_manage.semimanage.service.shutFrame.dto.ShutQuery;
|
||||||
|
import org.nl.wms.storage_manage.semimanage.service.structIvt.IStIvtStructivtBcpService;
|
||||||
|
import org.nl.wms.storage_manage.semimanage.service.structIvt.dao.StIvtStructivtBcp;
|
||||||
import org.nl.wms.storage_manage.semimanage.service.structIvt.dao.mapper.StIvtStructivtBcpMapper;
|
import org.nl.wms.storage_manage.semimanage.service.structIvt.dao.mapper.StIvtStructivtBcpMapper;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -53,6 +56,8 @@ public class StIvtShutframeinvBcpServiceImpl extends ServiceImpl<StIvtShutframei
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IStIvtBsrealstorattrService stIvtBsrealstorattrService;
|
private IStIvtBsrealstorattrService stIvtBsrealstorattrService;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
private IStIvtStructivtBcpService structivtBcpService;
|
||||||
|
@Autowired
|
||||||
private StIvtStructivtBcpMapper bcpMapper;
|
private StIvtStructivtBcpMapper bcpMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -64,11 +69,30 @@ public class StIvtShutframeinvBcpServiceImpl extends ServiceImpl<StIvtShutframei
|
|||||||
return build;
|
return build;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void confirm(JSONObject form) {
|
||||||
|
Assert.notNull(new Object[]{form, form.get("shutframeinv_id")}, "请求参数不能为空");
|
||||||
|
|
||||||
|
List<StIvtShutframedtlBcp> list = shutframedtlBcpService.list(new QueryWrapper<StIvtShutframedtlBcp>().eq("shutframeinv_id", form.getString("shutframeinv_id")));
|
||||||
|
list.forEach(dtl -> {
|
||||||
|
String material_id = dtl.getMaterial_id();
|
||||||
|
String turnin_struct_id = dtl.getTurnin_struct_id();
|
||||||
|
String turnout_struct_id = dtl.getTurnout_struct_id();
|
||||||
|
StIvtStructivtBcp in_ivt = structivtBcpService.getOne(new QueryWrapper<StIvtStructivtBcp>().eq("struct_id", turnin_struct_id).eq("material_id", material_id));
|
||||||
|
if (ObjectUtil.isEmpty(in_ivt)) {
|
||||||
|
throw new BadRequestException("库存不能为空!");
|
||||||
|
}
|
||||||
|
in_ivt.setCanuse_qty(NumberUtil.add(in_ivt.getCanuse_qty(), dtl.getFact_qty()));
|
||||||
|
structivtBcpService.remove(new QueryWrapper<StIvtStructivtBcp>().eq("struct_id", turnout_struct_id));
|
||||||
|
structivtBcpService.updateById(in_ivt);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Map> getBillDtl(JSONObject jo) {
|
public List<Map> getBillDtl(JSONObject jo) {
|
||||||
List<StIvtShutframedtlBcp> list = shutframedtlBcpService.list(new QueryWrapper<StIvtShutframedtlBcp>().eq("shutframeinv_id", jo.getString("shutframeinv_id")));
|
List<StIvtShutframedtlBcp> list = shutframedtlBcpService.list(new QueryWrapper<StIvtShutframedtlBcp>().eq("shutframeinv_id", jo.getString("shutframeinv_id")));
|
||||||
List<Map> ivt_list = bcpMapper.getStructIvtInfo(MapOf.of("struct_code", list.get(0).getTurnout_struct_code()));
|
List<Map> ivt_list = bcpMapper.getStructIvtInfo(MapOf.of("struct_code", list.get(0).getTurnin_struct_code()));
|
||||||
List<Map> ivt_list2 = bcpMapper.getStructIvtInfo(MapOf.of("struct_code", list.get(0).getTurnin_struct_code()));
|
List<Map> ivt_list2 = bcpMapper.getStructIvtInfo(MapOf.of("struct_code", list.get(0).getTurnout_struct_code()));
|
||||||
ivt_list.addAll(ivt_list2);
|
ivt_list.addAll(ivt_list2);
|
||||||
return ivt_list;
|
return ivt_list;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package org.nl.wms.storage_manage.semimanage.service.structIvt.dao;
|
package org.nl.wms.storage_manage.semimanage.service.structIvt.dao;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
@@ -28,6 +30,7 @@ public class StIvtStructivtBcp implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 仓位标识
|
* 仓位标识
|
||||||
*/
|
*/
|
||||||
|
@TableId
|
||||||
private String struct_id;
|
private String struct_id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -128,6 +128,17 @@
|
|||||||
>
|
>
|
||||||
任务下发
|
任务下发
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
slot="right"
|
||||||
|
class="filter-item"
|
||||||
|
type="success"
|
||||||
|
:disabled="work_flag"
|
||||||
|
icon="el-icon-position"
|
||||||
|
size="mini"
|
||||||
|
@click="confirm"
|
||||||
|
>
|
||||||
|
强制确认
|
||||||
|
</el-button>
|
||||||
</crudOperation>
|
</crudOperation>
|
||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
<el-table
|
<el-table
|
||||||
@@ -283,6 +294,11 @@ export default {
|
|||||||
this.querytable()
|
this.querytable()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
confirm() {
|
||||||
|
shutframe.confirm({ 'shutframeinv_id': this.currentRow.shutframeinv_id }).then(res => {
|
||||||
|
this.querytable()
|
||||||
|
})
|
||||||
|
},
|
||||||
checkboxT(row) {
|
checkboxT(row) {
|
||||||
return row.bill_status !== '99'
|
return row.bill_status !== '99'
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ export function add(data) {
|
|||||||
|
|
||||||
export function del(ids) {
|
export function del(ids) {
|
||||||
return request({
|
return request({
|
||||||
url: 'api/shutframe/',
|
url: 'api/shutframe/delete',
|
||||||
method: 'delete',
|
method: 'post',
|
||||||
data: ids
|
data: ids
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -31,6 +31,7 @@ export function getOutBillDtl(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getOutBillDtl2(params) {
|
export function getOutBillDtl2(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/shutframe/getOutBillDtl2',
|
url: '/api/shutframe/getOutBillDtl2',
|
||||||
@@ -38,12 +39,14 @@ export function getOutBillDtl2(params) {
|
|||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getInvTypes() {
|
export function getInvTypes() {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/shutframe/getInvTypes',
|
url: '/api/shutframe/getInvTypes',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function insertDtl(data) {
|
export function insertDtl(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/shutframe/insertDtl',
|
url: '/api/shutframe/insertDtl',
|
||||||
@@ -51,6 +54,7 @@ export function insertDtl(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getBcpIvtInfo(data) {
|
export function getBcpIvtInfo(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/bcp/getBcpIvtInfo',
|
url: '/api/bcp/getBcpIvtInfo',
|
||||||
@@ -58,6 +62,7 @@ export function getBcpIvtInfo(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getStructIvt2(params) {
|
export function getStructIvt2(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/shutframe/getStructIvt2',
|
url: '/api/shutframe/getStructIvt2',
|
||||||
@@ -65,6 +70,7 @@ export function getStructIvt2(params) {
|
|||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getStruct(params) {
|
export function getStruct(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/shutframe/getStruct',
|
url: '/api/shutframe/getStruct',
|
||||||
@@ -72,13 +78,15 @@ export function getStruct(params) {
|
|||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export function handdown(data) {
|
|
||||||
|
export function confirm(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/shutframe/handdown',
|
url: '/api/shutframe/confirm',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getOutBillTask(params) {
|
export function getOutBillTask(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/shutframe/getOutBillTask',
|
url: '/api/shutframe/getOutBillTask',
|
||||||
@@ -86,6 +94,7 @@ export function getOutBillTask(params) {
|
|||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function issueTask(data) {
|
export function issueTask(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/shutframe/issueTask',
|
url: '/api/shutframe/issueTask',
|
||||||
@@ -93,6 +102,7 @@ export function issueTask(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function finishTask(data) {
|
export function finishTask(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/shutframe/finishTask',
|
url: '/api/shutframe/finishTask',
|
||||||
@@ -100,6 +110,7 @@ export function finishTask(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function allCancel(data) {
|
export function allCancel(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/shutframe/allCancel',
|
url: '/api/shutframe/allCancel',
|
||||||
@@ -107,4 +118,19 @@ export function allCancel(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export default { add, edit, del, getOutBillDtl, allCancel, getBcpIvtInfo, getOutBillTask, finishTask, issueTask, getInvTypes, handdown, getOutBillDtl2, getStructIvt2, getStruct }
|
|
||||||
|
export default {
|
||||||
|
add,
|
||||||
|
edit,
|
||||||
|
del,
|
||||||
|
getOutBillDtl,
|
||||||
|
allCancel,
|
||||||
|
getBcpIvtInfo,
|
||||||
|
getOutBillTask,
|
||||||
|
finishTask,
|
||||||
|
confirm,
|
||||||
|
getInvTypes,
|
||||||
|
getOutBillDtl2,
|
||||||
|
getStructIvt2,
|
||||||
|
getStruct
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user