添加工装定检管理和工装定检结果导出功能
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.page.TableDataInfo;
|
||||
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.QcDefect;
|
||||
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.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
import static com.ktg.common.utils.PageUtils.startPage;
|
||||
@ -40,6 +43,19 @@ public class InventoryTaskController extends BaseController {
|
||||
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.page.TableDataInfo;
|
||||
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.InventoryTask;
|
||||
import com.ktg.mes.qc.service.InventoryRequestService;
|
||||
import com.ktg.mes.qc.service.InventoryTaskService;
|
||||
import com.ktg.mes.wm.domain.WmsInPlan;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
import static com.ktg.common.utils.SecurityUtils.getUsername;
|
||||
@ -90,4 +93,15 @@ public class inventoryRequestController extends BaseController {
|
||||
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;
|
||||
|
||||
import com.ktg.common.annotation.Excel;
|
||||
import com.ktg.common.core.domain.BaseEntity;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
@ -14,33 +15,42 @@ public class InventoryRequest extends BaseEntity {
|
||||
private Long requestId;
|
||||
|
||||
//结果编码
|
||||
@Excel(name = "结果编码")
|
||||
private String requestCode;
|
||||
|
||||
//点检人
|
||||
@Excel(name = "点检人")
|
||||
private String frockUser;
|
||||
|
||||
//计划id
|
||||
private Long frockId;
|
||||
|
||||
//点检计划
|
||||
@Excel(name = "点检计划")
|
||||
private String frockName;
|
||||
|
||||
//物料id
|
||||
private String mrlWlGid;
|
||||
|
||||
//物料id
|
||||
//物料
|
||||
private String mrlWlName;
|
||||
|
||||
//结果名称
|
||||
@Excel(name = "结果名称")
|
||||
private String resultName;
|
||||
|
||||
//点检结果
|
||||
private String frockResult;
|
||||
//点检结果
|
||||
@Excel(name = "点检结果")
|
||||
private String frockResultName;
|
||||
|
||||
//点检异常
|
||||
@Excel(name = "点检异常")
|
||||
private String frockError;
|
||||
|
||||
//点检时间
|
||||
@Excel(name = "点检时间")
|
||||
private Timestamp frockDate;
|
||||
|
||||
//备注
|
||||
@ -164,6 +174,14 @@ public class InventoryRequest extends BaseEntity {
|
||||
this.mrlWlName = mrlWlName;
|
||||
}
|
||||
|
||||
public String getFrockResultName() {
|
||||
return frockResultName;
|
||||
}
|
||||
|
||||
public void setFrockResultName(String frockResultName) {
|
||||
this.frockResultName = frockResultName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "InventoryRequest{" +
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.ktg.mes.qc.domain;
|
||||
|
||||
import com.ktg.common.annotation.Excel;
|
||||
import com.ktg.common.core.domain.BaseEntity;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
@ -16,34 +17,46 @@ public class InventoryTask extends BaseEntity {
|
||||
//id
|
||||
private Long wmsInventoryID;
|
||||
//编码
|
||||
@Excel(name = "编码")
|
||||
private String wmsInventoryCode;
|
||||
//名称
|
||||
@Excel(name = "名称")
|
||||
private String name;
|
||||
//分类Id
|
||||
private String uomId;
|
||||
//分类名称
|
||||
@Excel(name = "分类名称")
|
||||
private String uomName;
|
||||
//物料Id名称
|
||||
private String productId;
|
||||
//物料名称
|
||||
@Excel(name = "物料名称")
|
||||
private String productName;
|
||||
//点检模型
|
||||
private String mrlModel;
|
||||
//点检模型名称
|
||||
@Excel(name = "点检模型名称")
|
||||
private String mrlModelName;
|
||||
//点检周期
|
||||
@Excel(name = "点检周期")
|
||||
private String mrlPeriod;
|
||||
//计划规则
|
||||
@Excel(name = "计划规则")
|
||||
private String planPeriod;
|
||||
//开始时间
|
||||
@Excel(name = "开始时间")
|
||||
private Timestamp startTime;
|
||||
//结束时间
|
||||
@Excel(name = "结束时间")
|
||||
private Timestamp finishTime;
|
||||
//上次检测时间
|
||||
@Excel(name = "上次检测时间")
|
||||
private Timestamp superiorTime;
|
||||
//下次检测时间
|
||||
@Excel(name = "下次检测时间")
|
||||
private Timestamp belowTime;
|
||||
//工装定检预警
|
||||
@Excel(name = "工装定检预警")
|
||||
private String mrlWarning;
|
||||
//是否完成
|
||||
private int isSuccess;
|
||||
|
@ -81,6 +81,15 @@ public class InventoryRequestServiceImpl implements InventoryRequestService {
|
||||
|
||||
@Override
|
||||
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