rev:现场调试优化
This commit is contained in:
@@ -96,6 +96,12 @@ public class PdaTaskController {
|
|||||||
return new ResponseEntity<>(pdaTaskService.getMaterialInfoByPoint(whereJson), HttpStatus.OK);
|
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")
|
@PostMapping("/loading")
|
||||||
@Log("产线上料")
|
@Log("产线上料")
|
||||||
|
|||||||
@@ -66,4 +66,6 @@ public interface PdaTaskService {
|
|||||||
JSONObject getChargeRegions();
|
JSONObject getChargeRegions();
|
||||||
|
|
||||||
JSONObject getMaterialTypes();
|
JSONObject getMaterialTypes();
|
||||||
|
|
||||||
|
JSONObject selectMaterialByPointCode(JSONObject whereJson);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -483,6 +483,47 @@ public class PdaTaskServiceImpl implements PdaTaskService {
|
|||||||
return ret;
|
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
|
@Override
|
||||||
public JSONObject getMaterialInfoByPoint(JSONObject whereJson) {
|
public JSONObject getMaterialInfoByPoint(JSONObject whereJson) {
|
||||||
String point_code = whereJson.getString("point_code");
|
String point_code = whereJson.getString("point_code");
|
||||||
|
|||||||
@@ -50,6 +50,12 @@ public class MaterialRecordController {
|
|||||||
return new ResponseEntity<>(HttpStatus.OK);
|
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;
|
package org.nl.wms.sch.material.service;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import org.nl.common.domain.query.PageQuery;
|
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.dao.SchBaseTaskconfig;
|
||||||
import org.nl.wms.sch.task.service.dto.SchBaseTaskconfigQuery;
|
import org.nl.wms.sch.task.service.dto.SchBaseTaskconfigQuery;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
public interface MaterialRecordService extends IService<MaterialRecord> {
|
public interface MaterialRecordService extends IService<MaterialRecord> {
|
||||||
@@ -37,4 +39,6 @@ public interface MaterialRecordService extends IService<MaterialRecord> {
|
|||||||
* @param ids /
|
* @param ids /
|
||||||
*/
|
*/
|
||||||
void deleteAll(Set<String> 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);
|
IPage<MaterialRecord> selectPageLeftJoin(IPage<MaterialRecord> pages, MaterialRecordQuery whereJson);
|
||||||
|
|
||||||
List<JSONObject> selectMaterialByRegion(@Param("region_code") String region_code);
|
List<JSONObject> selectMaterialByRegion(@Param("region_code") String region_code);
|
||||||
|
|
||||||
|
List<JSONObject> getMaterialTypes();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,4 +28,12 @@
|
|||||||
region_code = #{region_code}
|
region_code = #{region_code}
|
||||||
AND DATE ( create_time ) >= CURDATE()
|
AND DATE ( create_time ) >= CURDATE()
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getMaterialTypes" resultType="com.alibaba.fastjson.JSONObject">
|
||||||
|
SELECT
|
||||||
|
material_type
|
||||||
|
FROM
|
||||||
|
`md_me_materialbase`
|
||||||
|
GROUP BY
|
||||||
|
material_type
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -2,6 +2,9 @@ package org.nl.wms.sch.material.service.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.IdUtil;
|
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.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
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.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@@ -85,4 +90,10 @@ public class MaterialRecordServiceImpl extends ServiceImpl<MaterialRecordMapper,
|
|||||||
// 真删除
|
// 真删除
|
||||||
materialRecordMapper.deleteBatchIds(ids);
|
materialRecordMapper.deleteBatchIds(ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<JSONObject> getMaterialTypes() {
|
||||||
|
List<JSONObject> list = materialRecordMapper.getMaterialTypes();
|
||||||
|
return list;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
window.g = {
|
window.g = {
|
||||||
dev: {
|
dev: {
|
||||||
VUE_APP_BASE_API: 'http://192.168.217.8:8010'
|
VUE_APP_BASE_API: 'http://192.168.217.2:8010'
|
||||||
},
|
},
|
||||||
prod: {
|
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"
|
@keyup.enter.native="crud.toQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="物料名称">
|
<el-form-item label="物料类型">
|
||||||
<el-input
|
<el-select
|
||||||
v-model="query.material_type"
|
v-model="query.material_type"
|
||||||
clearable
|
clearable
|
||||||
size="mini"
|
size="mini"
|
||||||
placeholder="物料类型"
|
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>
|
</el-form-item>
|
||||||
<rrOperation />
|
<rrOperation />
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -81,6 +88,7 @@ import CRUD, { header, presenter } from '@crud/crud'
|
|||||||
import rrOperation from '@crud/RR.operation'
|
import rrOperation from '@crud/RR.operation'
|
||||||
import pagination from '@crud/Pagination'
|
import pagination from '@crud/Pagination'
|
||||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
|
import materialRecord from '@/views/wms/sch/materialRecord/materialRecord'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MaterialDialog',
|
name: 'MaterialDialog',
|
||||||
@@ -104,7 +112,8 @@ export default {
|
|||||||
return {
|
return {
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
tableRadio: null,
|
tableRadio: null,
|
||||||
tableData: []
|
tableData: [],
|
||||||
|
materialTypesList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -119,7 +128,9 @@ export default {
|
|||||||
this.tableRadio = item
|
this.tableRadio = item
|
||||||
},
|
},
|
||||||
open() {
|
open() {
|
||||||
|
materialRecord.getMaterialTypes().then(res => {
|
||||||
|
this.materialTypesList = res
|
||||||
|
})
|
||||||
},
|
},
|
||||||
handleSelectionChange(val, row) {
|
handleSelectionChange(val, row) {
|
||||||
if (val.length > 1) {
|
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