问题修改

This commit is contained in:
jiang 2025-09-22 18:53:28 +08:00
parent 264d2c96ad
commit 742a8b31c4
5 changed files with 50 additions and 44 deletions

View File

@ -58,6 +58,7 @@ public class DevMergeController extends BaseController {
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, list)); return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, list));
} }
/** /**
* 获取台账中设备信息详细信息 * 获取台账中设备信息详细信息
*/ */

View File

@ -187,4 +187,5 @@ public class DevInfoVo extends DevInfo {
private String devSubcategory; private String devSubcategory;
private String devName; private String devName;
private String devModel; private String devModel;
} }

View File

@ -402,16 +402,16 @@ public class DevInfoServiceImpl implements DevInfoService {
if (devInfo == null) { if (devInfo == null) {
return AjaxResult.error("设备信息不能为空"); return AjaxResult.error("设备信息不能为空");
} }
if (!"2".equals(devInfo.getType())) { /* if (!"2".equals(devInfo.getType())) {
if (ObjectUtil.isEmpty(devInfo.getMainFileList())) { if (ObjectUtil.isEmpty(devInfo.getMainFileList())) {
return AjaxResult.error("主展示图不能为空"); return AjaxResult.error("主展示图不能为空");
} }
if (ObjectUtil.isEmpty(devInfo.getDetailsFileList())) { if (ObjectUtil.isEmpty(devInfo.getDetailsFileList())) {
return AjaxResult.error("详情页展示图不能为空"); return AjaxResult.error("详情页展示图不能为空");
} }
} }*/
String code = ""; String code = "";
for (int i = 0; i < devInfo.getTableList().size(); i++) { /* for (int i = 0; i < devInfo.getTableList().size(); i++) {*/
//获取用户信息 //获取用户信息
Long userId = SecurityUtils.getLoginUser().getUserid(); Long userId = SecurityUtils.getLoginUser().getUserid();
//保存用户信息 //保存用户信息
@ -422,9 +422,9 @@ public class DevInfoServiceImpl implements DevInfoService {
code = getString(); code = getString();
} }
devInfo.setCode(code); devInfo.setCode(code);
devInfo.setCompanyId(SecurityUtils.getLoginUser().getSysUser().getCompanyId().toString()); //devInfo.setCompanyId(SecurityUtils.getLoginUser().getSysUser().getCompanyId().toString());
devInfo.setDeviceCount(devInfo.getDeviceCount()); devInfo.setDeviceCount(devInfo.getDeviceCount());
devInfo.setIdentifyCode(devInfo.getTableList().get(i).getIdentifyCode()); //devInfo.setIdentifyCode(devInfo.getTableList().get(i).getIdentifyCode());
//0914 添加字段 //0914 添加字段
devInfo.setChangeStatus("1"); devInfo.setChangeStatus("1");
devInfo.setUpDownStatus("0"); devInfo.setUpDownStatus("0");
@ -432,19 +432,19 @@ public class DevInfoServiceImpl implements DevInfoService {
if (num == 0) { if (num == 0) {
return AjaxResult.error("设备信息SQL保存失败请修改后重试"); return AjaxResult.error("设备信息SQL保存失败请修改后重试");
} }
devInfoMapper.updateTypeLeasePrice(devInfo); //devInfoMapper.updateTypeLeasePrice(devInfo);
code = ""; code = "";
//保存自定义属性值 //保存自定义属性值
if (!CollectionUtils.isEmpty(devInfo.getDevInfoProperties())) { /*if (!CollectionUtils.isEmpty(devInfo.getDevInfoProperties())) {
devInfoMapper.insertDevInfoProperties(devInfo.getMaId(), devInfo.getDevInfoProperties()); devInfoMapper.insertDevInfoProperties(devInfo.getMaId(), devInfo.getDevInfoProperties());
} }*/
//把文件保存到附件中 //把文件保存到附件中
Table table = devInfo.getTableList().get(i); /* Table table = devInfo.getTableList().get(i);
AjaxResult error = uploadFiles(table, devInfo, userId, i); AjaxResult error = uploadFiles(table, devInfo, userId, i);
if (error != null) { if (error != null) {
return error; return error;
} }*/
} /*}*/
return AjaxResult.success("保存成功"); return AjaxResult.success("保存成功");
} }

View File

@ -134,7 +134,7 @@
LEFT JOIN bm_company_info c ON sd.dept_id = c.company_id LEFT JOIN bm_company_info c ON sd.dept_id = c.company_id
LEFT JOIN ma_type_view mtv ON mtv.typeId = mdi.type_id LEFT JOIN ma_type_view mtv ON mtv.typeId = mdi.type_id
LEFT JOIN jj_sing_project jsp ON jsp.pro_code = mdi.on_project LEFT JOIN jj_sing_project jsp ON jsp.pro_code = mdi.on_project
WHERE mdi.is_active = 1 and mdi.entry_status = 1 and mdi.own_co =#{ownCo} WHERE mdi.is_active = 1 and mdi.entry_status = 1
<if test="typeId != null"> <if test="typeId != null">
and ( and (
mtv.mainGxId = #{typeId} mtv.mainGxId = #{typeId}

View File

@ -17,39 +17,41 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="devList" resultType="com.bonus.material.device.domain.vo.DevInfoVo"> <select id="devList" resultType="com.bonus.material.device.domain.vo.DevInfoVo">
SELECT SELECT
mtv.proType, mtv.proType,
mtv.mainGx, mtv.mainGx,
mtv.childGx, mtv.childGx,
mtv.devCategory, mtv.devCategory,
mtv.devSubcategory, mtv.devSubcategory,
mtv.devName, mtv.devName,
mtv.devModel, mtv.devModel,
mtv.unit_name, mtv.unit_name,
d.ma_id as maId, d.ma_id as maId,
d.code as code, d.code as code,
d.identify_code as identifyCode, d.identify_code as identifyCode,
d.device_name as deviceName, d.device_name as deviceName,
d.device_count as deviceCount, d.device_count as deviceCount,
d.brand as brand, d.brand as brand,
d.model_name as modelName, d.model_name as modelName,
d.production_date as productionDate, d.production_date as productionDate,
d.working_hours as workingHours, d.working_hours as workingHours,
d.serial_number as serialNumber, d.serial_number as serialNumber,
d.person as person, d.person as person,
d.person_phone as personPhone, d.person_phone as personPhone,
d.create_time as createTime, d.create_time as createTime,
d.update_time as updateTime, d.update_time as updateTime,
d.own_co as companyId, d.own_co as companyId,
sd.dept_name as companyName, sd.dept_name as companyName,
c.operate_address as operateAddress c.operate_address as operateAddress,
d.entry_status AS entryStatus
FROM FROM
ma_dev_info d cs_device_real_dev cdrd
LEFT JOIN sys_dept sd ON d.own_co = sd.dept_id LEFT JOIN ma_dev_info d ON cdrd.dev_id = d.ma_id
LEFT JOIN bm_company_info c ON sd.dept_id = c.company_id LEFT JOIN sys_dept sd ON d.own_co = sd.dept_id
LEFT JOIN ma_type_view mtv ON mtv.typeId = d.type_id LEFT JOIN bm_company_info c ON sd.dept_id = c.company_id
LEFT JOIN cs_device_real_dev cdrd ON cdrd.dev_id = d.ma_id LEFT JOIN ma_type_view mtv ON mtv.typeId = d.type_id
<where> <where>
d.is_active='1' and cdrd.cs_id = #{orderId} d.is_active='1' and cdrd.cs_id = #{orderId}
<if test="keyWord != null and keyWord != ''"> <if test="keyWord != null and keyWord != ''">
and ( and (
locate(#{keyWord},mtv.mainGx) > 0 locate(#{keyWord},mtv.mainGx) > 0
@ -75,7 +77,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</insert> </insert>
<update id="submitOrder"> <update id="submitOrder">
UPDATE cs_device_status SET status = #{status} WHERE id = #{id} UPDATE cs_device_status
SET status = #{status}
WHERE id = #{id}
</update> </update>
<update id="updateDeviceStatus"> <update id="updateDeviceStatus">