liuxiaoxu
1 month ago
9 changed files with 0 additions and 1382 deletions
@ -1,320 +0,0 @@ |
|||||
package com.ruoyi.system.domain; |
|
||||
|
|
||||
import com.ruoyi.common.annotation.Excel; |
|
||||
import com.ruoyi.common.core.domain.BaseEntity; |
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder; |
|
||||
|
|
||||
/** |
|
||||
* 设备档案信息对象 sys_equipment |
|
||||
* |
|
||||
* @author ruoyi |
|
||||
* @date 2022-11-04 |
|
||||
*/ |
|
||||
public class SysEquipment extends BaseEntity |
|
||||
{ |
|
||||
private static final long serialVersionUID = 1L; |
|
||||
|
|
||||
/** 设备id */ |
|
||||
private Long equipmentId; |
|
||||
|
|
||||
/** 设备编号 */ |
|
||||
@Excel(name = "设备编号") |
|
||||
private String equipmentCode; |
|
||||
|
|
||||
/** 设备名称 */ |
|
||||
@Excel(name = "设备名称") |
|
||||
private String equipmentName; |
|
||||
|
|
||||
/** 设备型号 */ |
|
||||
@Excel(name = "设备型号") |
|
||||
private String equipmentModel; |
|
||||
|
|
||||
/** 设备重量 */ |
|
||||
@Excel(name = "设备重量") |
|
||||
private String equipmentWeight; |
|
||||
|
|
||||
/** 设备状态 */ |
|
||||
@Excel(name = "设备状态") |
|
||||
private String equipmentState; |
|
||||
|
|
||||
/** 计量单位 */ |
|
||||
@Excel(name = "计量单位") |
|
||||
private String unitOfMeasurement; |
|
||||
|
|
||||
/** 设备类别 */ |
|
||||
@Excel(name = "设备类别") |
|
||||
private String equipmentCategory; |
|
||||
|
|
||||
/** 出厂编号 */ |
|
||||
@Excel(name = "出厂编号") |
|
||||
private String factoryNumber; |
|
||||
|
|
||||
/** 设备价格 */ |
|
||||
@Excel(name = "设备价格") |
|
||||
private String equipmentPrice; |
|
||||
|
|
||||
/** 厂家代码 */ |
|
||||
private String manufacturerNumber; |
|
||||
|
|
||||
/** 设备生产日期 */ |
|
||||
@Excel(name = "设备生产日期") |
|
||||
private String dateOfManufacture; |
|
||||
|
|
||||
/** 所在部门 */ |
|
||||
@Excel(name = "所在部门") |
|
||||
private String equipmentDept; |
|
||||
|
|
||||
/** 设备厂家名称 */ |
|
||||
@Excel(name = "设备厂家名称") |
|
||||
private String manufacturerName; |
|
||||
|
|
||||
/** 设备使用日期 */ |
|
||||
@Excel(name = "设备使用日期") |
|
||||
private String dateOfUse; |
|
||||
|
|
||||
/** 折旧年数 */ |
|
||||
@Excel(name = "折旧年数") |
|
||||
private String depreciationYear; |
|
||||
|
|
||||
/** 年折旧率 */ |
|
||||
@Excel(name = "年折旧率") |
|
||||
private String depreciationRate; |
|
||||
|
|
||||
/** 设备存放位置 */ |
|
||||
@Excel(name = "设备存放位置") |
|
||||
private String storageLocation; |
|
||||
|
|
||||
/** 完成工序 */ |
|
||||
@Excel(name = "完成工序") |
|
||||
private String completionOfProcess; |
|
||||
|
|
||||
/** 负责人 */ |
|
||||
@Excel(name = "负责人") |
|
||||
private String equipmentManager; |
|
||||
|
|
||||
/** 备注 */ |
|
||||
@Excel(name = "备注") |
|
||||
private String equipmentRemark; |
|
||||
|
|
||||
|
|
||||
/** 录入时间 */ |
|
||||
@Excel(name = "录入时间") |
|
||||
private String firstAddTime; |
|
||||
|
|
||||
/** 修改时间 */ |
|
||||
@Excel(name = "修改时间") |
|
||||
private String updateInfoTime; |
|
||||
|
|
||||
public Long getEquipmentId() { |
|
||||
return equipmentId; |
|
||||
} |
|
||||
|
|
||||
public void setEquipmentId(Long equipmentId) { |
|
||||
this.equipmentId = equipmentId; |
|
||||
} |
|
||||
|
|
||||
public String getEquipmentCode() { |
|
||||
return equipmentCode; |
|
||||
} |
|
||||
|
|
||||
public void setEquipmentCode(String equipmentCode) { |
|
||||
this.equipmentCode = equipmentCode; |
|
||||
} |
|
||||
|
|
||||
public String getEquipmentName() { |
|
||||
return equipmentName; |
|
||||
} |
|
||||
|
|
||||
public void setEquipmentName(String equipmentName) { |
|
||||
this.equipmentName = equipmentName; |
|
||||
} |
|
||||
|
|
||||
public String getEquipmentModel() { |
|
||||
return equipmentModel; |
|
||||
} |
|
||||
|
|
||||
public void setEquipmentModel(String equipmentModel) { |
|
||||
this.equipmentModel = equipmentModel; |
|
||||
} |
|
||||
|
|
||||
public String getEquipmentWeight() { |
|
||||
return equipmentWeight; |
|
||||
} |
|
||||
|
|
||||
public void setEquipmentWeight(String equipmentWeight) { |
|
||||
this.equipmentWeight = equipmentWeight; |
|
||||
} |
|
||||
|
|
||||
public String getEquipmentState() { |
|
||||
return equipmentState; |
|
||||
} |
|
||||
|
|
||||
public void setEquipmentState(String equipmentState) { |
|
||||
this.equipmentState = equipmentState; |
|
||||
} |
|
||||
|
|
||||
public String getUnitOfMeasurement() { |
|
||||
return unitOfMeasurement; |
|
||||
} |
|
||||
|
|
||||
public void setUnitOfMeasurement(String unitOfMeasurement) { |
|
||||
this.unitOfMeasurement = unitOfMeasurement; |
|
||||
} |
|
||||
|
|
||||
public String getEquipmentCategory() { |
|
||||
return equipmentCategory; |
|
||||
} |
|
||||
|
|
||||
public void setEquipmentCategory(String equipmentCategory) { |
|
||||
this.equipmentCategory = equipmentCategory; |
|
||||
} |
|
||||
|
|
||||
public String getFactoryNumber() { |
|
||||
return factoryNumber; |
|
||||
} |
|
||||
|
|
||||
public void setFactoryNumber(String factoryNumber) { |
|
||||
this.factoryNumber = factoryNumber; |
|
||||
} |
|
||||
|
|
||||
public String getEquipmentPrice() { |
|
||||
return equipmentPrice; |
|
||||
} |
|
||||
|
|
||||
public void setEquipmentPrice(String equipmentPrice) { |
|
||||
this.equipmentPrice = equipmentPrice; |
|
||||
} |
|
||||
|
|
||||
public String getManufacturerNumber() { |
|
||||
return manufacturerNumber; |
|
||||
} |
|
||||
|
|
||||
public void setManufacturerNumber(String manufacturerNumber) { |
|
||||
this.manufacturerNumber = manufacturerNumber; |
|
||||
} |
|
||||
|
|
||||
public String getDateOfManufacture() { |
|
||||
return dateOfManufacture; |
|
||||
} |
|
||||
|
|
||||
public void setDateOfManufacture(String dateOfManufacture) { |
|
||||
this.dateOfManufacture = dateOfManufacture; |
|
||||
} |
|
||||
|
|
||||
public String getEquipmentDept() { |
|
||||
return equipmentDept; |
|
||||
} |
|
||||
|
|
||||
public void setEquipmentDept(String equipmentDept) { |
|
||||
this.equipmentDept = equipmentDept; |
|
||||
} |
|
||||
|
|
||||
public String getManufacturerName() { |
|
||||
return manufacturerName; |
|
||||
} |
|
||||
|
|
||||
public void setManufacturerName(String manufacturerName) { |
|
||||
this.manufacturerName = manufacturerName; |
|
||||
} |
|
||||
|
|
||||
public String getDateOfUse() { |
|
||||
return dateOfUse; |
|
||||
} |
|
||||
|
|
||||
public void setDateOfUse(String dateOfUse) { |
|
||||
this.dateOfUse = dateOfUse; |
|
||||
} |
|
||||
|
|
||||
public String getDepreciationYear() { |
|
||||
return depreciationYear; |
|
||||
} |
|
||||
|
|
||||
public void setDepreciationYear(String depreciationYear) { |
|
||||
this.depreciationYear = depreciationYear; |
|
||||
} |
|
||||
|
|
||||
public String getDepreciationRate() { |
|
||||
return depreciationRate; |
|
||||
} |
|
||||
|
|
||||
public void setDepreciationRate(String depreciationRate) { |
|
||||
this.depreciationRate = depreciationRate; |
|
||||
} |
|
||||
|
|
||||
public String getStorageLocation() { |
|
||||
return storageLocation; |
|
||||
} |
|
||||
|
|
||||
public void setStorageLocation(String storageLocation) { |
|
||||
this.storageLocation = storageLocation; |
|
||||
} |
|
||||
|
|
||||
public String getCompletionOfProcess() { |
|
||||
return completionOfProcess; |
|
||||
} |
|
||||
|
|
||||
public void setCompletionOfProcess(String completionOfProcess) { |
|
||||
this.completionOfProcess = completionOfProcess; |
|
||||
} |
|
||||
|
|
||||
public String getEquipmentManager() { |
|
||||
return equipmentManager; |
|
||||
} |
|
||||
|
|
||||
public void setEquipmentManager(String equipmentManager) { |
|
||||
this.equipmentManager = equipmentManager; |
|
||||
} |
|
||||
|
|
||||
public String getEquipmentRemark() { |
|
||||
return equipmentRemark; |
|
||||
} |
|
||||
|
|
||||
public void setEquipmentRemark(String equipmentRemark) { |
|
||||
this.equipmentRemark = equipmentRemark; |
|
||||
} |
|
||||
|
|
||||
public String getFirstAddTime() { |
|
||||
return firstAddTime; |
|
||||
} |
|
||||
|
|
||||
public void setFirstAddTime(String firstAddTime) { |
|
||||
this.firstAddTime = firstAddTime; |
|
||||
} |
|
||||
|
|
||||
public String getUpdateInfoTime() { |
|
||||
return updateInfoTime; |
|
||||
} |
|
||||
|
|
||||
public void setUpdateInfoTime(String updateInfoTime) { |
|
||||
this.updateInfoTime = updateInfoTime; |
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
public String toString() { |
|
||||
return new ToStringBuilder(this) |
|
||||
.append("equipmentId", equipmentId) |
|
||||
.append("equipmentCode", equipmentCode) |
|
||||
.append("equipmentName", equipmentName) |
|
||||
.append("equipmentModel", equipmentModel) |
|
||||
.append("equipmentWeight", equipmentWeight) |
|
||||
.append("equipmentState", equipmentState) |
|
||||
.append("unitOfMeasurement", unitOfMeasurement) |
|
||||
.append("equipmentCategory", equipmentCategory) |
|
||||
.append("factoryNumber", factoryNumber) |
|
||||
.append("equipmentPrice", equipmentPrice) |
|
||||
.append("manufacturerNumber", manufacturerNumber) |
|
||||
.append("dateOfManufacture", dateOfManufacture) |
|
||||
.append("equipmentDept", equipmentDept) |
|
||||
.append("manufacturerName", manufacturerName) |
|
||||
.append("dateOfUse", dateOfUse) |
|
||||
.append("depreciationYear", depreciationYear) |
|
||||
.append("depreciationRate", depreciationRate) |
|
||||
.append("storageLocation", storageLocation) |
|
||||
.append("completionOfProcess", completionOfProcess) |
|
||||
.append("equipmentManager", equipmentManager) |
|
||||
.append("equipmentRemark", equipmentRemark) |
|
||||
.append("firstAddTime", firstAddTime) |
|
||||
.append("updateInfoTime", updateInfoTime) |
|
||||
.toString(); |
|
||||
} |
|
||||
} |
|
@ -1,62 +0,0 @@ |
|||||
package com.ruoyi.system.mapper; |
|
||||
|
|
||||
import com.ruoyi.system.domain.SysEquipment; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
/** |
|
||||
* 设备档案信息Mapper接口 |
|
||||
* |
|
||||
* @author ruoyi |
|
||||
* @date 2022-11-04 |
|
||||
*/ |
|
||||
public interface SysEquipmentMapper |
|
||||
{ |
|
||||
/** |
|
||||
* 查询设备档案信息 |
|
||||
* |
|
||||
* @param equipmentId 设备档案信息ID |
|
||||
* @return 设备档案信息 |
|
||||
*/ |
|
||||
public SysEquipment selectSysEquipmentById(Long equipmentId); |
|
||||
|
|
||||
/** |
|
||||
* 查询设备档案信息列表 |
|
||||
* |
|
||||
* @param sysEquipment 设备档案信息 |
|
||||
* @return 设备档案信息集合 |
|
||||
*/ |
|
||||
public List<SysEquipment> selectSysEquipmentList(SysEquipment sysEquipment); |
|
||||
|
|
||||
/** |
|
||||
* 新增设备档案信息 |
|
||||
* |
|
||||
* @param sysEquipment 设备档案信息 |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
public int insertSysEquipment(SysEquipment sysEquipment); |
|
||||
|
|
||||
/** |
|
||||
* 修改设备档案信息 |
|
||||
* |
|
||||
* @param sysEquipment 设备档案信息 |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
public int updateSysEquipment(SysEquipment sysEquipment); |
|
||||
|
|
||||
/** |
|
||||
* 删除设备档案信息 |
|
||||
* |
|
||||
* @param equipmentId 设备档案信息ID |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
public int deleteSysEquipmentById(Long equipmentId); |
|
||||
|
|
||||
/** |
|
||||
* 批量删除设备档案信息 |
|
||||
* |
|
||||
* @param equipmentIds 需要删除的数据ID |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
public int deleteSysEquipmentByIds(String[] equipmentIds); |
|
||||
} |
|
@ -1,62 +0,0 @@ |
|||||
package com.ruoyi.system.service; |
|
||||
|
|
||||
import com.ruoyi.system.domain.SysEquipment; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
/** |
|
||||
* 设备档案信息Service接口 |
|
||||
* |
|
||||
* @author ruoyi |
|
||||
* @date 2022-11-04 |
|
||||
*/ |
|
||||
public interface ISysEquipmentService |
|
||||
{ |
|
||||
/** |
|
||||
* 查询设备档案信息 |
|
||||
* |
|
||||
* @param equipmentId 设备档案信息ID |
|
||||
* @return 设备档案信息 |
|
||||
*/ |
|
||||
public SysEquipment selectSysEquipmentById(Long equipmentId); |
|
||||
|
|
||||
/** |
|
||||
* 查询设备档案信息列表 |
|
||||
* |
|
||||
* @param sysEquipment 设备档案信息 |
|
||||
* @return 设备档案信息集合 |
|
||||
*/ |
|
||||
public List<SysEquipment> selectSysEquipmentList(SysEquipment sysEquipment); |
|
||||
|
|
||||
/** |
|
||||
* 新增设备档案信息 |
|
||||
* |
|
||||
* @param sysEquipment 设备档案信息 |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
public int insertSysEquipment(SysEquipment sysEquipment); |
|
||||
|
|
||||
/** |
|
||||
* 修改设备档案信息 |
|
||||
* |
|
||||
* @param sysEquipment 设备档案信息 |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
public int updateSysEquipment(SysEquipment sysEquipment); |
|
||||
|
|
||||
/** |
|
||||
* 批量删除设备档案信息 |
|
||||
* |
|
||||
* @param ids 需要删除的数据ID |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
public int deleteSysEquipmentByIds(String ids); |
|
||||
|
|
||||
/** |
|
||||
* 删除设备档案信息信息 |
|
||||
* |
|
||||
* @param equipmentId 设备档案信息ID |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
public int deleteSysEquipmentById(Long equipmentId); |
|
||||
} |
|
@ -1,95 +0,0 @@ |
|||||
package com.ruoyi.system.service.impl; |
|
||||
|
|
||||
import com.ruoyi.common.core.text.Convert; |
|
||||
import com.ruoyi.system.domain.SysEquipment; |
|
||||
import com.ruoyi.system.mapper.SysEquipmentMapper; |
|
||||
import com.ruoyi.system.service.ISysEquipmentService; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
import org.springframework.stereotype.Service; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
/** |
|
||||
* 设备档案信息Service业务层处理 |
|
||||
* |
|
||||
* @author ruoyi |
|
||||
* @date 2022-11-04 |
|
||||
*/ |
|
||||
@Service |
|
||||
public class SysEquipmentServiceImpl implements ISysEquipmentService |
|
||||
{ |
|
||||
@Autowired |
|
||||
private SysEquipmentMapper sysEquipmentMapper; |
|
||||
|
|
||||
/** |
|
||||
* 查询设备档案信息 |
|
||||
* |
|
||||
* @param equipmentId 设备档案信息ID |
|
||||
* @return 设备档案信息 |
|
||||
*/ |
|
||||
@Override |
|
||||
public SysEquipment selectSysEquipmentById(Long equipmentId) |
|
||||
{ |
|
||||
return sysEquipmentMapper.selectSysEquipmentById(equipmentId); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 查询设备档案信息列表 |
|
||||
* |
|
||||
* @param sysEquipment 设备档案信息 |
|
||||
* @return 设备档案信息 |
|
||||
*/ |
|
||||
@Override |
|
||||
public List<SysEquipment> selectSysEquipmentList(SysEquipment sysEquipment) |
|
||||
{ |
|
||||
return sysEquipmentMapper.selectSysEquipmentList(sysEquipment); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 新增设备档案信息 |
|
||||
* |
|
||||
* @param sysEquipment 设备档案信息 |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
@Override |
|
||||
public int insertSysEquipment(SysEquipment sysEquipment) |
|
||||
{ |
|
||||
return sysEquipmentMapper.insertSysEquipment(sysEquipment); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 修改设备档案信息 |
|
||||
* |
|
||||
* @param sysEquipment 设备档案信息 |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
@Override |
|
||||
public int updateSysEquipment(SysEquipment sysEquipment) |
|
||||
{ |
|
||||
return sysEquipmentMapper.updateSysEquipment(sysEquipment); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 删除设备档案信息对象 |
|
||||
* |
|
||||
* @param ids 需要删除的数据ID |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
@Override |
|
||||
public int deleteSysEquipmentByIds(String ids) |
|
||||
{ |
|
||||
return sysEquipmentMapper.deleteSysEquipmentByIds(Convert.toStrArray(ids)); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 删除设备档案信息信息 |
|
||||
* |
|
||||
* @param equipmentId 设备档案信息ID |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
@Override |
|
||||
public int deleteSysEquipmentById(Long equipmentId) |
|
||||
{ |
|
||||
return sysEquipmentMapper.deleteSysEquipmentById(equipmentId); |
|
||||
} |
|
||||
} |
|
@ -1,123 +0,0 @@ |
|||||
package com.ruoyi.web.controller.system; |
|
||||
|
|
||||
import com.ruoyi.common.annotation.Log; |
|
||||
import com.ruoyi.common.core.controller.BaseController; |
|
||||
import com.ruoyi.common.core.domain.AjaxResult; |
|
||||
import com.ruoyi.common.core.page.TableDataInfo; |
|
||||
import com.ruoyi.common.enums.BusinessType; |
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil; |
|
||||
import com.ruoyi.system.domain.SysEquipment; |
|
||||
import com.ruoyi.system.service.ISysEquipmentService; |
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
import org.springframework.stereotype.Controller; |
|
||||
import org.springframework.ui.ModelMap; |
|
||||
import org.springframework.web.bind.annotation.*; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
/** |
|
||||
* 设备档案信息Controller |
|
||||
* |
|
||||
* @author ruoyi |
|
||||
* @date 2022-11-04 |
|
||||
*/ |
|
||||
@Controller |
|
||||
@RequestMapping("/system/equipment") |
|
||||
public class SysEquipmentController extends BaseController |
|
||||
{ |
|
||||
private String prefix = "system/equipment"; |
|
||||
|
|
||||
@Autowired |
|
||||
private ISysEquipmentService sysEquipmentService; |
|
||||
|
|
||||
@RequiresPermissions("system:equipment:view") |
|
||||
@GetMapping() |
|
||||
public String equipment() |
|
||||
{ |
|
||||
return prefix + "/equipment"; |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 查询设备档案信息列表 |
|
||||
*/ |
|
||||
@RequiresPermissions("system:equipment:list") |
|
||||
@PostMapping("/list") |
|
||||
@ResponseBody |
|
||||
public TableDataInfo list(SysEquipment sysEquipment) |
|
||||
{ |
|
||||
startPage(); |
|
||||
List<SysEquipment> list = sysEquipmentService.selectSysEquipmentList(sysEquipment); |
|
||||
return getDataTable(list); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 导出设备档案信息列表 |
|
||||
*/ |
|
||||
@RequiresPermissions("system:equipment:export") |
|
||||
@Log(title = "设备档案信息", businessType = BusinessType.EXPORT) |
|
||||
@PostMapping("/export") |
|
||||
@ResponseBody |
|
||||
public AjaxResult export(SysEquipment sysEquipment) |
|
||||
{ |
|
||||
List<SysEquipment> list = sysEquipmentService.selectSysEquipmentList(sysEquipment); |
|
||||
ExcelUtil<SysEquipment> util = new ExcelUtil<SysEquipment>(SysEquipment.class); |
|
||||
return util.exportExcel(list, "设备档案信息数据"); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 新增设备档案信息 |
|
||||
*/ |
|
||||
@GetMapping("/add") |
|
||||
public String add() |
|
||||
{ |
|
||||
return prefix + "/add"; |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 新增保存设备档案信息 |
|
||||
*/ |
|
||||
@RequiresPermissions("system:equipment:add") |
|
||||
@Log(title = "设备档案信息", businessType = BusinessType.INSERT) |
|
||||
@PostMapping("/add") |
|
||||
@ResponseBody |
|
||||
public AjaxResult addSave(SysEquipment sysEquipment) |
|
||||
{ |
|
||||
return toAjax(sysEquipmentService.insertSysEquipment(sysEquipment)); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 修改设备档案信息 |
|
||||
*/ |
|
||||
@GetMapping("/edit/{equipmentId}") |
|
||||
public String edit(@PathVariable("equipmentId") Long equipmentId, ModelMap mmap) |
|
||||
{ |
|
||||
SysEquipment sysEquipment = sysEquipmentService.selectSysEquipmentById(equipmentId); |
|
||||
mmap.put("sysEquipment", sysEquipment); |
|
||||
return prefix + "/edit"; |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 修改保存设备档案信息 |
|
||||
*/ |
|
||||
@RequiresPermissions("system:equipment:edit") |
|
||||
@Log(title = "设备档案信息", businessType = BusinessType.UPDATE) |
|
||||
@PostMapping("/edit") |
|
||||
@ResponseBody |
|
||||
public AjaxResult editSave(SysEquipment sysEquipment) |
|
||||
{ |
|
||||
return toAjax(sysEquipmentService.updateSysEquipment(sysEquipment)); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 删除设备档案信息 |
|
||||
*/ |
|
||||
@RequiresPermissions("system:equipment:remove") |
|
||||
@Log(title = "设备档案信息", businessType = BusinessType.DELETE) |
|
||||
@PostMapping( "/remove") |
|
||||
@ResponseBody |
|
||||
public AjaxResult remove(String ids) |
|
||||
{ |
|
||||
return toAjax(sysEquipmentService.deleteSysEquipmentByIds(ids)); |
|
||||
} |
|
||||
} |
|
@ -1,142 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8" ?> |
|
||||
<!DOCTYPE mapper |
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
<mapper namespace="com.ruoyi.system.mapper.SysEquipmentMapper"> |
|
||||
|
|
||||
<resultMap type="SysEquipment" id="SysEquipmentResult"> |
|
||||
<result property="equipmentId" column="equipment_id" /> |
|
||||
<result property="equipmentCode" column="equipment_code" /> |
|
||||
<result property="equipmentName" column="equipment_name" /> |
|
||||
<result property="equipmentModel" column="equipment_model" /> |
|
||||
<result property="equipmentWeight" column="equipment_weight" /> |
|
||||
<result property="equipmentState" column="equipment_state" /> |
|
||||
<result property="unitOfMeasurement" column="unit_of_measurement" /> |
|
||||
<result property="equipmentCategory" column="equipment_category" /> |
|
||||
<result property="factoryNumber" column="factory_number" /> |
|
||||
<result property="equipmentPrice" column="equipment_price" /> |
|
||||
<result property="manufacturerNumber" column="manufacturer_number" /> |
|
||||
<result property="dateOfManufacture" column="date_of_manufacture" /> |
|
||||
<result property="equipmentDept" column="equipment_dept" /> |
|
||||
<result property="manufacturerName" column="manufacturer_name" /> |
|
||||
<result property="dateOfUse" column="date_of_use" /> |
|
||||
<result property="depreciationYear" column="depreciation_year" /> |
|
||||
<result property="depreciationRate" column="depreciation_rate" /> |
|
||||
<result property="storageLocation" column="storage_location" /> |
|
||||
<result property="completionOfProcess" column="completion_of_process" /> |
|
||||
<result property="equipmentManager" column="equipment_manager" /> |
|
||||
<result property="equipmentRemark" column="equipment_remark" /> |
|
||||
<result property="firstAddTime" column="first_add_time" /> |
|
||||
<result property="updateInfoTime" column="update_info_time" /> |
|
||||
</resultMap> |
|
||||
|
|
||||
<sql id="selectSysEquipmentVo"> |
|
||||
select equipment_id, equipment_code, equipment_name, equipment_model, equipment_weight, equipment_state, unit_of_measurement, equipment_category, factory_number, equipment_price, manufacturer_number, date_of_manufacture, equipment_dept, manufacturer_name, date_of_use, depreciation_year, depreciation_rate, storage_location, completion_of_process, equipment_manager, equipment_remark, first_add_time, update_info_time from sys_equipment |
|
||||
</sql> |
|
||||
|
|
||||
<select id="selectSysEquipmentList" parameterType="SysEquipment" resultMap="SysEquipmentResult"> |
|
||||
<include refid="selectSysEquipmentVo"/> |
|
||||
<where> |
|
||||
<if test="equipmentCode != null and equipmentCode != ''"> and equipment_code like concat('%', #{equipmentCode}, '%')</if> |
|
||||
<if test="equipmentName != null and equipmentName != ''"> and equipment_name like concat('%', #{equipmentName}, '%')</if> |
|
||||
<if test="manufacturerNumber != null and manufacturerNumber != ''"> and manufacturer_number like concat('%', #{manufacturerNumber}, '%')</if> |
|
||||
<if test="manufacturerName != null and manufacturerName != ''"> and manufacturer_name like concat('%', #{manufacturerName}, '%')</if> |
|
||||
<if test="equipmentState != null and equipmentState != ''"> and equipment_state = #{equipmentState}</if> |
|
||||
</where> |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectSysEquipmentById" parameterType="Long" resultMap="SysEquipmentResult"> |
|
||||
<include refid="selectSysEquipmentVo"/> |
|
||||
where equipment_id = #{equipmentId} |
|
||||
</select> |
|
||||
|
|
||||
<insert id="insertSysEquipment" parameterType="SysEquipment" useGeneratedKeys="true" keyProperty="equipmentId"> |
|
||||
insert into sys_equipment |
|
||||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
||||
<if test="equipmentCode != null">equipment_code,</if> |
|
||||
<if test="equipmentName != null">equipment_name,</if> |
|
||||
<if test="equipmentModel != null">equipment_model,</if> |
|
||||
<if test="equipmentWeight != null">equipment_weight,</if> |
|
||||
<if test="equipmentState != null">equipment_state,</if> |
|
||||
<if test="unitOfMeasurement != null">unit_of_measurement,</if> |
|
||||
<if test="equipmentCategory != null">equipment_category,</if> |
|
||||
<if test="factoryNumber != null">factory_number,</if> |
|
||||
<if test="equipmentPrice != null">equipment_price,</if> |
|
||||
<if test="manufacturerNumber != null">manufacturer_number,</if> |
|
||||
<if test="dateOfManufacture != null">date_of_manufacture,</if> |
|
||||
<if test="equipmentDept != null">equipment_dept,</if> |
|
||||
<if test="manufacturerName != null">manufacturer_name,</if> |
|
||||
<if test="dateOfUse != null">date_of_use,</if> |
|
||||
<if test="depreciationYear != null">depreciation_year,</if> |
|
||||
<if test="depreciationRate != null">depreciation_rate,</if> |
|
||||
<if test="storageLocation != null">storage_location,</if> |
|
||||
<if test="completionOfProcess != null">completion_of_process,</if> |
|
||||
<if test="equipmentManager != null">equipment_manager,</if> |
|
||||
<if test="equipmentRemark != null">equipment_remark,</if> |
|
||||
first_add_time, |
|
||||
</trim> |
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
||||
<if test="equipmentCode != null">#{equipmentCode},</if> |
|
||||
<if test="equipmentName != null">#{equipmentName},</if> |
|
||||
<if test="equipmentModel != null">#{equipmentModel},</if> |
|
||||
<if test="equipmentWeight != null">#{equipmentWeight},</if> |
|
||||
<if test="equipmentState != null">#{equipmentState},</if> |
|
||||
<if test="unitOfMeasurement != null">#{unitOfMeasurement},</if> |
|
||||
<if test="equipmentCategory != null">#{equipmentCategory},</if> |
|
||||
<if test="factoryNumber != null">#{factoryNumber},</if> |
|
||||
<if test="equipmentPrice != null">#{equipmentPrice},</if> |
|
||||
<if test="manufacturerNumber != null">#{manufacturerNumber},</if> |
|
||||
<if test="dateOfManufacture != null">#{dateOfManufacture},</if> |
|
||||
<if test="equipmentDept != null">#{equipmentDept},</if> |
|
||||
<if test="manufacturerName != null">#{manufacturerName},</if> |
|
||||
<if test="dateOfUse != null">#{dateOfUse},</if> |
|
||||
<if test="depreciationYear != null">#{depreciationYear},</if> |
|
||||
<if test="depreciationRate != null">#{depreciationRate},</if> |
|
||||
<if test="storageLocation != null">#{storageLocation},</if> |
|
||||
<if test="completionOfProcess != null">#{completionOfProcess},</if> |
|
||||
<if test="equipmentManager != null">#{equipmentManager},</if> |
|
||||
<if test="equipmentRemark != null">#{equipmentRemark},</if> |
|
||||
now(), |
|
||||
</trim> |
|
||||
</insert> |
|
||||
|
|
||||
<update id="updateSysEquipment" parameterType="SysEquipment"> |
|
||||
update sys_equipment |
|
||||
<trim prefix="SET" suffixOverrides=","> |
|
||||
<if test="equipmentCode != null">equipment_code = #{equipmentCode},</if> |
|
||||
<if test="equipmentName != null">equipment_name = #{equipmentName},</if> |
|
||||
<if test="equipmentModel != null">equipment_model = #{equipmentModel},</if> |
|
||||
<if test="equipmentWeight != null">equipment_weight = #{equipmentWeight},</if> |
|
||||
<if test="equipmentState != null">equipment_state = #{equipmentState},</if> |
|
||||
<if test="unitOfMeasurement != null">unit_of_measurement = #{unitOfMeasurement},</if> |
|
||||
<if test="equipmentCategory != null">equipment_category = #{equipmentCategory},</if> |
|
||||
<if test="factoryNumber != null">factory_number = #{factoryNumber},</if> |
|
||||
<if test="equipmentPrice != null">equipment_price = #{equipmentPrice},</if> |
|
||||
<if test="manufacturerNumber != null">manufacturer_number = #{manufacturerNumber},</if> |
|
||||
<if test="dateOfManufacture != null">date_of_manufacture = #{dateOfManufacture},</if> |
|
||||
<if test="equipmentDept != null">equipment_dept = #{equipmentDept},</if> |
|
||||
<if test="manufacturerName != null">manufacturer_name = #{manufacturerName},</if> |
|
||||
<if test="dateOfUse != null">date_of_use = #{dateOfUse},</if> |
|
||||
<if test="depreciationYear != null">depreciation_year = #{depreciationYear},</if> |
|
||||
<if test="depreciationRate != null">depreciation_rate = #{depreciationRate},</if> |
|
||||
<if test="storageLocation != null">storage_location = #{storageLocation},</if> |
|
||||
<if test="completionOfProcess != null">completion_of_process = #{completionOfProcess},</if> |
|
||||
<if test="equipmentManager != null">equipment_manager = #{equipmentManager},</if> |
|
||||
<if test="equipmentRemark != null">equipment_remark = #{equipmentRemark},</if> |
|
||||
update_info_time = CONCAT_WS(',',NOW(),update_info_time), |
|
||||
</trim> |
|
||||
where equipment_id = #{equipmentId} |
|
||||
</update> |
|
||||
|
|
||||
<delete id="deleteSysEquipmentById" parameterType="Long"> |
|
||||
delete from sys_equipment where equipment_id = #{equipmentId} |
|
||||
</delete> |
|
||||
|
|
||||
<delete id="deleteSysEquipmentByIds" parameterType="String"> |
|
||||
delete from sys_equipment where equipment_id in |
|
||||
<foreach item="equipmentId" collection="array" open="(" separator="," close=")"> |
|
||||
#{equipmentId} |
|
||||
</foreach> |
|
||||
</delete> |
|
||||
|
|
||||
</mapper> |
|
@ -1,184 +0,0 @@ |
|||||
<!DOCTYPE html> |
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|
||||
<head> |
|
||||
<th:block th:include="include :: header('新增设备档案信息')" /> |
|
||||
<th:block th:include="include :: datetimepicker-css" /> |
|
||||
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet"> |
|
||||
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet"> |
|
||||
</head> |
|
||||
<body class="white-bg"> |
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|
||||
<form class="form-horizontal m" id="form-equipment-add"> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label is-required">设备编号:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="equipmentCode" class="form-control" type="text" required> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label is-required">设备名称:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="equipmentName" class="form-control" type="text" required> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">设备型号:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="equipmentModel" class="form-control" type="text"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">设备重量:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="equipmentWeight" class="form-control" type="text"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">设备状态:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<!-- <input name="equipmentState" class="form-control" type="text">--> |
|
||||
<select name="equipmentState" class="form-control select-list" th:with="type=${@dict.getType('equipment_state')}"> |
|
||||
<option value="">所有</option> |
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"></option> |
|
||||
</select> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">计量单位:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<!-- <input name="unitOfMeasurement" class="form-control" type="text">--> |
|
||||
<select name="unitOfMeasurement" id="unit" class="form-control select-list" th:with="type=${@dict.getType('sys_unit_class')}"> |
|
||||
<option value="">所有</option> |
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"></option> |
|
||||
</select> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">设备类别:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="equipmentCategory" class="form-control" type="text"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">出厂编号:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="factoryNumber" class="form-control" type="text"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">设备价格:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="equipmentPrice" class="form-control" type="text"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">厂家代码:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="manufacturerNumber" class="form-control" type="text"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">设备生产日期:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<div class="input-group date"> |
|
||||
<input name="dateOfManufacture" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">所在部门:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<!-- <input name="equipmentDept" class="form-control" type="text">--> |
|
||||
<select name="equipmentDept" id="dept" class="form-control select-list" th:with="type=${@dict.getType('sys_dept_type')}"> |
|
||||
<option value="">所有</option> |
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"></option> |
|
||||
</select> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">设备厂家名称:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="manufacturerName" class="form-control" type="text"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">设备使用日期:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<div class="input-group date"> |
|
||||
<input name="dateOfUse" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">折旧年数:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="depreciationYear" class="form-control" type="text"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">年折旧率:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="depreciationRate" class="form-control" type="text"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">设备存放位置:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="storageLocation" class="form-control" type="text"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">完成工序:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="completionOfProcess" class="form-control" type="text"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">负责人:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="equipmentManager" class="form-control" type="text"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">备注:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<textarea name="equipmentRemark" class="form-control" type="text"></textarea> |
|
||||
</div> |
|
||||
</div> |
|
||||
</form> |
|
||||
</div> |
|
||||
<th:block th:include="include :: footer" /> |
|
||||
<th:block th:include="include :: datetimepicker-js" /> |
|
||||
<th:block th:include="include :: select2-js"/> |
|
||||
<script th:inline="javascript"> |
|
||||
var prefix = ctx + "system/equipment" |
|
||||
$("#form-equipment-add").validate({ |
|
||||
focusCleanup: true |
|
||||
}); |
|
||||
|
|
||||
function submitHandler() { |
|
||||
if ($.validate.form()) { |
|
||||
$.operate.save(prefix + "/add", $('#form-equipment-add').serialize()); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
$("input[name='dateOfManufacture']").datetimepicker({ |
|
||||
format: "yyyy-mm-dd", |
|
||||
minView: "month", |
|
||||
autoclose: true, |
|
||||
todayBtn: true |
|
||||
}); |
|
||||
|
|
||||
$("input[name='dateOfUse']").datetimepicker({ |
|
||||
format: "yyyy-mm-dd", |
|
||||
minView: "month", |
|
||||
autoclose: true, |
|
||||
todayBtn: true |
|
||||
}); |
|
||||
|
|
||||
$("#form-equipment-add input[name='storageLocation']").val("设备仓") |
|
||||
</script> |
|
||||
</body> |
|
||||
</html> |
|
@ -1,183 +0,0 @@ |
|||||
<!DOCTYPE html> |
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|
||||
<head> |
|
||||
<th:block th:include="include :: header('修改设备档案信息')" /> |
|
||||
<th:block th:include="include :: datetimepicker-css" /> |
|
||||
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet"> |
|
||||
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet"> |
|
||||
</head> |
|
||||
<body class="white-bg"> |
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|
||||
<form class="form-horizontal m" id="form-equipment-edit" th:object="${sysEquipment}"> |
|
||||
<input name="equipmentId" th:field="*{equipmentId}" type="hidden"> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label is-required">设备编号:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="equipmentCode" th:field="*{equipmentCode}" class="form-control" type="text" required> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label is-required">设备名称:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="equipmentName" th:field="*{equipmentName}" class="form-control" type="text" required> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">设备型号:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="equipmentModel" th:field="*{equipmentModel}" class="form-control" type="text"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">设备重量:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="equipmentWeight" th:field="*{equipmentWeight}" class="form-control" type="text"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">设备状态:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<!-- <input name="equipmentState" class="form-control" type="text">--> |
|
||||
<select name="equipmentState" class="form-control select-list" th:field="*{equipmentState}" th:with="type=${@dict.getType('equipment_state')}"> |
|
||||
<option value="">所有</option> |
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"></option> |
|
||||
</select> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">计量单位:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<!-- <input name="unitOfMeasurement" th:field="*{unitOfMeasurement}" class="form-control" type="text">--> |
|
||||
<select name="unitOfMeasurement" id="unit" class="form-control select-list" th:field="*{unitOfMeasurement}" th:with="type=${@dict.getType('sys_unit_class')}"> |
|
||||
<option value="">所有</option> |
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"></option> |
|
||||
</select> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">设备类别:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="equipmentCategory" th:field="*{equipmentCategory}" class="form-control" type="text"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">出厂编号:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="factoryNumber" th:field="*{factoryNumber}" class="form-control" type="text"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">设备价格:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="equipmentPrice" th:field="*{equipmentPrice}" class="form-control" type="text"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">厂家代码:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="manufacturerNumber" th:field="*{manufacturerNumber}" class="form-control" type="text"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">设备生产日期:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<div class="input-group date"> |
|
||||
<input name="dateOfManufacture" th:field="*{dateOfManufacture}" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">所在部门:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<!-- <input name="equipmentDept" th:field="*{equipmentDept}" class="form-control" type="text">--> |
|
||||
<select name="equipmentDept" id="dept" class="form-control select-list" th:field="*{equipmentDept}" th:with="type=${@dict.getType('sys_dept_type')}"> |
|
||||
<option value="">所有</option> |
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"></option> |
|
||||
</select> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">设备厂家名称:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="manufacturerName" th:field="*{manufacturerName}" class="form-control" type="text"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">设备使用日期:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<div class="input-group date"> |
|
||||
<input name="dateOfUse" th:value="*{dateOfUse}" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">折旧年数:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="depreciationYear" th:field="*{depreciationYear}" class="form-control" type="text"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">年折旧率:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="depreciationRate" th:field="*{depreciationRate}" class="form-control" type="text"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">设备存放位置:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="storageLocation" th:field="*{storageLocation}" class="form-control" type="text"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">完成工序:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="completionOfProcess" th:field="*{completionOfProcess}" class="form-control" type="text"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">负责人:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="equipmentManager" th:field="*{equipmentManager}" class="form-control" type="text"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">备注:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<textarea name="equipmentRemark" th:field="*{equipmentRemark}" class="form-control" type="text"></textarea> |
|
||||
</div> |
|
||||
</div> |
|
||||
</form> |
|
||||
</div> |
|
||||
<th:block th:include="include :: footer" /> |
|
||||
<th:block th:include="include :: datetimepicker-js" /> |
|
||||
<th:block th:include="include :: select2-js"/> |
|
||||
<script th:inline="javascript"> |
|
||||
var prefix = ctx + "system/equipment"; |
|
||||
$("#form-equipment-edit").validate({ |
|
||||
focusCleanup: true |
|
||||
}); |
|
||||
|
|
||||
function submitHandler() { |
|
||||
if ($.validate.form()) { |
|
||||
$.operate.save(prefix + "/edit", $('#form-equipment-edit').serialize()); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
$("input[name='dateOfManufacture']").datetimepicker({ |
|
||||
format: "yyyy-mm-dd", |
|
||||
minView: "month", |
|
||||
autoclose: true, |
|
||||
todayBtn: true |
|
||||
}); |
|
||||
|
|
||||
$("input[name='dateOfUse']").datetimepicker({ |
|
||||
format: "yyyy-mm-dd", |
|
||||
minView: "month", |
|
||||
autoclose: true, |
|
||||
todayBtn: true |
|
||||
}); |
|
||||
</script> |
|
||||
</body> |
|
||||
</html> |
|
@ -1,211 +0,0 @@ |
|||||
<!DOCTYPE html> |
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> |
|
||||
<head> |
|
||||
<th:block th:include="include :: header('设备档案信息列表')" /> |
|
||||
</head> |
|
||||
<body class="gray-bg"> |
|
||||
<div class="container-div"> |
|
||||
<div class="row"> |
|
||||
<div class="col-sm-12 search-collapse"> |
|
||||
<form id="formId"> |
|
||||
<div class="select-list"> |
|
||||
<ul> |
|
||||
<li> |
|
||||
<label>设备编号:</label> |
|
||||
<input type="text" name="equipmentCode"/> |
|
||||
</li> |
|
||||
<li> |
|
||||
<label>设备名称:</label> |
|
||||
<input type="text" name="equipmentName"/> |
|
||||
</li> |
|
||||
<li> |
|
||||
<label>厂家代码:</label> |
|
||||
<input type="text" name="manufacturerNumber"/> |
|
||||
</li> |
|
||||
<li> |
|
||||
<label>设备厂家名称:</label> |
|
||||
<input type="text" name="manufacturerName"/> |
|
||||
</li> |
|
||||
<li> |
|
||||
<label>设备状态:</label> |
|
||||
<select name="equipmentState" th:with="type=${@dict.getType('equipment_state')}"> |
|
||||
<option value="">所有</option> |
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|
||||
</select> |
|
||||
</li> |
|
||||
<li> |
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a> |
|
||||
</li> |
|
||||
</ul> |
|
||||
</div> |
|
||||
</form> |
|
||||
</div> |
|
||||
|
|
||||
<div class="btn-group-sm" id="toolbar" role="group"> |
|
||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:equipment:add"> |
|
||||
<i class="fa fa-plus"></i> 添加 |
|
||||
</a> |
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:equipment:edit"> |
|
||||
<i class="fa fa-edit"></i> 修改 |
|
||||
</a> |
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:equipment:remove"> |
|
||||
<i class="fa fa-remove"></i> 删除 |
|
||||
</a> |
|
||||
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:equipment:export">--> |
|
||||
<!-- <i class="fa fa-download"></i> 导出--> |
|
||||
<!-- </a>--> |
|
||||
</div> |
|
||||
<div class="col-sm-12 select-table table-striped"> |
|
||||
<table id="bootstrap-table" style="white-space:nowrap"></table> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
<th:block th:include="include :: footer" /> |
|
||||
<script th:inline="javascript"> |
|
||||
var editFlag = [[${@permission.hasPermi('system:equipment:edit')}]]; |
|
||||
var removeFlag = [[${@permission.hasPermi('system:equipment:remove')}]]; |
|
||||
var equipmentDeptDatas = [[${@dict.getType('sys_dept_type')}]]; |
|
||||
var equipmentStateDatas = [[${@dict.getType('equipment_state')}]]; |
|
||||
var prefix = ctx + "system/equipment"; |
|
||||
|
|
||||
$(function() { |
|
||||
var options = { |
|
||||
url: prefix + "/list", |
|
||||
createUrl: prefix + "/add", |
|
||||
updateUrl: prefix + "/edit/{id}", |
|
||||
removeUrl: prefix + "/remove", |
|
||||
exportUrl: prefix + "/export", |
|
||||
clickToSelect: true, |
|
||||
modalName: "设备档案信息", |
|
||||
columns: [{ |
|
||||
checkbox: true |
|
||||
}, |
|
||||
{ |
|
||||
field: 'equipmentId', |
|
||||
title: '设备id', |
|
||||
visible: false |
|
||||
}, |
|
||||
{ |
|
||||
field: 'equipmentCode', |
|
||||
title: '设备编号' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'equipmentName', |
|
||||
title: '设备名称' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'equipmentModel', |
|
||||
title: '设备型号' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'equipmentState', |
|
||||
title: '设备状态', |
|
||||
formatter: function(value, row, index) { |
|
||||
return $.table.selectDictLabel(equipmentStateDatas, value); |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
field: 'equipmentWeight', |
|
||||
title: '设备重量' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'unitOfMeasurement', |
|
||||
title: '计量单位' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'equipmentCategory', |
|
||||
title: '设备类别' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'factoryNumber', |
|
||||
title: '出厂编号' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'equipmentPrice', |
|
||||
title: '设备价格' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'dateOfManufacture', |
|
||||
title: '设备生产日期' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'equipmentDept', |
|
||||
title: '所在部门', |
|
||||
formatter: function(value, row, index) { |
|
||||
return $.table.selectDictLabel(equipmentDeptDatas, value); |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
field: 'manufacturerName', |
|
||||
title: '设备厂家名称' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'dateOfUse', |
|
||||
title: '设备使用日期' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'depreciationYear', |
|
||||
title: '折旧年数' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'depreciationRate', |
|
||||
title: '年折旧率' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'storageLocation', |
|
||||
title: '设备存放位置' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'completionOfProcess', |
|
||||
title: '完成工序' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'equipmentManager', |
|
||||
title: '负责人' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'equipmentRemark', |
|
||||
title: '备注' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'firstAddTime', |
|
||||
title: '录入时间', |
|
||||
formatter: function (value, row, index) { |
|
||||
if (value == null) { |
|
||||
return ""; |
|
||||
} else { |
|
||||
return value; |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
field: 'updateInfoTime', |
|
||||
title: '上次修改时间', |
|
||||
formatter: function (value, row, index) { |
|
||||
if (value == null) { |
|
||||
return ""; |
|
||||
} else { |
|
||||
var vArr = value.split(',') |
|
||||
return vArr[0]; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
// { |
|
||||
// title: '操作', |
|
||||
// align: 'center', |
|
||||
// formatter: function(value, row, index) { |
|
||||
// var actions = []; |
|
||||
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.equipmentId + '\')"><i class="fa fa-edit"></i>编辑</a> '); |
|
||||
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.equipmentId + '\')"><i class="fa fa-remove"></i>删除</a>'); |
|
||||
// return actions.join(''); |
|
||||
// } |
|
||||
// } |
|
||||
] |
|
||||
}; |
|
||||
$.table.init(options); |
|
||||
}); |
|
||||
</script> |
|
||||
</body> |
|
||||
</html> |
|
Loading…
Reference in new issue