This commit is contained in:
18188916393
2022-09-28 21:39:39 +08:00
10 changed files with 49 additions and 22 deletions

View File

@@ -276,11 +276,12 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
String molten_pool = json.getString("molten_pool"); String molten_pool = json.getString("molten_pool");
String weight = json.getString("weight"); String weight = json.getString("weight");
String qty = json.getString("plan_qty"); String qty = json.getString("plan_qty");
String product_type = json.getString("product_type");
String product_code = json.getString("product_code"); String product_code = json.getString("product_code");
String AlongSide = json.getString("AlongSide"); String AlongSide = json.getString("alongside");
String BshortSide = json.getString("BshortSide"); String BshortSide = json.getString("bshortside");
String Htrapezoidal = json.getString("Htrapezoidal"); String Htrapezoidal = json.getString("htrapezoidal");
String Wthickness = json.getString("Wthickness"); String Wthickness = json.getString("wthickness");
if (StrUtil.isEmpty(producetask_code)) { if (StrUtil.isEmpty(producetask_code)) {
throw new WDKException("工单号不能为空"); throw new WDKException("工单号不能为空");
@@ -375,7 +376,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
//下发成功后,写入工单信息表记录 //下发成功后,写入工单信息表记录
ProduceshiftorderDto dto = new ProduceshiftorderDto(); ProduceshiftorderDto dto = new ProduceshiftorderDto();
dto.setOrder_code(producetask_code); dto.setOrder_code(producetask_code);
dto.setProduct_code(product_code); dto.setProduct_type(product_type);
dto.setDevice_code(device_code); dto.setDevice_code(device_code);
dto.setOrder_status("0"); dto.setOrder_status("0");
dto.setMaterial_code(material_code); dto.setMaterial_code(material_code);

View File

@@ -28,7 +28,7 @@ public class ProduceshiftorderDto implements Serializable {
private String qty; private String qty;
/** 产品编码 */ /** 产品编码 */
private String product_code; private String product_type;
/** 物料编码 */ /** 物料编码 */
private String material_code; private String material_code;

View File

@@ -140,7 +140,7 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService {
map.put("设备编码", produceshiftorder.getDevice_code()); map.put("设备编码", produceshiftorder.getDevice_code());
map.put("工单状态", produceshiftorder.getOrder_status()); map.put("工单状态", produceshiftorder.getOrder_status());
map.put("下料数量", produceshiftorder.getQty()); map.put("下料数量", produceshiftorder.getQty());
map.put("产品编码", produceshiftorder.getProduct_code()); map.put("工单类型", produceshiftorder.getProduct_type());
map.put("物料编码", produceshiftorder.getMaterial_code()); map.put("物料编码", produceshiftorder.getMaterial_code());
map.put("物料名称", produceshiftorder.getMaterial_name()); map.put("物料名称", produceshiftorder.getMaterial_name());
map.put("物料标识", produceshiftorder.getMaterial_uuid()); map.put("物料标识", produceshiftorder.getMaterial_uuid());
@@ -172,7 +172,7 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService {
//判断是否为wms下发的排产单 //判断是否为wms下发的排产单
String hasWms = acsConfigService.findConfigFromCache().get(AcsConfig.HASWMS); String hasWms = acsConfigService.findConfigFromCache().get(AcsConfig.HASWMS);
if (StrUtil.isNotEmpty(dto.getProduct_code()) && hasWms.equals("1")) { if (StrUtil.isNotEmpty(dto.getProduct_type()) && hasWms.equals("1")) {
JSONObject json = new JSONObject(); JSONObject json = new JSONObject();
json.put("producetask_code",dto.getOrder_code()); json.put("producetask_code",dto.getOrder_code());
json.put("device_code",dto.getDevice_code()); json.put("device_code",dto.getDevice_code());

View File

@@ -49,7 +49,7 @@
prod.order_code, prod.order_code,
prod.order_status, prod.order_status,
prod.qty, prod.qty,
prod.product_code, prod.product_type,
prod.material_code, prod.material_code,
prod.material_name, prod.material_name,
prod.material_uuid, prod.material_uuid,

View File

@@ -99,13 +99,15 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div style="margin: 3px; min-height: 80vh"> <div style="margin: 3px; min-height: 80vh;">
<!--数据判空--> <!--数据判空-->
<el-empty v-if="showEmpty" :description="emptyText" /> <el-empty v-if="showEmpty" :description="emptyText" />
<!--数据加载--> <!--数据加载-->
<el-card v-else shadow="hover"> <el-card v-else shadow="hover" style="width: 100%" class="log-warpper">
<div v-for="(log, index) in logs" :key="index"> <div style="width: 100%">
<div style="margin-bottom: 5px; font-size: 12px; width: 100%" v-html="log[1]" /> <div v-for="(log, index) in logs" :key="index" >
<div style="margin-bottom: 5px; font-size: 12px;" v-html="log[1]" />
</div>
</div> </div>
</el-card> </el-card>
</div> </div>
@@ -461,5 +463,8 @@ export default {
</script> </script>
<style scoped> <style scoped>
.log-warpper {
word-break: break-word;
word-wrap: break-word
}
</style> </style>

View File

@@ -2,6 +2,7 @@
package org.nl.wms.Cribbing.service.impl; package org.nl.wms.Cribbing.service.impl;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.nl.exception.BadRequestException; import org.nl.exception.BadRequestException;
@@ -37,9 +38,19 @@ public class CribbinginfoServiceImpl implements CribbinginfoService {
@Override @Override
public Map<String, Object> queryAll(Map whereJson, Pageable page) { public Map<String, Object> queryAll(Map whereJson, Pageable page) {
// WQLObject wo = WQLObject.getWQLObject("md_me_cribbinginfo");
// ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), "1=1", "update_time desc");
// final JSONObject json = rb.pageResult();
// return json;
WQLObject wo = WQLObject.getWQLObject("md_me_cribbinginfo"); WQLObject wo = WQLObject.getWQLObject("md_me_cribbinginfo");
ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), "1=1", "update_time desc"); String name = (String) whereJson.get("name");
String sql = "1=1";
if (StrUtil.isNotEmpty(name)) {
sql = " (material_code like '%" + name + "%' OR material_name like '%" + name + "%')";
}
ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), sql + " and is_delete='0'", "update_time desc");
final JSONObject json = rb.pageResult(); final JSONObject json = rb.pageResult();
log.info("json:{}", json);
return json; return json;
} }

View File

@@ -300,7 +300,7 @@ public class ProducetaskServiceImpl implements ProducetaskService {
taskObj = WQL.getWO("PDM_ProduceTask_01").addParam("flag", "4").addParam("producetask_id", producetask_id).process().uniqueResult(0); taskObj = WQL.getWO("PDM_ProduceTask_01").addParam("flag", "4").addParam("producetask_id", producetask_id).process().uniqueResult(0);
} }
taskObj.put("product_code", "wms"); taskObj.put("product_type", "wms");
WmsToAcsService wmsToAcsService = SpringContextHolder.getBean(WmsToAcsService.class); WmsToAcsService wmsToAcsService = SpringContextHolder.getBean(WmsToAcsService.class);
JSONArray arr = new JSONArray(); JSONArray arr = new JSONArray();
arr.add(taskObj); arr.add(taskObj);

View File

@@ -44,7 +44,7 @@ import cn.hutool.core.util.ObjectUtil;
@Slf4j @Slf4j
public class WorkprocedureiosServiceImpl implements WorkprocedureiosService { public class WorkprocedureiosServiceImpl implements WorkprocedureiosService {
private final String THIS_CLASS = SendMaterialTask.class.getName(); private final String THIS_CLASS = SendMaterialTask.class.getName();
private SendMaterialTask sendMaterialTask;
@Override @Override
public Map<String, Object> queryAll(Map whereJson, Pageable page) { public Map<String, Object> queryAll(Map whereJson, Pageable page) {
@@ -238,7 +238,7 @@ public class WorkprocedureiosServiceImpl implements WorkprocedureiosService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void genTask(JSONObject taskJson) { public void genTask(JSONObject taskJson) {
SendMaterialTask sendMaterialTask = new SendMaterialTask();
String iostorinv_id = taskJson.getString("iostorinv_id"); String iostorinv_id = taskJson.getString("iostorinv_id");
WQLObject wo = WQLObject.getWQLObject("st_ivt_workprocedureios"); WQLObject wo = WQLObject.getWQLObject("st_ivt_workprocedureios");
JSONObject jsonObject = wo.query("iostorinv_id = '" + iostorinv_id + "'").uniqueResult(0); JSONObject jsonObject = wo.query("iostorinv_id = '" + iostorinv_id + "'").uniqueResult(0);

View File

@@ -4,16 +4,26 @@
<div class="head-container"> <div class="head-container">
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'--> <!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission" /> <crudOperation :permission="permission" />
<el-input
v-model="query.name"
size="small"
clearable
placeholder="输入物料名称或编码"
style="width: 200px;"
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
<rrOperation />
<!--表单组件--> <!--表单组件-->
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px"> <el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" size="mini" label-width="100px">
<el-form-item v-if = "false" label="物料标志"> <el-form-item v-if="false" label="物料标志">
<el-input v-model="form.material_id" style="width: 370px;" /> <el-input v-model="form.material_id" style="width: 370px;" />
</el-form-item> </el-form-item>
<el-form-item label="物料编码"> <el-form-item label="物料编码">
<el-input v-model="form.material_code" style="width: 370px;" @focus="getMater"/> <el-input v-model="form.material_code" style="width: 370px;" @focus="getMater" />
</el-form-item> </el-form-item>
<el-form-item v-if = "false" label="物料名称 "> <el-form-item v-if="false" label="物料名称 ">
<el-input v-model="form.material_name" style="width: 370px;" /> <el-input v-model="form.material_name" style="width: 370px;" />
</el-form-item> </el-form-item>
<el-form-item label="产品编号"> <el-form-item label="产品编号">
@@ -292,7 +302,7 @@ export default {
components: { pagination, crudOperation, rrOperation, udOperation, MaterDialog }, components: { pagination, crudOperation, rrOperation, udOperation, MaterDialog },
mixins: [presenter(), header(), form(defaultForm), crud()], mixins: [presenter(), header(), form(defaultForm), crud()],
cruds() { cruds() {
return CRUD({title: '基础垛形参数', url: 'api/cribbinginfo', idField: 'info_id', sort: 'info_id,desc', crudMethod: { ...crudCribbinginfo }}) return CRUD({ title: '基础垛形参数', url: 'api/cribbinginfo', idField: 'info_id', sort: 'info_id,desc', crudMethod: { ...crudCribbinginfo }})
}, },
data() { data() {
return { return {