fix:报废出库审核对没有库存的卷跳过处理
This commit is contained in:
@@ -227,7 +227,11 @@ public class ProductScrapServiceImpl implements ProductScrapService {
|
|||||||
List<JSONObject> ivtList = ivt.query("pcsn in ('" + pcsnJoining + "') and canuse_qty > 0")
|
List<JSONObject> ivtList = ivt.query("pcsn in ('" + pcsnJoining + "') and canuse_qty > 0")
|
||||||
.getResultJSONArray(0).toJavaList(JSONObject.class);
|
.getResultJSONArray(0).toJavaList(JSONObject.class);
|
||||||
|
|
||||||
if (dtlArr.size() != ivtList.size()) {
|
Set<String> ivtSet = ivtList.stream().map(row -> row.getString("pcsn")).collect(Collectors.toSet());
|
||||||
|
|
||||||
|
String havePcsn = ivtSet.stream().collect(Collectors.joining("','"));
|
||||||
|
|
||||||
|
/*if (dtlArr.size() != ivtList.size()) {
|
||||||
throw new BadRequestException("库存异常请检查!");
|
throw new BadRequestException("库存异常请检查!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -237,7 +241,7 @@ public class ProductScrapServiceImpl implements ProductScrapService {
|
|||||||
|
|
||||||
if (!is_pass) {
|
if (!is_pass) {
|
||||||
throw new BadRequestException("库存异常请检查!");
|
throw new BadRequestException("库存异常请检查!");
|
||||||
}
|
}*/
|
||||||
|
|
||||||
// 生成出库单
|
// 生成出库单
|
||||||
JSONObject jsonOutMst = new JSONObject();
|
JSONObject jsonOutMst = new JSONObject();
|
||||||
@@ -256,6 +260,9 @@ public class ProductScrapServiceImpl implements ProductScrapService {
|
|||||||
JSONArray tableData = new JSONArray();
|
JSONArray tableData = new JSONArray();
|
||||||
for (int i = 0; i < dtlArr.size(); i++) {
|
for (int i = 0; i < dtlArr.size(); i++) {
|
||||||
JSONObject json = dtlArr.getJSONObject(i);
|
JSONObject json = dtlArr.getJSONObject(i);
|
||||||
|
if (!ivtSet.contains(json.getString("pcsn"))) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
JSONObject jsonDtl = new JSONObject();
|
JSONObject jsonDtl = new JSONObject();
|
||||||
jsonDtl.put("pcsn", json.getString("pcsn"));
|
jsonDtl.put("pcsn", json.getString("pcsn"));
|
||||||
@@ -274,7 +281,11 @@ public class ProductScrapServiceImpl implements ProductScrapService {
|
|||||||
jsonObject.put("iostorinv_id", iostorinv_id);
|
jsonObject.put("iostorinv_id", iostorinv_id);
|
||||||
// 变更为手动分配
|
// 变更为手动分配
|
||||||
// checkOutBillService.allDiv(jsonObject);
|
// checkOutBillService.allDiv(jsonObject);
|
||||||
|
if (StrUtil.isNotEmpty(havePcsn)) {
|
||||||
|
HashMap dtlMap = new HashMap();
|
||||||
|
dtlMap.put("is_audit", "1");
|
||||||
|
dtl.update(dtlMap, "scrap_id = '" + whereJson.getString("scrap_id") + "' AND pcsn in ('" + havePcsn + "')");
|
||||||
|
}
|
||||||
// 更新主表为完成
|
// 更新主表为完成
|
||||||
JSONObject param = new JSONObject();
|
JSONObject param = new JSONObject();
|
||||||
param.put("bill_status", "99");
|
param.put("bill_status", "99");
|
||||||
@@ -609,6 +620,7 @@ public class ProductScrapServiceImpl implements ProductScrapService {
|
|||||||
mp.put("不合格品来源", "客户投诉");
|
mp.put("不合格品来源", "客户投诉");
|
||||||
}
|
}
|
||||||
mp.put("不合格品缺陷描述", object.getString("remark"));
|
mp.put("不合格品缺陷描述", object.getString("remark"));
|
||||||
|
mp.put("是否出库", object.getString("is_audit").equals("1") ? "是" : "否");
|
||||||
list.add(mp);
|
list.add(mp);
|
||||||
}
|
}
|
||||||
FileUtil.downloadExcel(list, response);
|
FileUtil.downloadExcel(list, response);
|
||||||
|
|||||||
@@ -134,7 +134,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>-->
|
</el-form-item>-->
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-button class="filter-item" :disabled="crud.status.view > 0" @click="allSend()" size="medium" icon="el-icon-plus" style="float: right; padding: 3px 0" type="warning">填充</el-button>
|
<el-button class="filter-item" :disabled="crud.status.view > 0" size="medium" icon="el-icon-plus" style="float: right; padding: 3px 0" type="warning" @click="allSend()">填充</el-button>
|
||||||
</el-card>
|
</el-card>
|
||||||
<div class="crud-opts2">
|
<div class="crud-opts2">
|
||||||
<span class="role-span">不合格品明细</span>
|
<span class="role-span">不合格品明细</span>
|
||||||
@@ -191,8 +191,8 @@
|
|||||||
<el-select
|
<el-select
|
||||||
v-model="scope.row.fail_source"
|
v-model="scope.row.fail_source"
|
||||||
class="input-with-select"
|
class="input-with-select"
|
||||||
@input="custNameInput2(form.tableData[scope.$index])"
|
|
||||||
:disabled="crud.status.view > 0"
|
:disabled="crud.status.view > 0"
|
||||||
|
@input="custNameInput2(form.tableData[scope.$index])"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in dict.FAIL_SOURCE"
|
v-for="item in dict.FAIL_SOURCE"
|
||||||
@@ -205,12 +205,17 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column key="8" width="150" prop="remark" label="不合格品缺陷描述">
|
<el-table-column key="8" width="150" prop="remark" label="不合格品缺陷描述">
|
||||||
<template scope="scope">
|
<template scope="scope">
|
||||||
<el-input v-model="scope.row.remark" @input="custNameInput(form.tableData[scope.$index])" :disabled="crud.status.view > 0" class="input-with-select" />
|
<el-input v-model="scope.row.remark" :disabled="crud.status.view > 0" class="input-with-select" @input="custNameInput(form.tableData[scope.$index])" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column width="150" label="是否填充" v-if="crud.status.cu > 0">
|
<el-table-column v-if="crud.status.view > 0" key="9" prop="is_audit" label="是否出库" align="center" min-width="150">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.is_audit === '1' ? '是' : '否' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column v-if="crud.status.cu > 0" width="150" label="是否填充">
|
||||||
<template scope="scope">
|
<template scope="scope">
|
||||||
<el-switch v-model="scope.row.is_used" @change="changeIsUsed(scope.row)" active-color="#13ce66" inactive-color="#ff4949" active-value="1" inactive-value="0" />
|
<el-switch v-model="scope.row.is_used" active-color="#13ce66" inactive-color="#ff4949" active-value="1" inactive-value="0" @change="changeIsUsed(scope.row)" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="170" fixed="right">
|
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="170" fixed="right">
|
||||||
|
|||||||
Reference in New Issue
Block a user