装备编辑可修改装备租金
This commit is contained in:
parent
e46bca6cdb
commit
4085364894
|
|
@ -274,5 +274,7 @@ public interface DevInfoMapper {
|
||||||
List<DevInfoVo> getMaTypeLeasingDetail(DevInfoVo devInfoVo);
|
List<DevInfoVo> getMaTypeLeasingDetail(DevInfoVo devInfoVo);
|
||||||
|
|
||||||
List<SysDept> getDemandUnit(DevInfoVo devInfoVo);
|
List<SysDept> getDemandUnit(DevInfoVo devInfoVo);
|
||||||
|
|
||||||
|
int updateTypeLeasePrice(DevInfo devInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -210,6 +210,7 @@ public class DevInfoServiceImpl implements DevInfoService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据文件名截取文件名
|
* 根据文件名截取文件名
|
||||||
|
*
|
||||||
* @param fileName
|
* @param fileName
|
||||||
*/
|
*/
|
||||||
private String extracted(String fileName) {
|
private String extracted(String fileName) {
|
||||||
|
|
@ -410,9 +411,11 @@ public class DevInfoServiceImpl implements DevInfoService {
|
||||||
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());
|
||||||
if (devInfoMapper.insertDevInfo(devInfo) == 0) {
|
int num = devInfoMapper.insertDevInfo(devInfo);
|
||||||
|
if (num == 0) {
|
||||||
return AjaxResult.error("设备信息SQL保存失败,请修改后重试");
|
return AjaxResult.error("设备信息SQL保存失败,请修改后重试");
|
||||||
}
|
}
|
||||||
|
devInfoMapper.updateTypeLeasePrice(devInfo);
|
||||||
code = "";
|
code = "";
|
||||||
//保存自定义属性值
|
//保存自定义属性值
|
||||||
if (!CollectionUtils.isEmpty(devInfo.getDevInfoProperties())) {
|
if (!CollectionUtils.isEmpty(devInfo.getDevInfoProperties())) {
|
||||||
|
|
@ -594,6 +597,7 @@ public class DevInfoServiceImpl implements DevInfoService {
|
||||||
String identifyCode = tableList.get(0).getIdentifyCode();
|
String identifyCode = tableList.get(0).getIdentifyCode();
|
||||||
devInfo.setIdentifyCode(identifyCode);
|
devInfo.setIdentifyCode(identifyCode);
|
||||||
int i = devInfoMapper.updateDevInfo(devInfo);
|
int i = devInfoMapper.updateDevInfo(devInfo);
|
||||||
|
devInfoMapper.updateTypeLeasePrice(devInfo);
|
||||||
|
|
||||||
Integer id = tableList.get(0).getId();
|
Integer id = tableList.get(0).getId();
|
||||||
if (id != null) {
|
if (id != null) {
|
||||||
|
|
@ -871,6 +875,7 @@ public class DevInfoServiceImpl implements DevInfoService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 在租装备信息查询
|
* 在租装备信息查询
|
||||||
|
*
|
||||||
* @param devInfo
|
* @param devInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -881,6 +886,7 @@ public class DevInfoServiceImpl implements DevInfoService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备批量导入模版下载
|
* 设备批量导入模版下载
|
||||||
|
*
|
||||||
* @param response
|
* @param response
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -914,6 +920,7 @@ public class DevInfoServiceImpl implements DevInfoService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备信息导入
|
* 设备信息导入
|
||||||
|
*
|
||||||
* @param file
|
* @param file
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -1015,6 +1022,7 @@ public class DevInfoServiceImpl implements DevInfoService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 读取Excel表格数据,做非空判断
|
* 读取Excel表格数据,做非空判断
|
||||||
|
*
|
||||||
* @param sheet
|
* @param sheet
|
||||||
* @param totalRows
|
* @param totalRows
|
||||||
* @param totalCells
|
* @param totalCells
|
||||||
|
|
@ -1071,6 +1079,7 @@ public class DevInfoServiceImpl implements DevInfoService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检查数字格式是否为整数
|
* 检查数字格式是否为整数
|
||||||
|
*
|
||||||
* @param cellValue
|
* @param cellValue
|
||||||
* @param r
|
* @param r
|
||||||
* @param c
|
* @param c
|
||||||
|
|
@ -1088,6 +1097,7 @@ public class DevInfoServiceImpl implements DevInfoService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检查日期格式
|
* 检查日期格式
|
||||||
|
*
|
||||||
* @param cellValue
|
* @param cellValue
|
||||||
* @param rowIndex
|
* @param rowIndex
|
||||||
* @param colIndex
|
* @param colIndex
|
||||||
|
|
@ -1104,6 +1114,7 @@ public class DevInfoServiceImpl implements DevInfoService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断日期格式是否正确
|
* 判断日期格式是否正确
|
||||||
|
*
|
||||||
* @param dateStr
|
* @param dateStr
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -1150,6 +1161,7 @@ public class DevInfoServiceImpl implements DevInfoService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检查数据是否为空
|
* 检查数据是否为空
|
||||||
|
*
|
||||||
* @param cellValue
|
* @param cellValue
|
||||||
* @param rowIndex
|
* @param rowIndex
|
||||||
* @param colIndex
|
* @param colIndex
|
||||||
|
|
@ -1163,6 +1175,7 @@ public class DevInfoServiceImpl implements DevInfoService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检查电话号码格式
|
* 检查电话号码格式
|
||||||
|
*
|
||||||
* @param cellValue
|
* @param cellValue
|
||||||
* @param rowIndex
|
* @param rowIndex
|
||||||
* @param colIndex
|
* @param colIndex
|
||||||
|
|
@ -1178,6 +1191,7 @@ public class DevInfoServiceImpl implements DevInfoService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 读取Excel表格数据,做非空及格式判断
|
* 读取Excel表格数据,做非空及格式判断
|
||||||
|
*
|
||||||
* @param headerRow
|
* @param headerRow
|
||||||
* @param totalCells
|
* @param totalCells
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1008,6 +1008,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
update ma_dev_info set total_lease_day = IFNULL(total_lease_day, 0) + 1
|
update ma_dev_info set total_lease_day = IFNULL(total_lease_day, 0) + 1
|
||||||
where is_active = '1' and ma_status = '3'
|
where is_active = '1' and ma_status = '3'
|
||||||
</update>
|
</update>
|
||||||
|
<update id="updateTypeLeasePrice">
|
||||||
|
update ma_type set lease_price = #{dayLeasePrice}
|
||||||
|
where type_id = #{typeId}
|
||||||
|
</update>
|
||||||
|
|
||||||
<select id="getIdleDevRatio" resultType="com.bonus.material.device.domain.DevInfo">
|
<select id="getIdleDevRatio" resultType="com.bonus.material.device.domain.DevInfo">
|
||||||
SELECT
|
SELECT
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue