rev:托盘拣选出库流程
This commit is contained in:
@@ -42,7 +42,7 @@ public class AppRun implements CommandLineRunner {
|
||||
|
||||
@Override
|
||||
public void run(String... args) {
|
||||
HeartClientServer heartServer = new HeartClientServer(new InetSocketAddress("192.168.8.218", 20889));
|
||||
// HeartClientServer heartServer = new HeartClientServer(new InetSocketAddress("192.168.8.218", 20889));
|
||||
System.out.println("--------项目启动完成--------");
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ public class PalletInStorageTask extends AbstractTask {
|
||||
throw new BadRequestException("申请任务失败:载具"+vehicle_code+"物料信息不存在");
|
||||
}
|
||||
MdPbVehicleMaterVo vehicleMater = item.get(0);
|
||||
|
||||
//拣选回库流程
|
||||
BussEventMulticaster.Publish(
|
||||
new FlowStartEvent("pallet_in",
|
||||
(proc_inst_id,empPlace) -> iMdPbVehicleMaterService.update(new UpdateWrapper<MdPbVehicleMater>()
|
||||
|
||||
@@ -101,7 +101,7 @@ public class DeviceManageController {
|
||||
if (vehicleMater == null){
|
||||
throw new BadRequestException(String.format(vehicleCode+"载具组盘信息不存在"));
|
||||
}
|
||||
wmsToAcsService.toCommand(device_code,form.getMode(),vehicleInfo.getH());
|
||||
wmsToAcsService.toCommand(device_code,"1",vehicleInfo.getH());
|
||||
return new ResponseEntity<>(TableDataInfo.build(),HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,8 @@ import org.nl.wms.flow_manage.flow.service.execution.dao.ActRuExecution;
|
||||
import org.nl.wms.md_manage.vehicleMater.service.IMdPbVehicleMaterService;
|
||||
import org.nl.wms.md_manage.vehicleMater.service.dao.MdPbVehicleMater;
|
||||
import org.nl.wms.pda_manage.palletio.service.PalletIostorinvService;
|
||||
import org.nl.wms.pm_manage.form_data.service.IPmFormDataService;
|
||||
import org.nl.wms.pm_manage.form_data.service.dao.PmFormData;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -41,6 +43,8 @@ public class IOStorageController {
|
||||
private IMdPbVehicleMaterService iMdPbVehicleMaterService;
|
||||
@Autowired
|
||||
private IActRuExecutionService iActRuExecutionService;
|
||||
@Autowired
|
||||
private IPmFormDataService iPmFormDataService;
|
||||
|
||||
|
||||
@PostMapping("out")
|
||||
@@ -52,6 +56,7 @@ public class IOStorageController {
|
||||
.eq("vehicle_code", vehicle_code)
|
||||
.eq("is_delete", false));
|
||||
if (one!=null){
|
||||
//流程校验
|
||||
String proc_inst_id = one.getProc_inst_id();
|
||||
if (!StringUtils.isEmpty(proc_inst_id)){
|
||||
String parent_id = iActRuExecutionService.getParentByChild(proc_inst_id);
|
||||
@@ -62,6 +67,14 @@ public class IOStorageController {
|
||||
throw new BadRequestException(String.format("当前载具%s业务流程%s未完成",vehicle_code,parent_id));
|
||||
}
|
||||
}
|
||||
//单据校验"针对托盘库拣选
|
||||
int count = iPmFormDataService.count(new QueryWrapper<PmFormData>()
|
||||
.eq("form_type", "Picking")
|
||||
.eq("vehicle_code", vehicle_code)
|
||||
.lt("status", StatusEnum.FORM_STATUS.code("完成")));
|
||||
if (count>0){
|
||||
throw new BadRequestException(String.format("当前载具%s为拣选出库请先进行拣选操作",vehicle_code));
|
||||
}
|
||||
iMdPbVehicleMaterService.update(new UpdateWrapper<MdPbVehicleMater>()
|
||||
.set("is_delete",true)
|
||||
.set("proc_inst_id",null)
|
||||
|
||||
@@ -157,8 +157,8 @@ public class PmFormDataServiceImpl extends ServiceImpl<PmFormDataMapper, PmFormD
|
||||
|
||||
@Override
|
||||
public List<PmFormDataDto> queryTree(FormDataQuery query, PageQuery pageQuery) {
|
||||
Page page = PageHelper.startPage(pageQuery.getPage() + 1, pageQuery.getSize());
|
||||
page.setOrderBy("id DESC");
|
||||
// Page page = PageHelper.startPage(pageQuery.getPage() + 1, pageQuery.getSize());
|
||||
// page.setOrderBy("id DESC");
|
||||
List<PmFormDataDto> pmFormDataDtos = this.baseMapper.queryTree(query);
|
||||
return pmFormDataDtos;
|
||||
}
|
||||
|
||||
@@ -296,7 +296,16 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl<StIvtIostorinvOutMapp
|
||||
iMdPbVehicleMaterService.update(new UpdateWrapper<MdPbVehicleMater>()
|
||||
.set("frozen_qty", 0)
|
||||
.in("id", Arrays.asList(split)));
|
||||
//更新点位锁定
|
||||
String vehicleCodes = iostorinvdtls.stream().map(StIvtIostorinvdtl::getVehicle_code).collect(Collectors.joining(","));
|
||||
String[] vehicleCodeSplit = vehicleCodes.split(",");
|
||||
iStIvtStructattrService
|
||||
.update(new UpdateWrapper<StIvtStructattr>()
|
||||
.set("lock_type",StatusEnum.LOCK.code("无锁"))
|
||||
.in("vehicle_code", Arrays.asList(vehicleCodeSplit))
|
||||
);
|
||||
}
|
||||
|
||||
this.update(new UpdateWrapper<StIvtIostorinv>()
|
||||
.set("status", StatusEnum.FORM_STATUS.code("取消"))
|
||||
.eq("id", id));
|
||||
|
||||
@@ -189,17 +189,15 @@ public class PickingService {
|
||||
|
||||
PickingService pickingService = SpringContextHolder.getBean(this.getClass());
|
||||
pickingService.disGroup(mst);
|
||||
iFormDataService.update(new UpdateWrapper<PmFormData>()
|
||||
.set("status",StatusEnum.FORM_STATUS.code("执行中"))
|
||||
.eq("id",mst.getId()));
|
||||
//只有透传才有vehicle_code参数否则只有inst_id
|
||||
FlowContinueEvent continueEvent = new FlowContinueEvent(mst.getProc_inst_id(), (PermeateFunction<String, String>) (inst_id, vehicle_code) -> iMdPbVehicleMaterService.update(new UpdateWrapper<MdPbVehicleMater>()
|
||||
.set("proc_inst_id",inst_id)
|
||||
.eq("is_delete",false)
|
||||
.eq("vehicle_code",vehicle_code)), null)
|
||||
.setDto(dto);
|
||||
continueEvent.setCallback(emp->{
|
||||
iFormDataService.update(new UpdateWrapper<PmFormData>()
|
||||
.set("status",StatusEnum.FORM_STATUS.code("执行中"))
|
||||
.eq("id",mst.getId()));
|
||||
});
|
||||
BussEventMulticaster.Publish(continueEvent);
|
||||
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ spring:
|
||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
# url: jdbc:mysql://${DB_HOST:192.168.8.218}:${DB_PORT:3306}/${DB_NAME:wms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||
url: jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:wms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||
url: jdbc:mysql://${DB_HOST:192.168.81.251}:${DB_PORT:3306}/${DB_NAME:wms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||
username: ${DB_USER:root}
|
||||
password: ${DB_PWD:123456}
|
||||
|
||||
|
||||
@@ -95,7 +95,6 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="parent_id" width="200" label="父流程" />
|
||||
<el-table-column prop="def_name" width="200" label="部署名称" />
|
||||
<el-table-column prop="def_model_key" width="200" label="模型KEY" />
|
||||
<!-- <el-table-column prop="def_description" width="200" label="部署描述" />-->
|
||||
<el-table-column v-if="false" prop="deployment_id" label="流程部署ID" />
|
||||
<!-- <el-table-column-->
|
||||
@@ -113,23 +112,24 @@
|
||||
width="130"
|
||||
label="当前节点"
|
||||
/>
|
||||
<el-table-column prop="is_active" label="启用">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.is_active"
|
||||
active-color="#13ce66"
|
||||
:active-value="true"
|
||||
:inactive-value="false"
|
||||
inactive-color="#ff4949"
|
||||
@change="changeActive(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="is_active" label="启用">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-switch-->
|
||||
<!-- v-model="scope.row.is_active"-->
|
||||
<!-- active-color="#13ce66"-->
|
||||
<!-- :active-value="true"-->
|
||||
<!-- :inactive-value="false"-->
|
||||
<!-- inactive-color="#ff4949"-->
|
||||
<!-- @change="changeActive(scope.row)"-->
|
||||
<!-- />-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column prop="status" label="实例状态">
|
||||
<template slot-scope="scope">
|
||||
{{ statusEnum.label.FLOW_STATUS[scope.row.status] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="def_model_key" width="200" label="模型KEY" />
|
||||
<el-table-column prop="remark" show-overflow-tooltip show-tooltip-when-overflow label="备注" />
|
||||
<el-table-column prop="form_type" show-overflow-tooltip show-tooltip-when-overflow width="130" label="表单类型" />
|
||||
<el-table-column prop="form_id" show-overflow-tooltip show-tooltip-when-overflow width="130" label="表单id" />
|
||||
|
||||
@@ -55,7 +55,8 @@
|
||||
<template v-for="(col,index) in cols">
|
||||
<el-form-item label="col.lable" prop="bill_code">
|
||||
<label slot="label">{{ col.lable }}:</label>
|
||||
<el-select v-if="col.value == 'product_area'"
|
||||
<el-select
|
||||
v-if="col.value == 'product_area'"
|
||||
v-model="form.form_data[col.value]"
|
||||
clearable
|
||||
size="mini"
|
||||
@@ -127,8 +128,13 @@
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="unit_id" label="单位" width="160">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="tableData[scope.$index].unit_id"
|
||||
class="filter-item" placeholder="单位" size="small" style="width: 90px">
|
||||
<el-select
|
||||
v-model="tableData[scope.$index].unit_id"
|
||||
class="filter-item"
|
||||
placeholder="单位"
|
||||
size="small"
|
||||
style="width: 90px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in unitDict"
|
||||
:key="item.value"
|
||||
@@ -169,7 +175,8 @@
|
||||
</el-table-column>
|
||||
<el-table-column v-for="(item, index) in dtlCols" :key="item.value" :label="item.lable" width="160">
|
||||
<template scope="scope">
|
||||
<el-select v-if="item.value == 'product_area'"
|
||||
<el-select
|
||||
v-if="item.value == 'product_area'"
|
||||
v-model="tableData[scope.$index].form_data[item.value]"
|
||||
clearable
|
||||
size="mini"
|
||||
@@ -184,7 +191,7 @@
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-input v-if="item.value != 'product_area'" disabled v-model="tableData[scope.$index].form_data[item.value]" class="input-with-select" />
|
||||
<el-input v-if="item.value != 'product_area'" v-model="tableData[scope.$index].form_data[item.value]" disabled class="input-with-select" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -230,7 +237,6 @@ import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
||||
import measureunit from '@/views/wms/base_manage/measure/measureunit'
|
||||
import crudProductIn from '@/views/wms/stor_manage/out/storinvout'
|
||||
|
||||
|
||||
const defaultForm = {
|
||||
id: '',
|
||||
code: '',
|
||||
@@ -279,7 +285,7 @@ export default {
|
||||
rules: {
|
||||
bill_type: [
|
||||
{ required: true, message: '单据类型不能为空', trigger: 'blur' }
|
||||
],
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -319,7 +325,6 @@ export default {
|
||||
this.$emit('AddChanged')
|
||||
},
|
||||
|
||||
|
||||
insertEvent(row) {
|
||||
this.materShow = true
|
||||
},
|
||||
@@ -355,7 +360,7 @@ export default {
|
||||
return false
|
||||
}
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
let itemDtl = this.tableData[i];
|
||||
const itemDtl = this.tableData[i]
|
||||
if (!itemDtl.unit_id) {
|
||||
this.crud.notify('单位不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
@@ -395,7 +400,7 @@ export default {
|
||||
this.dtlCols.forEach(a => {
|
||||
let item = ''
|
||||
if (a.value in data) {
|
||||
item = data[a.value];
|
||||
item = data[a.value]
|
||||
}
|
||||
this.$set(data.form_data, a.value, item)
|
||||
})
|
||||
@@ -404,11 +409,11 @@ export default {
|
||||
})
|
||||
},
|
||||
tableDtlMaterial2(data) {
|
||||
let mst = data['t'];
|
||||
let rows = [];
|
||||
const mst = data['t']
|
||||
let rows = []
|
||||
this.form.source_form_type = mst.form_type
|
||||
this.form.source_form_id = mst.id
|
||||
let mst_form_data = mst.form_data;
|
||||
const mst_form_data = mst.form_data
|
||||
if (data['item'] == null || data['item'].length == 0) {
|
||||
rows.push(mst)
|
||||
} else {
|
||||
@@ -417,7 +422,7 @@ export default {
|
||||
this.cols.forEach(a => {
|
||||
let item = ''
|
||||
if (a.value in mst_form_data) {
|
||||
item = mst_form_data[a.value];
|
||||
item = mst_form_data[a.value]
|
||||
}
|
||||
this.$set(this.form.form_data, a.value, item)
|
||||
})
|
||||
@@ -430,14 +435,16 @@ export default {
|
||||
data.single_weight = row.single_weight
|
||||
data.source_form_type = row.form_type
|
||||
data.source_form_id = row.id
|
||||
data.pcsn = row.pcsn
|
||||
data.qty = row.qty
|
||||
data.unit_id = row.unit_id
|
||||
data.form_data = {}
|
||||
let fowFormData = row.form_data;
|
||||
let row_form_data = {...fowFormData,...data};
|
||||
const fowFormData = row.form_data
|
||||
const row_form_data = { ...fowFormData, ...data }
|
||||
this.dtlCols.forEach(a => {
|
||||
let item = ''
|
||||
if (a.value in row_form_data) {
|
||||
item = row_form_data[a.value];
|
||||
item = row_form_data[a.value]
|
||||
}
|
||||
this.$set(data.form_data, a.value, item)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user