master
guochaojie 3 months ago
parent 23f2679d98
commit 6519df03b6

@ -12,6 +12,6 @@
nx_recycle_device a
${ew.customSqlSegment}
and
a.id not in (SELECT device_id from nx_recycle_staff_device where f_delete_mark is null)
not exists (select 1 from nx_recycle_staff_device b where a.device_code=b.device_code)
</select>
</mapper>

@ -221,6 +221,7 @@ public class RecycleCleanOrderServiceImpl extends ServiceImpl<RecycleCleanOrderM
//排序
if (StringUtil.isEmpty(recycleCleanOrderPagination.getSidx())) {
recycleCleanOrderQueryWrapper.lambda().orderByDesc(RecycleCleanOrderEntity::getCreatorTime);
recycleCleanOrderQueryWrapper.lambda().orderByDesc(RecycleCleanOrderEntity::getId);
} else {
try {

@ -388,6 +388,7 @@ public class RecycleDeliveryOrderServiceImpl extends ServiceImpl<RecycleDelivery
//排序
if (StringUtil.isEmpty(recycleDeliveryOrderPagination.getSidx())) {
recycleDeliveryOrderQueryWrapper.lambda().orderByDesc(RecycleDeliveryOrderEntity::getCreatorTime);
recycleDeliveryOrderQueryWrapper.lambda().orderByDesc(RecycleDeliveryOrderEntity::getId);
} else {
try {
@ -409,6 +410,7 @@ public class RecycleDeliveryOrderServiceImpl extends ServiceImpl<RecycleDelivery
recycleDeliveryOrderQueryWrapper.lambda().isNull(RecycleDeliveryOrderEntity::getDeleteMark);
if ("0".equals(dataType)) {
if ((total > 0 && AllIdList.size() > 0) || total == 0) {
Page<RecycleDeliveryOrderEntity> page = new Page<>(recycleDeliveryOrderPagination.getCurrentPage(), recycleDeliveryOrderPagination.getPageSize());

@ -271,6 +271,7 @@ public class RecycleDeviceEventServiceImpl extends ServiceImpl<RecycleDeviceEven
//排序
if (StringUtil.isEmpty(recycleDeviceEventPagination.getSidx())) {
recycleDeviceEventQueryWrapper.lambda().orderByDesc(RecycleDeviceEventEntity::getCreateTime);
recycleDeviceEventQueryWrapper.lambda().orderByDesc(RecycleDeviceEventEntity::getId);
} else {
try {
@ -290,6 +291,7 @@ public class RecycleDeviceEventServiceImpl extends ServiceImpl<RecycleDeviceEven
recycleDeviceEventQueryWrapper.lambda().eq(RecycleDeviceEventEntity::getCompanyId, userProvider.get().getOrganizeId());
}
if ("0".equals(dataType)) {
if ((total > 0 && AllIdList.size() > 0) || total == 0) {
Page<RecycleDeviceEventEntity> page = new Page<>(recycleDeviceEventPagination.getCurrentPage(), recycleDeviceEventPagination.getPageSize());

@ -457,8 +457,9 @@ public class RecycleDeviceServiceImpl extends ServiceImpl<RecycleDeviceMapper, R
QueryWrapper<RecycleDeviceEntity> queryWrapper = new QueryWrapper<>();
// queryWrapper.eq("a.document_type",voucherPagination.getDocumentType());
queryWrapper.notIn(ObjectUtils.isNotEmpty(recycleDevicePagination.getExcludeIdList()), "a.id", recycleDevicePagination.getExcludeIdList());
queryWrapper.notIn(ObjectUtils.isNotEmpty(recycleDevicePagination.getExcludeIdList()), "a.device_code", recycleDevicePagination.getExcludeIdList());
queryWrapper.eq("a.be_long_station_id", recycleDevicePagination.getStationId());
queryWrapper.isNull("a.f_delete_mark");
Page<RecycleDeviceEntity> page = new Page<>(recycleDevicePagination.getCurrentPage(), recycleDevicePagination.getPageSize());
IPage<RecycleDeviceEntity> voucherEntityIPage = recycleDeviceMapper.QueryRecycleDevice(page, queryWrapper);

@ -85,7 +85,7 @@ public class RecycleDeviceConfigOneController {
/**
*
*
* @param recycleDeviceConfigOnePagination
* @param
* @return
*/
@Operation(summary = "获取用户配置")

@ -29,7 +29,6 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
/**
*
@ -269,8 +268,7 @@ public class RecycleDeviceController {
UserInfo userInfo = userProvider.get();
Date nowDate = DateUtil.getNowDate();
boolean exists = redisUtil.exists("online_" + command.getDeviceCode());
Long liveTime = redisUtil.getLiveTime("online_" + command.getDeviceCode());
if (!exists || liveTime < 0) {
if (!exists ) {
return ActionResult.fail("设备不在线!");
}
String deviceCode = command.getDeviceCode();
@ -306,6 +304,7 @@ public class RecycleDeviceController {
String organizeId = userInfo.getOrganizeId();
QueryWrapper<RecycleDeviceEntity> wrapper = new QueryWrapper<>();
LambdaQueryWrapper<RecycleDeviceEntity> lambda = wrapper.lambda();
lambda.isNull(RecycleDeviceEntity::getDeleteMark);
if (!isAdministrator) {
lambda.eq(RecycleDeviceEntity::getBeLongCompanyId, organizeId);
}

@ -89,7 +89,7 @@ public class CustomerMqttClient {
public void publish(String topic, String msg, int qos, boolean retained) {
MqttMessage message = new MqttMessage();
message.setPayload(msg.getBytes());
message.setPayload(msg.getBytes(StandardCharsets.UTF_8));
message.setQos(qos);
message.setRetained(retained);
MqttTopic mqttTopic = client.getTopic(topic);

@ -12,7 +12,7 @@ public enum CMDEnum {
apply("apply", "申请控制"),
exit("exit", "结束控制"),
weight("weight", "获取重量"),
change("change", "配置更新"),
refresh("refresh", "配置更新"),
reboot("reboot", "重启设备"),
restart("restart", "重启应用"),
update("update", "更新应用"),

@ -2,8 +2,6 @@ package jnpf.model.recycledevice;
import lombok.Data;
import java.util.Map;
@Data
public class Command {
private String orderNo;

Loading…
Cancel
Save