代码更新

This commit is contained in:
2022-11-30 14:36:23 +08:00
parent f253dfc740
commit 4164a58727
8 changed files with 53 additions and 10 deletions

View File

@@ -44,6 +44,7 @@ public class StructivtServiceImpl implements StructivtService {
String struct = MapUtil.getStr(whereJson, "struct"); String struct = MapUtil.getStr(whereJson, "struct");
String stor_id = MapUtil.getStr(whereJson, "stor_id"); String stor_id = MapUtil.getStr(whereJson, "stor_id");
String pcsn = MapUtil.getStr(whereJson, "pcsn"); String pcsn = MapUtil.getStr(whereJson, "pcsn");
String sap_pcsn = MapUtil.getStr(whereJson, "sap_pcsn");
JSONObject map = new JSONObject(); JSONObject map = new JSONObject();
map.put("flag", "1"); map.put("flag", "1");
map.put("stor_id", stor_id); map.put("stor_id", stor_id);
@@ -56,6 +57,9 @@ public class StructivtServiceImpl implements StructivtService {
if (StrUtil.isNotEmpty(pcsn)) { if (StrUtil.isNotEmpty(pcsn)) {
map.put("pcsn", "%" + pcsn + "%"); map.put("pcsn", "%" + pcsn + "%");
} }
if (StrUtil.isNotEmpty(sap_pcsn)) {
map.put("sap_pcsn", "%" + sap_pcsn + "%");
}
JSONObject jsonObject = WQL.getWO("QST_STRUCTIVT001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "ivt.instorage_time desc"); JSONObject jsonObject = WQL.getWO("QST_STRUCTIVT001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "ivt.instorage_time desc");
return jsonObject; return jsonObject;
} }

View File

@@ -18,6 +18,7 @@
输入.material TYPEAS s_string 输入.material TYPEAS s_string
输入.stor_id TYPEAS s_string 输入.stor_id TYPEAS s_string
输入.pcsn TYPEAS s_string 输入.pcsn TYPEAS s_string
输入.sap_pcsn TYPEAS s_string
[临时表] [临时表]
--这边列出来的临时表就会在运行期动态创建 --这边列出来的临时表就会在运行期动态创建
@@ -82,6 +83,10 @@
ivt.pcsn like 输入.pcsn ivt.pcsn like 输入.pcsn
ENDOPTION ENDOPTION
OPTION 输入.sap_pcsn <> ""
sub.sap_pcsn like 输入.sap_pcsn
ENDOPTION
OPTION 输入.stor_id <> "" OPTION 输入.stor_id <> ""
attr.stor_id = 输入.stor_id attr.stor_id = 输入.stor_id
ENDOPTION ENDOPTION

View File

@@ -19,9 +19,7 @@ import org.nl.wms.st.inbill.service.CheckOutBillService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.io.BufferedWriter; import java.io.*;
import java.io.File;
import java.io.FileWriter;
/** /**
* @author liuxy * @author liuxy
@@ -107,7 +105,8 @@ public class PrintServiceImpl implements PrintService {
file.createNewFile(); file.createNewFile();
} }
fw = new FileWriter(filePath); fw = new FileWriter(filePath);
BufferedWriter bw = new BufferedWriter(fw); OutputStreamWriter write = new OutputStreamWriter(new FileOutputStream(file), "utf-8");
BufferedWriter bw = new BufferedWriter(write);
bw.write("package_box_sn1,package_box_sn2,sale_order_name,product_description,product_name,width,pcsn,date_of_FG_inbound,box_weight,date_of_production,quanlity_in_box,quality_guaran_period,nspector,storage_conditions,weight\n"); bw.write("package_box_sn1,package_box_sn2,sale_order_name,product_description,product_name,width,pcsn,date_of_FG_inbound,box_weight,date_of_production,quanlity_in_box,quality_guaran_period,nspector,storage_conditions,weight\n");
bw.write(package_box_sn1 + "," bw.write(package_box_sn1 + ","
@@ -128,6 +127,7 @@ public class PrintServiceImpl implements PrintService {
); );
bw.close(); bw.close();
jo.put("message", "打印成功!");
} catch (Exception e) { } catch (Exception e) {
jo.put("message", "打印失败!"+e.getMessage()); jo.put("message", "打印失败!"+e.getMessage());
} finally { } finally {
@@ -137,7 +137,6 @@ public class PrintServiceImpl implements PrintService {
jo.put("message", "打印失败!"+e.getMessage()); jo.put("message", "打印失败!"+e.getMessage());
} }
} }
jo.put("message", "打印成功!");
return jo; return jo;
} }

View File

@@ -88,6 +88,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
map.put("flag", "7"); map.put("flag", "7");
map.put("begin_time", MapUtil.getStr(whereJson, "begin_time")); map.put("begin_time", MapUtil.getStr(whereJson, "begin_time"));
map.put("end_time", MapUtil.getStr(whereJson, "end_time")); map.put("end_time", MapUtil.getStr(whereJson, "end_time"));
map.put("sap_pcsn", MapUtil.getStr(whereJson, "sap_pcsn"));
map.put("canuse_qty", "0"); map.put("canuse_qty", "0");
if (StrUtil.isNotEmpty(map.get("material_code"))) { if (StrUtil.isNotEmpty(map.get("material_code"))) {
@@ -96,6 +97,9 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
if (StrUtil.isNotEmpty(map.get("pcsn"))) { if (StrUtil.isNotEmpty(map.get("pcsn"))) {
map.put("pcsn", "%" + map.get("pcsn") + "%"); map.put("pcsn", "%" + map.get("pcsn") + "%");
} }
if (StrUtil.isNotEmpty(map.get("sap_pcsn"))) {
map.put("sap_pcsn", "%" + map.get("sap_pcsn") + "%");
}
JSONObject jo = WQL.getWO("QST_IVT_CHECKOUTBILL").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "ivt.struct_code ASC"); JSONObject jo = WQL.getWO("QST_IVT_CHECKOUTBILL").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "ivt.struct_code ASC");
return jo; return jo;
} }
@@ -1838,7 +1842,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
} }
//判断是否存在未确认状态的分配记录 //判断是否存在未确认状态的分配记录
JSONObject task = wo_dis.query("work_status <>'99' and iostorinv_id = '" + iostorinv_id + "'").uniqueResult(0); /* JSONObject task = wo_dis.query("work_status <>'99' and iostorinv_id = '" + iostorinv_id + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(task)) { if (ObjectUtil.isNotEmpty(task)) {
JSONArray ja00 = wo_dis.query("work_status ='00' and iostorinv_id = '" + iostorinv_id + "'").getResultJSONArray(0); JSONArray ja00 = wo_dis.query("work_status ='00' and iostorinv_id = '" + iostorinv_id + "'").getResultJSONArray(0);
JSONArray jatotal = wo_dis.query("iostorinv_id = '" + iostorinv_id + "'").getResultJSONArray(0); JSONArray jatotal = wo_dis.query("iostorinv_id = '" + iostorinv_id + "'").getResultJSONArray(0);
@@ -1847,7 +1851,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
} else { } else {
throw new BadRequestException("存在未确认状态的出库分配记录,不允许强制确认!"); throw new BadRequestException("存在未确认状态的出库分配记录,不允许强制确认!");
} }
} }*/
//查询生成和未分配完的明细 //查询生成和未分配完的明细
JSONArray dtls = WQL.getWO("QST_IVT_CHECKOUTBILL") JSONArray dtls = WQL.getWO("QST_IVT_CHECKOUTBILL")
@@ -2450,7 +2454,11 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
// 订单号 // 订单号
String source_bill_code = jsonDtl.getString("source_bill_code"); String source_bill_code = jsonDtl.getString("source_bill_code");
if (ObjectUtil.isNotEmpty(source_bill_code)) { if (ObjectUtil.isNotEmpty(source_bill_code)) {
try {
oneMap.put("order_no",source_bill_code.substring(0,source_bill_code.indexOf("-"))); oneMap.put("order_no",source_bill_code.substring(0,source_bill_code.indexOf("-")));
} catch (Exception e) {
oneMap.put("order_no",source_bill_code);
}
} }
} }
String pageNow = String.valueOf(j + 1); // 页码 String pageNow = String.valueOf(j + 1); // 页码

View File

@@ -45,6 +45,7 @@
输入.sale_order_name TYPEAS s_string 输入.sale_order_name TYPEAS s_string
输入.box_no TYPEAS s_string 输入.box_no TYPEAS s_string
输入.canuse_qty TYPEAS s_string 输入.canuse_qty TYPEAS s_string
输入.sap_pcsn TYPEAS s_string
[临时表] [临时表]
--这边列出来的临时表就会在运行期动态创建 --这边列出来的临时表就会在运行期动态创建
@@ -456,7 +457,8 @@
mater.material_name, mater.material_name,
mater.material_code, mater.material_code,
unit.unit_name AS qty_unit_name, unit.unit_name AS qty_unit_name,
attr.storagevehicle_code AS box_no attr.storagevehicle_code AS box_no,
sub.sap_pcsn
FROM FROM
ST_IVT_StructIvt ivt ST_IVT_StructIvt ivt
LEFT JOIN md_me_materialbase mater ON mater.material_id = ivt.material_id LEFT JOIN md_me_materialbase mater ON mater.material_id = ivt.material_id
@@ -472,6 +474,10 @@
mater.material_name like 输入.material_code) mater.material_name like 输入.material_code)
ENDOPTION ENDOPTION
OPTION 输入.sap_pcsn <> ""
sub.sap_pcsn like 输入.sap_pcsn
ENDOPTION
OPTION 输入.pcsn <> "" OPTION 输入.pcsn <> ""
ivt.pcsn like 输入.pcsn ivt.pcsn like 输入.pcsn
ENDOPTION ENDOPTION

View File

@@ -57,6 +57,16 @@
class="filter-item" class="filter-item"
/> />
</el-form-item> </el-form-item>
<el-form-item label="sap批次">
<el-input
v-model="query.sap_pcsn"
clearable
size="small"
placeholder="sap批次"
style="width: 200px;"
class="filter-item"
/>
</el-form-item>
<rrOperation :crud="crud" /> <rrOperation :crud="crud" />
</el-form> </el-form>
</div> </div>

View File

@@ -31,6 +31,15 @@
class="filter-item" class="filter-item"
@keyup.enter.native="crud.toQuery" @keyup.enter.native="crud.toQuery"
/> />
<el-input
v-model="query.sap_pcsn"
clearable
size="mini"
placeholder="sap批次"
style="width: 200px;"
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
<rrOperation /> <rrOperation />
</div> </div>
</div> </div>
@@ -50,6 +59,7 @@
<el-table-column show-overflow-tooltip prop="struct_name" label="仓位" /> <el-table-column show-overflow-tooltip prop="struct_name" label="仓位" />
<el-table-column show-overflow-tooltip prop="box_no" label="箱号" /> <el-table-column show-overflow-tooltip prop="box_no" label="箱号" />
<el-table-column show-overflow-tooltip prop="pcsn" label="子卷号" /> <el-table-column show-overflow-tooltip prop="pcsn" label="子卷号" />
<el-table-column show-overflow-tooltip prop="sap_pcsn" label="sap批次" />
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="重量" /> <el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="重量" />
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="重量单位" /> <el-table-column show-overflow-tooltip prop="qty_unit_name" label="重量单位" />
</el-table> </el-table>

View File

@@ -331,7 +331,7 @@ export default {
} else { } else {
this.work_flag = true this.work_flag = true
} }
if (current.bill_status === '50' || current.bill_status === '40') { if (current.bill_status === '50' || current.bill_status === '40' || current.bill_status === '30') {
this.confirm_flag = false this.confirm_flag = false
} else { } else {
this.confirm_flag = true this.confirm_flag = true
@@ -375,6 +375,7 @@ export default {
confirm() { confirm() {
checkoutbill.confirm({ 'iostorinv_id': this.currentRow.iostorinv_id }).then(res => { checkoutbill.confirm({ 'iostorinv_id': this.currentRow.iostorinv_id }).then(res => {
this.querytable() this.querytable()
this.crud.notify('出库成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
}) })
}, },
querytable() { querytable() {