物资装备SQL修改
This commit is contained in:
parent
aa3278f2ca
commit
0928f68f6a
|
|
@ -33,7 +33,7 @@ public interface DevInfoMapper {
|
|||
* @param deviceName 物资名称
|
||||
* @return 条数
|
||||
*/
|
||||
int getDeviceNameCount(String deviceName);
|
||||
Integer getDeviceNameCount(String deviceName);
|
||||
|
||||
int insertHotSearch(Long maId);
|
||||
|
||||
|
|
|
|||
|
|
@ -239,8 +239,8 @@ public class DevInfoServiceImpl implements DevInfoService {
|
|||
throw new ServiceException("非法参数异常: " + e.getMessage());
|
||||
}
|
||||
|
||||
int deviceNameCount = devInfoMapper.getDeviceNameCount(devInfo.getDeviceName());
|
||||
if (deviceNameCount > 0) {
|
||||
Integer deviceNameCount = devInfoMapper.getDeviceNameCount(devInfo.getDeviceName());
|
||||
if (deviceNameCount != null && deviceNameCount > 0) {
|
||||
return AjaxResult.error("设备名称已存在,请修改后重试!");
|
||||
}
|
||||
|
||||
|
|
@ -279,7 +279,7 @@ public class DevInfoServiceImpl implements DevInfoService {
|
|||
return AjaxResult.error("装备草稿保存失败,请修改后重试");
|
||||
}
|
||||
AjaxResult error = uploadFiles(devInfo, userId);
|
||||
if (error != null) return error;
|
||||
if (error != null) {return error;}
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error("装备草稿保存失败,执行异常:" + e.getMessage());
|
||||
}
|
||||
|
|
@ -505,8 +505,6 @@ public class DevInfoServiceImpl implements DevInfoService {
|
|||
//保存用户信息
|
||||
devInfo1.setCreator(userId);
|
||||
devInfo1.setCode(String.valueOf(UUID.randomUUID()));
|
||||
// TODO
|
||||
// devInfo1.setOwnCo(Long.valueOf(bmCompanyInfo.getCompanyId()));
|
||||
devInfo1.setTypeId(typeInfo.getTypeId());
|
||||
devInfo1.setJsDayPrice(Float.valueOf(leasePrice));
|
||||
devInfo1.setModelName(modelName);
|
||||
|
|
|
|||
|
|
@ -258,7 +258,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<insert id="insertDevInfo" parameterType="com.bonus.material.device.domain.DevInfo" useGeneratedKeys="true" keyProperty="maId">
|
||||
insert into ma_dev_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="maId != null and maId != '' ">ma_id,</if>
|
||||
<if test="deviceName != null and deviceName != '' ">device_name,</if>
|
||||
<if test="deviceWeight != null and deviceWeight != '' ">device_weight,</if>
|
||||
<if test="deviceCount != null">device_count,</if>
|
||||
|
|
@ -298,7 +297,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="maId != null and maId != ''">#{maId},</if>
|
||||
<if test="deviceName != null and deviceName != ''">#{deviceName},</if>
|
||||
<if test="deviceWeight != null and deviceWeight != ''">#{deviceWeight},</if>
|
||||
<if test="deviceCount != null">#{deviceCount},</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue