44252 产线屏放在边端,无需登录

tags/yfai-mes-ext-v2.5
王杰 5 months ago
parent 010ea9ce0c
commit 1d7f753064

@ -10,7 +10,6 @@ import cn.estsh.i3plus.platform.common.tool.ExcelTool;
import cn.estsh.i3plus.pojo.base.bean.ListPager;
import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil;
import cn.estsh.i3plus.pojo.mes.bean.MesProduceSn;
import cn.estsh.i3plus.pojo.mes.bean.MesProductionRecord;
import cn.estsh.i3plus.pojo.mes.model.MesProductionRecordModel;
import cn.estsh.i3plus.pojo.mes.util.MesExtEnumUtil;
import cn.estsh.i3plus.pojo.model.common.ExportDataModel;
@ -26,6 +25,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import javax.persistence.EntityManager;
@ -63,9 +63,10 @@ public class BaseExtDataController extends MesBaseController {
@GetMapping(value = "/enumlist")
@ApiOperation(value = "获取MES系统所有枚举")
public ResultBean enumlist(@RequestParam(name = "enumName") String enumName) {
public ResultBean enumlistByOrg(@RequestParam(name = "enumName") String enumName, @RequestParam(name = "organizeCode", required = false) String organizeCode) {
try {
Map<String, Object> map = enumService.doGetMesEnumByEnumName(AuthUtil.getOrganize().getOrganizeCode(), enumName);
organizeCode = StringUtils.isEmpty(organizeCode) ? AuthUtil.getOrganize().getOrganizeCode() : organizeCode;
Map<String, Object> map = enumService.doGetMesEnumByEnumName(organizeCode, enumName);
return ResultBean.success("查询成功")
.setResultObject(map)
.setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());

@ -12,6 +12,7 @@ import cn.estsh.impp.framework.boot.util.ValidatorBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
@ -39,8 +40,7 @@ public class MesWorkCenterBoardController {
ValidatorBean.beginValid(conditionModel)
.notNull("workCenterCodeList", conditionModel.getWorkCenterCodeList())
.notNull("timeRangeIdentification", conditionModel.getTimeRangeIdentification());
String organizeCode = AuthUtil.getOrganize().getOrganizeCode();
conditionModel.setOrganizeCode(organizeCode);
if (StringUtils.isEmpty(conditionModel.getOrganizeCode())) conditionModel.setOrganizeCode(AuthUtil.getOrganize().getOrganizeCode());
return ResultBean.success("查询产线状态").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode()).
setResultList(mesYfBoardService.queryWorkCenterStatus(conditionModel));
} catch (ImppBusiException e) {
@ -57,8 +57,7 @@ public class MesWorkCenterBoardController {
ValidatorBean.beginValid(conditionModel)
.notNull("workCenterCodeList", conditionModel.getWorkCenterCodeList())
.notNull("timeRangeIdentification", conditionModel.getTimeRangeIdentification());
String organizeCode = AuthUtil.getOrganize().getOrganizeCode();
conditionModel.setOrganizeCode(organizeCode);
if (StringUtils.isEmpty(conditionModel.getOrganizeCode())) conditionModel.setOrganizeCode(AuthUtil.getOrganize().getOrganizeCode());
return ResultBean.success("查询产线生产完成率").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode()).
setResultObject(mesYfBoardService.queryWorkCenterProductionCompletionRate(conditionModel));
} catch (ImppBusiException e) {
@ -75,8 +74,7 @@ public class MesWorkCenterBoardController {
ValidatorBean.beginValid(conditionModel)
.notNull("workCenterCodeList", conditionModel.getWorkCenterCodeList())
.notNull("timeRangeIdentification", conditionModel.getTimeRangeIdentification());
String organizeCode = AuthUtil.getOrganize().getOrganizeCode();
conditionModel.setOrganizeCode(organizeCode);
if (StringUtils.isEmpty(conditionModel.getOrganizeCode())) conditionModel.setOrganizeCode(AuthUtil.getOrganize().getOrganizeCode());
return ResultBean.success("查询产线工单完成情况").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode()).
setResultList(mesYfBoardService.queryWorkCenterWorkOrderCompletionStatus(conditionModel));
} catch (ImppBusiException e) {
@ -93,8 +91,7 @@ public class MesWorkCenterBoardController {
ValidatorBean.beginValid(conditionModel)
.notNull("workCenterCodeList", conditionModel.getWorkCenterCodeList())
.notNull("timeRangeIdentification", conditionModel.getTimeRangeIdentification());
String organizeCode = AuthUtil.getOrganize().getOrganizeCode();
conditionModel.setOrganizeCode(organizeCode);
if (StringUtils.isEmpty(conditionModel.getOrganizeCode())) conditionModel.setOrganizeCode(AuthUtil.getOrganize().getOrganizeCode());
return ResultBean.success("查询单位小时完工数").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode()).
setResultList(mesYfBoardService.queryUnitHourCompletionRate(conditionModel));
} catch (ImppBusiException e) {
@ -111,8 +108,7 @@ public class MesWorkCenterBoardController {
ValidatorBean.beginValid(conditionModel)
.notNull("workCenterCodeList", conditionModel.getWorkCenterCodeList())
.notNull("timeRangeIdentification", conditionModel.getTimeRangeIdentification());
String organizeCode = AuthUtil.getOrganize().getOrganizeCode();
conditionModel.setOrganizeCode(organizeCode);
if (StringUtils.isEmpty(conditionModel.getOrganizeCode())) conditionModel.setOrganizeCode(AuthUtil.getOrganize().getOrganizeCode());
return ResultBean.success("查询产线一次下线合格率").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode()).
setResultList(mesYfBoardService.queryWorkCenterFirstTimeOfflineQualificationRate(conditionModel));
} catch (ImppBusiException e) {
@ -129,8 +125,7 @@ public class MesWorkCenterBoardController {
ValidatorBean.beginValid(conditionModel)
.notNull("workCenterCodeList", conditionModel.getWorkCenterCodeList())
.notNull("timeRangeIdentification", conditionModel.getTimeRangeIdentification());
String organizeCode = AuthUtil.getOrganize().getOrganizeCode();
conditionModel.setOrganizeCode(organizeCode);
if (StringUtils.isEmpty(conditionModel.getOrganizeCode())) conditionModel.setOrganizeCode(AuthUtil.getOrganize().getOrganizeCode());
return ResultBean.success("查询点检结果").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode()).
setResultList(mesYfBoardService.queryInspectionResults(conditionModel));
} catch (ImppBusiException e) {
@ -147,8 +142,7 @@ public class MesWorkCenterBoardController {
ValidatorBean.beginValid(conditionModel)
.notNull("workCenterCodeList", conditionModel.getWorkCenterCodeList())
.notNull("timeRangeIdentification", conditionModel.getTimeRangeIdentification());
String organizeCode = AuthUtil.getOrganize().getOrganizeCode();
conditionModel.setOrganizeCode(organizeCode);
if (StringUtils.isEmpty(conditionModel.getOrganizeCode())) conditionModel.setOrganizeCode(AuthUtil.getOrganize().getOrganizeCode());
return ResultBean.success("查询异常停线时间").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode()).
setResultObject(mesYfBoardService.queryAbnormalDowntime(conditionModel));
} catch (ImppBusiException e) {

Loading…
Cancel
Save