修改bug

This commit is contained in:
zds
2022-07-21 14:45:33 +08:00
parent d623d8246a
commit 61f6311a05
4 changed files with 26 additions and 21 deletions

View File

@@ -14,10 +14,13 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.exception.BadRequestException;
import org.nl.modules.security.service.dto.JwtUserDto;
import org.nl.modules.system.service.DeptService;
import org.nl.modules.system.util.CodeUtil;
import org.nl.utils.SecurityUtils;
import org.nl.utils.SpringContextHolder;
import org.nl.wms.basedata.em.service.EquipmentfileService;
import org.nl.wms.basedata.master.constant.MaterOptTypeEnum;
import org.nl.wms.basedata.master.service.ClassstandardService;
import org.nl.wms.pdm.service.WorkOrdereService;
import org.nl.wql.WQL;
import org.nl.wql.core.bean.WQLObject;
@@ -32,11 +35,12 @@ import java.util.*;
@RequiredArgsConstructor
@Slf4j
public class EquipmentfileServiceImpl implements EquipmentfileService {
private final ClassstandardService classstandardService;
@Override
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
HashMap<String, String> map = new HashMap<>(whereJson);
DeptService deptService = SpringContextHolder.getBean(DeptService.class);
map.put("flag", "1");
String device_code = map.get("device_code");
if (StrUtil.isNotEmpty(device_code)) {
@@ -46,6 +50,16 @@ public class EquipmentfileServiceImpl implements EquipmentfileService {
if (StrUtil.isNotEmpty(manufacturer)) {
map.put("manufacturer", "%" + manufacturer + "%");
}
String material_type_id = map.get("material_type_id");
if (!StrUtil.isEmpty(material_type_id)) {
String classIds = classstandardService.getChildIdStr(material_type_id);
map.put("classIds", classIds);
}
String use_deptid = map.get("use_deptid");
if (!StrUtil.isEmpty(use_deptid)) {
String deptIds = deptService.getChildIdStr(Long.parseLong(use_deptid));
map.put("deptIds", deptIds);
}
String begin_time = map.get("begin_time");
if (StrUtil.isNotEmpty(begin_time)) {
map.put("begin_time", begin_time.substring(0,10));

View File

@@ -25,7 +25,8 @@
输入.workprocedure_id TYPEAS s_string
输入.is_produceuse TYPEAS s_string
输入.devicerecord_id TYPEAS s_string
输入.classIds TYPEAS f_string
输入.deptIds TYPEAS f_string
[临时表]
--这边列出来的临时表就会在运行期动态创建
@@ -72,13 +73,16 @@
equipmentfile.status = 输入.status
ENDOPTION
OPTION 输入.use_deptid <> ""
equipmentfile.use_deptid = 输入.use_deptid
equipmentfile.use_deptid in 输入.deptIds
ENDOPTION
OPTION 输入.workprocedure_id <> ""
equipmentfile.workprocedure_id = 输入.workprocedure_id
ENDOPTION
OPTION 输入.device_type <> ""
equipmentfile.device_type = 输入.device_type
ENDOPTION
OPTION 输入.material_type_id <> ""
equipmentfile.material_type_id = 输入.material_type_id
equipmentfile.material_type_id in 输入.classIds
ENDOPTION
OPTION 输入.device_code <> ""
(equipmentfile.device_code like 输入.device_code or equipmentfile.device_name like 输入.device_code)

View File

@@ -19,21 +19,9 @@
<label slot="label">设备名称:</label>
<el-input v-model="form.device_name" disabled style="width: 210px" />
</el-form-item>
<el-form-item label="使用班组" prop="use_groupid">
<el-select
v-model="form.use_groupid"
placeholder="使用班组"
disabled
style="width: 210px"
class="filter-item"
>
<el-option
v-for="item in dict.device_type"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-form-item label="使用班组" prop="use_groupname">
<label slot="label">使用班组:</label>
<el-input v-model="form.use_groupname" disabled style="width: 210px" />
</el-form-item>
<el-form-item label="归属部门" prop="belong_deptname">
<label slot="label">归属部门:</label>
@@ -55,7 +43,6 @@
>
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column min-width="150" prop="sparepart_only_id" label="备件编码" align="center"/>
<el-table-column prop="sparepart_only_id" label="备件名称" align="center" width="120px" />
<el-table-column min-width="120" prop="material_code" label="物料编码" align="center" />
<el-table-column min-width="80" prop="material_name" label="物料名称" align="center" />
<el-table-column min-width="80" prop="class_code" label="分类编码" align="center" />

View File

@@ -219,7 +219,7 @@
<el-table-column :formatter="stateFormat" min-width="100" prop="status" label="设备状态" />
<el-table-column prop="beginuse_date" min-width="130" label="启用日期"/>
<el-table-column prop="use_deptname" min-width="130" label="使用部门"/>
<el-table-column prop="use_groupid" min-width="130" label="使用班组"/>
<el-table-column prop="use_groupname" min-width="130" label="使用班组"/>
<el-table-column prop="supplier_name" min-width="130" label="供应商"/>
<el-table-column prop="manufacturer" min-width="130" label="制造商"/>
<el-table-column prop="country_manufactur" min-width="130" label="制造国别"/>