盘点测试
This commit is contained in:
@@ -183,28 +183,44 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
|||||||
if (job == null) {
|
if (job == null) {
|
||||||
return AjaxResult.warn("任务不存在");
|
return AjaxResult.warn("任务不存在");
|
||||||
}
|
}
|
||||||
MydoJobDetail param = new MydoJobDetail();
|
if (job.getInOrOut().equals("5")){
|
||||||
param.setJobId(jobId);
|
//料箱盘点入库作业
|
||||||
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailList(param);
|
|
||||||
if (CollUtil.isNotEmpty(mydoJobDetails)) {
|
|
||||||
List<BasStock> list = new ArrayList<>();
|
|
||||||
for (MydoJobDetail mydoJobDetail : mydoJobDetails) {
|
|
||||||
list.add(getStockByInStockinDetail(mydoJobDetail, job));
|
|
||||||
}
|
|
||||||
basStockService.insertBasStockList(list);
|
|
||||||
mydoJob.setStatus("4");
|
|
||||||
updateMydoJob(mydoJob);
|
|
||||||
//修改货位
|
//修改货位
|
||||||
BasCargoSpace basCargoSpace = new BasCargoSpace();
|
BasCargoSpace basCargoSpace = new BasCargoSpace();
|
||||||
basCargoSpace.setStatus("2");
|
basCargoSpace.setStatus("5");
|
||||||
basCargoSpace.setTrayCode(job.getTrayCode());
|
basCargoSpace.setTrayCode(job.getTrayCode());
|
||||||
basCargoSpace.setCargoSpaceId(job.getCargoSpaceId());
|
basCargoSpace.setCargoSpaceId(job.getCargoSpaceId());
|
||||||
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
|
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
|
||||||
//插入历史表
|
|
||||||
insertHistory(mydoJob.getJobId());
|
return AjaxResult.success();
|
||||||
|
|
||||||
|
}else {
|
||||||
|
//正常入库作业
|
||||||
|
|
||||||
|
MydoJobDetail param = new MydoJobDetail();
|
||||||
|
param.setJobId(jobId);
|
||||||
|
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailList(param);
|
||||||
|
if (CollUtil.isNotEmpty(mydoJobDetails)) {
|
||||||
|
List<BasStock> list = new ArrayList<>();
|
||||||
|
for (MydoJobDetail mydoJobDetail : mydoJobDetails) {
|
||||||
|
list.add(getStockByInStockinDetail(mydoJobDetail, job));
|
||||||
|
}
|
||||||
|
basStockService.insertBasStockList(list);
|
||||||
|
mydoJob.setStatus("4");
|
||||||
|
updateMydoJob(mydoJob);
|
||||||
|
//修改货位
|
||||||
|
BasCargoSpace basCargoSpace = new BasCargoSpace();
|
||||||
|
basCargoSpace.setStatus("2");
|
||||||
|
basCargoSpace.setTrayCode(job.getTrayCode());
|
||||||
|
basCargoSpace.setCargoSpaceId(job.getCargoSpaceId());
|
||||||
|
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
|
||||||
|
//插入历史表
|
||||||
|
insertHistory(mydoJob.getJobId());
|
||||||
|
}
|
||||||
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
return AjaxResult.success();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private BasStock getStockByInStockinDetail(MydoJobDetail mydoJobDetail, MydoJob mydoJob) {
|
private BasStock getStockByInStockinDetail(MydoJobDetail mydoJobDetail, MydoJob mydoJob) {
|
||||||
|
|||||||
@@ -237,6 +237,7 @@ public class PdaController extends BaseController {
|
|||||||
* @param trayCodeMakeSure 托盘信息
|
* @param trayCodeMakeSure 托盘信息
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('pda:out:outMakeSure')")
|
||||||
@PostMapping("/outMakeSure")
|
@PostMapping("/outMakeSure")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxResult outMakeSure(@RequestBody TrayCodeMakeSure trayCodeMakeSure) {
|
public AjaxResult outMakeSure(@RequestBody TrayCodeMakeSure trayCodeMakeSure) {
|
||||||
@@ -248,6 +249,7 @@ public class PdaController extends BaseController {
|
|||||||
* @param trayCodeMakeSure 托盘信息
|
* @param trayCodeMakeSure 托盘信息
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('pda:check:checkMakeSure')")
|
||||||
@PostMapping("/checkMakeSure")
|
@PostMapping("/checkMakeSure")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxResult checkMakeSure(@RequestBody TrayCodeMakeSure trayCodeMakeSure) {
|
public AjaxResult checkMakeSure(@RequestBody TrayCodeMakeSure trayCodeMakeSure) {
|
||||||
|
|||||||
@@ -252,12 +252,17 @@ public class PdaServiceImp implements PdaService {
|
|||||||
public AjaxResult checkMakeSure(TrayCodeMakeSure trayCodeMakeSure) {
|
public AjaxResult checkMakeSure(TrayCodeMakeSure trayCodeMakeSure) {
|
||||||
List<MydoJobDetail> mydoJobDetailList = trayCodeMakeSure.getMydoJobDetailList();
|
List<MydoJobDetail> mydoJobDetailList = trayCodeMakeSure.getMydoJobDetailList();
|
||||||
if(CollUtil.isNotEmpty(mydoJobDetailList)){
|
if(CollUtil.isNotEmpty(mydoJobDetailList)){
|
||||||
|
boolean flag = mydoJobDetailList.stream().anyMatch(x -> StrUtil.isEmpty(x.getStockId()) && "0".equals(x.getInQuantity()));
|
||||||
|
if (flag){
|
||||||
|
return AjaxResult.warn("新增库存,存在为0的数量");
|
||||||
|
}
|
||||||
for (MydoJobDetail mydoJobDetail : mydoJobDetailList) {
|
for (MydoJobDetail mydoJobDetail : mydoJobDetailList) {
|
||||||
CheckCommitRecord checkCommitRecord = new CheckCommitRecord();
|
CheckCommitRecord checkCommitRecord = new CheckCommitRecord();
|
||||||
checkCommitRecord.setQuantity(mydoJobDetail.getInQuantity());
|
checkCommitRecord.setQuantity(mydoJobDetail.getInQuantity());
|
||||||
checkCommitRecord.setTrayCode(trayCodeMakeSure.getTrayCode());
|
checkCommitRecord.setTrayCode(trayCodeMakeSure.getTrayCode());
|
||||||
checkCommitRecord.setStockId(mydoJobDetail.getStockId());
|
checkCommitRecord.setStockId(mydoJobDetail.getStockId());
|
||||||
checkCommitRecord.setSpare1(mydoJobDetail.getInOrOutDId());
|
checkCommitRecord.setSpare1(mydoJobDetail.getInOrOutDId());
|
||||||
|
checkCommitRecord.setSpare2(mydoJobDetail.getProductId());
|
||||||
checkCommitRecordService.insertCheckCommitRecord(checkCommitRecord);
|
checkCommitRecordService.insertCheckCommitRecord(checkCommitRecord);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,8 +93,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="classId != null and classId != ''"> and class_id = #{classId}</if>
|
<if test="classId != null and classId != ''"> and class_id = #{classId}</if>
|
||||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||||
<if test="faultFlag != null and faultFlag != ''"> and fault_flag = #{faultFlag}</if>
|
<if test="faultFlag != null and faultFlag != ''"> and fault_flag = #{faultFlag}</if>
|
||||||
<if test="inOut != null and inOut != '' and inOut =='2'.toString "> and mj.in_or_out >=20</if>
|
<if test="inOut != null and inOut != '' and inOut =='2'.toString "> and in_or_out >=20</if>
|
||||||
<if test="inOut != null and inOut != '' and inOut =='1'.toString "> and mj.in_or_out < 20</if>
|
<if test="inOut != null and inOut != '' and inOut =='1'.toString "> and in_or_out < 20</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@@ -514,7 +514,7 @@ export default {
|
|||||||
|
|
||||||
// 手动完成/作废
|
// 手动完成/作废
|
||||||
handleCompletedManually(row) {
|
handleCompletedManually(row) {
|
||||||
console.log("1111")
|
//console.log("1111")
|
||||||
const jobIds = this.ids;
|
const jobIds = this.ids;
|
||||||
if (jobIds.length === 0) {
|
if (jobIds.length === 0) {
|
||||||
this.$modal.msgError("请选择要操作的数据");
|
this.$modal.msgError("请选择要操作的数据");
|
||||||
@@ -531,11 +531,13 @@ export default {
|
|||||||
//手动作废
|
//手动作废
|
||||||
manualInvalidation(data).then(response => {
|
manualInvalidation(data).then(response => {
|
||||||
this.$modal.msgSuccess("操作成功");
|
this.$modal.msgSuccess("操作成功");
|
||||||
|
this.getList();
|
||||||
})
|
})
|
||||||
}else if (row.type === 'completed'){
|
}else if (row.type === 'completed'){
|
||||||
//手动完成
|
//手动完成
|
||||||
manualCompleted(data).then(response => {
|
manualCompleted(data).then(response => {
|
||||||
this.$modal.msgSuccess("操作成功");
|
this.$modal.msgSuccess("操作成功");
|
||||||
|
this.getList();
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -320,7 +320,8 @@
|
|||||||
<!-- </template>-->
|
<!-- </template>-->
|
||||||
<!-- </el-table-column>-->
|
<!-- </el-table-column>-->
|
||||||
<el-table-column :label="$t('checkJobOut.billId')" align="center" prop="inOrOutId" /> <!-- 单据ID -->
|
<el-table-column :label="$t('checkJobOut.billId')" align="center" prop="inOrOutId" /> <!-- 单据ID -->
|
||||||
<el-table-column :label="$t('checkJobOut.subBillId')" align="center" prop="productId" /> <!-- 子单据ID -->
|
<el-table-column :label="$t('checkJobOut.subBillId')" align="center" prop="inOrOutDId" /> <!-- 单据ID -->
|
||||||
|
<el-table-column :label="$t('checkJobOut.productId')" align="center" prop="productId" /> <!-- 物料id -->
|
||||||
<el-table-column :label="$t('checkJobOut.materialDesc')" align="center" prop="extraField.materialDesc" /> <!-- 物料编码 -->
|
<el-table-column :label="$t('checkJobOut.materialDesc')" align="center" prop="extraField.materialDesc" /> <!-- 物料编码 -->
|
||||||
<el-table-column :label="$t('checkJobOut.englishDesc')" align="center" prop="extraField.englishDesc" /> // 英文描述
|
<el-table-column :label="$t('checkJobOut.englishDesc')" align="center" prop="extraField.englishDesc" /> // 英文描述
|
||||||
<!-- <el-table-column :label="$t('checkJobOut.cartonNo')" align="center" prop="extraField.cartonNo" /> // 箱号-->
|
<!-- <el-table-column :label="$t('checkJobOut.cartonNo')" align="center" prop="extraField.cartonNo" /> // 箱号-->
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('stockManagement.stockStatus')" prop="stockStatus"><!-- 库存状态 -->
|
<el-form-item :label="$t('stockManagement.stockStatus')" prop="cargoSpaceStockStatus"><!-- 库存状态 -->
|
||||||
<el-select v-model="queryParams.stockStatus" :placeholder="$t('stockManagement.selectStockStatus')" clearable>
|
<el-select v-model="queryParams.cargoSpaceStockStatus" :placeholder="$t('stockManagement.selectStockStatus')" clearable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in dict.type.stock_status"
|
v-for="dict in dict.type.stock_status"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
@@ -250,9 +250,9 @@
|
|||||||
<el-table-column :label="$t('stockManagement.stockId')" align="center" prop="stockId" /> <!-- 库存id -->
|
<el-table-column :label="$t('stockManagement.stockId')" align="center" prop="stockId" /> <!-- 库存id -->
|
||||||
<el-table-column :label="$t('stockManagement.cargoSpaceId')" align="center" prop="cargoSpaceId" /> <!-- 货位id -->
|
<el-table-column :label="$t('stockManagement.cargoSpaceId')" align="center" prop="cargoSpaceId" /> <!-- 货位id -->
|
||||||
<el-table-column :label="$t('stockManagement.cargoSpaceName')" align="center" prop="cargoSpaceName" /> <!-- 货位id -->
|
<el-table-column :label="$t('stockManagement.cargoSpaceName')" align="center" prop="cargoSpaceName" /> <!-- 货位id -->
|
||||||
<el-table-column :label="$t('stockManagement.stockStatus')" align="center" prop="stockStatus"> <!-- 库存状态 -->
|
<el-table-column :label="$t('stockManagement.stockStatus')" align="center" prop="cargoSpaceStockStatus"> <!-- 库存状态 -->
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.stock_status" :value="scope.row.stockStatus"/>
|
<dict-tag :options="dict.type.stock_status" :value="scope.row.cargoSpaceStockStatus"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('stockManagement.cargoSpaceStatus')" align="center" prop="cargoSpaceStatus" >
|
<el-table-column :label="$t('stockManagement.cargoSpaceStatus')" align="center" prop="cargoSpaceStatus" >
|
||||||
@@ -323,8 +323,8 @@
|
|||||||
<el-form-item :label="$t('stockManagement.cargoSpaceId')" prop="cargoSpaceId"> <!-- 货位id -->
|
<el-form-item :label="$t('stockManagement.cargoSpaceId')" prop="cargoSpaceId"> <!-- 货位id -->
|
||||||
<el-input v-model="form.cargoSpaceId" :placeholder="$t('stockManagement.inputCargoSpaceId')" />
|
<el-input v-model="form.cargoSpaceId" :placeholder="$t('stockManagement.inputCargoSpaceId')" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('stockManagement.stockStatus')" prop="stockStatus"> <!-- 库存状态 -->
|
<el-form-item :label="$t('stockManagement.stockStatus')" prop="cargoSpaceStockStatus"> <!-- 库存状态 -->
|
||||||
<el-select v-model="form.stockStatus" :placeholder="$t('stockManagement.selectStockStatus')">
|
<el-select v-model="form.cargoSpaceStockStatus" :placeholder="$t('stockManagement.selectStockStatus')">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in dict.type.stock_status"
|
v-for="dict in dict.type.stock_status"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
|
|||||||
Reference in New Issue
Block a user