This commit is contained in:
zds
2022-12-28 18:44:11 +08:00
parent 86e37f50ac
commit 5194d45e71
4 changed files with 47 additions and 69 deletions

View File

@@ -65,6 +65,14 @@
WHERE
1 = 1
AND workorder.is_out = '1'
AND workorder.workorder_id IN (
SELECT DISTINCT
( procedureoffline.workorder_id )
FROM
pdm_bi_procedureoffline procedureoffline
WHERE
1 = 1
AND procedureoffline.is_send='0')
ENDSELECT
ENDPAGEQUERY
ENDIF

View File

@@ -37,32 +37,41 @@ public class StatisticalReportServiceImpl implements StatisticalReportService {
public Map<String, Object> sendOutQuery(Map whereJson, Pageable page) {
HashMap<String, String> map = new HashMap<>(whereJson);
String begin_time = MapUtil.getStr(whereJson, "begin_time");
String begin_time = map.get("begin_time");
if (StrUtil.isNotEmpty(begin_time)) {
map.put("begin_time", begin_time.substring(0,10));
}
String end_time = MapUtil.getStr(whereJson, "end_time");
String end_time = map.get("end_time");
if (StrUtil.isNotEmpty(end_time)) {
map.put("end_time", end_time.substring(0,10));
}
String pcsn = MapUtil.getStr(whereJson, "pcsn");
if (!StrUtil.isEmpty(pcsn)) {
String pcsn = map.get("pcsn");
if (StrUtil.isNotEmpty(pcsn)) {
map.put("pcsn", "%" + pcsn + "%");
}
String material_code = MapUtil.getStr(whereJson, "material_code");
if (!StrUtil.isEmpty(material_code)) {
String material_code = map.get("material_code");
if (StrUtil.isNotEmpty(material_code)) {
map.put("material_code", "%" + material_code + "%");
}
String workorder_code = MapUtil.getStr(whereJson, "workorder_code");
if (!StrUtil.isEmpty(workorder_code)) {
String workorder_code = map.get("workorder_code");
if (StrUtil.isNotEmpty(workorder_code)) {
map.put("workorder_code", "%" + workorder_code + "%");
}
String send_name = MapUtil.getStr(whereJson, "send_name");
if (!StrUtil.isEmpty(send_name)) {
String send_name = map.get("send_name");
if (StrUtil.isNotEmpty(send_name)) {
map.put("send_name", "%" + send_name + "%");
}
String is_send = map.get("is_send");
if (StrUtil.isNotEmpty(is_send)) {
if ("1,2".contains(is_send)) {
map.put("is_send12", is_send);
}
if ("0".equals(is_send)) {
map.put("is_send0", "0");
}
}else if (StrUtil.isEmpty(is_send)) {
map.put("is_send0", "0");
}
map.put("flag", "5");
JSONObject jo = WQL.getWO("statistical_report_query_02").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "send_date desc,material_code,pcsn");
return jo;
@@ -564,24 +573,24 @@ public class StatisticalReportServiceImpl implements StatisticalReportService {
JSONObject jsonObject = (JSONObject)JSON.toJSON(raw);
String storagevehicle_code = (String) jsonObject.get("storagevehicle_code");
if (StrUtil.isEmpty(storagevehicle_code)) {
throw new PdaRequestException("载具不能为空!");
throw new BadRequestException("载具不能为空!");
}
if (StrUtil.isEmpty(jsonObject.getString("diskrecord_id"))) {
throw new PdaRequestException("组盘记录不能为空");
throw new BadRequestException("组盘记录不能为空");
}
// 仓位属性表【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+"无组盘记录!");
throw new BadRequestException("该载具"+storagevehicle_code+"无组盘记录!");
}
if (!jo.getString("diskrecord_id").equals(jsonObject.getString("diskrecord_id"))){
throw new PdaRequestException("该载具"+storagevehicle_code+"对应编号不一致!");
throw new BadRequestException("该载具"+storagevehicle_code+"对应编号不一致!");
}
String is_send = jo.getString("is_send");
if(!"1".equals(is_send)){
throw new PdaRequestException("该载具"+storagevehicle_code+"状态不是已出库状态,不允许发货!");
throw new BadRequestException("该载具"+storagevehicle_code+"状态不是已出库状态,不允许发货!");
}
String diskrecord_id = jsonObject.getString("diskrecord_id");
HashMap<String,String> map = new HashMap<String,String>();

View File

@@ -32,7 +32,8 @@
输入.org_id TYPEAS s_string
输入.workorder_code TYPEAS s_string
输入.send_name TYPEAS s_string
输入.is_send TYPEAS s_string
输入.is_send0 TYPEAS s_string
输入.is_send12 TYPEAS s_string
[临时表]
@@ -235,7 +236,7 @@
workorder.send_date <= 输入.end_time
ENDOPTION
OPTION 输入.pcsn <> ""
procedureoffline.pcsn like 输入.pcsn
workorder.pcsn like 输入.pcsn
ENDOPTION
OPTION 输入.material_code <> ""
(mb.material_code like 输入.material_code or mb.material_name like 输入.material_code)
@@ -249,8 +250,11 @@
OPTION 输入.org_id <> ""
workorder.org_id = 输入.org_id
ENDOPTION
OPTION 输入.is_send <> ""
procedureoffline.is_send = 输入.is_send
OPTION 输入.is_send0 <> ""
(procedureoffline.is_send = 输入.is_send0 or procedureoffline.is_send is null)
ENDOPTION
OPTION 输入.is_send12 <> ""
(procedureoffline.is_send = 输入.is_send12)
ENDOPTION
ENDSELECT
ENDPAGEQUERY

View File

@@ -97,7 +97,6 @@
placeholder="请选择"
class="filter-item"
style="width: 210px;"
@change="hand"
>
<el-option
v-for="item in passList"
@@ -163,12 +162,7 @@ import crudInspectionsheetmst from '@/api/wms/ql/inspectionsheetmst'
import CRUD, { presenter, header, crud } 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 DateRangePicker from '@/components/DateRangePicker'
import AddDialog from '@/views/wms/ql/inspectionsheet/AddDialog'
import ResultPutDialog from '@/views/wms/ql/inspectionsheet/ResultPutDialog'
import Date from '@/utils/datetime'
import report from '@/api/wms/statistics/report'
import workorder from '@/api/wms/pdm/workorder'
@@ -187,7 +181,7 @@ export default {
// 每页数据条数
size: 20
},
query: { is_send: '0' },
query: { is_send: '1' },
crudMethod: { ...crudInspectionsheetmst },
optShow: {
add: false,
@@ -235,31 +229,10 @@ export default {
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)
}
this.crud.notify('操作成功!')
})
})
},
// 钩子在获取表格数据之前执行false 则代表不获取数据
[CRUD.HOOK.beforeRefresh]() {
},
handleSelectionChange(val, row) {
if (val.length > 1) {
this.$refs.table.clearSelection()
this.$refs.table.toggleRowSelection(val.pop())
this.buttonChange(row)
} else if (val.length === 1) {
this.buttonChange(row)
} else {
this.handleCurrentChange(null)
}
},
onSelectAll() {
this.$refs.table.clearSelection()
},
orgFormat(row) {
for (const item of this.Depts) {
if (item.id === row.org_id) {
@@ -267,14 +240,6 @@ export default {
}
}
},
hand(value) {
this.crud.toQuery()
},
buttonChange(current) {
if (current !== null) {
this.currentRow = current
}
},
onInput() {
this.$forceUpdate()
},
@@ -288,11 +253,6 @@ export default {
}
this.crud.toQuery()
},
handleCurrentChange(current) {
if (current === null) {
this.currentRow = {}
}
},
formatStatus(row, column) {
for (const item of this.statusList) {
if (item.value === row.bill_status) {
@@ -305,17 +265,14 @@ export default {
return '已发货'
} else if (row.is_send === '1') {
return '已出库'
} else {
} else if (row.is_send === '0') {
return '未出库'
} else{
return ''
}
},
stateFormat(row) {
return this.dict.label.workorder_status[row.workorder_status]
},
querytable() {
this.onSelectAll()
this.crud.toQuery()
this.handleCurrentChange(null)
}
}
}