feat: 优化

dev_fifo1.0
chenhc 1 year ago
parent 46ae4e7141
commit b6ac849ce5

@ -13,6 +13,7 @@ import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.controller.BaseController;
import com.glxp.api.entity.auth.AuthAdmin;
import com.glxp.api.entity.dev.DeviceChangeLogEntity;
import com.glxp.api.entity.dev.DeviceChangeOrderItemEntity;
import com.glxp.api.entity.dev.DeviceInfoEntity;
import com.glxp.api.entity.system.SysPdfTemplateRelevanceLabelEntity;
import com.glxp.api.entity.system.SystemPDFTemplateEntity;
@ -389,4 +390,16 @@ public class DeviceInfoController extends BaseController {
return ResultVOUtils.error(ResultEnum.DATA_NOT, "模板错误");
}
/**
*
*
* @return
*/
@AuthRuleAnnotation("")
@PostMapping("/udi/device/info/update")
public BaseResponse updateOrderItem(@RequestBody DeviceInfoEntity entity) {
deviceInfoService.updateOrderItem(entity);
return ResultVOUtils.successMsg("保存成功!");
}
}

@ -101,4 +101,6 @@ public interface DeviceInfoService extends IService<DeviceInfoEntity> {
boolean exitOrder(Long orderId, String deviceCode);
String genDeviceCode();
boolean updateOrderItem(DeviceInfoEntity entity);
}

@ -1,12 +1,15 @@
package com.glxp.api.service.dev.impl;
import cn.hutool.core.util.RandomUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.entity.auth.AuthAdmin;
import com.glxp.api.entity.dev.DeviceChangeOrderItemEntity;
import com.glxp.api.entity.dev.DeviceInfoEntity;
import com.glxp.api.enums.dev.DeviceStatusEnum;
import com.glxp.api.exception.JsonException;
@ -202,6 +205,25 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
} while (deviceInfo != null);
return deviceCode;
}
@Override
public boolean updateOrderItem(DeviceInfoEntity entity) {
String ybbm = entity.getYbbm();
if (StrUtil.isNotEmpty(ybbm) && ybbm.length() >= 7) {
String catalogCode = ybbm.substring(0, 7);
Integer catalogcode1 = Integer.valueOf(ybbm.substring(1, 3));
Integer catalogcode2 = Integer.valueOf(catalogcode1 + ybbm.substring(3, 5));
Integer catalogcode3 = Integer.valueOf(catalogcode2 + ybbm.substring(5, 7));
entity.setCatalogCode1(catalogcode1);
entity.setCatalogCode2(catalogcode2);
entity.setCatalogCode3(catalogcode3);
entity.setCatalogCode(catalogCode);
}
UpdateWrapper<DeviceInfoEntity> uw = new UpdateWrapper<>();
uw.eq("deviceCode",entity.getDeviceCode());
return super.update(entity,uw);
}
}

@ -2485,3 +2485,8 @@ CALL Pro_Temp_ColumnWork('device_check_detail', 'livePath',
CALL Pro_Temp_ColumnWork('device_check_detail', 'suggestion',
' varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT''巡检建议''',
1);
UPDATE auth_menu
SET `menu_name` = '本科室设备', `parent_id` = 1703, `order_num` = 4, `path` = '/dev/deviceInfoSelf', `component` = 'dev/deviceInfoSelf',
`query_param` = NULL, `is_frame` = 1, `is_cache` = 0, `menu_type` = 'C', `visible` = '0', `status` = '0', `perms` = NULL, `icon` = NULL,
`create_by` = '超级用户', `create_time` = '2023-11-22 16:16:48', `update_by` = NULL, `update_time` = NULL, `remark` = NULL WHERE `menu_id` = 2021;

Loading…
Cancel
Save