|
|
|
@ -2,21 +2,26 @@ package com.chanko.yunxi.mes.module.biz.controller.admin.app;
|
|
|
|
|
|
|
|
|
|
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
|
|
|
|
|
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
|
|
|
|
import com.chanko.yunxi.mes.module.biz.controller.admin.app.vo.OverTaskVO;
|
|
|
|
|
import com.chanko.yunxi.mes.module.biz.controller.admin.procedure.vo.ProcedureRespVO;
|
|
|
|
|
import com.chanko.yunxi.mes.module.biz.controller.admin.workshop.vo.WorkshopRespVO;
|
|
|
|
|
import com.chanko.yunxi.mes.module.biz.controller.admin.app.vo.AppVersionVO;
|
|
|
|
|
import com.chanko.yunxi.mes.module.biz.dal.dataobject.plan.PlanWorkshopDO;
|
|
|
|
|
import com.chanko.yunxi.mes.module.biz.dal.dataobject.procedure.ProcedureDO;
|
|
|
|
|
import com.chanko.yunxi.mes.module.biz.dal.dataobject.systemparameters.SystemParametersDO;
|
|
|
|
|
import com.chanko.yunxi.mes.module.biz.dal.dataobject.taskdispatch.TaskDispatchDO;
|
|
|
|
|
import com.chanko.yunxi.mes.module.biz.dal.dataobject.taskdispatch.TaskDispatchDetailDO;
|
|
|
|
|
import com.chanko.yunxi.mes.module.biz.dal.dataobject.workshop.WorkshopDO;
|
|
|
|
|
import com.chanko.yunxi.mes.module.biz.dal.mysql.procedure.ProcedureMapper;
|
|
|
|
|
import com.chanko.yunxi.mes.module.biz.dal.mysql.systemparameters.SystemParametersMapper;
|
|
|
|
|
import com.chanko.yunxi.mes.module.biz.dal.mysql.workshop.WorkshopMapper;
|
|
|
|
|
import com.chanko.yunxi.mes.module.biz.enums.SystemParmetersEnum;
|
|
|
|
|
import com.chanko.yunxi.mes.module.infra.dal.dataobject.file.FileDO;
|
|
|
|
|
import com.chanko.yunxi.mes.module.infra.service.file.FileService;
|
|
|
|
|
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
|
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
|
|
import jodd.util.StringUtil;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
@ -51,6 +56,9 @@ public class AdminAppController {
|
|
|
|
|
@Resource
|
|
|
|
|
private ProcedureMapper procedureMapper;
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
private SystemParametersMapper systemParametersMapper;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/latest")
|
|
|
|
|
@Operation(summary = "获取最新app版本")
|
|
|
|
@ -94,4 +102,19 @@ public class AdminAppController {
|
|
|
|
|
;
|
|
|
|
|
return success(BeanUtils.toBean(procedureMapper.selectList(query), ProcedureRespVO.class));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@GetMapping("/allow-over-task")
|
|
|
|
|
@Operation(summary = "是否允许超量报工")
|
|
|
|
|
public CommonResult<OverTaskVO> allowOverTask(){
|
|
|
|
|
SystemParametersDO systemParametersDO = systemParametersMapper.selectOne("code", SystemParmetersEnum.OVERTASK_CENTER_LIST.getDescription());
|
|
|
|
|
OverTaskVO overTaskVO = new OverTaskVO();
|
|
|
|
|
if(systemParametersDO == null){
|
|
|
|
|
overTaskVO.setIsAllow("0");
|
|
|
|
|
overTaskVO.setWorkShops("");
|
|
|
|
|
}else{
|
|
|
|
|
overTaskVO.setIsAllow(StringUtil.isNotEmpty(systemParametersDO.getCurrentValue())?"1":"0");
|
|
|
|
|
overTaskVO.setWorkShops(systemParametersDO.getCurrentValue());
|
|
|
|
|
}
|
|
|
|
|
return success(overTaskVO);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|