zhangsiqi
6 months ago
9 changed files with 1616 additions and 0 deletions
@ -0,0 +1,151 @@ |
|||
package com.ruoyi.financial.controller; |
|||
|
|||
import java.util.List; |
|||
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.GetMapping; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.ResponseBody; |
|||
import com.ruoyi.common.annotation.Log; |
|||
import com.ruoyi.common.enums.BusinessType; |
|||
import com.ruoyi.financial.domain.FinancialCompantFixedAssets; |
|||
import com.ruoyi.financial.service.IFinancialCompantFixedAssetsService; |
|||
import com.ruoyi.common.core.controller.BaseController; |
|||
import com.ruoyi.common.core.domain.AjaxResult; |
|||
import com.ruoyi.common.utils.poi.ExcelUtil; |
|||
import com.ruoyi.common.core.page.TableDataInfo; |
|||
|
|||
/** |
|||
* 公司固定资产Controller |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-05-28 |
|||
*/ |
|||
@Controller |
|||
@RequestMapping("/financial/compantFixedAssets") |
|||
public class FinancialCompantFixedAssetsController extends BaseController |
|||
{ |
|||
private String prefix = "financial/compantFixedAssets"; |
|||
|
|||
@Autowired |
|||
private IFinancialCompantFixedAssetsService financialCompantFixedAssetsService; |
|||
|
|||
@RequiresPermissions("financial:CompantFixedAssets:view") |
|||
@GetMapping() |
|||
public String CompantFixedAssets() |
|||
{ |
|||
return prefix + "/CompantFixedAssets"; |
|||
} |
|||
|
|||
/** |
|||
* 查询公司固定资产列表 |
|||
*/ |
|||
@RequiresPermissions("financial:CompantFixedAssets:list") |
|||
@PostMapping("/list") |
|||
@ResponseBody |
|||
public TableDataInfo list(FinancialCompantFixedAssets financialCompantFixedAssets) |
|||
{ |
|||
startPage(); |
|||
List<FinancialCompantFixedAssets> list = financialCompantFixedAssetsService.selectFinancialCompantFixedAssetsList(financialCompantFixedAssets); |
|||
return getDataTable(list); |
|||
} |
|||
|
|||
/** |
|||
* 导出公司固定资产列表 |
|||
*/ |
|||
@RequiresPermissions("financial:CompantFixedAssets:export") |
|||
@Log(title = "公司固定资产", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
@ResponseBody |
|||
public AjaxResult export(FinancialCompantFixedAssets financialCompantFixedAssets) |
|||
{ |
|||
List<FinancialCompantFixedAssets> list = financialCompantFixedAssetsService.selectFinancialCompantFixedAssetsList(financialCompantFixedAssets); |
|||
ExcelUtil<FinancialCompantFixedAssets> util = new ExcelUtil<FinancialCompantFixedAssets>(FinancialCompantFixedAssets.class); |
|||
return util.exportExcel(list, "公司固定资产数据"); |
|||
} |
|||
|
|||
/** |
|||
* 新增公司固定资产 |
|||
*/ |
|||
@GetMapping("/add") |
|||
public String add() |
|||
{ |
|||
return prefix + "/add"; |
|||
} |
|||
|
|||
/** |
|||
* 新增保存公司固定资产 |
|||
*/ |
|||
@RequiresPermissions("financial:CompantFixedAssets:add") |
|||
@Log(title = "公司固定资产", businessType = BusinessType.INSERT) |
|||
@PostMapping("/add") |
|||
@ResponseBody |
|||
public AjaxResult addSave(FinancialCompantFixedAssets financialCompantFixedAssets) |
|||
{ |
|||
return toAjax(financialCompantFixedAssetsService.insertFinancialCompantFixedAssets(financialCompantFixedAssets)); |
|||
} |
|||
|
|||
/** |
|||
* 修改公司固定资产 |
|||
*/ |
|||
@GetMapping("/edit/{compantFixedAssetsId}") |
|||
public String edit(@PathVariable("compantFixedAssetsId") Long compantFixedAssetsId, ModelMap mmap) |
|||
{ |
|||
FinancialCompantFixedAssets financialCompantFixedAssets = financialCompantFixedAssetsService.selectFinancialCompantFixedAssetsById(compantFixedAssetsId); |
|||
mmap.put("financialCompantFixedAssets", financialCompantFixedAssets); |
|||
return prefix + "/edit"; |
|||
} |
|||
|
|||
/** |
|||
* 修改保存公司固定资产 |
|||
*/ |
|||
@RequiresPermissions("financial:CompantFixedAssets:edit") |
|||
@Log(title = "公司固定资产", businessType = BusinessType.UPDATE) |
|||
@PostMapping("/edit") |
|||
@ResponseBody |
|||
public AjaxResult editSave(FinancialCompantFixedAssets financialCompantFixedAssets) |
|||
{ |
|||
return toAjax(financialCompantFixedAssetsService.updateFinancialCompantFixedAssets(financialCompantFixedAssets)); |
|||
} |
|||
|
|||
/** |
|||
* 删除公司固定资产 |
|||
*/ |
|||
@RequiresPermissions("financial:CompantFixedAssets:remove") |
|||
@Log(title = "公司固定资产", businessType = BusinessType.DELETE) |
|||
@PostMapping( "/remove") |
|||
@ResponseBody |
|||
public AjaxResult remove(String ids) |
|||
{ |
|||
return toAjax(financialCompantFixedAssetsService.deleteFinancialCompantFixedAssetsByIds(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 作废公司固定资产 |
|||
*/ |
|||
@RequiresPermissions("financial:CompantFixedAssets:cancel") |
|||
@Log(title = "公司固定资产", businessType = BusinessType.CANCEL) |
|||
@GetMapping( "/cancel/{id}") |
|||
@ResponseBody |
|||
public AjaxResult cancel(@PathVariable("id") Long id){ |
|||
return toAjax(financialCompantFixedAssetsService.cancelFinancialCompantFixedAssetsById(id)); |
|||
} |
|||
|
|||
/** |
|||
* 恢复公司固定资产 |
|||
*/ |
|||
@RequiresPermissions("financial:CompantFixedAssets:restore") |
|||
@Log(title = "公司固定资产", businessType = BusinessType.RESTORE) |
|||
@GetMapping( "/restore/{id}") |
|||
@ResponseBody |
|||
public AjaxResult restore(@PathVariable("id")Long id) |
|||
{ |
|||
return toAjax(financialCompantFixedAssetsService.restoreFinancialCompantFixedAssetsById(id)); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,371 @@ |
|||
package com.ruoyi.financial.domain; |
|||
|
|||
import org.apache.commons.lang3.builder.ToStringBuilder; |
|||
import org.apache.commons.lang3.builder.ToStringStyle; |
|||
import com.ruoyi.common.annotation.Excel; |
|||
import com.ruoyi.common.core.domain.BaseEntity; |
|||
|
|||
/** |
|||
* 公司固定资产对象 financial_compant_fixed_assets |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-05-28 |
|||
*/ |
|||
public class FinancialCompantFixedAssets extends BaseEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** 设备档案id */ |
|||
private Long compantFixedAssetsId; |
|||
|
|||
/** 料号 */ |
|||
@Excel(name = "料号") |
|||
private String materialCode; |
|||
|
|||
/** 物料名称 */ |
|||
@Excel(name = "物料名称") |
|||
private String materialName; |
|||
/** 设备编号 */ |
|||
@Excel(name = "设备编号") |
|||
private String equipCode; |
|||
/** 设备名称 */ |
|||
@Excel(name = "设备名称") |
|||
private String equipName; |
|||
|
|||
/** 设备型号 */ |
|||
@Excel(name = "设备型号") |
|||
private String equipModel; |
|||
|
|||
/** 设备重量 */ |
|||
@Excel(name = "设备重量") |
|||
private String equipWeight; |
|||
|
|||
/** 设备状态 */ |
|||
@Excel(name = "设备状态") |
|||
private String equipStatus; |
|||
|
|||
/** 计量单位 */ |
|||
@Excel(name = "计量单位") |
|||
private String equipUnit; |
|||
|
|||
/** 设备类别 */ |
|||
@Excel(name = "设备类别") |
|||
private String equipCategory; |
|||
|
|||
/** 出厂编号 */ |
|||
@Excel(name = "出厂编号") |
|||
private String factoryCode; |
|||
|
|||
/** 设备价格 */ |
|||
@Excel(name = "设备价格") |
|||
private Long equipPrice; |
|||
|
|||
/** 厂家代码 */ |
|||
@Excel(name = "厂家代码") |
|||
private String manufacturerCode; |
|||
|
|||
/** 设备生产日期 */ |
|||
@Excel(name = "设备生产日期") |
|||
private String equipProductionDate; |
|||
|
|||
/** 所在部门 */ |
|||
@Excel(name = "所在部门") |
|||
private String department; |
|||
|
|||
/** 设备厂家名称 */ |
|||
@Excel(name = "设备厂家名称") |
|||
private String equipManufacturerName; |
|||
|
|||
/** 设备使用日期 */ |
|||
@Excel(name = "设备使用日期") |
|||
private String equipUsageDate; |
|||
|
|||
/** 折旧年数 */ |
|||
@Excel(name = "折旧年数") |
|||
private String depreciationYears; |
|||
|
|||
/** 年折旧率 */ |
|||
@Excel(name = "年折旧率") |
|||
private String annualDepreciationRate; |
|||
|
|||
/** 设备存放位置 */ |
|||
@Excel(name = "设备存放位置") |
|||
private String equipStorageLocation; |
|||
|
|||
/** 完成工序 */ |
|||
@Excel(name = "完成工序") |
|||
private String completeTheProcess; |
|||
|
|||
/** 负责人 */ |
|||
@Excel(name = "负责人") |
|||
private String esponsiblePerson; |
|||
|
|||
/** 使用状态 */ |
|||
@Excel(name = "使用状态") |
|||
private String useStatus; |
|||
|
|||
/** 审核状态 */ |
|||
@Excel(name = "审核状态") |
|||
private String auditStatus; |
|||
|
|||
/** 删除标志 */ |
|||
private String delFlag; |
|||
|
|||
|
|||
public void setCompantFixedAssetsId(Long compantFixedAssetsId) |
|||
{ |
|||
this.compantFixedAssetsId = compantFixedAssetsId; |
|||
} |
|||
|
|||
public Long getCompantFixedAssetsId() |
|||
{ |
|||
return compantFixedAssetsId; |
|||
} |
|||
|
|||
public String getEquipCode() { |
|||
return equipCode; |
|||
} |
|||
|
|||
public void setEquipCode(String equipCode) { |
|||
this.equipCode = equipCode; |
|||
} |
|||
|
|||
public String getEquipName() { |
|||
return equipName; |
|||
} |
|||
|
|||
public void setEquipName(String equipName) { |
|||
this.equipName = equipName; |
|||
} |
|||
public void setMaterialCode(String materialCode) |
|||
{ |
|||
this.materialCode = materialCode; |
|||
} |
|||
|
|||
public String getMaterialCode() |
|||
{ |
|||
return materialCode; |
|||
} |
|||
public void setMaterialName(String materialName) |
|||
{ |
|||
this.materialName = materialName; |
|||
} |
|||
|
|||
public String getMaterialName() |
|||
{ |
|||
return materialName; |
|||
} |
|||
public void setEquipModel(String equipModel) |
|||
{ |
|||
this.equipModel = equipModel; |
|||
} |
|||
|
|||
public String getEquipModel() |
|||
{ |
|||
return equipModel; |
|||
} |
|||
public void setEquipWeight(String equipWeight) |
|||
{ |
|||
this.equipWeight = equipWeight; |
|||
} |
|||
|
|||
public String getEquipWeight() |
|||
{ |
|||
return equipWeight; |
|||
} |
|||
public void setEquipStatus(String equipStatus) |
|||
{ |
|||
this.equipStatus = equipStatus; |
|||
} |
|||
|
|||
public String getEquipStatus() |
|||
{ |
|||
return equipStatus; |
|||
} |
|||
public void setEquipUnit(String equipUnit) |
|||
{ |
|||
this.equipUnit = equipUnit; |
|||
} |
|||
|
|||
public String getEquipUnit() |
|||
{ |
|||
return equipUnit; |
|||
} |
|||
public void setEquipCategory(String equipCategory) |
|||
{ |
|||
this.equipCategory = equipCategory; |
|||
} |
|||
|
|||
public String getEquipCategory() |
|||
{ |
|||
return equipCategory; |
|||
} |
|||
public void setFactoryCode(String factoryCode) |
|||
{ |
|||
this.factoryCode = factoryCode; |
|||
} |
|||
|
|||
public String getFactoryCode() |
|||
{ |
|||
return factoryCode; |
|||
} |
|||
public void setEquipPrice(Long equipPrice) |
|||
{ |
|||
this.equipPrice = equipPrice; |
|||
} |
|||
|
|||
public Long getEquipPrice() |
|||
{ |
|||
return equipPrice; |
|||
} |
|||
public void setManufacturerCode(String manufacturerCode) |
|||
{ |
|||
this.manufacturerCode = manufacturerCode; |
|||
} |
|||
|
|||
public String getManufacturerCode() |
|||
{ |
|||
return manufacturerCode; |
|||
} |
|||
public void setEquipProductionDate(String equipProductionDate) |
|||
{ |
|||
this.equipProductionDate = equipProductionDate; |
|||
} |
|||
|
|||
public String getEquipProductionDate() |
|||
{ |
|||
return equipProductionDate; |
|||
} |
|||
public void setDepartment(String department) |
|||
{ |
|||
this.department = department; |
|||
} |
|||
|
|||
public String getDepartment() |
|||
{ |
|||
return department; |
|||
} |
|||
public void setEquipManufacturerName(String equipManufacturerName) |
|||
{ |
|||
this.equipManufacturerName = equipManufacturerName; |
|||
} |
|||
|
|||
public String getEquipManufacturerName() |
|||
{ |
|||
return equipManufacturerName; |
|||
} |
|||
public void setEquipUsageDate(String equipUsageDate) |
|||
{ |
|||
this.equipUsageDate = equipUsageDate; |
|||
} |
|||
|
|||
public String getEquipUsageDate() |
|||
{ |
|||
return equipUsageDate; |
|||
} |
|||
public void setDepreciationYears(String depreciationYears) |
|||
{ |
|||
this.depreciationYears = depreciationYears; |
|||
} |
|||
|
|||
public String getDepreciationYears() |
|||
{ |
|||
return depreciationYears; |
|||
} |
|||
public void setAnnualDepreciationRate(String annualDepreciationRate) |
|||
{ |
|||
this.annualDepreciationRate = annualDepreciationRate; |
|||
} |
|||
|
|||
public String getAnnualDepreciationRate() |
|||
{ |
|||
return annualDepreciationRate; |
|||
} |
|||
public void setEquipStorageLocation(String equipStorageLocation) |
|||
{ |
|||
this.equipStorageLocation = equipStorageLocation; |
|||
} |
|||
|
|||
public String getEquipStorageLocation() |
|||
{ |
|||
return equipStorageLocation; |
|||
} |
|||
public void setCompleteTheProcess(String completeTheProcess) |
|||
{ |
|||
this.completeTheProcess = completeTheProcess; |
|||
} |
|||
|
|||
public String getCompleteTheProcess() |
|||
{ |
|||
return completeTheProcess; |
|||
} |
|||
public void setEsponsiblePerson(String esponsiblePerson) |
|||
{ |
|||
this.esponsiblePerson = esponsiblePerson; |
|||
} |
|||
|
|||
public String getEsponsiblePerson() |
|||
{ |
|||
return esponsiblePerson; |
|||
} |
|||
public void setUseStatus(String useStatus) |
|||
{ |
|||
this.useStatus = useStatus; |
|||
} |
|||
|
|||
public String getUseStatus() |
|||
{ |
|||
return useStatus; |
|||
} |
|||
public void setAuditStatus(String auditStatus) |
|||
{ |
|||
this.auditStatus = auditStatus; |
|||
} |
|||
|
|||
public String getAuditStatus() |
|||
{ |
|||
return auditStatus; |
|||
} |
|||
public void setDelFlag(String delFlag) |
|||
{ |
|||
this.delFlag = delFlag; |
|||
} |
|||
|
|||
public String getDelFlag() |
|||
{ |
|||
return delFlag; |
|||
} |
|||
@Override |
|||
public String toString() { |
|||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
|||
.append("compantFixedAssetsId", getCompantFixedAssetsId()) |
|||
.append("materialCode", getMaterialCode()) |
|||
.append("materialName", getMaterialName()) |
|||
.append("equipModel", getEquipModel()) |
|||
.append("equipWeight", getEquipWeight()) |
|||
.append("equipStatus", getEquipStatus()) |
|||
.append("equipUnit", getEquipUnit()) |
|||
.append("equipCategory", getEquipCategory()) |
|||
.append("factoryCode", getFactoryCode()) |
|||
.append("equipPrice", getEquipPrice()) |
|||
.append("manufacturerCode", getManufacturerCode()) |
|||
.append("equipProductionDate", getEquipProductionDate()) |
|||
.append("department", getDepartment()) |
|||
.append("equipManufacturerName", getEquipManufacturerName()) |
|||
.append("equipUsageDate", getEquipUsageDate()) |
|||
.append("depreciationYears", getDepreciationYears()) |
|||
.append("annualDepreciationRate", getAnnualDepreciationRate()) |
|||
.append("equipStorageLocation", getEquipStorageLocation()) |
|||
.append("completeTheProcess", getCompleteTheProcess()) |
|||
.append("esponsiblePerson", getEsponsiblePerson()) |
|||
.append("remark", getRemark()) |
|||
.append("createBy", getCreateBy()) |
|||
.append("createTime", getCreateTime()) |
|||
.append("updateBy", getUpdateBy()) |
|||
.append("updateTime", getUpdateTime()) |
|||
.append("useStatus", getUseStatus()) |
|||
.append("auditStatus", getAuditStatus()) |
|||
.append("delFlag", getDelFlag()) |
|||
.toString(); |
|||
} |
|||
} |
@ -0,0 +1,77 @@ |
|||
package com.ruoyi.financial.mapper; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.financial.domain.FinancialCompantFixedAssets; |
|||
|
|||
/** |
|||
* 公司固定资产Mapper接口 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-05-28 |
|||
*/ |
|||
public interface FinancialCompantFixedAssetsMapper |
|||
{ |
|||
/** |
|||
* 查询公司固定资产 |
|||
* |
|||
* @param compantFixedAssetsId 公司固定资产ID |
|||
* @return 公司固定资产 |
|||
*/ |
|||
public FinancialCompantFixedAssets selectFinancialCompantFixedAssetsById(Long compantFixedAssetsId); |
|||
|
|||
/** |
|||
* 查询公司固定资产列表 |
|||
* |
|||
* @param financialCompantFixedAssets 公司固定资产 |
|||
* @return 公司固定资产集合 |
|||
*/ |
|||
public List<FinancialCompantFixedAssets> selectFinancialCompantFixedAssetsList(FinancialCompantFixedAssets financialCompantFixedAssets); |
|||
|
|||
/** |
|||
* 新增公司固定资产 |
|||
* |
|||
* @param financialCompantFixedAssets 公司固定资产 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertFinancialCompantFixedAssets(FinancialCompantFixedAssets financialCompantFixedAssets); |
|||
|
|||
/** |
|||
* 修改公司固定资产 |
|||
* |
|||
* @param financialCompantFixedAssets 公司固定资产 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateFinancialCompantFixedAssets(FinancialCompantFixedAssets financialCompantFixedAssets); |
|||
|
|||
/** |
|||
* 删除公司固定资产 |
|||
* |
|||
* @param compantFixedAssetsId 公司固定资产ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteFinancialCompantFixedAssetsById(Long compantFixedAssetsId); |
|||
|
|||
/** |
|||
* 批量删除公司固定资产 |
|||
* |
|||
* @param compantFixedAssetsIds 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteFinancialCompantFixedAssetsByIds(String[] compantFixedAssetsIds); |
|||
|
|||
/** |
|||
* 作废公司固定资产 |
|||
* |
|||
* @param compantFixedAssetsId 公司固定资产ID |
|||
* @return 结果 |
|||
*/ |
|||
public int cancelFinancialCompantFixedAssetsById(Long compantFixedAssetsId); |
|||
|
|||
/** |
|||
* 恢复公司固定资产 |
|||
* |
|||
* @param compantFixedAssetsId 公司固定资产ID |
|||
* @return 结果 |
|||
*/ |
|||
public int restoreFinancialCompantFixedAssetsById(Long compantFixedAssetsId); |
|||
} |
@ -0,0 +1,75 @@ |
|||
package com.ruoyi.financial.service; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.financial.domain.FinancialCompantFixedAssets; |
|||
|
|||
/** |
|||
* 公司固定资产Service接口 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-05-28 |
|||
*/ |
|||
public interface IFinancialCompantFixedAssetsService |
|||
{ |
|||
/** |
|||
* 查询公司固定资产 |
|||
* |
|||
* @param compantFixedAssetsId 公司固定资产ID |
|||
* @return 公司固定资产 |
|||
*/ |
|||
public FinancialCompantFixedAssets selectFinancialCompantFixedAssetsById(Long compantFixedAssetsId); |
|||
|
|||
/** |
|||
* 查询公司固定资产列表 |
|||
* |
|||
* @param financialCompantFixedAssets 公司固定资产 |
|||
* @return 公司固定资产集合 |
|||
*/ |
|||
public List<FinancialCompantFixedAssets> selectFinancialCompantFixedAssetsList(FinancialCompantFixedAssets financialCompantFixedAssets); |
|||
|
|||
/** |
|||
* 新增公司固定资产 |
|||
* |
|||
* @param financialCompantFixedAssets 公司固定资产 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertFinancialCompantFixedAssets(FinancialCompantFixedAssets financialCompantFixedAssets); |
|||
|
|||
/** |
|||
* 修改公司固定资产 |
|||
* |
|||
* @param financialCompantFixedAssets 公司固定资产 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateFinancialCompantFixedAssets(FinancialCompantFixedAssets financialCompantFixedAssets); |
|||
|
|||
/** |
|||
* 批量删除公司固定资产 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteFinancialCompantFixedAssetsByIds(String ids); |
|||
|
|||
/** |
|||
* 删除公司固定资产信息 |
|||
* |
|||
* @param compantFixedAssetsId 公司固定资产ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteFinancialCompantFixedAssetsById(Long compantFixedAssetsId); |
|||
|
|||
/** |
|||
* 作废公司固定资产 |
|||
* @param compantFixedAssetsId 公司固定资产ID |
|||
* @return |
|||
*/ |
|||
int cancelFinancialCompantFixedAssetsById(Long compantFixedAssetsId); |
|||
|
|||
/** |
|||
* 恢复公司固定资产 |
|||
* @param compantFixedAssetsId 公司固定资产ID |
|||
* @return |
|||
*/ |
|||
int restoreFinancialCompantFixedAssetsById(Long compantFixedAssetsId); |
|||
} |
@ -0,0 +1,126 @@ |
|||
package com.ruoyi.financial.service.impl; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.common.utils.DateUtils; |
|||
import com.ruoyi.common.utils.ShiroUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import com.ruoyi.financial.mapper.FinancialCompantFixedAssetsMapper; |
|||
import com.ruoyi.financial.domain.FinancialCompantFixedAssets; |
|||
import com.ruoyi.financial.service.IFinancialCompantFixedAssetsService; |
|||
import com.ruoyi.common.core.text.Convert; |
|||
|
|||
/** |
|||
* 公司固定资产Service业务层处理 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-05-28 |
|||
*/ |
|||
@Service |
|||
public class FinancialCompantFixedAssetsServiceImpl implements IFinancialCompantFixedAssetsService |
|||
{ |
|||
@Autowired |
|||
private FinancialCompantFixedAssetsMapper financialCompantFixedAssetsMapper; |
|||
|
|||
/** |
|||
* 查询公司固定资产 |
|||
* |
|||
* @param compantFixedAssetsId 公司固定资产ID |
|||
* @return 公司固定资产 |
|||
*/ |
|||
@Override |
|||
public FinancialCompantFixedAssets selectFinancialCompantFixedAssetsById(Long compantFixedAssetsId) |
|||
{ |
|||
return financialCompantFixedAssetsMapper.selectFinancialCompantFixedAssetsById(compantFixedAssetsId); |
|||
} |
|||
|
|||
/** |
|||
* 查询公司固定资产列表 |
|||
* |
|||
* @param financialCompantFixedAssets 公司固定资产 |
|||
* @return 公司固定资产 |
|||
*/ |
|||
@Override |
|||
public List<FinancialCompantFixedAssets> selectFinancialCompantFixedAssetsList(FinancialCompantFixedAssets financialCompantFixedAssets) |
|||
{ |
|||
return financialCompantFixedAssetsMapper.selectFinancialCompantFixedAssetsList(financialCompantFixedAssets); |
|||
} |
|||
|
|||
/** |
|||
* 新增公司固定资产 |
|||
* |
|||
* @param financialCompantFixedAssets 公司固定资产 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int insertFinancialCompantFixedAssets(FinancialCompantFixedAssets financialCompantFixedAssets) |
|||
{ |
|||
String loginName = ShiroUtils.getLoginName(); |
|||
financialCompantFixedAssets.setCreateBy(loginName); |
|||
financialCompantFixedAssets.setCreateTime(DateUtils.getNowDate()); |
|||
return financialCompantFixedAssetsMapper.insertFinancialCompantFixedAssets(financialCompantFixedAssets); |
|||
} |
|||
|
|||
/** |
|||
* 修改公司固定资产 |
|||
* |
|||
* @param financialCompantFixedAssets 公司固定资产 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int updateFinancialCompantFixedAssets(FinancialCompantFixedAssets financialCompantFixedAssets) |
|||
{ |
|||
String loginName = ShiroUtils.getLoginName(); |
|||
financialCompantFixedAssets.setUpdateBy(loginName); |
|||
financialCompantFixedAssets.setUpdateTime(DateUtils.getNowDate()); |
|||
return financialCompantFixedAssetsMapper.updateFinancialCompantFixedAssets(financialCompantFixedAssets); |
|||
} |
|||
|
|||
/** |
|||
* 删除公司固定资产对象 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteFinancialCompantFixedAssetsByIds(String ids) |
|||
{ |
|||
return financialCompantFixedAssetsMapper.deleteFinancialCompantFixedAssetsByIds(Convert.toStrArray(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 删除公司固定资产信息 |
|||
* |
|||
* @param compantFixedAssetsId 公司固定资产ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteFinancialCompantFixedAssetsById(Long compantFixedAssetsId) |
|||
{ |
|||
return financialCompantFixedAssetsMapper.deleteFinancialCompantFixedAssetsById(compantFixedAssetsId); |
|||
} |
|||
|
|||
/** |
|||
* 作废公司固定资产 |
|||
* |
|||
* @param compantFixedAssetsId 公司固定资产ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int cancelFinancialCompantFixedAssetsById(Long compantFixedAssetsId) |
|||
{ |
|||
return financialCompantFixedAssetsMapper.cancelFinancialCompantFixedAssetsById(compantFixedAssetsId); |
|||
} |
|||
|
|||
/** |
|||
* 恢复公司固定资产信息 |
|||
* |
|||
* @param compantFixedAssetsId 公司固定资产ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int restoreFinancialCompantFixedAssetsById(Long compantFixedAssetsId) |
|||
{ |
|||
return financialCompantFixedAssetsMapper.restoreFinancialCompantFixedAssetsById(compantFixedAssetsId); |
|||
} |
|||
} |
@ -0,0 +1,198 @@ |
|||
<?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.financial.mapper.FinancialCompantFixedAssetsMapper"> |
|||
|
|||
<resultMap type="FinancialCompantFixedAssets" id="FinancialCompantFixedAssetsResult"> |
|||
<result property="compantFixedAssetsId" column="compant_fixed_assets_id" /> |
|||
<result property="materialCode" column="material_code" /> |
|||
<result property="materialName" column="material_name" /> |
|||
<result property="equipCode" column="equip_code" /> |
|||
<result property="equipName" column="equip_name" /> |
|||
<result property="equipModel" column="equip_model" /> |
|||
<result property="equipWeight" column="equip_ weight" /> |
|||
<result property="equipStatus" column="equip_status" /> |
|||
<result property="equipUnit" column="equip_unit" /> |
|||
<result property="equipCategory" column="equip_category" /> |
|||
<result property="factoryCode" column="factory_code" /> |
|||
<result property="equipPrice" column="equip_price" /> |
|||
<result property="manufacturerCode" column="manufacturer_code" /> |
|||
<result property="equipProductionDate" column="equip_production_date" /> |
|||
<result property="department" column="department" /> |
|||
<result property="equipManufacturerName" column="equip_manufacturer_name" /> |
|||
<result property="equipUsageDate" column="equip_usage_date" /> |
|||
<result property="depreciationYears" column="depreciation_years" /> |
|||
<result property="annualDepreciationRate" column="annual_depreciation_rate" /> |
|||
<result property="equipStorageLocation" column="equip_storage_location" /> |
|||
<result property="completeTheProcess" column="complete_the_process" /> |
|||
<result property="esponsiblePerson" column="esponsible_person" /> |
|||
<result property="remark" column="remark" /> |
|||
<result property="createBy" column="create_by" /> |
|||
<result property="createTime" column="create_time" /> |
|||
<result property="updateBy" column="update_by" /> |
|||
<result property="updateTime" column="update_time" /> |
|||
<result property="useStatus" column="use_status" /> |
|||
<result property="auditStatus" column="audit_status" /> |
|||
<result property="delFlag" column="del_flag" /> |
|||
</resultMap> |
|||
|
|||
<sql id="selectFinancialCompantFixedAssetsVo"> |
|||
select compant_fixed_assets_id, material_code, material_name,equip_code,equip_name, equip_model, |
|||
equip_weight, equip_status, equip_unit, equip_category, factory_code, |
|||
equip_price, manufacturer_code, equip_production_date, department, equip_manufacturer_name, |
|||
equip_usage_date, depreciation_years, annual_depreciation_rate, equip_storage_location, |
|||
complete_the_process, esponsible_person, remark, create_by, create_time, update_by, |
|||
update_time, use_status, audit_status, del_flag |
|||
from financial_compant_fixed_assets |
|||
</sql> |
|||
|
|||
<select id="selectFinancialCompantFixedAssetsList" parameterType="FinancialCompantFixedAssets" resultMap="FinancialCompantFixedAssetsResult"> |
|||
<include refid="selectFinancialCompantFixedAssetsVo"/> |
|||
<where> |
|||
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if> |
|||
<if test="materialName != null and materialName != ''"> and material_name = #{materialName}</if> |
|||
<if test="equipCode != null and equipCode != ''"> and equip_code = #{equipCode}</if> |
|||
<if test="equipName != null and equipName != ''"> and equip_name = #{equipName}</if> |
|||
<if test="equipModel != null and equipModel != ''"> and equip_model = #{equipModel}</if> |
|||
<if test="params.beginEquipStatus != null and params.beginEquipStatus != '' and params.endEquipStatus != null and params.endEquipStatus != ''"> and equip_status between #{params.beginEquipStatus} and #{params.endEquipStatus}</if> |
|||
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if> |
|||
<if test="equipPrice != null "> and equip_price = #{equipPrice}</if> |
|||
<if test="manufacturerCode != null and manufacturerCode != ''"> and manufacturer_code = #{manufacturerCode}</if> |
|||
<if test="params.beginEquipProductionDate != null and params.beginEquipProductionDate != '' and params.endEquipProductionDate != null and params.endEquipProductionDate != ''"> and equip_production_date between #{params.beginEquipProductionDate} and #{params.endEquipProductionDate}</if> |
|||
<if test="department != null and department != ''"> and department = #{department}</if> |
|||
<if test="equipManufacturerName != null and equipManufacturerName != ''"> and equip_manufacturer_name like concat('%', #{equipManufacturerName}, '%')</if> |
|||
<if test="equipStorageLocation != null and equipStorageLocation != ''"> and equip_storage_location = #{equipStorageLocation}</if> |
|||
<if test="esponsiblePerson != null and esponsiblePerson != ''"> and esponsible_person = #{esponsiblePerson}</if> |
|||
<if test="useStatus != null and useStatus != ''"> and use_status = #{useStatus}</if> |
|||
<if test="auditStatus != null and auditStatus != ''"> and audit_status = #{auditStatus}</if> |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectFinancialCompantFixedAssetsById" parameterType="Long" resultMap="FinancialCompantFixedAssetsResult"> |
|||
<include refid="selectFinancialCompantFixedAssetsVo"/> |
|||
where compant_fixed_assets_id = #{compantFixedAssetsId} |
|||
</select> |
|||
|
|||
<insert id="insertFinancialCompantFixedAssets" parameterType="FinancialCompantFixedAssets" useGeneratedKeys="true" keyProperty="compantFixedAssetsId"> |
|||
insert into financial_compant_fixed_assets |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="materialCode != null">material_code,</if> |
|||
<if test="materialName != null">material_name,</if> |
|||
<if test="equipCode != null">equip_code,</if> |
|||
<if test="equipName != null">equip_name,</if> |
|||
<if test="equipModel != null">equip_model,</if> |
|||
<if test="equipWeight != null">equip_weight,</if> |
|||
<if test="equipStatus != null">equip_status,</if> |
|||
<if test="equipUnit != null">equip_unit,</if> |
|||
<if test="equipCategory != null">equip_category,</if> |
|||
<if test="factoryCode != null">factory_code,</if> |
|||
<if test="equipPrice != null">equip_price,</if> |
|||
<if test="manufacturerCode != null">manufacturer_code,</if> |
|||
<if test="equipProductionDate != null">equip_production_date,</if> |
|||
<if test="department != null">department,</if> |
|||
<if test="equipManufacturerName != null">equip_manufacturer_name,</if> |
|||
<if test="equipUsageDate != null">equip_usage_date,</if> |
|||
<if test="depreciationYears != null">depreciation_years,</if> |
|||
<if test="annualDepreciationRate != null">annual_depreciation_rate,</if> |
|||
<if test="equipStorageLocation != null">equip_storage_location,</if> |
|||
<if test="completeTheProcess != null">complete_the_process,</if> |
|||
<if test="esponsiblePerson != null">esponsible_person,</if> |
|||
<if test="remark != null">remark,</if> |
|||
<if test="createBy != null">create_by,</if> |
|||
<if test="createTime != null">create_time,</if> |
|||
<if test="updateBy != null">update_by,</if> |
|||
<if test="updateTime != null">update_time,</if> |
|||
<if test="useStatus != null">use_status,</if> |
|||
<if test="auditStatus != null">audit_status,</if> |
|||
<if test="delFlag != null">del_flag,</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="materialCode != null">#{materialCode},</if> |
|||
<if test="materialName != null">#{materialName},</if> |
|||
<if test="equipCode != null">#{equipCode},</if> |
|||
<if test="equipName != null">#{equipName},</if> |
|||
<if test="equipModel != null">#{equipModel},</if> |
|||
<if test="equipWeight != null">#{equipWeight},</if> |
|||
<if test="equipStatus != null">#{equipStatus},</if> |
|||
<if test="equipUnit != null">#{equipUnit},</if> |
|||
<if test="equipCategory != null">#{equipCategory},</if> |
|||
<if test="factoryCode != null">#{factoryCode},</if> |
|||
<if test="equipPrice != null">#{equipPrice},</if> |
|||
<if test="manufacturerCode != null">#{manufacturerCode},</if> |
|||
<if test="equipProductionDate != null">#{equipProductionDate},</if> |
|||
<if test="department != null">#{department},</if> |
|||
<if test="equipManufacturerName != null">#{equipManufacturerName},</if> |
|||
<if test="equipUsageDate != null">#{equipUsageDate},</if> |
|||
<if test="depreciationYears != null">#{depreciationYears},</if> |
|||
<if test="annualDepreciationRate != null">#{annualDepreciationRate},</if> |
|||
<if test="equipStorageLocation != null">#{equipStorageLocation},</if> |
|||
<if test="completeTheProcess != null">#{completeTheProcess},</if> |
|||
<if test="esponsiblePerson != null">#{esponsiblePerson},</if> |
|||
<if test="remark != null">#{remark},</if> |
|||
<if test="createBy != null">#{createBy},</if> |
|||
<if test="createTime != null">#{createTime},</if> |
|||
<if test="updateBy != null">#{updateBy},</if> |
|||
<if test="updateTime != null">#{updateTime},</if> |
|||
<if test="useStatus != null">#{useStatus},</if> |
|||
<if test="auditStatus != null">#{auditStatus},</if> |
|||
<if test="delFlag != null">#{delFlag},</if> |
|||
</trim> |
|||
</insert> |
|||
|
|||
<update id="updateFinancialCompantFixedAssets" parameterType="FinancialCompantFixedAssets"> |
|||
update financial_compant_fixed_assets |
|||
<trim prefix="SET" suffixOverrides=","> |
|||
<if test="materialCode != null">material_code = #{materialCode},</if> |
|||
<if test="materialName != null">material_name = #{materialName},</if> |
|||
<if test="equipCode != null">equip_code = #{equipCode},</if> |
|||
<if test="equipName != null">equip_name = #{equipName},</if> |
|||
<if test="equipModel != null">equip_model = #{equipModel},</if> |
|||
<if test="equipWeight != null">equip_ weight = #{equipWeight},</if> |
|||
<if test="equipStatus != null">equip_status = #{equipStatus},</if> |
|||
<if test="equipUnit != null">equip_unit = #{equipUnit},</if> |
|||
<if test="equipCategory != null">equip_category = #{equipCategory},</if> |
|||
<if test="factoryCode != null">factory_code = #{factoryCode},</if> |
|||
<if test="equipPrice != null">equip_price = #{equipPrice},</if> |
|||
<if test="manufacturerCode != null">manufacturer_code = #{manufacturerCode},</if> |
|||
<if test="equipProductionDate != null">equip_production_date = #{equipProductionDate},</if> |
|||
<if test="department != null">department = #{department},</if> |
|||
<if test="equipManufacturerName != null">equip_manufacturer_name = #{equipManufacturerName},</if> |
|||
<if test="equipUsageDate != null">equip_usage_date = #{equipUsageDate},</if> |
|||
<if test="depreciationYears != null">depreciation_years = #{depreciationYears},</if> |
|||
<if test="annualDepreciationRate != null">annual_depreciation_rate = #{annualDepreciationRate},</if> |
|||
<if test="equipStorageLocation != null">equip_storage_location = #{equipStorageLocation},</if> |
|||
<if test="completeTheProcess != null">complete_the_process = #{completeTheProcess},</if> |
|||
<if test="esponsiblePerson != null">esponsible_person = #{esponsiblePerson},</if> |
|||
<if test="remark != null">remark = #{remark},</if> |
|||
<if test="createBy != null">create_by = #{createBy},</if> |
|||
<if test="createTime != null">create_time = #{createTime},</if> |
|||
<if test="updateBy != null">update_by = #{updateBy},</if> |
|||
<if test="updateTime != null">update_time = #{updateTime},</if> |
|||
<if test="useStatus != null">use_status = #{useStatus},</if> |
|||
<if test="auditStatus != null">audit_status = #{auditStatus},</if> |
|||
<if test="delFlag != null">del_flag = #{delFlag},</if> |
|||
</trim> |
|||
where compant_fixed_assets_id = #{compantFixedAssetsId} |
|||
</update> |
|||
|
|||
<delete id="deleteFinancialCompantFixedAssetsById" parameterType="Long"> |
|||
delete from financial_compant_fixed_assets where compant_fixed_assets_id = #{compantFixedAssetsId} |
|||
</delete> |
|||
|
|||
<delete id="deleteFinancialCompantFixedAssetsByIds" parameterType="String"> |
|||
delete from financial_compant_fixed_assets where compant_fixed_assets_id in |
|||
<foreach item="compantFixedAssetsId" collection="array" open="(" separator="," close=")"> |
|||
#{compantFixedAssetsId} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
<update id="cancelFinancialCompantFixedAssetsById" parameterType="Long"> |
|||
update financial_compant_fixed_assets set del_flag = '1' where compant_fixed_assets_id = #{compantFixedAssetsId} |
|||
</update> |
|||
|
|||
<update id="restoreFinancialCompantFixedAssetsById" parameterType="Long"> |
|||
update financial_compant_fixed_assets set del_flag = '0' where compant_fixed_assets_id = #{compantFixedAssetsId} |
|||
</update> |
|||
|
|||
</mapper> |
@ -0,0 +1,234 @@ |
|||
<!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" /> |
|||
<th:block th:include="include :: select2-css" /> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-CompantFixedAssets-add"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">料号:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="materialCode" class="form-control m-b" > |
|||
<option value=""></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">物料名称:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="materialName" class="form-control m-b" > |
|||
<option value=""></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">设备编号:</label> |
|||
<div class="col-sm-8"> |
|||
<input type="text" name="equipCode" class="form-control m-b" required/> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">设备名称:</label> |
|||
<div class="col-sm-8"> |
|||
<input type="text" name="equipName" class="form-control m-b" required/> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">设备型号:</label> |
|||
<div class="col-sm-8"> |
|||
<input type="text" name="equipModel" class="form-control m-b" /> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">设备重量:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="equipWeight" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">设备状态:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="equipStatus" class="form-control m-b" /> |
|||
<option value="">所有</option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">计量单位:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="equipUnit" class="form-control m-b" th:with="type=${@dict.getType('ck_liangci')}"> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">设备类别:</label> |
|||
<div class="col-sm-8"> |
|||
<input type="text" name="equipCategory" class="form-control" /> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">出厂编号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="factoryCode" 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="equipPrice" 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="manufacturerCode" 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="equipProductionDate" 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"> |
|||
<select name="department" class="form-control m-b"> |
|||
<option value="">所有</option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">设备厂家名称:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="equipManufacturerName" 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="equipUsageDate" 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="depreciationYears" 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="annualDepreciationRate" 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="equipStorageLocation" 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="completeTheProcess" 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="esponsiblePerson" 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="remark" class="form-control"></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 + "financial/compantFixedAssets" |
|||
$("#form-CompantFixedAssets-add").validate({focusCleanup: true}); |
|||
//获取物料料号,物料名称 |
|||
$(function(){ |
|||
$.ajax({ |
|||
url: ctx + "erp/material/getMaterialSelList", |
|||
type: "POST", |
|||
dataType: 'json', |
|||
delay: 250, |
|||
success: function (res, params) { |
|||
if (res.data.length > 0) { |
|||
var usertData = res.data; |
|||
for (let i in usertData) { |
|||
$("#form-CompantFixedAssets-add select[name='materialCode']").append( |
|||
"<option value='" + usertData[i].materialNo + "'>" + usertData[i].materialNo + "</option>"); |
|||
} |
|||
} else { |
|||
$.modal.msgError(res.msg); |
|||
} |
|||
}, |
|||
}); |
|||
$.ajax({ |
|||
url: ctx + "erp/material/getMaterialSelList", |
|||
type: "POST", |
|||
dataType: 'json', |
|||
delay: 250, |
|||
success: function (res, params) { |
|||
if (res.data.length > 0) { |
|||
var usertData = res.data; |
|||
for (let i in usertData) { |
|||
$("#form-CompantFixedAssets-add select[name='materialName']").append( |
|||
"<option value='" + usertData[i].materialName + "'>" + usertData[i].materialName + "</option>"); |
|||
} |
|||
} else { |
|||
$.modal.msgError(res.msg); |
|||
} |
|||
} |
|||
}); |
|||
}); |
|||
|
|||
$("#form-CompantFixedAssets-add select[materialCode]").on('select2:select', function (e){ |
|||
var data = e.params.data; |
|||
$("#form-CompantFixedAssets-add input[name='materialCode']").val(data.materialNo); |
|||
$("#form-CompantFixedAssets-add input[name='materialName']").val(data.materialName); |
|||
}); |
|||
$("#form-CompantFixedAssets-add select[materialName]").on('select2:select', function (e){ |
|||
var data = e.params.data; |
|||
$("input[name='materialCode']").val(data.materialNo); |
|||
$("input[name='materialName']").val(data.materialName); |
|||
}); |
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/add", $('#form-CompantFixedAssets-add').serialize()); |
|||
} |
|||
} |
|||
|
|||
$("input[name='equipProductionDate']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
|
|||
$("input[name='equipUsageDate']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,144 @@ |
|||
<!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="equipCode" /> |
|||
</li> |
|||
<li> |
|||
<label>设备名称:</label> |
|||
<input type="text" name="equipName" /> |
|||
</li> |
|||
<li> |
|||
<label>出厂编号:</label> |
|||
<input type="text" name="factoryCode"/> |
|||
</li> |
|||
<li> |
|||
<label>厂家代码:</label> |
|||
<input type="text" name="manufacturerCode"/> |
|||
</li> |
|||
<li> |
|||
<label>设备厂家名称:</label> |
|||
<input type="text" name="equipManufacturerName"/> |
|||
</li> |
|||
<li> |
|||
<label>设备状态:</label> |
|||
<select name="equipStatus" th:attr="dict=${@dict.getType('equipment_state')}"> |
|||
<option value="">所有</option> |
|||
<option th:each="dict : ${@dict.getType('sys_equip_status')}" 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="financial:CompantFixedAssets:add"> |
|||
<i class="fa fa-plus"></i> 添加 |
|||
</a> |
|||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="financial:CompantFixedAssets:edit"> |
|||
<i class="fa fa-edit"></i> 修改 |
|||
</a> |
|||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="financial:CompantFixedAssets:remove"> |
|||
<i class="fa fa-remove"></i> 删除 |
|||
</a> |
|||
</div> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<table id="bootstrap-table"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var editFlag = [[${@permission.hasPermi('financial:CompantFixedAssets:edit')}]]; |
|||
var removeFlag = [[${@permission.hasPermi('financial:CompantFixedAssets:remove')}]]; |
|||
var cancelFlag = [[${@permission.hasPermi('financial:CompantFixedAssets:cancel')}]]; |
|||
var restoreFlag = [[${@permission.hasPermi('financial:CompantFixedAssets:restore')}]]; |
|||
var equipUnitDatas = [[${@dict.getType('ck_liangci')}]]; |
|||
var useStatusDatas = [[${@dict.getType('useStatus')}]]; |
|||
var auditStatusDatas = [[${@dict.getType('auditStatus')}]]; |
|||
var prefix = ctx + "financial/compantFixedAssets"; |
|||
|
|||
$(function() { |
|||
var options = { |
|||
url: prefix + "/list", |
|||
createUrl: prefix + "/add", |
|||
updateUrl: prefix + "/edit/{id}", |
|||
removeUrl: prefix + "/remove", |
|||
cancelUrl: prefix + "/cancel/{id}", |
|||
restoreUrl: prefix + "/restore/{id}", |
|||
exportUrl: prefix + "/export", |
|||
modalName: "公司固定资产", |
|||
columns: [ |
|||
{checkbox: true}, |
|||
{title: '设备档案id',field: 'compantFixedAssetsId',visible: false}, |
|||
{title: '料号',field: 'materialCode',sort: true}, |
|||
{title: '物料名称',field: 'materialName',sort: true}, |
|||
{title: '设备编号',field: 'equipCode',sort: true}, |
|||
{title: '设备名称',field: 'equipName',sort: true}, |
|||
{title: '设备型号',field: 'equipModel',sort: true}, |
|||
{title: '设备重量',field: 'equipWeight',sort: true}, |
|||
{title: '设备状态',field: 'equipStatus',sort: true}, |
|||
{title: '计量单位',field: 'equipUnit', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(equipUnitDatas, value); |
|||
} |
|||
}, |
|||
{title: '设备类别',field: 'equipCategory',sort: true}, |
|||
{title: '出厂编号',field: 'factoryCode',sort: true}, |
|||
{title: '设备价格',field: 'equipPrice',sort: true}, |
|||
{title: '厂家代码',field: 'manufacturerCode',sort: true}, |
|||
{title: '设备生产日期',field: 'equipProductionDate',sort: true}, |
|||
{title: '所在部门',field: 'department',sort: true}, |
|||
{title: '设备厂家名称',field: 'equipManufacturerName',sort: true}, |
|||
{title: '设备使用日期',field: 'equipUsageDate',sort: true}, |
|||
{title: '折旧年数',field: 'depreciationYears',sort: true}, |
|||
{title: '年折旧率',field: 'annualDepreciationRate',sort: true}, |
|||
{title: '设备存放位置',field: 'equipStorageLocation',sort: true}, |
|||
{title: '完成工序',field: 'completeTheProcess',sort: true}, |
|||
{title: '负责人',field: 'esponsiblePerson',sort: true}, |
|||
{title: '备注',field: 'remark',sort: true}, |
|||
{title: '使用状态',field: 'useStatus', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(useStatusDatas, value); |
|||
} |
|||
}, |
|||
{title: '审核状态',field: 'auditStatus', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(auditStatusDatas, value); |
|||
} |
|||
}, |
|||
{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.compantFixedAssetsId + '\')"><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.compantFixedAssetsId + '\')"><i class="fa fa-remove"></i>删除</a> '); |
|||
if(row.delFlag == '0'){ |
|||
actions.push('<a class="btn btn-danger btn-xs ' + cancelFlag + '" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.id + '\')"><i class="fa fa-remove"></i>作废</a> '); |
|||
}else{ |
|||
actions.push('<a class="btn btn-success btn-xs ' + restoreFlag + '" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.id + '\')"><i class="fa fa-window-restore"></i>恢复</a> '); |
|||
} |
|||
return actions.join(''); |
|||
} |
|||
} |
|||
] |
|||
}; |
|||
$.table.init(options); |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,240 @@ |
|||
<!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" /> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-CompantFixedAssets-edit" th:object="${financialCompantFixedAssets}"> |
|||
<input name="compantFixedAssetsId" th:field="*{compantFixedAssetsId}" type="hidden"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">料号:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="materialCode" class="form-control m-b"> |
|||
<option value="">所有</option> |
|||
</select> |
|||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">物料名称:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="materialName" class="form-control m-b"> |
|||
<option value="">所有</option> |
|||
</select> |
|||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">设备编号:</label> |
|||
<div class="col-sm-8"> |
|||
<input type="text" name="equipCode" class="form-control m-b" required/> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">设备名称:</label> |
|||
<div class="col-sm-8"> |
|||
<input type="text" name="equipName" class="form-control m-b" required/> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">设备型号:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="equipModel" class="form-control m-b"> |
|||
<option value="">所有</option> |
|||
</select> |
|||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">设备重量:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="equipWeight" th:field="*{equipWeight}" 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="radio-box"> |
|||
<input type="radio" name="equipStatus" value=""> |
|||
<label th:for="equipStatus" th:text="未知"></label> |
|||
</div> |
|||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">计量单位:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="equipUnit" class="form-control m-b" th:with="type=${@dict.getType('ck_liangci')}"> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{equipUnit}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">设备类别:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="equipCategory" th:field="*{equipCategory}" 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="factoryCode" th:field="*{factoryCode}" 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="equipPrice" th:field="*{equipPrice}" 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="manufacturerCode" th:field="*{manufacturerCode}" 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="equipProductionDate" th:value="${#dates.format(financialCompantFixedAssets.equipProductionDate, 'yyyy-MM-dd')}" 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"> |
|||
<select name="department" class="form-control m-b"> |
|||
<option value="">所有</option> |
|||
</select> |
|||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">设备厂家名称:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="equipManufacturerName" th:field="*{equipManufacturerName}" 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="equipUsageDate" th:value="${#dates.format(financialCompantFixedAssets.equipUsageDate, 'yyyy-MM-dd')}" 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="depreciationYears" th:field="*{depreciationYears}" 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="annualDepreciationRate" th:field="*{annualDepreciationRate}" 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="equipStorageLocation" th:field="*{equipStorageLocation}" 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="completeTheProcess" th:field="*{completeTheProcess}" 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="esponsiblePerson" th:field="*{esponsiblePerson}" 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="remark" class="form-control">[[*{remark}]]</textarea> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "financial/CompantFixedAssets"; |
|||
$("#form-CompantFixedAssets-edit").validate({focusCleanup: true}); |
|||
$(function(){ |
|||
$.ajax({ |
|||
url: ctx + "erp/material/getMaterialSelList", |
|||
type: "POST", |
|||
dataType: 'json', |
|||
delay: 250, |
|||
success: function (res, params) { |
|||
if (res.data.length > 0) { |
|||
var usertData = res.data; |
|||
for (let i in usertData) { |
|||
$("#form-CompantFixedAssets-edit select[name='materialCode']").append( |
|||
"<option value='" + usertData[i].materialNo + "'>" + usertData[i].materialNo + "</option>"); |
|||
} |
|||
} else { |
|||
$.modal.msgError(res.msg); |
|||
} |
|||
}, |
|||
}); |
|||
$.ajax({ |
|||
url: ctx + "erp/material/getMaterialSelList", |
|||
type: "POST", |
|||
dataType: 'json', |
|||
delay: 250, |
|||
success: function (res, params) { |
|||
if (res.data.length > 0) { |
|||
var usertData = res.data; |
|||
for (let i in usertData) { |
|||
$("#form-CompantFixedAssets-edit select[name='materialName']").append( |
|||
"<option value='" + usertData[i].materialName + "'>" + usertData[i].materialName + "</option>"); |
|||
} |
|||
} else { |
|||
$.modal.msgError(res.msg); |
|||
} |
|||
} |
|||
}); |
|||
}); |
|||
|
|||
$("#form-CompantFixedAssets-edit select[materialCode]").on('select2:select', function (e){ |
|||
var data = e.params.data; |
|||
$("#form-CompantFixedAssets-edit input[name='materialCode']").val(data.materialNo); |
|||
$("#form-CompantFixedAssets-edit input[name='materialName']").val(data.materialName); |
|||
}); |
|||
$("#form-CompantFixedAssets-edit select[materialName]").on('select2:select', function (e){ |
|||
var data = e.params.data; |
|||
$("input[name='materialCode']").val(data.materialNo); |
|||
$("input[name='materialName']").val(data.materialName); |
|||
}); |
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/edit", $('#form-CompantFixedAssets-edit').serialize()); |
|||
} |
|||
} |
|||
|
|||
$("input[name='equipProductionDate']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
|
|||
$("input[name='equipUsageDate']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
Loading…
Reference in new issue