fix: 斗山国际化开发

This commit is contained in:
2024-08-08 13:34:31 +08:00
parent 542f96b539
commit f729b25c98
14 changed files with 174 additions and 96 deletions

View File

@@ -419,8 +419,8 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
@Override
public Map<String, Object> updateTask(String whereJson) {
JSONArray datas = JSONArray.parseArray(whereJson);
log.info("WMS更新任务点位状态--------------:输入参数" + datas.toString());
JSONObject jsonObject = JSON.parseObject(whereJson);
log.info("WMS更新任务点位状态--------------:输入参数" + jsonObject.toString());
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code("WMS更新任务点位状态")
.content("WMS更新任务点位状态-----输入参数:" + whereJson)
@@ -428,24 +428,14 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto);
JSONArray errArr = new JSONArray();
if (datas.size() > 0) {
for (int i = 0; i < datas.size(); i++) {
JSONObject jsonObject = datas.getJSONObject(i);
String device_code = jsonObject.getString("device_code");
//1-允许取放;
String option = jsonObject.getString("option");
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver;
Device device_k = deviceAppService.findDeviceByCode(device_code);
Device device_m = deviceAppService.findDeviceByCode(device_code);
if (device_k.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device_k.getDeviceDriver();
standardOrdinarySiteDeviceDriver.setOption(Integer.parseInt(option));
}
if (device_m.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device_m.getDeviceDriver();
standardOrdinarySiteDeviceDriver.setOption(Integer.parseInt(option));
}
}
String device_code = jsonObject.getString("device_code");
//1-允许取放;
String option = jsonObject.getString("option");
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver;
Device device_k = deviceAppService.findDeviceByCode(device_code);
if (device_k.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device_k.getDeviceDriver();
standardOrdinarySiteDeviceDriver.setOption(Integer.parseInt(option));
}
JSONObject resultJson = new JSONObject();
if (ObjectUtil.isEmpty(errArr)) {
@@ -458,6 +448,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
resultJson.put("errArr", errArr);
}
}
LuceneLogDto logDto1 = LuceneLogDto.builder()
.device_code("WMS更新任务点位状态")
.content("WMS更新任务点位状态-----返回参数:" + resultJson)
@@ -508,7 +499,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
InflatableShaftLibraryDeviceDriver inflatableShaftLibraryDeviceDriver;
HongXiangStationDeviceDriver hongXiangStationDeviceDriver;
LampThreecolorDeviceDriver lampThreecolorDeviceDriver;
BeltConveyorDeviceDriver beltConveyorDeviceDriver ;
BeltConveyorDeviceDriver beltConveyorDeviceDriver;
WasteFoilWeighingStationDriver wasteFoilWeighingStationDriver;
FoldDiscSiteDeviceDriver foldDiscSiteDeviceDriver;
if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) {
@@ -520,7 +511,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
lampThreecolorDeviceDriver.writing(code, value);
}
if (device.getDeviceDriver() instanceof BeltConveyorDeviceDriver) {
beltConveyorDeviceDriver=(BeltConveyorDeviceDriver) device.getDeviceDriver();
beltConveyorDeviceDriver = (BeltConveyorDeviceDriver) device.getDeviceDriver();
beltConveyorDeviceDriver.writing(code, value);
}
if (device.getDeviceDriver() instanceof InflatableShaftLibraryDeviceDriver) {
@@ -587,11 +578,11 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
wasteFoilWeighingStationDriver.writing("to_command", "6");
Thread.sleep(1000); //休眠1秒
while (wasteFoilWeighingStationDriver.getMode() == 6) {
jo.put("currentWeight", wasteFoilWeighingStationDriver.getWeight());//当前重量
jo.put("lastWeight", wasteFoilWeighingStationDriver.getOld_weight());//上一次重量
jo.put("weightGap", wasteFoilWeighingStationDriver.getGap_weight());//重量差
break;
}
jo.put("currentWeight", wasteFoilWeighingStationDriver.getWeight());//当前重量
jo.put("lastWeight", wasteFoilWeighingStationDriver.getOld_weight());//上一次重量
jo.put("weightGap", wasteFoilWeighingStationDriver.getGap_weight());//重量差
break;
}
wasteFoilWeighingStationDriver.writing("to_command", "0");
}
//称重确认信号
@@ -599,10 +590,10 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
wasteFoilWeighingStationDriver.writing("to_command", "7");
Thread.sleep(1000); //休眠1秒
while (wasteFoilWeighingStationDriver.getMode() == 7) {
jo.put("currentWeight", wasteFoilWeighingStationDriver.getWeight());//当前重量
jo.put("lastWeight", wasteFoilWeighingStationDriver.getOld_weight());//上一次重量
jo.put("weightGap", wasteFoilWeighingStationDriver.getGap_weight());//重量差
break;
jo.put("currentWeight", wasteFoilWeighingStationDriver.getWeight());//当前重量
jo.put("lastWeight", wasteFoilWeighingStationDriver.getOld_weight());//上一次重量
jo.put("weightGap", wasteFoilWeighingStationDriver.getGap_weight());//重量差
break;
}
wasteFoilWeighingStationDriver.writing("to_command", "0");
}
@@ -649,11 +640,11 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
PaperTubePickSiteDeviceDriver paperTubePickSiteDeviceDriver;
if (device.getDeviceDriver() instanceof PaperTubePickSiteDeviceDriver) {
paperTubePickSiteDeviceDriver = (PaperTubePickSiteDeviceDriver) device.getDeviceDriver();
if (ObjectUtil.isEmpty(to_material)){
if (ObjectUtil.isEmpty(to_material)) {
map.put("to_material", "0");
map.put("to_spec", "0");
map.put("to_qty", "0");
}else {
} else {
map.put("to_material", to_material);
map.put("to_spec", to_spec);
map.put("to_qty", to_qty);
@@ -857,8 +848,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
jo.put("qty", foldDiscSiteDeviceDriver.getQty());
jo.put("container_type", foldDiscSiteDeviceDriver.getContainer_type());
jo.put("error", foldDiscSiteDeviceDriver.getError());
}
else if (device.getDeviceDriver() instanceof InflatableShaftLibraryDeviceDriver) {
} else if (device.getDeviceDriver() instanceof InflatableShaftLibraryDeviceDriver) {
inflatableShaftLibraryDeviceDriver = (InflatableShaftLibraryDeviceDriver) device.getDeviceDriver();
jo.put("device_code", parent_device_code);
jo.put("move", inflatableShaftLibraryDeviceDriver.getMove());

View File

@@ -73,6 +73,11 @@ public class SysMenu implements Serializable {
*/
private String in_title;
/**
* 菜单标题
*/
private String ko_title;
/**
* 组件名称
*/

View File

@@ -37,6 +37,7 @@ public class MenuDto extends BaseDTO implements Serializable {
private String zh_title;
private String en_title;
private String in_title;
private String ko_title;
private Integer menu_sort;
@@ -104,6 +105,9 @@ public class MenuDto extends BaseDTO implements Serializable {
if ("zh".equals(local)){
return zh_title;
}
if ("ko".equals(local)){
return ko_title;
}
return title;
}
}

View File

@@ -219,6 +219,7 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
sysDictMapper.delete(new QueryWrapper<Dict>().eq("para1",menu.getMenu_id()));
}
menu.setTitle(resources.getTitle());
menu.setKo_title(resources.getKo_title());
menu.setComponent(resources.getComponent());
menu.setPath(resources.getPath());
menu.setIcon(resources.getIcon());
@@ -366,6 +367,7 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
menuDto.setIn_title(entity.getIn_title());
menuDto.setEn_title(entity.getEn_title());
menuDto.setZh_title(entity.getZh_title());
menuDto.setKo_title(entity.getKo_title());
menuDto.setMenu_sort(entity.getMenu_sort());
menuDto.setPath(entity.getPath());
menuDto.setComponent(entity.getComponent());

View File

@@ -6,7 +6,7 @@ spring:
freemarker:
check-template-location: false
profiles:
active: dev
active: prod
jackson:
time-zone: GMT+8
data: