rev:现场调试优化
This commit is contained in:
@@ -96,6 +96,12 @@ public class PdaTaskController {
|
||||
return new ResponseEntity<>(pdaTaskService.getMaterialInfoByPoint(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/selectMaterialByPointCode")
|
||||
@Log("根据点位获取组盘信息")
|
||||
public ResponseEntity<Object> selectMaterialByPointCode(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(pdaTaskService.selectMaterialByPointCode(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/loading")
|
||||
@Log("产线上料")
|
||||
|
||||
@@ -66,4 +66,6 @@ public interface PdaTaskService {
|
||||
JSONObject getChargeRegions();
|
||||
|
||||
JSONObject getMaterialTypes();
|
||||
|
||||
JSONObject selectMaterialByPointCode(JSONObject whereJson);
|
||||
}
|
||||
|
||||
@@ -483,6 +483,47 @@ public class PdaTaskServiceImpl implements PdaTaskService {
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject selectMaterialByPointCode(JSONObject whereJson) {
|
||||
String point_code = whereJson.getString("point_code");
|
||||
if (ObjectUtil.isEmpty(point_code)) {
|
||||
throw new BadRequestException("点位不能为空!");
|
||||
}
|
||||
SchBasePoint point = pointMapper.selectOne(new LambdaQueryWrapper<SchBasePoint>().eq(SchBasePoint::getPoint_code, point_code));
|
||||
if (ObjectUtil.isEmpty(point)) {
|
||||
throw new BadRequestException("点位不存在!");
|
||||
}
|
||||
String storagevehicle_code = point.getStoragevehicle_code();
|
||||
List<GroupPlatedtl> list = new ArrayList<>();
|
||||
JSONArray arr = new JSONArray();
|
||||
if (ObjectUtil.isNotEmpty(storagevehicle_code)) {
|
||||
GroupPlate groupPlate = groupplateMapper.selectOne(new LambdaQueryWrapper<GroupPlate>()
|
||||
.eq(GroupPlate::getStoragevehicle_code, storagevehicle_code)
|
||||
.eq(GroupPlate::getStatus, GroupStatus.START.getCode())
|
||||
.eq(GroupPlate::getIs_delete, GeneralDefinition.NO));
|
||||
if (ObjectUtil.isNotEmpty(groupPlate)) {
|
||||
String group_id = groupPlate.getGroup_id();
|
||||
list = groupplatedtlService.getGroupPlatedtlList(group_id);
|
||||
if (ObjectUtil.isNotEmpty(list)) {
|
||||
list.forEach(groupPlatedtl -> {
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("container_code", groupPlatedtl.getContainer_code());
|
||||
jo.put("material_code", groupPlatedtl.getMaterial_code());
|
||||
jo.put("material_name", groupPlatedtl.getMaterial_name());
|
||||
jo.put("qty", groupPlatedtl.getQty());
|
||||
jo.put("measure_unit_id", groupPlatedtl.getUnit_name());
|
||||
arr.add(jo);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
JSONObject ret = new JSONObject();
|
||||
ret.put("code", String.valueOf(HttpStatus.HTTP_OK));
|
||||
ret.put("message", "查询成功");
|
||||
ret.put("data", arr);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject getMaterialInfoByPoint(JSONObject whereJson) {
|
||||
String point_code = whereJson.getString("point_code");
|
||||
|
||||
@@ -50,6 +50,12 @@ public class MaterialRecordController {
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/getMaterialTypes")
|
||||
@Log("查询物料类型")
|
||||
public ResponseEntity<Object> getMaterialTypes(){
|
||||
return new ResponseEntity<>(materialRecordService.getMaterialTypes(),HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.nl.wms.sch.material.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
@@ -8,6 +9,7 @@ import org.nl.wms.sch.material.service.dto.MaterialRecordQuery;
|
||||
import org.nl.wms.sch.task.service.dao.SchBaseTaskconfig;
|
||||
import org.nl.wms.sch.task.service.dto.SchBaseTaskconfigQuery;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
public interface MaterialRecordService extends IService<MaterialRecord> {
|
||||
@@ -37,4 +39,6 @@ public interface MaterialRecordService extends IService<MaterialRecord> {
|
||||
* @param ids /
|
||||
*/
|
||||
void deleteAll(Set<String> ids);
|
||||
|
||||
List<JSONObject> getMaterialTypes();
|
||||
}
|
||||
|
||||
@@ -13,4 +13,6 @@ public interface MaterialRecordMapper extends BaseMapper<MaterialRecord> {
|
||||
IPage<MaterialRecord> selectPageLeftJoin(IPage<MaterialRecord> pages, MaterialRecordQuery whereJson);
|
||||
|
||||
List<JSONObject> selectMaterialByRegion(@Param("region_code") String region_code);
|
||||
|
||||
List<JSONObject> getMaterialTypes();
|
||||
}
|
||||
|
||||
@@ -28,4 +28,12 @@
|
||||
region_code = #{region_code}
|
||||
AND DATE ( create_time ) >= CURDATE()
|
||||
</select>
|
||||
<select id="getMaterialTypes" resultType="com.alibaba.fastjson.JSONObject">
|
||||
SELECT
|
||||
material_type
|
||||
FROM
|
||||
`md_me_materialbase`
|
||||
GROUP BY
|
||||
material_type
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -2,6 +2,9 @@ package org.nl.wms.sch.material.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.http.HttpStatus;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@@ -24,6 +27,8 @@ import org.nl.wms.sch.task.service.dao.SchBaseTaskconfig;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@Service
|
||||
@@ -85,4 +90,10 @@ public class MaterialRecordServiceImpl extends ServiceImpl<MaterialRecordMapper,
|
||||
// 真删除
|
||||
materialRecordMapper.deleteBatchIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<JSONObject> getMaterialTypes() {
|
||||
List<JSONObject> list = materialRecordMapper.getMaterialTypes();
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
window.g = {
|
||||
dev: {
|
||||
VUE_APP_BASE_API: 'http://192.168.217.8:8010'
|
||||
VUE_APP_BASE_API: 'http://192.168.217.2:8010'
|
||||
},
|
||||
prod: {
|
||||
VUE_APP_BASE_API: 'http://192.168.217.8:8010'
|
||||
VUE_APP_BASE_API: 'http://192.168.217.2:8010'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -24,14 +24,21 @@
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称">
|
||||
<el-input
|
||||
<el-form-item label="物料类型">
|
||||
<el-select
|
||||
v-model="query.material_type"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="物料类型"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
class="filter-item"
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in materialTypesList"
|
||||
:label="item.material_type"
|
||||
:value="item.material_type"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
@@ -81,6 +88,7 @@ import CRUD, { header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import materialRecord from '@/views/wms/sch/materialRecord/materialRecord'
|
||||
|
||||
export default {
|
||||
name: 'MaterialDialog',
|
||||
@@ -104,7 +112,8 @@ export default {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
tableRadio: null,
|
||||
tableData: []
|
||||
tableData: [],
|
||||
materialTypesList: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -119,7 +128,9 @@ export default {
|
||||
this.tableRadio = item
|
||||
},
|
||||
open() {
|
||||
|
||||
materialRecord.getMaterialTypes().then(res => {
|
||||
this.materialTypesList = res
|
||||
})
|
||||
},
|
||||
handleSelectionChange(val, row) {
|
||||
if (val.length > 1) {
|
||||
|
||||
@@ -24,4 +24,11 @@ export function edit(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del }
|
||||
export function getMaterialTypes() {
|
||||
return request({
|
||||
url: 'api/materialRecord/getMaterialTypes',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getMaterialTypes}
|
||||
|
||||
Reference in New Issue
Block a user