rev:拆拼盘修改
This commit is contained in:
@@ -65,5 +65,13 @@ public class StIvtShutframeinvBcpController {
|
||||
public ResponseEntity<Object> getBillDtl(@RequestBody JSONObject jo) {
|
||||
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);
|
||||
|
||||
void confirm(JSONObject jo);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -34,15 +34,13 @@ import java.util.LinkedList;
|
||||
@Service
|
||||
public class StIvtShutframedtlBcpServiceImpl extends ServiceImpl<StIvtShutframedtlBcpMapper, StIvtShutframedtlBcp> implements IStIvtShutframedtlBcpService {
|
||||
|
||||
private StIvtStructattr first_struct;
|
||||
|
||||
private StIvtStructattr last_struct;
|
||||
|
||||
@Autowired
|
||||
private IStIvtStructattrService structattrService;
|
||||
|
||||
@Override
|
||||
public int create(JSONArray rows, String shutframeinv_id) {
|
||||
StIvtStructattr first_struct = null;
|
||||
StIvtStructattr last_struct = null;
|
||||
int total_qty = 1;
|
||||
|
||||
if (rows.size() > 0 && StringUtils.isNotEmpty(shutframeinv_id)) {
|
||||
@@ -100,6 +98,6 @@ public class StIvtShutframedtlBcpServiceImpl extends ServiceImpl<StIvtShutframed
|
||||
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.util.NumberUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
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.mapper.StIvtShutframeinvBcpMapper;
|
||||
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.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -53,6 +56,8 @@ public class StIvtShutframeinvBcpServiceImpl extends ServiceImpl<StIvtShutframei
|
||||
@Autowired
|
||||
private IStIvtBsrealstorattrService stIvtBsrealstorattrService;
|
||||
@Autowired
|
||||
private IStIvtStructivtBcpService structivtBcpService;
|
||||
@Autowired
|
||||
private StIvtStructivtBcpMapper bcpMapper;
|
||||
|
||||
@Override
|
||||
@@ -64,11 +69,30 @@ public class StIvtShutframeinvBcpServiceImpl extends ServiceImpl<StIvtShutframei
|
||||
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
|
||||
public List<Map> getBillDtl(JSONObject jo) {
|
||||
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_list2 = bcpMapper.getStructIvtInfo(MapOf.of("struct_code", list.get(0).getTurnin_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).getTurnout_struct_code()));
|
||||
ivt_list.addAll(ivt_list2);
|
||||
return ivt_list;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package org.nl.wms.storage_manage.semimanage.service.structIvt.dao;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
@@ -28,6 +30,7 @@ public class StIvtStructivtBcp implements Serializable {
|
||||
/**
|
||||
* 仓位标识
|
||||
*/
|
||||
@TableId
|
||||
private String struct_id;
|
||||
|
||||
/**
|
||||
|
||||
@@ -128,6 +128,17 @@
|
||||
>
|
||||
任务下发
|
||||
</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>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
@@ -283,6 +294,11 @@ export default {
|
||||
this.querytable()
|
||||
})
|
||||
},
|
||||
confirm() {
|
||||
shutframe.confirm({ 'shutframeinv_id': this.currentRow.shutframeinv_id }).then(res => {
|
||||
this.querytable()
|
||||
})
|
||||
},
|
||||
checkboxT(row) {
|
||||
return row.bill_status !== '99'
|
||||
},
|
||||
|
||||
@@ -10,8 +10,8 @@ export function add(data) {
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/shutframe/',
|
||||
method: 'delete',
|
||||
url: 'api/shutframe/delete',
|
||||
method: 'post',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
@@ -31,6 +31,7 @@ export function getOutBillDtl(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getOutBillDtl2(params) {
|
||||
return request({
|
||||
url: '/api/shutframe/getOutBillDtl2',
|
||||
@@ -38,12 +39,14 @@ export function getOutBillDtl2(params) {
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function getInvTypes() {
|
||||
return request({
|
||||
url: '/api/shutframe/getInvTypes',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function insertDtl(data) {
|
||||
return request({
|
||||
url: '/api/shutframe/insertDtl',
|
||||
@@ -51,6 +54,7 @@ export function insertDtl(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getBcpIvtInfo(data) {
|
||||
return request({
|
||||
url: '/api/bcp/getBcpIvtInfo',
|
||||
@@ -58,6 +62,7 @@ export function getBcpIvtInfo(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getStructIvt2(params) {
|
||||
return request({
|
||||
url: '/api/shutframe/getStructIvt2',
|
||||
@@ -65,6 +70,7 @@ export function getStructIvt2(params) {
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function getStruct(params) {
|
||||
return request({
|
||||
url: '/api/shutframe/getStruct',
|
||||
@@ -72,13 +78,15 @@ export function getStruct(params) {
|
||||
params
|
||||
})
|
||||
}
|
||||
export function handdown(data) {
|
||||
|
||||
export function confirm(data) {
|
||||
return request({
|
||||
url: '/api/shutframe/handdown',
|
||||
url: '/api/shutframe/confirm',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getOutBillTask(params) {
|
||||
return request({
|
||||
url: '/api/shutframe/getOutBillTask',
|
||||
@@ -86,6 +94,7 @@ export function getOutBillTask(params) {
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function issueTask(data) {
|
||||
return request({
|
||||
url: '/api/shutframe/issueTask',
|
||||
@@ -93,6 +102,7 @@ export function issueTask(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function finishTask(data) {
|
||||
return request({
|
||||
url: '/api/shutframe/finishTask',
|
||||
@@ -100,6 +110,7 @@ export function finishTask(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function allCancel(data) {
|
||||
return request({
|
||||
url: '/api/shutframe/allCancel',
|
||||
@@ -107,4 +118,19 @@ export function allCancel(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