李永德
6 months ago
11 changed files with 422 additions and 2 deletions
@ -0,0 +1,45 @@ |
|||
package org.nl.wms.cockpit.rest; |
|||
|
|||
import cn.dev33.satoken.annotation.SaIgnore; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import lombok.RequiredArgsConstructor; |
|||
import org.nl.modules.logging.annotation.Log; |
|||
import org.nl.wms.cockpit.service.ReportService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.data.domain.Pageable; |
|||
import org.springframework.http.HttpStatus; |
|||
import org.springframework.http.ResponseEntity; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* @Author: lyd |
|||
* @Description: 报表管理 |
|||
* @Date: 2024/5/16 |
|||
*/ |
|||
@RestController |
|||
@Api(tags = "报表管理") |
|||
@RequestMapping("/api/report") |
|||
public class ReportController { |
|||
|
|||
@Autowired |
|||
private ReportService reportService; |
|||
|
|||
@GetMapping("/queryXN") |
|||
@Log("查询出窑虚拟库、货架、木托虚拟库库存") |
|||
@ApiOperation("查询出窑虚拟库、货架、木托虚拟库库存") |
|||
//@SaCheckPermission("point:list")
|
|||
public ResponseEntity<Object> queryXN(@RequestParam Map whereJson, Pageable page) { |
|||
return new ResponseEntity<>(reportService.queryXN(whereJson, page), HttpStatus.OK); |
|||
} |
|||
@GetMapping("/mudMaterialReport") |
|||
@Log("泥料退料报表") |
|||
@ApiOperation("泥料退料报表") |
|||
//@SaCheckPermission("point:list")
|
|||
public ResponseEntity<Object> mudMaterialReport(@RequestParam Map whereJson, Pageable page) { |
|||
return new ResponseEntity<>(reportService.mudMaterialReport(whereJson, page), HttpStatus.OK); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,17 @@ |
|||
package org.nl.wms.cockpit.service; |
|||
|
|||
import com.alibaba.fastjson.JSONObject; |
|||
import org.springframework.data.domain.Pageable; |
|||
|
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* @Author: lyd |
|||
* @Description: |
|||
* @Date: 2024/5/16 |
|||
*/ |
|||
public interface ReportService { |
|||
Map<String,Object> queryXN(Map whereJson, Pageable page); |
|||
|
|||
Map<String,Object> mudMaterialReport(Map whereJson, Pageable page); |
|||
} |
@ -0,0 +1,29 @@ |
|||
package org.nl.wms.cockpit.service.impl; |
|||
|
|||
import com.alibaba.fastjson.JSONArray; |
|||
import com.alibaba.fastjson.JSONObject; |
|||
import org.nl.modules.wql.WQL; |
|||
import org.nl.modules.wql.util.WqlUtil; |
|||
import org.nl.wms.cockpit.service.ReportService; |
|||
import org.springframework.data.domain.Pageable; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* @Author: lyd |
|||
* @Description: |
|||
* @Date: 2024/5/16 |
|||
*/ |
|||
@Service |
|||
public class ReportServiceImpl implements ReportService { |
|||
@Override |
|||
public Map<String, Object> queryXN(Map whereJson, Pageable page) { |
|||
return WQL.getWO("REPORT").addParam("flag", "1").addParam("point_code", whereJson.get("point_code")).pageQuery(WqlUtil.getHttpContext(page), "sd.create_time desc"); |
|||
} |
|||
|
|||
@Override |
|||
public Map<String, Object> mudMaterialReport(Map whereJson, Pageable page) { |
|||
return WQL.getWO("REPORT").addParam("flag", "2").pageQuery(WqlUtil.getHttpContext(page), "sd.create_time desc, m.order_code"); |
|||
} |
|||
} |
@ -0,0 +1,76 @@ |
|||
[交易说明] |
|||
交易名: 车间情况 |
|||
所属模块: |
|||
功能简述: |
|||
版权所有: |
|||
表引用: |
|||
版本经历: |
|||
|
|||
[数据库] |
|||
--指定数据库,为空采用默认值,默认为db.properties中列出的第一个库 |
|||
|
|||
[IO定义] |
|||
################################################# |
|||
## 表字段对应输入参数 |
|||
################################################# |
|||
输入.flag TYPEAS s_string |
|||
输入.point_code TYPEAS s_string |
|||
|
|||
|
|||
[临时表] |
|||
--这边列出来的临时表就会在运行期动态创建 |
|||
|
|||
[临时变量] |
|||
--所有中间过程变量均可在此处定义 |
|||
|
|||
[业务过程] |
|||
|
|||
########################################## |
|||
# 1、输入输出检查 # |
|||
########################################## |
|||
|
|||
|
|||
########################################## |
|||
# 2、主过程前处理 # |
|||
########################################## |
|||
|
|||
|
|||
########################################## |
|||
# 3、业务主过程 # |
|||
########################################## |
|||
|
|||
|
|||
IF 输入.flag = "1" |
|||
PAGEQUERY |
|||
SELECT |
|||
sd.*, |
|||
p.point_name, |
|||
m.material_code, |
|||
m.order_code |
|||
FROM |
|||
`st_ivt_vehicle_detail` sd |
|||
LEFT JOIN sch_base_point p ON p.point_code = sd.point_code |
|||
LEFT JOIN md_me_materialbase m ON m.material_id = sd.material_id |
|||
WHERE p.region_code = 'XN' AND sd.is_delete = '0' |
|||
OPTION 输入.point_code <> "" |
|||
sd.point_code = 输入.point_code |
|||
ENDOPTION |
|||
ENDSELECT |
|||
ENDPAGEQUERY |
|||
ENDIF |
|||
|
|||
IF 输入.flag = "2" |
|||
PAGEQUERY |
|||
SELECT |
|||
sd.*, |
|||
p.point_name, |
|||
m.material_code, |
|||
m.order_code |
|||
FROM |
|||
`st_ivt_vehicle_detail` sd |
|||
LEFT JOIN sch_base_point p ON p.point_code = sd.point_code |
|||
LEFT JOIN md_me_materialbase m ON m.material_id = sd.material_id |
|||
WHERE sd.is_back = '1' |
|||
ENDSELECT |
|||
ENDPAGEQUERY |
|||
ENDIF |
Binary file not shown.
@ -0,0 +1,73 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<!--工具栏--> |
|||
<div class="head-container"> |
|||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'--> |
|||
<crudOperation :permission="permission" /> |
|||
<!--表格渲染--> |
|||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler"> |
|||
<el-table-column type="selection" width="55" /> |
|||
<el-table-column prop="vehicle_code" label="托盘号" :min-width="flexWidth('vehicle_code',crud.data,'托盘号')" /> |
|||
<el-table-column prop="vehicle_type" label="托盘类型" :min-width="flexWidth('vehicle_type',crud.data,'托盘类型')"> |
|||
<template slot-scope="scope"> |
|||
{{ dict.label.vehicle_type[scope.row.vehicle_type] }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'拆垛工位')" /> |
|||
<el-table-column prop="weight" label="物料重量" :min-width="flexWidth('weight',crud.data,'分拣工单')" /> |
|||
<el-table-column prop="qty" label="物料数量" :min-width="flexWidth('qty',crud.data,'分拣工单')" /> |
|||
<el-table-column prop="point_name" label="点位名称" :min-width="flexWidth('point_name',crud.data,'分拣工单')" /> |
|||
<el-table-column prop="order_code" label="订单编码" :min-width="flexWidth('order_code',crud.data,'分拣工单')" /> |
|||
</el-table> |
|||
<!--分页组件--> |
|||
<pagination /> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import CRUD, { crud, header, presenter } from '@crud/crud' |
|||
import rrOperation from '@crud/RR.operation' |
|||
import crudOperation from '@crud/CRUD.operation' |
|||
import udOperation from '@crud/UD.operation' |
|||
import pagination from '@crud/Pagination' |
|||
import crudPoint from '@/api/wms/sch/point' |
|||
export default { |
|||
name: 'BackMaterial', |
|||
dicts: ['vehicle_type'], |
|||
components: { pagination, crudOperation, rrOperation, udOperation }, |
|||
mixins: [presenter(), header(), crud()], |
|||
cruds() { |
|||
return CRUD({ |
|||
title: '虚拟库存报表', |
|||
url: 'api/report/mudMaterialReport', |
|||
optShow: { |
|||
add: false, |
|||
edit: false, |
|||
del: false, |
|||
download: false |
|||
} |
|||
}) |
|||
}, |
|||
data() { |
|||
return { |
|||
permission: { |
|||
}, |
|||
rules: { |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
}, |
|||
methods: { |
|||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据 |
|||
[CRUD.HOOK.beforeRefresh]() { |
|||
return true |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
@ -0,0 +1,106 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<!--工具栏--> |
|||
<div class="head-container"> |
|||
<div v-if="crud.props.searchToggle"> |
|||
<el-form |
|||
:inline="true" |
|||
class="demo-form-inline" |
|||
label-position="right" |
|||
label-width="100px" |
|||
label-suffix=":" |
|||
> |
|||
<el-form-item label="虚拟库位置"> |
|||
<el-select |
|||
v-model="query.point_code" |
|||
clearable |
|||
filterable |
|||
placeholder="虚拟库位置" |
|||
> |
|||
<el-option |
|||
v-for="item in regionList" |
|||
:key="item.point_id" |
|||
:label="item.point_name" |
|||
:value="item.point_code" |
|||
/> |
|||
</el-select> |
|||
</el-form-item> |
|||
<rrOperation /> |
|||
</el-form> |
|||
</div> |
|||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'--> |
|||
<crudOperation :permission="permission" /> |
|||
<!--表格渲染--> |
|||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler"> |
|||
<el-table-column type="selection" width="55" /> |
|||
<el-table-column prop="vehicle_code" label="托盘号" :min-width="flexWidth('vehicle_code',crud.data,'托盘号')" /> |
|||
<el-table-column prop="vehicle_type" label="托盘类型" :min-width="flexWidth('vehicle_type',crud.data,'托盘类型')"> |
|||
<template slot-scope="scope"> |
|||
{{ dict.label.vehicle_type[scope.row.vehicle_type] }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'拆垛工位')" /> |
|||
<el-table-column prop="weight" label="物料重量" :min-width="flexWidth('weight',crud.data,'分拣工单')" /> |
|||
<el-table-column prop="qty" label="物料数量" :min-width="flexWidth('qty',crud.data,'分拣工单')" /> |
|||
<el-table-column prop="point_name" label="点位名称" :min-width="flexWidth('point_name',crud.data,'分拣工单')" /> |
|||
<el-table-column prop="order_code" label="订单编码" :min-width="flexWidth('order_code',crud.data,'分拣工单')" /> |
|||
</el-table> |
|||
<!--分页组件--> |
|||
<pagination /> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import CRUD, { crud, header, presenter } from '@crud/crud' |
|||
import rrOperation from '@crud/RR.operation' |
|||
import crudOperation from '@crud/CRUD.operation' |
|||
import udOperation from '@crud/UD.operation' |
|||
import pagination from '@crud/Pagination' |
|||
import crudPoint from '@/api/wms/sch/point' |
|||
export default { |
|||
name: 'XnShow', |
|||
dicts: ['vehicle_type'], |
|||
components: { pagination, crudOperation, rrOperation, udOperation }, |
|||
mixins: [presenter(), header(), crud()], |
|||
cruds() { |
|||
return CRUD({ |
|||
title: '虚拟库存报表', |
|||
url: 'api/report/queryXN', |
|||
optShow: { |
|||
add: false, |
|||
edit: false, |
|||
del: false, |
|||
download: false |
|||
} |
|||
}) |
|||
}, |
|||
data() { |
|||
return { |
|||
permission: { |
|||
}, |
|||
rules: { |
|||
}, |
|||
regionList: [] |
|||
} |
|||
}, |
|||
created() { |
|||
const param = { |
|||
'region_Code': 'XN' |
|||
} |
|||
crudPoint.getPoint(param).then(res => { |
|||
this.regionList = res |
|||
}) |
|||
}, |
|||
methods: { |
|||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据 |
|||
[CRUD.HOOK.beforeRefresh]() { |
|||
return true |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
Loading…
Reference in new issue