代码合并
This commit is contained in:
@@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.wql.WQL;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.wms.pda.st.service.VirtualOutService;
|
||||
@@ -95,37 +96,42 @@ public class VirtualOutServiceImpl implements VirtualOutService {
|
||||
|
||||
JSONArray box_rows = whereJson.getJSONArray("box_rows");
|
||||
|
||||
HashSet<String> boxSet = new HashSet<>();
|
||||
String box_no = whereJson.getString("box_no");
|
||||
if (ObjectUtil.isEmpty(box_no)) throw new BadRequestException("木箱不能为空");
|
||||
|
||||
for (int i = 0; i < box_rows.size(); i++) {
|
||||
|
||||
/* for (int i = 0; i < box_rows.size(); i++) {
|
||||
JSONObject json = box_rows.getJSONObject(i);
|
||||
boxSet.add(json.getString("package_box_sn"));
|
||||
}
|
||||
if (!StrUtil.equals(json.getString("package_box_sn"), box_no)) {
|
||||
throw new BadRequestException("请输入正确的木箱号");
|
||||
}
|
||||
}*/
|
||||
|
||||
for (String box_no : boxSet) {
|
||||
JSONArray disArr = WQL.getWO("PDA_ST_01").addParam("flag", "7").addParam("box_no", box_no).process().getResultJSONArray(0);
|
||||
for (int i = 0; i < disArr.size(); i++) {
|
||||
JSONObject jsonDis = disArr.getJSONObject(i);
|
||||
// 更新状态为完成
|
||||
jsonDis.put("work_status", "99");
|
||||
disTab.update(jsonDis);
|
||||
// 传单据号
|
||||
|
||||
// 判断分配明细是否全部完成
|
||||
JSONArray disNoArr = disTab.query("iostorinvdtl_id = '" + jsonDis.getString("iostorinvdtl_id") + "' and work_status <> '99'").getResultJSONArray(0);
|
||||
if (ObjectUtil.isEmpty(disNoArr)) {
|
||||
// 更新明细表状态为完成
|
||||
JSONObject jsonDtl = dtlTab.query("iostorinvdtl_id = '" + jsonDis.getString("iostorinvdtl_id") + "'").uniqueResult(0);
|
||||
jsonDtl.put("bill_status", "99");
|
||||
dtlTab.update(jsonDtl);
|
||||
JSONArray disArr = WQL.getWO("PDA_ST_01").addParam("flag", "7").addParam("box_no", box_no).process().getResultJSONArray(0);
|
||||
if (ObjectUtil.isEmpty(disArr)) throw new BadRequestException("木箱码无效");
|
||||
for (int i = 0; i < disArr.size(); i++) {
|
||||
JSONObject jsonDis = disArr.getJSONObject(i);
|
||||
// 更新状态为完成
|
||||
jsonDis.put("work_status", "99");
|
||||
disTab.update(jsonDis);
|
||||
|
||||
// 判断此明细是否全部完成
|
||||
JSONArray dtlNoArr = dtlTab.query("iostorinv_id = '" + jsonDis.getString("iostorinv_id") + "' and bill_status <> '99'").getResultJSONArray(0);
|
||||
if (ObjectUtil.isEmpty(dtlNoArr)) {
|
||||
// 调用强制完成接口
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("iostorinv_id",jsonDis.getString("iostorinv_id"));
|
||||
checkOutBillService.confirm(param);
|
||||
}
|
||||
// 判断分配明细是否全部完成
|
||||
JSONArray disNoArr = disTab.query("iostorinvdtl_id = '" + jsonDis.getString("iostorinvdtl_id") + "' and work_status <> '99'").getResultJSONArray(0);
|
||||
if (ObjectUtil.isEmpty(disNoArr)) {
|
||||
// 更新明细表状态为完成
|
||||
JSONObject jsonDtl = dtlTab.query("iostorinvdtl_id = '" + jsonDis.getString("iostorinvdtl_id") + "'").uniqueResult(0);
|
||||
jsonDtl.put("bill_status", "99");
|
||||
dtlTab.update(jsonDtl);
|
||||
|
||||
// 判断此明细是否全部完成
|
||||
JSONArray dtlNoArr = dtlTab.query("iostorinv_id = '" + jsonDis.getString("iostorinv_id") + "' and bill_status <> '99'").getResultJSONArray(0);
|
||||
if (ObjectUtil.isEmpty(dtlNoArr)) {
|
||||
// 调用强制完成接口
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("iostorinv_id", jsonDis.getString("iostorinv_id"));
|
||||
checkOutBillService.confirm(param);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -135,8 +141,8 @@ public class VirtualOutServiceImpl implements VirtualOutService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject printType(JSONObject whereJson){
|
||||
JSONArray rows = WQL.getWO("PDA_ST_01").addParam("flag","6").process().getResultJSONArray(0);
|
||||
public JSONObject printType(JSONObject whereJson) {
|
||||
JSONArray rows = WQL.getWO("PDA_ST_01").addParam("flag", "6").process().getResultJSONArray(0);
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("data", rows);
|
||||
jo.put("message", "查询成功!");
|
||||
|
||||
@@ -38,6 +38,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
public Map<String, Object> pageQuery(Map whereJson, Pageable page) {
|
||||
HashMap map = new HashMap<>(whereJson);
|
||||
String bill_code = MapUtil.getStr(whereJson, "bill_code");
|
||||
String box_no = MapUtil.getStr(whereJson, "box_no");
|
||||
String material_search = MapUtil.getStr(whereJson, "material_search");
|
||||
map.put("flag", "1");
|
||||
map.put("stor_id", MapUtil.getStr(whereJson, "stor_id"));
|
||||
@@ -50,6 +51,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
map.put("pcsn", MapUtil.getStr(whereJson, "pcsn"));
|
||||
if (!ObjectUtil.isEmpty(bill_code)) map.put("bill_code", "%" + bill_code + "%");
|
||||
if (!ObjectUtil.isEmpty(material_search)) map.put("material_search", "%" + material_search + "%");
|
||||
if (!ObjectUtil.isEmpty(box_no)) map.put("box_no", "%" + box_no + "%");
|
||||
|
||||
JSONObject jo = WQL.getWO("QST_IVT_INANDOUTRETRUN").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "mst.input_time desc");
|
||||
return jo;
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
输入.material_type_id TYPEAS f_string
|
||||
输入.iostorinv_id TYPEAS s_string
|
||||
输入.ids TYPEAS f_string
|
||||
输入.box_no TYPEAS s_string
|
||||
|
||||
|
||||
|
||||
@@ -66,6 +67,7 @@
|
||||
FROM
|
||||
st_ivt_iostorinv mst
|
||||
LEFT JOIN st_ivt_iostorinvdtl dtl ON mst.iostorinv_id = dtl.iostorinv_id
|
||||
LEFT JOIN ST_IVT_IOStorInvDis dis ON dis.iostorinvdtl_id = dtl.iostorinvdtl_id
|
||||
LEFT JOIN sys_user user ON user.user_id = mst.upload_optid
|
||||
INNER JOIN md_me_materialbase mb ON mb.material_id = dtl.material_id
|
||||
WHERE
|
||||
@@ -86,6 +88,10 @@
|
||||
mst.bill_type = 输入.bill_type
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.box_no <> ""
|
||||
dis.box_no like 输入.box_no
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.bill_status <> ""
|
||||
mst.bill_status = 输入.bill_status
|
||||
ENDOPTION
|
||||
|
||||
@@ -110,6 +110,15 @@
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="箱号">
|
||||
<el-input
|
||||
v-model="query.box_no"
|
||||
size="mini"
|
||||
clearable
|
||||
placeholder="箱号"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="模糊查询">
|
||||
<el-input
|
||||
v-model="query.bill_code"
|
||||
@@ -236,7 +245,7 @@ import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudStorattr from '@/views/wms/basedata/st/stor/storattr'
|
||||
import ViewDialog from '@/views/wms/st/inbill/ViewDialog'
|
||||
import ViewDialog from '@/views/wms/st/outbill/ViewDialog'
|
||||
|
||||
export default {
|
||||
name: 'Return',
|
||||
|
||||
@@ -113,7 +113,11 @@
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column show-overflow-tooltip prop="bill_code" width="130" label="单据编码" />
|
||||
<el-table-column show-overflow-tooltip prop="bill_code" width="130" label="单据号">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="toView(scope.$index, scope.row)">{{ scope.row.bill_code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip :formatter="formatStatus" width="100" prop="bill_status" label="单据状态" />
|
||||
<el-table-column prop="stor_name" label="仓库" width="100" />
|
||||
<el-table-column show-overflow-tooltip prop="bill_type" :formatter="bill_typeFormat" label="业务类型" />
|
||||
@@ -134,6 +138,7 @@
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<ViewDialog :dialog-show.sync="viewShow" :rowmst="mstrow" @AddChanged="querytable" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -146,10 +151,11 @@ import pagination from '@crud/Pagination'
|
||||
import DateRangePicker from '@/components/DateRangePicker/index'
|
||||
import crudInchargefrom from '@/views/wms/st/incharge/incharge'
|
||||
import crudStorattr from '@/views/wms/basedata/st/stor/storattr'
|
||||
import ViewDialog from '@/views/wms/st/outbill/ViewDialog'
|
||||
|
||||
export default {
|
||||
name: 'Incharge',
|
||||
components: { crudOperation, rrOperation, udOperation, pagination, DateRangePicker },
|
||||
components: { crudOperation, rrOperation, udOperation, pagination, DateRangePicker, ViewDialog },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '入库冲销',
|
||||
@@ -171,6 +177,8 @@ export default {
|
||||
dicts: ['ST_CREATE_MODE', 'ST_INV_IN_TYPE', 'io_bill_status'],
|
||||
data() {
|
||||
return {
|
||||
mstrow: {},
|
||||
viewShow: false,
|
||||
permission: {
|
||||
},
|
||||
storlist: []
|
||||
@@ -185,6 +193,10 @@ export default {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
toView(index, row) {
|
||||
this.mstrow = row
|
||||
this.viewShow = true
|
||||
},
|
||||
charge() {
|
||||
const _selectData = this.$refs.table.selection
|
||||
crudInchargefrom.charge(_selectData[0]).then(res => {
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
disabled
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.ST_INV_OUT_TYPE"
|
||||
v-for="item in dict.INANDOUT_BILL_TYPE"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -137,12 +137,12 @@
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column prop="pcsn" label="子卷批次号" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="storagevehicle_code" label="箱号" align="center" width="200px" show-overflow-tooltip />
|
||||
<el-table-column prop="box_no" label="箱号" align="center" width="200px" show-overflow-tooltip />
|
||||
<el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
||||
<el-table-column prop="struct_code" label="起始位置" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="next_point_code" label="目的位置" align="center" />
|
||||
<el-table-column prop="task_code" label="任务号" align="center" />
|
||||
<el-table-column prop="task_type" label="任务类型" align="center" width="150px" :formatter="taskdtl_typeFormat" />
|
||||
<el-table-column prop="struct_code" label="仓位" align="center" show-overflow-tooltip />
|
||||
<!-- <el-table-column prop="next_point_code" label="目的位置" align="center" />-->
|
||||
<!-- <el-table-column prop="task_code" label="任务号" align="center" />-->
|
||||
<!-- <el-table-column prop="task_type" label="任务类型" align="center" width="150px" :formatter="taskdtl_typeFormat" />-->
|
||||
<el-table-column prop="task_status" label="状态" align="center" width="110px" :formatter="task_statusFormat" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
@@ -160,7 +160,7 @@ export default {
|
||||
name: 'ViewDialog',
|
||||
components: { },
|
||||
mixins: [crud()],
|
||||
dicts: ['io_bill_status', 'work_status', 'task_status', 'SCH_TASK_TYPE_DTL','ST_INV_OUT_TYPE'],
|
||||
dicts: ['io_bill_status', 'work_status', 'task_status', 'SCH_TASK_TYPE_DTL','ST_INV_OUT_TYPE', 'INANDOUT_BILL_TYPE'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
@@ -198,7 +198,7 @@ export default {
|
||||
this.billtypelist = res
|
||||
}),
|
||||
// 查询原材料库的仓库
|
||||
crudStorattr.getStor({ 'is_materialstore': '1' }).then(res => {
|
||||
crudStorattr.getStor({ 'is_productstore': '1' }).then(res => {
|
||||
this.storlist = res.content
|
||||
})
|
||||
},
|
||||
|
||||
@@ -134,7 +134,11 @@
|
||||
@select-all="onSelectAll"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column show-overflow-tooltip prop="bill_code" width="130" label="单据编码"/>
|
||||
<el-table-column show-overflow-tooltip prop="bill_code" width="130" label="单据号">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="toView(scope.$index, scope.row)">{{ scope.row.bill_code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip :formatter="stateFormat" width="100" prop="bill_status" label="单据状态" />
|
||||
<el-table-column prop="stor_name" label="仓库" width="100" />
|
||||
<el-table-column show-overflow-tooltip prop="bill_type" :formatter="bill_typeFormat" label="业务类型" />
|
||||
@@ -155,6 +159,7 @@
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<ViewDialog :dialog-show.sync="viewShow" :rowmst="mstrow" @AddChanged="querytable" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -167,10 +172,11 @@ import pagination from '@crud/Pagination'
|
||||
import DateRangePicker from '@/components/DateRangePicker/index'
|
||||
import crudOutchargefrom from '@/views/wms/st/outcharge/outcharge'
|
||||
import crudStorattr from '@/views/wms/basedata/st/stor/storattr'
|
||||
import ViewDialog from '@/views/wms/st/outbill/ViewDialog'
|
||||
|
||||
export default {
|
||||
name: 'Outcharge',
|
||||
components: { crudOperation, rrOperation, udOperation, pagination, DateRangePicker },
|
||||
components: { crudOperation, rrOperation, udOperation, pagination, DateRangePicker, ViewDialog },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '出库冲销',
|
||||
@@ -196,6 +202,8 @@ export default {
|
||||
},
|
||||
billType: null,
|
||||
storlist: [],
|
||||
mstrow: {},
|
||||
viewShow: false,
|
||||
currentRow: null,
|
||||
createtypelist: [],
|
||||
statuslist: []
|
||||
@@ -210,6 +218,10 @@ export default {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
toView(index, row) {
|
||||
this.mstrow = row
|
||||
this.viewShow = true
|
||||
},
|
||||
create_modeFormat(row, column) {
|
||||
return this.dict.label.ST_CREATE_MODE[row.create_mode]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user