rev:修改了点位仓位启用禁用同步、新增手持查询立库RGV状态接口
This commit is contained in:
@@ -61,6 +61,7 @@ public class StructattrServiceImpl implements StructattrService {
|
|||||||
map.put("sect_id", (String) whereJson.get("sect_id"));
|
map.put("sect_id", (String) whereJson.get("sect_id"));
|
||||||
map.put("lock_type", (String) whereJson.get("lock_type"));
|
map.put("lock_type", (String) whereJson.get("lock_type"));
|
||||||
map.put("layer_num", (String) whereJson.get("layer_num"));
|
map.put("layer_num", (String) whereJson.get("layer_num"));
|
||||||
|
map.put("is_used", (String) whereJson.get("is_used"));
|
||||||
|
|
||||||
//获取人员对应的仓库
|
//获取人员对应的仓库
|
||||||
UserStorServiceImpl userStorService = new UserStorServiceImpl();
|
UserStorServiceImpl userStorService = new UserStorServiceImpl();
|
||||||
@@ -223,7 +224,7 @@ public class StructattrServiceImpl implements StructattrService {
|
|||||||
}
|
}
|
||||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
String nickName = SecurityUtils.getCurrentNickName();
|
String nickName = SecurityUtils.getCurrentNickName();
|
||||||
String struct_id = json.getString("struct_id");
|
String struct_code = json.getString("struct_code");
|
||||||
String now = DateUtil.now();
|
String now = DateUtil.now();
|
||||||
|
|
||||||
String is_used = "1";
|
String is_used = "1";
|
||||||
@@ -241,7 +242,7 @@ public class StructattrServiceImpl implements StructattrService {
|
|||||||
json.put("update_optid", currentUserId);
|
json.put("update_optid", currentUserId);
|
||||||
json.put("update_optname", nickName);
|
json.put("update_optname", nickName);
|
||||||
json.put("update_time", now);
|
json.put("update_time", now);
|
||||||
WQLObject.getWQLObject("sch_base_point").update(json, " point_id = '" + struct_id + "'");
|
WQLObject.getWQLObject("sch_base_point").update(json, " point_code = '" + struct_code + "'");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -75,6 +75,9 @@
|
|||||||
OPTION 输入.layer_num <> ""
|
OPTION 输入.layer_num <> ""
|
||||||
struct.layer_num = 输入.layer_num
|
struct.layer_num = 输入.layer_num
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
OPTION 输入.is_used <> ""
|
||||||
|
struct.is_used = 输入.is_used
|
||||||
|
ENDOPTION
|
||||||
OPTION 输入.lock_type = "1"
|
OPTION 输入.lock_type = "1"
|
||||||
(struct.storagevehicle_code is null or struct.storagevehicle_code = '')
|
(struct.storagevehicle_code is null or struct.storagevehicle_code = '')
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|||||||
@@ -52,4 +52,11 @@ public class PdaTaskController {
|
|||||||
return new ResponseEntity<>(pdaTaskService.confirm(whereJson), HttpStatus.OK);
|
return new ResponseEntity<>(pdaTaskService.confirm(whereJson), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/rgvStatusQuery")
|
||||||
|
@Log("rgv状态查询")
|
||||||
|
@ApiOperation("rgv状态查询")
|
||||||
|
public ResponseEntity<Object> rgvStatusQuery(@RequestBody JSONObject whereJson) {
|
||||||
|
return new ResponseEntity<>(pdaTaskService.rgvStatusQuery(whereJson), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
package org.nl.wms.pda.task.service;
|
package org.nl.wms.pda.task.service;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import org.nl.modules.wql.core.content.HttpContext;
|
import org.nl.modules.wql.core.content.HttpContext;
|
||||||
|
|
||||||
@@ -31,4 +32,6 @@ public interface PdaTaskService {
|
|||||||
* @return JSONObject /
|
* @return JSONObject /
|
||||||
*/
|
*/
|
||||||
JSONObject confirm(JSONObject whereJson);
|
JSONObject confirm(JSONObject whereJson);
|
||||||
|
|
||||||
|
JSONArray rgvStatusQuery(JSONObject whereJson);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import org.nl.modules.wql.WQL;
|
|||||||
import org.nl.modules.wql.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
import org.nl.modules.wql.core.content.HttpContext;
|
import org.nl.modules.wql.core.content.HttpContext;
|
||||||
import org.nl.modules.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
|
import org.nl.wms.ext.acs.service.WmsToAcsService;
|
||||||
import org.nl.wms.pda.st.service.CoolInService;
|
import org.nl.wms.pda.st.service.CoolInService;
|
||||||
import org.nl.wms.pda.task.service.PdaTaskService;
|
import org.nl.wms.pda.task.service.PdaTaskService;
|
||||||
import org.nl.wms.sch.service.TaskService;
|
import org.nl.wms.sch.service.TaskService;
|
||||||
@@ -31,6 +32,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class PdaTaskServiceImpl implements PdaTaskService {
|
public class PdaTaskServiceImpl implements PdaTaskService {
|
||||||
|
private final WmsToAcsService wmsToAcsService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject taskQuery(JSONObject whereJson) {
|
public JSONObject taskQuery(JSONObject whereJson) {
|
||||||
@@ -38,7 +40,7 @@ public class PdaTaskServiceImpl implements PdaTaskService {
|
|||||||
|
|
||||||
JSONObject map = new JSONObject();
|
JSONObject map = new JSONObject();
|
||||||
map.put("flag", "1");
|
map.put("flag", "1");
|
||||||
if (ObjectUtil.isNotEmpty(search)) map.put("search", "%"+search+"%");
|
if (ObjectUtil.isNotEmpty(search)) map.put("search", "%" + search + "%");
|
||||||
JSONArray resultJSONArray = WQL.getWO("PDA_TASK").addParamMap(map).process().getResultJSONArray(0);
|
JSONArray resultJSONArray = WQL.getWO("PDA_TASK").addParamMap(map).process().getResultJSONArray(0);
|
||||||
|
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
@@ -61,7 +63,7 @@ public class PdaTaskServiceImpl implements PdaTaskService {
|
|||||||
}
|
}
|
||||||
SpringContextHolder.getBean(TaskService.class).operation(jsonTask);
|
SpringContextHolder.getBean(TaskService.class).operation(jsonTask);
|
||||||
|
|
||||||
jsonTask.put("task_status","05");
|
jsonTask.put("task_status", "05");
|
||||||
tab.update(jsonTask);
|
tab.update(jsonTask);
|
||||||
|
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
@@ -85,4 +87,11 @@ public class PdaTaskServiceImpl implements PdaTaskService {
|
|||||||
result.put("message", "操作完成");
|
result.put("message", "操作完成");
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONArray rgvStatusQuery(JSONObject whereJson) {
|
||||||
|
JSONArray rows = WQL.getWO("PDA_TASK").addParam("flag", "2").process().getResultJSONArray(0);
|
||||||
|
JSONObject jo = wmsToAcsService.getHotPointStatus(rows);
|
||||||
|
return jo.getJSONArray("data");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,4 +83,16 @@
|
|||||||
|
|
||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDQUERY
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
IF 输入.flag = "2"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
point_code AS device_code
|
||||||
|
FROM
|
||||||
|
sch_point_code
|
||||||
|
WHERE
|
||||||
|
point_code like 'RGV%'
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
@@ -154,7 +154,7 @@ public class HotPointIvtServiceImpl implements HotPointIvtService {
|
|||||||
String userName = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_USERNAME").getValue();
|
String userName = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_USERNAME").getValue();
|
||||||
String passWord = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_PASSWORD").getValue();
|
String passWord = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_PASSWORD").getValue();
|
||||||
param.put("iContainerName", form.getString("container_name"));
|
param.put("iContainerName", form.getString("container_name"));
|
||||||
param.put("iResourceName", form.getString(""));
|
param.put("iResourceName", form.getString("ext_code"));
|
||||||
param.put("iMoveInDate", DateUtil.now());
|
param.put("iMoveInDate", DateUtil.now());
|
||||||
param.put("iPlanBakingTemperature", form.getDoubleValue("temperature"));
|
param.put("iPlanBakingTemperature", form.getDoubleValue("temperature"));
|
||||||
param.put("iPlanBakingTimer", form.getDoubleValue("oven_time"));
|
param.put("iPlanBakingTimer", form.getDoubleValue("oven_time"));
|
||||||
|
|||||||
@@ -205,10 +205,10 @@ public class PointServiceImpl implements PointService {
|
|||||||
public void changeActive(JSONObject json) {
|
public void changeActive(JSONObject json) {
|
||||||
|
|
||||||
//如果是仓位点位,更新状态前,先去查询仓位点位所对应的库区是否启用,如果禁用抛出异常
|
//如果是仓位点位,更新状态前,先去查询仓位点位所对应的库区是否启用,如果禁用抛出异常
|
||||||
String struct_id = json.getString("point_id");
|
String struct_code = json.getString("point_code");
|
||||||
String point_type = json.getString("point_type");
|
String point_type = json.getString("point_type");
|
||||||
if (point_type.equals("01")) {
|
if (point_type.equals("01")) {
|
||||||
JSONObject st_ivt_bsRealStorAttr = WQLObject.getWQLObject("ST_IVT_StructAttr").query(" struct_id = '" + struct_id + "'").uniqueResult(0);
|
JSONObject st_ivt_bsRealStorAttr = WQLObject.getWQLObject("ST_IVT_StructAttr").query(" struct_code = '" + struct_code + "'").uniqueResult(0);
|
||||||
if (ObjectUtil.isNotEmpty(st_ivt_bsRealStorAttr)) {
|
if (ObjectUtil.isNotEmpty(st_ivt_bsRealStorAttr)) {
|
||||||
String sect_id = st_ivt_bsRealStorAttr.getString("sect_id");
|
String sect_id = st_ivt_bsRealStorAttr.getString("sect_id");
|
||||||
JSONObject st_ivt_sectAttr = WQLObject.getWQLObject("ST_IVT_SectAttr").query(" sect_id = '" + sect_id + "' and is_used = '1'").uniqueResult(0);
|
JSONObject st_ivt_sectAttr = WQLObject.getWQLObject("ST_IVT_SectAttr").query(" sect_id = '" + sect_id + "' and is_used = '1'").uniqueResult(0);
|
||||||
@@ -238,8 +238,8 @@ public class PointServiceImpl implements PointService {
|
|||||||
json.put("update_optid", currentUserId);
|
json.put("update_optid", currentUserId);
|
||||||
json.put("update_optname", nickName);
|
json.put("update_optname", nickName);
|
||||||
json.put("update_time", now);
|
json.put("update_time", now);
|
||||||
json.put("struct_id", struct_id);
|
json.put("struct_code", struct_code);
|
||||||
WQLObject.getWQLObject("ST_IVT_StructAttr").update(json, " struct_id = '" + struct_id + "'");
|
WQLObject.getWQLObject("ST_IVT_StructAttr").update(json, " struct_code = '" + struct_code + "'");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -45,6 +45,16 @@
|
|||||||
@keyup.enter.native="crud.toQuery"
|
@keyup.enter.native="crud.toQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="是否启用">
|
||||||
|
<el-switch
|
||||||
|
v-model="query.is_used"
|
||||||
|
active-value="0"
|
||||||
|
inactive-value="1"
|
||||||
|
active-color="#C0CCDA"
|
||||||
|
inactive-color="#409EFF"
|
||||||
|
@change="hand"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
<rrOperation />
|
<rrOperation />
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -503,10 +503,9 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
changeUsed(data, flag) { // 更改启用状态
|
changeUsed(data, flag) { // 更改启用状态
|
||||||
const param = {}
|
const param = data[0]
|
||||||
param.data = data
|
param.lock_type = flag
|
||||||
param.used = flag
|
crudPoint.changeActive(param).then(res => {
|
||||||
crudPoint.changeUsed(param).then(res => {
|
|
||||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user