add:外协添加发货状态;todo:手持查询未修改
This commit is contained in:
@@ -42,8 +42,8 @@ public class HandXCOutIvtController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/confirmoutstore")
|
@PostMapping("/confirmoutstore")
|
||||||
@Log("确认发货")
|
@Log("出库确认")
|
||||||
@ApiOperation("确认发货")
|
@ApiOperation("出库确认")
|
||||||
public ResponseEntity<Object> confirmOutStore(@RequestBody Map whereJson) {
|
public ResponseEntity<Object> confirmOutStore(@RequestBody Map whereJson) {
|
||||||
return new ResponseEntity<>(handXCOutIvtService.confirmOutStore(whereJson), HttpStatus.OK);
|
return new ResponseEntity<>(handXCOutIvtService.confirmOutStore(whereJson), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -137,9 +137,9 @@ public class HandXCOutIvtServiceImpl implements HandXCOutIvtService {
|
|||||||
String diskrecord_id = dtl.getString("diskrecord_id");
|
String diskrecord_id = dtl.getString("diskrecord_id");
|
||||||
HashMap<String,String> map = new HashMap<String,String>();
|
HashMap<String,String> map = new HashMap<String,String>();
|
||||||
map.put("is_send","1");
|
map.put("is_send","1");
|
||||||
map.put("send_id",currentUserId+"");
|
map.put("out_id",currentUserId+"");
|
||||||
map.put("send_name",userDto.getNickName());
|
map.put("out_name",userDto.getNickName());
|
||||||
map.put("send_time",DateUtil.now());
|
map.put("out_time",DateUtil.now());
|
||||||
PDM_BI_ProcedureOffline.update(map,"diskrecord_id='"+diskrecord_id+"'");
|
PDM_BI_ProcedureOffline.update(map,"diskrecord_id='"+diskrecord_id+"'");
|
||||||
}
|
}
|
||||||
JSONObject returnjo = new JSONObject();
|
JSONObject returnjo = new JSONObject();
|
||||||
|
|||||||
Binary file not shown.
@@ -1,5 +1,6 @@
|
|||||||
package org.nl.wms.statistics.rest;
|
package org.nl.wms.statistics.rest;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
@@ -33,6 +34,15 @@ public class StatisticalReportController {
|
|||||||
return new ResponseEntity<>(statisticalReportService.sendOutQuery(whereJson, page), HttpStatus.OK);
|
return new ResponseEntity<>(statisticalReportService.sendOutQuery(whereJson, page), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PutMapping("/confirmOutStore")
|
||||||
|
@Log("确认发货")
|
||||||
|
@ApiOperation("确认发货")
|
||||||
|
public ResponseEntity<Object> confirmOutStore(@RequestBody JSONArray whereJson) {
|
||||||
|
return new ResponseEntity<>(statisticalReportService.confirmOutStore(whereJson), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("/productInstor")
|
@GetMapping("/productInstor")
|
||||||
@Log("PG粉当月入库查询")
|
@Log("PG粉当月入库查询")
|
||||||
@ApiOperation("PG粉当月入库查询")
|
@ApiOperation("PG粉当月入库查询")
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package org.nl.wms.statistics.service;
|
package org.nl.wms.statistics.service;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -49,4 +48,13 @@ public interface StatisticalReportService {
|
|||||||
JSONArray query3(Map whereJson);
|
JSONArray query3(Map whereJson);
|
||||||
|
|
||||||
JSONArray query4(Map whereJson);
|
JSONArray query4(Map whereJson);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发货确认
|
||||||
|
*
|
||||||
|
* @param jsonObject 条件
|
||||||
|
* @return Map<String, Object>
|
||||||
|
*/
|
||||||
|
Map<String, Object> confirmOutStore(JSONArray jsonObject);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
package org.nl.wms.statistics.service.impl;
|
package org.nl.wms.statistics.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.date.DateTime;
|
|
||||||
import cn.hutool.core.date.DateUnit;
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.map.MapUtil;
|
import cn.hutool.core.map.MapUtil;
|
||||||
import cn.hutool.core.util.NumberUtil;
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.exception.BadRequestException;
|
import org.nl.exception.BadRequestException;
|
||||||
import org.nl.wms.basedata.master.constant.MaterOptTypeEnum;
|
import org.nl.modules.system.service.UserService;
|
||||||
|
import org.nl.modules.system.service.dto.UserDto;
|
||||||
|
import org.nl.pda.exception.PdaRequestException;
|
||||||
|
import org.nl.utils.SecurityUtils;
|
||||||
import org.nl.wms.common.util.DataAuthUtil;
|
import org.nl.wms.common.util.DataAuthUtil;
|
||||||
import org.nl.wms.statistics.service.StatisticalReportService;
|
import org.nl.wms.statistics.service.StatisticalReportService;
|
||||||
import org.nl.wms.statistics.service.StifleQueryService;
|
|
||||||
import org.nl.wql.WQL;
|
import org.nl.wql.WQL;
|
||||||
import org.nl.wql.core.bean.WQLObject;
|
import org.nl.wql.core.bean.WQLObject;
|
||||||
import org.nl.wql.util.WqlUtil;
|
import org.nl.wql.util.WqlUtil;
|
||||||
@@ -23,7 +23,6 @@ import org.springframework.data.domain.Pageable;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@@ -32,6 +31,8 @@ import java.util.stream.Collectors;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class StatisticalReportServiceImpl implements StatisticalReportService {
|
public class StatisticalReportServiceImpl implements StatisticalReportService {
|
||||||
|
|
||||||
|
private final UserService userService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> sendOutQuery(Map whereJson, Pageable page) {
|
public Map<String, Object> sendOutQuery(Map whereJson, Pageable page) {
|
||||||
HashMap<String, String> map = new HashMap<>(whereJson);
|
HashMap<String, String> map = new HashMap<>(whereJson);
|
||||||
@@ -63,7 +64,7 @@ public class StatisticalReportServiceImpl implements StatisticalReportService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
map.put("flag", "5");
|
map.put("flag", "5");
|
||||||
JSONObject jo = WQL.getWO("statistical_report_query_02").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "material_code");
|
JSONObject jo = WQL.getWO("statistical_report_query_02").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "send_date desc,material_code,pcsn");
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -553,4 +554,47 @@ public class StatisticalReportServiceImpl implements StatisticalReportService {
|
|||||||
.process().getResultJSONArray(0);
|
.process().getResultJSONArray(0);
|
||||||
return ja;
|
return ja;
|
||||||
}
|
}
|
||||||
|
//diskrecord_id ->
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public Map<String, Object> confirmOutStore(JSONArray list) {
|
||||||
|
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
|
UserDto userDto = userService.findById(currentUserId);
|
||||||
|
for (Object raw : list) {
|
||||||
|
JSONObject jsonObject = (JSONObject)JSON.toJSON(raw);
|
||||||
|
String storagevehicle_code = (String) jsonObject.get("storagevehicle_code");
|
||||||
|
if (StrUtil.isEmpty(storagevehicle_code)) {
|
||||||
|
throw new PdaRequestException("载具不能为空!");
|
||||||
|
}
|
||||||
|
if (StrUtil.isEmpty(jsonObject.getString("diskrecord_id"))) {
|
||||||
|
throw new PdaRequestException("组盘记录不能为空");
|
||||||
|
}
|
||||||
|
// 仓位属性表【ST_IVT_StructAttr】
|
||||||
|
WQLObject PDM_BI_ProcedureOffline = WQLObject.getWQLObject("PDM_BI_ProcedureOffline");
|
||||||
|
|
||||||
|
JSONObject jo = PDM_BI_ProcedureOffline.query("storagevehicle_code='"+storagevehicle_code+"'").uniqueResult(0);
|
||||||
|
if(jo==null){
|
||||||
|
throw new PdaRequestException("该载具"+storagevehicle_code+"无组盘记录!");
|
||||||
|
}
|
||||||
|
if (!jo.getString("diskrecord_id").equals(jsonObject.getString("diskrecord_id"))){
|
||||||
|
throw new PdaRequestException("该载具"+storagevehicle_code+"对应编号不一致!");
|
||||||
|
}
|
||||||
|
String is_send = jo.getString("is_send");
|
||||||
|
if(!"1".equals(is_send)){
|
||||||
|
throw new PdaRequestException("该载具"+storagevehicle_code+"状态不是已出库状态,不允许发货!");
|
||||||
|
}
|
||||||
|
String diskrecord_id = jsonObject.getString("diskrecord_id");
|
||||||
|
HashMap<String,String> map = new HashMap<String,String>();
|
||||||
|
map.put("is_send","2");
|
||||||
|
map.put("send_id",currentUserId+"");
|
||||||
|
map.put("send_name",userDto.getNickName());
|
||||||
|
map.put("send_time",DateUtil.now());
|
||||||
|
PDM_BI_ProcedureOffline.update(map,"diskrecord_id='"+diskrecord_id+"'");
|
||||||
|
}
|
||||||
|
|
||||||
|
JSONObject returnjo = new JSONObject();
|
||||||
|
returnjo.put("code", "1");
|
||||||
|
returnjo.put("desc", "操作成功!");
|
||||||
|
return returnjo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -194,6 +194,7 @@
|
|||||||
SELECT
|
SELECT
|
||||||
procedureoffline2.num_bucket,
|
procedureoffline2.num_bucket,
|
||||||
procedureoffline2.total_qty,
|
procedureoffline2.total_qty,
|
||||||
|
procedureoffline.diskrecord_id,
|
||||||
procedureoffline.storagevehicle_code,
|
procedureoffline.storagevehicle_code,
|
||||||
procedureoffline.is_send AS is_send,
|
procedureoffline.is_send AS is_send,
|
||||||
procedureoffline.send_name AS send_name,
|
procedureoffline.send_name AS send_name,
|
||||||
|
|||||||
@@ -54,4 +54,12 @@ export function query4(params) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { getHeader, getHeader2, materPlanDtlQuery, query1, query2, query3, query4 }
|
export function confirmOutStore(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/statistical/confirmOutStore',
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default { getHeader, getHeader2, materPlanDtlQuery, query1, query2, query3, query4, confirmOutStore }
|
||||||
|
|||||||
@@ -89,7 +89,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="是否发货">
|
<el-form-item label="发货状态">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="query.is_send"
|
v-model="query.is_send"
|
||||||
clearable
|
clearable
|
||||||
@@ -110,14 +110,30 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
<crudOperation :permission="permission" />
|
<crudOperation :permission="permission">
|
||||||
|
<el-button
|
||||||
|
slot="right"
|
||||||
|
class="filter-item"
|
||||||
|
type="success"
|
||||||
|
:disabled="crud.selections.length < 1"
|
||||||
|
icon="el-icon-check"
|
||||||
|
size="mini"
|
||||||
|
@click="typeChange"
|
||||||
|
>
|
||||||
|
确认发货
|
||||||
|
</el-button>
|
||||||
|
</crudOperation>
|
||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
<el-table ref="table" :max-height="590" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;"
|
<el-table
|
||||||
@selection-change="crud.selectionChangeHandler"
|
ref="table"
|
||||||
@current-change="handleCurrentChange"
|
v-loading="crud.loading"
|
||||||
@select="handleSelectionChange"
|
:max-height="590"
|
||||||
@select-all="onSelectAll"
|
:data="crud.data"
|
||||||
|
size="mini"
|
||||||
|
style="width: 100%;"
|
||||||
|
@selection-change="crud.selectionChangeHandler"
|
||||||
>
|
>
|
||||||
|
<el-table-column :selectable="checkboxT" type="selection" width="45" />
|
||||||
<el-table-column prop="send_date" label="计划发货日期" width="120px" />
|
<el-table-column prop="send_date" label="计划发货日期" width="120px" />
|
||||||
<el-table-column prop="workorder_code" label="工令号" width="120px" />
|
<el-table-column prop="workorder_code" label="工令号" width="120px" />
|
||||||
<el-table-column prop="org_id" label="所属组织" width="120px" :formatter="orgFormat" />
|
<el-table-column prop="org_id" label="所属组织" width="120px" :formatter="orgFormat" />
|
||||||
@@ -127,12 +143,14 @@
|
|||||||
<el-table-column prop="workorder_status" label="工令状态" width="150px" :formatter="stateFormat" />
|
<el-table-column prop="workorder_status" label="工令状态" width="150px" :formatter="stateFormat" />
|
||||||
<el-table-column prop="storagevehicle_code" label="托盘号" />
|
<el-table-column prop="storagevehicle_code" label="托盘号" />
|
||||||
<el-table-column prop="num_bucket" label="桶数" />
|
<el-table-column prop="num_bucket" label="桶数" />
|
||||||
<el-table-column prop="total_qty" label="托盘重量" min-width="120px"/>
|
<el-table-column prop="total_qty" label="托盘重量" min-width="120px" />
|
||||||
<el-table-column prop="create_name" label="组盘人" />
|
<el-table-column prop="create_name" label="组盘人" />
|
||||||
<el-table-column prop="create_time" label="组盘时间" min-width="150px" />
|
<el-table-column prop="create_time" label="组盘时间" min-width="150px" />
|
||||||
<el-table-column prop="is_send" label="是否已发货" min-width="120px" :formatter="formatResult" />
|
<el-table-column prop="is_send" label="发货状态" min-width="120px" :formatter="formatResult" />
|
||||||
<el-table-column prop="send_name" label="发货人" />
|
<el-table-column prop="send_name" label="发货人" />
|
||||||
<el-table-column prop="send_time" label="发货时间" min-width="150px" />
|
<el-table-column prop="send_time" label="发货时间" min-width="150px" />
|
||||||
|
<el-table-column prop="out_name" label="出库人" />
|
||||||
|
<el-table-column prop="out_time" label="出库时间" min-width="150px" />
|
||||||
</el-table>
|
</el-table>
|
||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<pagination />
|
<pagination />
|
||||||
@@ -151,6 +169,7 @@ import DateRangePicker from '@/components/DateRangePicker'
|
|||||||
import AddDialog from '@/views/wms/ql/inspectionsheet/AddDialog'
|
import AddDialog from '@/views/wms/ql/inspectionsheet/AddDialog'
|
||||||
import ResultPutDialog from '@/views/wms/ql/inspectionsheet/ResultPutDialog'
|
import ResultPutDialog from '@/views/wms/ql/inspectionsheet/ResultPutDialog'
|
||||||
import Date from '@/utils/datetime'
|
import Date from '@/utils/datetime'
|
||||||
|
import report from '@/api/wms/statistics/report'
|
||||||
import workorder from '@/api/wms/pdm/workorder'
|
import workorder from '@/api/wms/pdm/workorder'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -188,8 +207,9 @@ export default {
|
|||||||
openParam: {},
|
openParam: {},
|
||||||
query_flag: true,
|
query_flag: true,
|
||||||
passList: [
|
passList: [
|
||||||
{ 'label': '是', 'value': '1' },
|
{ 'label': '未出库', 'value': '0' },
|
||||||
{ 'label': '否', 'value': '0' }
|
{ 'label': '已出库', 'value': '1' },
|
||||||
|
{ 'label': '已发货', 'value': '2' }
|
||||||
],
|
],
|
||||||
permission: {
|
permission: {
|
||||||
}
|
}
|
||||||
@@ -204,6 +224,25 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
checkboxT(row) {
|
||||||
|
return row.is_send === '1'
|
||||||
|
},
|
||||||
|
typeChange() {
|
||||||
|
this.checkrows = this.$refs.table.selection
|
||||||
|
this.$confirm('是否确认发货?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
report.confirmOutStore(this.checkrows).then(res => {
|
||||||
|
if (res.code === '0') {
|
||||||
|
this.crud.notify(res.desc, CRUD.NOTIFICATION_TYPE.ERROR)
|
||||||
|
} else {
|
||||||
|
this.crud.notify('操作完成', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||||
[CRUD.HOOK.beforeRefresh]() {
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
},
|
},
|
||||||
@@ -214,13 +253,12 @@ export default {
|
|||||||
this.buttonChange(row)
|
this.buttonChange(row)
|
||||||
} else if (val.length === 1) {
|
} else if (val.length === 1) {
|
||||||
this.buttonChange(row)
|
this.buttonChange(row)
|
||||||
}else{
|
} else {
|
||||||
this.handleCurrentChange(null)
|
this.handleCurrentChange(null)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onSelectAll() {
|
onSelectAll() {
|
||||||
this.$refs.table.clearSelection()
|
this.$refs.table.clearSelection()
|
||||||
this.handleCurrentChange(null)
|
|
||||||
},
|
},
|
||||||
orgFormat(row) {
|
orgFormat(row) {
|
||||||
for (const item of this.Depts) {
|
for (const item of this.Depts) {
|
||||||
@@ -240,11 +278,11 @@ export default {
|
|||||||
onInput() {
|
onInput() {
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
},
|
},
|
||||||
mytoQuery(array1){
|
mytoQuery(array1) {
|
||||||
if(array1 === null){
|
if (array1 === null) {
|
||||||
this.crud.query.begin_time = ''
|
this.crud.query.begin_time = ''
|
||||||
this.crud.query.end_time = ''
|
this.crud.query.end_time = ''
|
||||||
}else{
|
} else {
|
||||||
this.crud.query.begin_time = array1[0]
|
this.crud.query.begin_time = array1[0]
|
||||||
this.crud.query.end_time = array1[1]
|
this.crud.query.end_time = array1[1]
|
||||||
}
|
}
|
||||||
@@ -263,9 +301,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
formatResult(row) {
|
formatResult(row) {
|
||||||
if (row.is_send === '1') {
|
if (row.is_send === '2') {
|
||||||
return '是'
|
return '已发货'
|
||||||
} else return '否'
|
} else if (row.is_send === '1') {
|
||||||
|
return '已出库'
|
||||||
|
} else {
|
||||||
|
return '未出库'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
stateFormat(row) {
|
stateFormat(row) {
|
||||||
return this.dict.label.workorder_status[row.workorder_status]
|
return this.dict.label.workorder_status[row.workorder_status]
|
||||||
|
|||||||
Reference in New Issue
Block a user