|
|
@ -1,9 +1,10 @@
|
|
|
|
package cn.estsh.i3plus.ext.mes.pcn.apiservice.controller.busi;
|
|
|
|
package cn.estsh.i3plus.ext.mes.pcn.apiservice.controller.busi;
|
|
|
|
|
|
|
|
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.api.base.IMesProdShiftRecordService;
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.api.base.IMesProdShiftRecordService;
|
|
|
|
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.api.base.IMesShiftService;
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesProductionCustomContextStepService;
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesProductionCustomContextStepService;
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesProductionDispatchContextStepService;
|
|
|
|
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.pojo.constant.MesCommonConstant;
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.pojo.constant.MesCommonConstant;
|
|
|
|
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtConstWords;
|
|
|
|
import cn.estsh.i3plus.mes.pcn.util.StationKvBeanUtil;
|
|
|
|
import cn.estsh.i3plus.mes.pcn.util.StationKvBeanUtil;
|
|
|
|
import cn.estsh.i3plus.pojo.base.bean.ListPager;
|
|
|
|
import cn.estsh.i3plus.pojo.base.bean.ListPager;
|
|
|
|
import cn.estsh.i3plus.pojo.base.common.Pager;
|
|
|
|
import cn.estsh.i3plus.pojo.base.common.Pager;
|
|
|
@ -18,12 +19,12 @@ import cn.estsh.impp.framework.boot.util.ResultBean;
|
|
|
|
import cn.estsh.impp.framework.boot.util.ValidatorBean;
|
|
|
|
import cn.estsh.impp.framework.boot.util.ValidatorBean;
|
|
|
|
import com.google.common.base.Objects;
|
|
|
|
import com.google.common.base.Objects;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @Description: 开关班记录
|
|
|
|
* @Description: 开关班记录
|
|
|
@ -39,6 +40,10 @@ public class MesProdShiftRecordController {
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private IMesProductionCustomContextStepService productionCustomContextStepService;
|
|
|
|
private IMesProductionCustomContextStepService productionCustomContextStepService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private IMesShiftService mesShiftService;
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/query-pager")
|
|
|
|
@GetMapping("/query-pager")
|
|
|
|
@ApiOperation(value = "查询开关班记录")
|
|
|
|
@ApiOperation(value = "查询开关班记录")
|
|
|
|
public ResultBean queryMesProdShiftRecordByPager(MesProdShiftRecord mesProdShiftRecord, Pager pager) {
|
|
|
|
public ResultBean queryMesProdShiftRecordByPager(MesProdShiftRecord mesProdShiftRecord, Pager pager) {
|
|
|
@ -121,12 +126,18 @@ public class MesProdShiftRecordController {
|
|
|
|
|
|
|
|
|
|
|
|
//封装展示组件班组班次内容
|
|
|
|
//封装展示组件班组班次内容
|
|
|
|
private List<StationKvBean> getProdShiftData(MesProdShiftRecord record) {
|
|
|
|
private List<StationKvBean> getProdShiftData(MesProdShiftRecord record) {
|
|
|
|
|
|
|
|
List<StationKvBean> stationKvBeans = StationKvBeanUtil.addStationKvBeanList(new ArrayList<>(),
|
|
|
|
return StationKvBeanUtil.addStationKvBeanList(new ArrayList<>(),
|
|
|
|
|
|
|
|
new StationKvBean("shiftGroup", "班组", record.getShiftGroup()),
|
|
|
|
new StationKvBean("shiftGroup", "班组", record.getShiftGroup()),
|
|
|
|
new StationKvBean("shiftGroupName", "班组名称", record.getShiftGroup()),
|
|
|
|
new StationKvBean("shiftGroupName", "班组名称", record.getShiftGroup()),
|
|
|
|
new StationKvBean("shiftCode", "班次", record.getShiftCode()),
|
|
|
|
new StationKvBean("shiftCode", "班次", record.getShiftCode()),
|
|
|
|
new StationKvBean("shiftName", "班次名称", record.getShiftName()))
|
|
|
|
new StationKvBean("shiftName", "班次名称", record.getShiftName()));
|
|
|
|
;
|
|
|
|
//班次开始时间 ,班次结束时间
|
|
|
|
|
|
|
|
Map<String, String> shiftTimeMap = mesShiftService.getShiftTimeMap(record);
|
|
|
|
|
|
|
|
if (!java.util.Objects.isNull(shiftTimeMap)) {
|
|
|
|
|
|
|
|
StationKvBeanUtil.addStationKvBeanList(stationKvBeans,
|
|
|
|
|
|
|
|
new StationKvBean(MesPcnExtConstWords.START_TIME,"开始时间",shiftTimeMap.get(MesPcnExtConstWords.START_TIME)),
|
|
|
|
|
|
|
|
new StationKvBean(MesPcnExtConstWords.END_TIME,"结束时间",shiftTimeMap.get(MesPcnExtConstWords.END_TIME)));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return stationKvBeans;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|