Browse Source

fix: 获取组盘信息校验、acs请求获取组盘信息、优化物料查询、人工维护

master
李永德 1 year ago
parent
commit
d072f165f0
  1. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/brick/service/impl/MdBaseBrickInfoServiceImpl.java
  2. 3
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/impl/MdBaseMaterialServiceImpl.java
  3. 11
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/dto/to/acs/GetPalletizeResponse.java
  4. 14
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java
  5. 4
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/impl/WmsToMesServiceImpl.java
  6. 11
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/track/service/dao/mapper/PdmBdProductionProcessTrackingMapper.xml
  7. 151
      lms/nladmin-ui/src/views/wms/basedata/material/index.vue

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/brick/service/impl/MdBaseBrickInfoServiceImpl.java

@ -69,7 +69,9 @@ public class MdBaseBrickInfoServiceImpl extends ServiceImpl<MdBaseBrickInfoMappe
public void addBrickInfo(BrickInfoDto dto) {
MdBaseBrickInfo brickInfo = toBrickInfoMapper(dto);
PdmBdWorkorder workorder = workorderService.getDeviceProductionTask(brickInfo.getGet_station());
if (ObjectUtil.isNotEmpty(workorder)) {
brickInfo.setWorkorder_code(workorder.getWorkorder_code());
}
mdBaseBrickInfoMapper.insert(brickInfo);
// todo:上传mes
wmsToMesService.reportBrickInfo(brickInfo);

3
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/impl/MdBaseMaterialServiceImpl.java

@ -49,10 +49,13 @@ public class MdBaseMaterialServiceImpl extends ServiceImpl<MdBaseMaterialMapper,
? Boolean.valueOf(whereJson.get("is_used").toString()) : null;
String workshop_code = ObjectUtil.isNotEmpty(whereJson.get("workshop_code"))
? whereJson.get("workshop_code").toString() : null;
String material_spec = ObjectUtil.isNotEmpty(whereJson.get("material_spec"))
? whereJson.get("material_spec").toString() : null;
LambdaQueryWrapper<MdBaseMaterial> lam = new LambdaQueryWrapper<>();
lam.like(ObjectUtil.isNotEmpty(blurry), MdBaseMaterial::getMaterial_code, blurry)
.or(ObjectUtil.isNotEmpty(blurry),
l -> l.like(ObjectUtil.isNotEmpty(blurry), MdBaseMaterial::getMaterial_name, blurry))
.like(ObjectUtil.isNotEmpty(material_spec), MdBaseMaterial::getMaterial_spec, material_spec)
.eq(ObjectUtil.isNotEmpty(is_used), MdBaseMaterial::getIs_used, is_used)
.eq(ObjectUtil.isNotEmpty(workshop_code), MdBaseMaterial::getWorkshop_code, workshop_code);
IPage<MdBaseMaterial> pages = new Page<>(page.getPage() + 1, page.getSize());

11
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/dto/to/acs/GetPalletizeResponse.java

@ -10,6 +10,7 @@ import org.nl.wms.ext.acs.service.dto.PalletizeDto;
public class GetPalletizeResponse extends BaseResponse {
private PalletizeDto palletizeDto;
private Integer material_qty;
public static GetPalletizeResponse responseOk(String requestNo) {
GetPalletizeResponse response = new GetPalletizeResponse();
@ -29,4 +30,14 @@ public class GetPalletizeResponse extends BaseResponse {
response.setResponseDate(DateUtil.now());
return response;
}
public static GetPalletizeResponse responseOk(String requestNo, PalletizeDto palletizeDto, Integer material_qty) {
GetPalletizeResponse response = new GetPalletizeResponse();
response.setRequestNo(requestNo);
response.setCode(HttpStatus.HTTP_OK);
response.setMessage("请求成功");
response.setPalletizeDto(palletizeDto);
response.setResponseDate(DateUtil.now());
response.setMaterial_qty(material_qty);
return response;
}
}

14
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java

@ -5,8 +5,6 @@ import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpStatus;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import lombok.SneakyThrows;
@ -67,7 +65,6 @@ import javax.annotation.PostConstruct;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
@ -833,12 +830,13 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
SchBaseVehiclematerialgroup baseVehiclematerialgroup = vehiclematerialgroupService.getGroupInfo(vehicleCode,
vehicleType, GroupBindMaterialStatusEnum.BOUND.getValue());
String extData = baseVehiclematerialgroup.getExt_data();
if (extData == null) {
return GetPalletizeResponse.responseOk(palletizeRequest.getRequestNo());
}
PalletizeDto palletizeDto = new PalletizeDto();
if (extData == null || extData.equals("null")) {
// 转成实体
PalletizeDto palletizeDto = CommonUtils.toJavaObject(extData, PalletizeDto.class);
return GetPalletizeResponse.responseOk(palletizeRequest.getRequestNo(), palletizeDto);
palletizeDto = CommonUtils.toJavaObject(extData, PalletizeDto.class);
}
return GetPalletizeResponse.responseOk(palletizeRequest.getRequestNo(), palletizeDto,
baseVehiclematerialgroup.getMaterial_qty());
}
/**

4
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/impl/WmsToMesServiceImpl.java

@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.extern.slf4j.Slf4j;
import org.nl.common.exception.BadRequestException;
import org.nl.system.service.notice.ISysNoticeService;
import org.nl.wms.database.brick.service.dao.MdBaseBrickInfo;
import org.nl.wms.database.material.service.IMdBaseMaterialService;
@ -439,6 +440,9 @@ public class WmsToMesServiceImpl implements WmsToMesService {
SchBasePoint device = pointService.getById(brickInfo.getGet_station());
// 获取工单
PdmBdWorkorder workorder = pdmBdWorkorderService.getByCode(brickInfo.getWorkorder_code());
if (ObjectUtil.isEmpty(workorder)) {
throw new BadRequestException("工单不存在,上报MES失败");
}
MdBaseMaterial material = mdBaseMaterialService.getById(workorder.getMaterial_id());
String singleWeight = material.getSingle_weight();
String volume = brickInfo.getVolume();

11
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/track/service/dao/mapper/PdmBdProductionProcessTrackingMapper.xml

@ -19,6 +19,17 @@
LEFT JOIN sch_base_point p ON p.point_code = pt.process_location
LEFT JOIN pdm_bd_workorder w ON w.workorder_code = vg.workorder_code
LEFT JOIN md_base_material m ON m.material_id = vg.material_id
<where>
<if test="query.buss_move_id != null">
AND pt.buss_move_id = #{query.buss_move_id}
</if>
<if test="query.end_time != null">
AND pt.record_time <![CDATA[<=]]> #{query.end_time}
</if>
<if test="query.begin_time != null">
AND pt.record_time <![CDATA[>=]]> #{query.begin_time}
</if>
</where>
ORDER BY pt.buss_move_id, pt.record_time
</select>
</mapper>

151
lms/nladmin-ui/src/views/wms/basedata/material/index.vue

@ -10,27 +10,36 @@
label-width="90px"
label-suffix=":"
>
<el-form-item label="所属车间">
<el-select
v-model="query.workshop_code"
<!-- <el-form-item label="所属车间">-->
<!-- <el-select-->
<!-- v-model="query.workshop_code"-->
<!-- clearable-->
<!-- size="mini"-->
<!-- placeholder="所属车间"-->
<!-- class="filter-item"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in workShopList"-->
<!-- :label="item.workshop_name"-->
<!-- :value="item.workshop_code"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="模糊搜索">
<el-input
v-model="query.blurry"
clearable
size="mini"
placeholder="所属车间"
class="filter-item"
>
<el-option
v-for="item in workShopList"
:label="item.workshop_name"
:value="item.workshop_code"
placeholder="编码名称"
@keyup.enter.native="crud.toQuery"
/>
</el-select>
</el-form-item>
<el-form-item label="模糊搜索">
<el-form-item label="物料规格">
<el-input
v-model="query.blurry"
v-model="query.material_spec"
clearable
size="mini"
placeholder="编码名称"
placeholder="物料规格"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
@ -51,28 +60,101 @@
</el-button>
</crudOperation>
<!--表单组件-->
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
<el-dialog
:close-on-click-modal="false"
:before-close="crud.cancelCU"
:visible.sync="crud.status.cu > 0"
:title="crud.status.title"
width="820px">
<el-form
ref="form"
:inline="true"
style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;"
:model="form"
:rules="rules"
size="mini"
label-width="125px"
label-suffix=":">
<el-form-item label="物料编码">
<el-input v-model="form.material_code" style="width: 370px;" />
<el-input disabled v-model="form.material_code" style="width: 240px;" />
</el-form-item>
<el-form-item label="物料名称 ">
<el-input v-model="form.material_name" style="width: 370px;" />
<el-input disabled v-model="form.material_name" style="width: 240px;" />
</el-form-item>
<el-form-item label="物料规格">
<el-input v-model="form.material_spec" style="width: 370px;" />
<el-input disabled v-model="form.material_spec" style="width: 240px;" />
</el-form-item>
<el-form-item label="物料分类标识">
<el-input v-model="form.class_id" style="width: 370px;" />
<el-form-item label="物料型号">
<el-input disabled v-model="form.material_model" style="width: 240px;" />
</el-form-item>
<el-form-item label="A长边">
<el-input-number
v-model.number="form.a_long_side"
:min="0"
style="width: 240px;"
/>
</el-form-item>
<el-form-item label="B短边">
<el-input-number
v-model.number="form.b_short_side"
:min="0"
style="width: 240px;"
/>
</el-form-item>
<el-form-item label="H高度">
<el-input-number
v-model.number="form.h_height"
:min="0"
style="width: 240px;"
/>
</el-form-item>
<el-form-item label="W厚度">
<el-input-number
v-model.number="form.w_thickness"
:min="0"
style="width: 240px;"
/>
</el-form-item>
<el-form-item label="静置时间(分钟)">
<el-input v-model="form.standing_time" style="width: 370px;" />
<el-input-number
v-model.number="form.standing_time"
:min="0"
style="width: 240px;"
/>
</el-form-item>
<el-form-item label="冷却时间(分钟)">
<el-input-number
v-model.number="form.cooling_time"
:min="0"
style="width: 240px;"
/>
</el-form-item>
<el-form-item label="木托盘规格">
<el-tooltip class="item" effect="dark" content="例如:950*1000" placement="top">
<el-select
v-model="form.pack_palletspec"
clearable
size="mini"
placeholder="请选择"
class="filter-item"
style="width: 240px;"
>
<el-option
v-for="item in dict.vehicle_type"
:label="item.label"
:value="item.label"
:disabled="item.value === 'LZ' || item.value === 'GTP'"
/>
</el-select>
</el-tooltip>
</el-form-item>
<el-form-item label="车间编码">
<el-input v-model="form.workshop_code" style="width: 370px;" />
<el-form-item label="包装方式">
<el-tooltip class="item" effect="dark" content="例如:3*6*6" placement="top">
<el-input v-model="form.pack_method" style="width: 240px;" />
</el-tooltip>
</el-form-item>
<el-form-item label="备注">
<el-input v-model="form.remark" style="width: 370px;" />
<el-input v-model="form.remark" type="textarea" style="width: 240px;" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -88,10 +170,10 @@
<el-table-column prop="raw_material_code" label="泥料编码" :min-width="flexWidth('material_code',crud.data,'物料编码')" />
<el-table-column prop="material_name" label="物料名称 " :min-width="flexWidth('material_name',crud.data,'物料名称 ')" />
<el-table-column prop="material_spec" label="物料规格" :min-width="flexWidth('material_spec',crud.data,'物料规格')" />
<el-table-column prop="class_id" label="物料分类标识" :min-width="flexWidth('class_id',crud.data,'物料分类标识')" />
<el-table-column prop="material_model" label="物料型号" :min-width="flexWidth('material_model',crud.data,'物料分类标识')" />
<el-table-column prop="standing_time" label="静置时间(分钟)" :min-width="flexWidth('standing_time',crud.data,'静置时间(分钟)')" />
<el-table-column prop="cooling_time" label="冷却时间(分钟)" :min-width="flexWidth('cooling_time',crud.data,'静置时间(分钟)')" />
<el-table-column prop="workshop_code" label="车间编码" :min-width="flexWidth('workshop_code',crud.data,'车间编码')" />
<!-- <el-table-column prop="workshop_code" label="车间编码" :min-width="flexWidth('workshop_code',crud.data,'车间编码')" />-->
<el-table-column prop="remark" label="备注" :min-width="flexWidth('remark',crud.data,'备注')" />
<el-table-column prop="is_used" label="是否启用" :min-width="flexWidth('is_used',crud.data,'是否启用')">
<template slot-scope="scope">
@ -104,9 +186,10 @@
</template>
</el-table-column>
<el-table-column prop="create_name" label="创建人" :min-width="flexWidth('create_name',crud.data,'创建人')" />
<el-table-column prop="create_time" label="创建时间" :min-width="flexWidth('create_time',crud.data,'创建时间')" />
<el-table-column prop="create_time" label="同步时间" :min-width="flexWidth('create_time',crud.data,'创建时间')" />
<el-table-column prop="update_name" label="修改人" :min-width="flexWidth('update_name',crud.data,'修改人')" />
<el-table-column prop="update_time" label="修改时间" :min-width="flexWidth('update_time',crud.data,'修改时间')" />
<el-table-column prop="ext_time" label="MES时间" :min-width="flexWidth('ext_time',crud.data,'修改时间')" />
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
<template slot-scope="scope">
<udOperation
@ -139,16 +222,24 @@ const defaultForm = {
raw_material_code: null,
material_name: null,
material_spec: null,
material_model: null,
a_long_side: null,
b_short_side: null,
h_height: null,
w_thickness: null,
class_id: null,
standing_time: null,
cooling_time: null,
standing_time: 0,
cooling_time: 0,
workshop_code: null,
pack_palletspec: null,
pack_method: null,
remark: null,
is_used: true,
is_delete: false
}
export default {
name: 'MdBaseMaterial',
dicts: ['vehicle_type'],
components: { pagination, crudOperation, rrOperation, udOperation, Treeselect },
mixins: [presenter(), header(), form(defaultForm), crud()],
cruds() {

Loading…
Cancel
Save