添加工装定检管理和工装定检结果导出功能
This commit is contained in:
parent
b9c5779d97
commit
f1598fbfda
@ -6,6 +6,8 @@ import com.ktg.common.core.controller.BaseController;
|
|||||||
import com.ktg.common.core.domain.AjaxResult;
|
import com.ktg.common.core.domain.AjaxResult;
|
||||||
import com.ktg.common.core.page.TableDataInfo;
|
import com.ktg.common.core.page.TableDataInfo;
|
||||||
import com.ktg.common.enums.BusinessType;
|
import com.ktg.common.enums.BusinessType;
|
||||||
|
import com.ktg.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ktg.mes.md.domain.BaseKnife;
|
||||||
import com.ktg.mes.qc.domain.InventoryTask;
|
import com.ktg.mes.qc.domain.InventoryTask;
|
||||||
import com.ktg.mes.qc.domain.QcDefect;
|
import com.ktg.mes.qc.domain.QcDefect;
|
||||||
import com.ktg.mes.qc.service.InventoryTaskService;
|
import com.ktg.mes.qc.service.InventoryTaskService;
|
||||||
@ -13,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static com.ktg.common.utils.PageUtils.startPage;
|
import static com.ktg.common.utils.PageUtils.startPage;
|
||||||
@ -40,6 +43,19 @@ public class InventoryTaskController extends BaseController {
|
|||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出工装定检列表
|
||||||
|
*/
|
||||||
|
@Log(title = "工装定检", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, InventoryTask inventoryTask)
|
||||||
|
{
|
||||||
|
List<InventoryTask> list = inventoryTaskService.getList(inventoryTask);
|
||||||
|
ExcelUtil<InventoryTask> util = new ExcelUtil<InventoryTask>(InventoryTask.class);
|
||||||
|
util.exportExcel(response, list, "工装定检数据数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改任务
|
* 修改任务
|
||||||
*/
|
*/
|
||||||
|
@ -5,14 +5,17 @@ import com.ktg.common.core.controller.BaseController;
|
|||||||
import com.ktg.common.core.domain.AjaxResult;
|
import com.ktg.common.core.domain.AjaxResult;
|
||||||
import com.ktg.common.core.page.TableDataInfo;
|
import com.ktg.common.core.page.TableDataInfo;
|
||||||
import com.ktg.common.enums.BusinessType;
|
import com.ktg.common.enums.BusinessType;
|
||||||
|
import com.ktg.common.utils.poi.ExcelUtil;
|
||||||
import com.ktg.mes.qc.domain.InventoryRequest;
|
import com.ktg.mes.qc.domain.InventoryRequest;
|
||||||
import com.ktg.mes.qc.domain.InventoryTask;
|
import com.ktg.mes.qc.domain.InventoryTask;
|
||||||
import com.ktg.mes.qc.service.InventoryRequestService;
|
import com.ktg.mes.qc.service.InventoryRequestService;
|
||||||
import com.ktg.mes.qc.service.InventoryTaskService;
|
import com.ktg.mes.qc.service.InventoryTaskService;
|
||||||
|
import com.ktg.mes.wm.domain.WmsInPlan;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static com.ktg.common.utils.SecurityUtils.getUsername;
|
import static com.ktg.common.utils.SecurityUtils.getUsername;
|
||||||
@ -90,4 +93,15 @@ public class inventoryRequestController extends BaseController {
|
|||||||
return toAjax(inventoryRequestService.deleteInventoryRequestByIds(requestIDs));
|
return toAjax(inventoryRequestService.deleteInventoryRequestByIds(requestIDs));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出定检列表
|
||||||
|
*/
|
||||||
|
@Log(title = "定检结果", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, InventoryRequest inventoryRequest)
|
||||||
|
{
|
||||||
|
List<InventoryRequest> list = inventoryRequestService.queryInventoryRequestList(inventoryRequest);
|
||||||
|
ExcelUtil<InventoryRequest> util = new ExcelUtil<InventoryRequest>(InventoryRequest.class);
|
||||||
|
util.exportExcel(response, list, "入库计划数据");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.ktg.mes.qc.domain;
|
package com.ktg.mes.qc.domain;
|
||||||
|
|
||||||
|
import com.ktg.common.annotation.Excel;
|
||||||
import com.ktg.common.core.domain.BaseEntity;
|
import com.ktg.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
@ -14,33 +15,42 @@ public class InventoryRequest extends BaseEntity {
|
|||||||
private Long requestId;
|
private Long requestId;
|
||||||
|
|
||||||
//结果编码
|
//结果编码
|
||||||
|
@Excel(name = "结果编码")
|
||||||
private String requestCode;
|
private String requestCode;
|
||||||
|
|
||||||
//点检人
|
//点检人
|
||||||
|
@Excel(name = "点检人")
|
||||||
private String frockUser;
|
private String frockUser;
|
||||||
|
|
||||||
//计划id
|
//计划id
|
||||||
private Long frockId;
|
private Long frockId;
|
||||||
|
|
||||||
//点检计划
|
//点检计划
|
||||||
|
@Excel(name = "点检计划")
|
||||||
private String frockName;
|
private String frockName;
|
||||||
|
|
||||||
//物料id
|
//物料id
|
||||||
private String mrlWlGid;
|
private String mrlWlGid;
|
||||||
|
|
||||||
//物料id
|
//物料
|
||||||
private String mrlWlName;
|
private String mrlWlName;
|
||||||
|
|
||||||
//结果名称
|
//结果名称
|
||||||
|
@Excel(name = "结果名称")
|
||||||
private String resultName;
|
private String resultName;
|
||||||
|
|
||||||
//点检结果
|
//点检结果
|
||||||
private String frockResult;
|
private String frockResult;
|
||||||
|
//点检结果
|
||||||
|
@Excel(name = "点检结果")
|
||||||
|
private String frockResultName;
|
||||||
|
|
||||||
//点检异常
|
//点检异常
|
||||||
|
@Excel(name = "点检异常")
|
||||||
private String frockError;
|
private String frockError;
|
||||||
|
|
||||||
//点检时间
|
//点检时间
|
||||||
|
@Excel(name = "点检时间")
|
||||||
private Timestamp frockDate;
|
private Timestamp frockDate;
|
||||||
|
|
||||||
//备注
|
//备注
|
||||||
@ -164,6 +174,14 @@ public class InventoryRequest extends BaseEntity {
|
|||||||
this.mrlWlName = mrlWlName;
|
this.mrlWlName = mrlWlName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getFrockResultName() {
|
||||||
|
return frockResultName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFrockResultName(String frockResultName) {
|
||||||
|
this.frockResultName = frockResultName;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "InventoryRequest{" +
|
return "InventoryRequest{" +
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.ktg.mes.qc.domain;
|
package com.ktg.mes.qc.domain;
|
||||||
|
|
||||||
|
import com.ktg.common.annotation.Excel;
|
||||||
import com.ktg.common.core.domain.BaseEntity;
|
import com.ktg.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
@ -16,34 +17,46 @@ public class InventoryTask extends BaseEntity {
|
|||||||
//id
|
//id
|
||||||
private Long wmsInventoryID;
|
private Long wmsInventoryID;
|
||||||
//编码
|
//编码
|
||||||
|
@Excel(name = "编码")
|
||||||
private String wmsInventoryCode;
|
private String wmsInventoryCode;
|
||||||
//名称
|
//名称
|
||||||
|
@Excel(name = "名称")
|
||||||
private String name;
|
private String name;
|
||||||
//分类Id
|
//分类Id
|
||||||
private String uomId;
|
private String uomId;
|
||||||
//分类名称
|
//分类名称
|
||||||
|
@Excel(name = "分类名称")
|
||||||
private String uomName;
|
private String uomName;
|
||||||
//物料Id名称
|
//物料Id名称
|
||||||
private String productId;
|
private String productId;
|
||||||
//物料名称
|
//物料名称
|
||||||
|
@Excel(name = "物料名称")
|
||||||
private String productName;
|
private String productName;
|
||||||
//点检模型
|
//点检模型
|
||||||
private String mrlModel;
|
private String mrlModel;
|
||||||
//点检模型名称
|
//点检模型名称
|
||||||
|
@Excel(name = "点检模型名称")
|
||||||
private String mrlModelName;
|
private String mrlModelName;
|
||||||
//点检周期
|
//点检周期
|
||||||
|
@Excel(name = "点检周期")
|
||||||
private String mrlPeriod;
|
private String mrlPeriod;
|
||||||
//计划规则
|
//计划规则
|
||||||
|
@Excel(name = "计划规则")
|
||||||
private String planPeriod;
|
private String planPeriod;
|
||||||
//开始时间
|
//开始时间
|
||||||
|
@Excel(name = "开始时间")
|
||||||
private Timestamp startTime;
|
private Timestamp startTime;
|
||||||
//结束时间
|
//结束时间
|
||||||
|
@Excel(name = "结束时间")
|
||||||
private Timestamp finishTime;
|
private Timestamp finishTime;
|
||||||
//上次检测时间
|
//上次检测时间
|
||||||
|
@Excel(name = "上次检测时间")
|
||||||
private Timestamp superiorTime;
|
private Timestamp superiorTime;
|
||||||
//下次检测时间
|
//下次检测时间
|
||||||
|
@Excel(name = "下次检测时间")
|
||||||
private Timestamp belowTime;
|
private Timestamp belowTime;
|
||||||
//工装定检预警
|
//工装定检预警
|
||||||
|
@Excel(name = "工装定检预警")
|
||||||
private String mrlWarning;
|
private String mrlWarning;
|
||||||
//是否完成
|
//是否完成
|
||||||
private int isSuccess;
|
private int isSuccess;
|
||||||
|
@ -81,6 +81,15 @@ public class InventoryRequestServiceImpl implements InventoryRequestService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<InventoryRequest> queryInventoryRequestList(InventoryRequest inventoryRequest) {
|
public List<InventoryRequest> queryInventoryRequestList(InventoryRequest inventoryRequest) {
|
||||||
return inventoryRequestMapper.getPage(inventoryRequest);
|
List<InventoryRequest> page = inventoryRequestMapper.getPage(inventoryRequest);
|
||||||
|
for (InventoryRequest request : page) {
|
||||||
|
if (request.getFrockResult().equals("0")) {
|
||||||
|
request.setFrockResultName("合格");
|
||||||
|
request.setFrockError("");
|
||||||
|
} else if (request.getFrockResult().equals("1")) {
|
||||||
|
request.setFrockResultName("不合格");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return page;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user