代码提交
This commit is contained in:
parent
6446ebe802
commit
e4e6e9d962
|
|
@ -125,6 +125,22 @@ public class DevChangeController extends BaseController {
|
|||
util.exportExcel(response, list, "导出设备流转台账详情");
|
||||
}
|
||||
|
||||
@ApiOperation(value = "导出设备流转台账详情")
|
||||
@PostMapping("/exportDetailsRetire")
|
||||
public void exportDetailsRetire(HttpServletResponse response, CsDeviceChangeDetailsVo vo) {
|
||||
List<DevChangeVo> list = service.getDevDetails(vo);
|
||||
ExcelUtil<DevChangeVo> util = new ExcelUtil<DevChangeVo>(DevChangeVo.class);
|
||||
util.exportExcel(response, list, "导出设备流转台账详情");
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "导出设备流转台账详情")
|
||||
@PostMapping("/exportDetailsRepair")
|
||||
public void exportDetailsRepair(HttpServletResponse response, CsDeviceChangeDetailsVo vo) {
|
||||
List<DevChangeVo> list = service.getDevDetails(vo);
|
||||
ExcelUtil<DevChangeVo> util = new ExcelUtil<DevChangeVo>(DevChangeVo.class);
|
||||
util.exportExcel(response, list, "导出设备流转台账详情");
|
||||
}
|
||||
|
||||
@ApiOperation(value = "出库记录单")
|
||||
@PostMapping("/getDevDetails")
|
||||
|
|
|
|||
|
|
@ -16,9 +16,11 @@ public class DevChangeVo {
|
|||
|
||||
private String typeId;
|
||||
//设备类型 1 工具 / 2 装备
|
||||
@Excel(name = "类型",width = 25 ,sort = 1)
|
||||
private String type;
|
||||
|
||||
//设备数量
|
||||
@Excel(name = "数量",width = 25 ,sort = 5)
|
||||
private int devNum;
|
||||
/**
|
||||
* 公司名称
|
||||
|
|
@ -49,12 +51,12 @@ public class DevChangeVo {
|
|||
/**
|
||||
* 设备型号
|
||||
*/
|
||||
@Excel(name = "设备型号",width = 25 ,sort = 2)
|
||||
@Excel(name = "规格型号",width = 25 ,sort = 3)
|
||||
private String devModel;
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
@Excel(name = "设备名称",width = 25 ,sort = 1)
|
||||
@Excel(name = "设备名称",width = 25 ,sort = 2)
|
||||
private String devName;
|
||||
/**
|
||||
* 等级
|
||||
|
|
@ -75,7 +77,7 @@ public class DevChangeVo {
|
|||
/**
|
||||
* 设备编码
|
||||
*/
|
||||
@Excel(name = "设备名称",width = 25 ,sort = 3)
|
||||
@Excel(name = "设备编码",width = 25 ,sort = 4)
|
||||
private String devCode;
|
||||
/**
|
||||
* 产权单位
|
||||
|
|
@ -124,15 +126,18 @@ public class DevChangeVo {
|
|||
|
||||
private String deptId;
|
||||
|
||||
|
||||
@Excel(name = "使用到期日期开始",width = 25 ,sort =6)
|
||||
private LocalDate useStartTime;
|
||||
|
||||
@Excel(name = "使用到期日期结束",width = 25 ,sort = 7)
|
||||
private LocalDate useEndTime;
|
||||
|
||||
private Integer workingHours;
|
||||
|
||||
@Excel(name = "最大使用年限",width = 25 ,sort = 8)
|
||||
private Integer maxWorkingHours;
|
||||
|
||||
@Excel(name = "剩余使用年限",width = 25 ,sort = 9)
|
||||
private Integer remainingHours;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -212,6 +212,7 @@ public class ToolApplyServiceImpl implements ToolApplyService {
|
|||
toolLedgerEntity.setTotalNum(item.getApplyNum());
|
||||
toolLedgerEntity.setAvailableNum(item.getApplyNum());
|
||||
toolLedgerEntity.setToolCode(toolLedgerMapper.getCode());
|
||||
|
||||
toolLedgerMapper.add(toolLedgerEntity);
|
||||
} else {
|
||||
ToolLedgerEntity byType = toolLedgerMapper.getByType(item.getTypeId());
|
||||
|
|
@ -226,6 +227,7 @@ public class ToolApplyServiceImpl implements ToolApplyService {
|
|||
// 调用 add() 方法求和,重新设置值
|
||||
byType.setTotalNum(totalNum.add(applyNum));
|
||||
byType.setAvailableNum(availableNum.add(applyNum));
|
||||
byType.setOriginCost(item.getToolPrice());
|
||||
toolLedgerMapper.updateByTypeAndId(byType);
|
||||
} else {
|
||||
ToolLedgerEntity toolLedgerEntity = new ToolLedgerEntity();
|
||||
|
|
@ -234,6 +236,7 @@ public class ToolApplyServiceImpl implements ToolApplyService {
|
|||
toolLedgerEntity.setCompanyId(SecurityUtils.getLoginUser().getSysUser().getDeptId());
|
||||
toolLedgerEntity.setTotalNum(item.getApplyNum());
|
||||
toolLedgerEntity.setAvailableNum(item.getApplyNum());
|
||||
toolLedgerEntity.setOriginCost(item.getToolPrice());
|
||||
toolLedgerMapper.add(toolLedgerEntity);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -151,6 +151,7 @@
|
|||
tt.level AS level,
|
||||
tad.id AS id,
|
||||
tad.status AS status,
|
||||
tad.tool_price as toolPrice,
|
||||
tt1.type_name AS parentTypeName, -- 1级父节点名称
|
||||
tt2.type_name AS grandparentTypeName, -- 2级父节点名称
|
||||
tt3.type_name AS greatGrandparentName, -- 3级父节点名称
|
||||
|
|
|
|||
Loading…
Reference in New Issue