代码提交
This commit is contained in:
parent
5cf0ce7ec5
commit
1cf620e929
|
|
@ -2,6 +2,8 @@ package com.bonus.material.devchange.domain;
|
|||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
@Data
|
||||
public class CsDeviceChangeDetailsVo {
|
||||
|
||||
|
|
@ -60,4 +62,14 @@ public class CsDeviceChangeDetailsVo {
|
|||
private String status;
|
||||
|
||||
private String changeStatus;
|
||||
|
||||
private LocalDate useStartTime;
|
||||
|
||||
private LocalDate useEndTime;
|
||||
|
||||
private Integer workingHours;
|
||||
|
||||
private Integer maxWorkingHours;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import com.bonus.common.core.annotation.Excel;
|
|||
import com.bonus.material.device.domain.vo.DevInfoPropertyVo;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
|
|
@ -124,6 +125,14 @@ public class DevChangeVo {
|
|||
private String deptId;
|
||||
|
||||
|
||||
private LocalDate useStartTime;
|
||||
|
||||
private LocalDate useEndTime;
|
||||
|
||||
private Integer workingHours;
|
||||
|
||||
private Integer maxWorkingHours;
|
||||
|
||||
private Integer remainingHours;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -821,6 +821,13 @@ public class DevChangeServiceImpl implements DevChangeService {
|
|||
public List<DevChangeVo> getDevDetails(CsDeviceChangeDetailsVo vo) {
|
||||
try {
|
||||
List<DevChangeVo> list = mapper.getDevDetails(vo);
|
||||
for(DevChangeVo devChangeVo : list){
|
||||
if(devChangeVo.getWorkingHours() == null){
|
||||
devChangeVo.setWorkingHours(0);
|
||||
}
|
||||
|
||||
devChangeVo.setRemainingHours(devChangeVo.getMaxWorkingHours()-devChangeVo.getWorkingHours());
|
||||
}
|
||||
return list;
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
|
|
|
|||
|
|
@ -1,16 +1,22 @@
|
|||
package com.bonus.material.supplier.controller;
|
||||
|
||||
import com.bonus.common.core.utils.poi.ExcelUtil;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.core.web.page.TableDataInfo;
|
||||
import com.bonus.common.log.annotation.SysLog;
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
import com.bonus.material.supplier.domain.MaSupplier;
|
||||
import com.bonus.material.supplier.service.MaSupplierService;
|
||||
import com.bonus.material.ma.vo.TreeSelect;
|
||||
import com.bonus.system.api.domain.SysUser;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
|
@ -69,6 +75,19 @@ public class MaSupplierController extends BaseController {
|
|||
}).collect(Collectors.toList());
|
||||
return AjaxResult.success(options);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/export")
|
||||
@SysLog(title = "厂家管理", businessType = OperaType.EXPORT, logType = 0, module = "系统管理->厂家管理", details = "导出厂家信息")
|
||||
public void export(HttpServletResponse response, MaSupplier query) {
|
||||
try {
|
||||
List<MaSupplier> list = maSupplierService.list(query);
|
||||
ExcelUtil<MaSupplier> util = new ExcelUtil<MaSupplier>(MaSupplier.class);
|
||||
util.exportExcel(response,list,"厂家数据");
|
||||
} catch (Exception e) {
|
||||
logger.error(e.toString(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.material.supplier.domain;
|
||||
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import com.bonus.common.core.web.domain.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
@ -15,12 +16,18 @@ import java.util.Date;
|
|||
@EqualsAndHashCode(callSuper = true)
|
||||
public class MaSupplier extends BaseEntity {
|
||||
|
||||
//用于excel导出的序号一列,不需要业务逻辑处理
|
||||
@Excel(name = "序号", isSequence = true, type = Excel.Type.EXPORT , sort = 0)
|
||||
int sequence;
|
||||
|
||||
@ApiModelProperty("厂家主键ID")
|
||||
private Long supplierId;
|
||||
|
||||
@Excel(name = "厂家编号", width = 25, sort = 1)
|
||||
@ApiModelProperty("厂家编号(如:SUP202510001)")
|
||||
private String supplierCode;
|
||||
|
||||
@Excel(name = "厂家名称", width = 25, sort = 2 )
|
||||
@ApiModelProperty("厂家名称")
|
||||
private String supplierName;
|
||||
|
||||
|
|
@ -30,6 +37,7 @@ public class MaSupplier extends BaseEntity {
|
|||
@ApiModelProperty("联系电话")
|
||||
private String contactPhone;
|
||||
|
||||
@Excel(name = "厂家地址", width = 25, sort = 3 )
|
||||
@ApiModelProperty("厂家地址")
|
||||
private String address;
|
||||
|
||||
|
|
|
|||
|
|
@ -238,11 +238,14 @@
|
|||
dev.item_type_model AS devModel,
|
||||
dcd.dev_type as type,
|
||||
dcd.num as devNum,
|
||||
|
||||
dcd.use_start_time as useStartTime,
|
||||
dcd.use_end_time as useEndTime,
|
||||
bci.company_name compName,
|
||||
bci.operate_address orgName,
|
||||
IFNULL(pro.pro_name, '-') proName,
|
||||
dev.on_project proId
|
||||
dev.on_project proId,
|
||||
dev.working_hours as workingHours,
|
||||
dev.max_working_hours as maxWorkingHours
|
||||
FROM
|
||||
cs_device_change_details dcd
|
||||
LEFT JOIN ma_dev_info dev ON dcd.dev_type_id = dev.ma_id
|
||||
|
|
|
|||
Loading…
Reference in New Issue