This commit is contained in:
2022-06-30 10:50:07 +08:00
parent 22fac97060
commit ca134703bf
2 changed files with 21 additions and 15 deletions

View File

@@ -77,29 +77,28 @@ public class Test3 extends BaseTest {
String now = DateUtil.now(); String now = DateUtil.now();
WQLObject tab= WQLObject.getWQLObject("acs_opc"); WQLObject tab= WQLObject.getWQLObject("acs_opc");
WQLObject tab_plc= WQLObject.getWQLObject("acs_opc_plc"); WQLObject tab_plc= WQLObject.getWQLObject("acs_opc_plc");
JSONArray resultJSONArray = tab.query("opc_code like '%TW'","opc_code").getResultJSONArray(0); JSONArray resultJSONArray = tab.query("opc_code like 'XY%'","opc_code").getResultJSONArray(0);
/* for (int i = 3; i < resultJSONArray.size(); i++) { for (int i = 0; i < resultJSONArray.size(); i++) {
final JSONObject jsonObject = resultJSONArray.getJSONObject(i); JSONObject jsonObject = resultJSONArray.getJSONObject(i);
JSONObject map = new JSONObject(); JSONObject map = new JSONObject();
map.put("plc_id",IdUtil.simpleUUID()); map.put("plc_id",IdUtil.simpleUUID());
map.put("plc_code",jsonObject.getString("opc_code")); map.put("plc_code",jsonObject.getString("opc_code"));
map.put("plc_name",jsonObject.getString("opc_name")); map.put("plc_name",jsonObject.getString("opc_name"));
map.put("opc_server_id",jsonObject.getString("opc_id")); map.put("opc_server_id",jsonObject.getString("opc_id"));
if (i <= 28){ map.put("plc_host","192.168.47." + (51 + i));
map.put("plc_host","192.168.47." + (162 + i));
} /* if (i >= 12 && i < 21){
if (i > 28 && i <= 42){
map.put("plc_host","192.168.47." + (102 + i)); map.put("plc_host","192.168.47." + (102 + i));
} }
if (i > 42 && i <= 57){ if (i > 42 && i <= 57){
map.put("plc_host","192.168.47." + (51 + i)); map.put("plc_host","192.168.47." + (51 + i));
} }*/
map.put("create_by",currentUsername); map.put("create_by",currentUsername);
map.put("create_time",now); map.put("create_time",now);
map.put("update_by",currentUsername); map.put("update_by",currentUsername);
map.put("update_name",now); map.put("update_name",now);
tab_plc.insert(map); tab_plc.insert(map);
}*/ }
/* for (int i = 5; i < 29; i++) { /* for (int i = 5; i < 29; i++) {
JSONObject map = new JSONObject(); JSONObject map = new JSONObject();
map.put("opc_id",IdUtil.simpleUUID()); map.put("opc_id",IdUtil.simpleUUID());
@@ -122,15 +121,15 @@ public class Test3 extends BaseTest {
map.put("update_name",now); map.put("update_name",now);
tab.insert(map); tab.insert(map);
}*/ }*/
for (int i = 1; i <= 13; i++) { /* for (int i = 1; i <= 21; i++) {
JSONObject map = new JSONObject(); JSONObject map = new JSONObject();
map.put("opc_id",IdUtil.simpleUUID()); map.put("opc_id",IdUtil.simpleUUID());
if (i < 10){ if (i < 10){
map.put("opc_code","KZ0"+i); map.put("opc_code","XY0"+i);
map.put("opc_name","KZ0"+i); map.put("opc_name","KZ0"+i);
} else { } else {
map.put("opc_code","KZ"+i); map.put("opc_code","XY"+i);
map.put("opc_name","KZ"+i); map.put("opc_name","XY"+i);
} }
map.put("opc_host","192.168.46.225"); map.put("opc_host","192.168.46.225");
map.put("user","administrator"); map.put("user","administrator");
@@ -143,7 +142,7 @@ public class Test3 extends BaseTest {
map.put("update_by",currentUsername); map.put("update_by",currentUsername);
map.put("update_name",now); map.put("update_name",now);
tab.insert(map); tab.insert(map);
} }*/
} }
@Test @Test

View File

@@ -60,6 +60,12 @@
<el-option v-for="item in deviceList" :key="item.device_code" :label="item.device_code" :value="item.device_code" /> <el-option v-for="item in deviceList" :key="item.device_code" :label="item.device_code" :value="item.device_code" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="是否agv搬运" prop="is_needmove">
<el-radio-group v-model="form.is_needmove" size="mini">
<el-radio-button label="1">是</el-radio-button>
<el-radio-button label="0">否</el-radio-button>
</el-radio-group>
</el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="text" @click="crud.cancelCU">取消</el-button> <el-button type="text" @click="crud.cancelCU">取消</el-button>
@@ -120,7 +126,8 @@ const defaultForm = {
update_time: null, update_time: null,
is_deleted: null, is_deleted: null,
ext_order_id: null, ext_order_id: null,
device_code: null device_code: null,
is_needmove: '1'
} }
export default { export default {
name: 'Produceshiftorder', name: 'Produceshiftorder',