tags/yfai-pcn-ext-v1.0
王杰 1 year ago
parent 8bca19c47e
commit 3a48a5e68e

@ -0,0 +1,24 @@
package cn.estsh.i3plus.ext.mes.pcn.api.base;
import cn.estsh.i3plus.pojo.mes.bean.MesWorkCell;
import io.swagger.annotations.ApiOperation;
import java.util.List;
/**
* @author yumingxing
* @version 1.0
* @date 2021/1/29 13:24
**/
public interface ISxOrganizeExtService {
/**
* 线
* @param organizeCode
* @param workCenterCode 线
* @return
*/
@ApiOperation(value = "根据生产线代码查询工位集合", notes = "根据生产线代码查询工位集合")
List<MesWorkCell> findWorkCell(String organizeCode, String workCenterCode);
}

@ -26,28 +26,18 @@
</dependency>
<dependency>
<groupId>i3plus.mes.pcn</groupId>
<artifactId>i3plus-mes-pcn-apiservice</artifactId>
</dependency>
<dependency>
<groupId>i3plus.mes.pcn</groupId>
<artifactId>i3plus-mes-pcn-api</artifactId>
</dependency>
<dependency>
<groupId>i3plus.ext.mes.pcn</groupId>
<artifactId>i3plus-ext-mes-pcn-pojo</artifactId>
</dependency>
<dependency>
<groupId>i3plus.icloud</groupId>
<artifactId>i3plus-icloud-core</artifactId>
<groupId>i3plus.mes.pcn</groupId>
<artifactId>i3plus-mes-pcn-apiservice</artifactId>
</dependency>
<dependency>
<groupId>i3plus.icloud</groupId>
<artifactId>i3plus-icloud-andon</artifactId>
<groupId>i3plus.mes.pcn</groupId>
<artifactId>i3plus-mes-pcn-api</artifactId>
</dependency>
<dependency>
@ -69,10 +59,7 @@
<groupId>i3plus.platform</groupId>
<artifactId>i3plus-platform-plugin</artifactId>
</dependency>
<dependency>
<groupId>i3plus.ext.mes.pcn</groupId>
<artifactId>i3plus-ext-mes-pcn-icloud</artifactId>
</dependency>
</dependencies>
<build>

@ -0,0 +1,50 @@
package cn.estsh.i3plus.ext.mes.pcn.apiservice.controller.base;
import cn.estsh.i3plus.ext.mes.pcn.api.base.ISxOrganizeExtService;
import cn.estsh.i3plus.platform.common.util.CommonConstWords;
import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil;
import cn.estsh.i3plus.pojo.mes.bean.MesWorkCell;
import cn.estsh.impp.framework.base.controller.MesPcnBaseController;
import cn.estsh.impp.framework.boot.auth.AuthUtil;
import cn.estsh.impp.framework.boot.exception.ImppBusiException;
import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder;
import cn.estsh.impp.framework.boot.util.ResultBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* @Author: wangjie
* @CreateDate: 2021/01/19 15:37
* @Description:
**/
@RestController
@RequestMapping(CommonConstWords.BASE_URL_MES_PCN + "/ext")
@Api(tags = "SX_组织")
public class SxOrganizeExtController extends MesPcnBaseController {
@Autowired
private ISxOrganizeExtService organizeService;
@GetMapping({"/query-work-cell-by-center"})
@ApiOperation(
value = "查询工作单元",
notes = "查询工作单元"
)
public ResultBean queryWorkCell(String workCenterCode) {
try {
List<MesWorkCell> areaList = this.organizeService.findWorkCell(AuthUtil.getOrganize().getOrganizeCode(), workCenterCode);
return ResultBean.success("操作成功").setResultList(areaList).setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
} catch (ImppBusiException var3) {
return ResultBean.fail(var3);
} catch (Exception var4) {
return ImppExceptionBuilder.newInstance().buildExceptionResult(var4);
}
}
}

@ -1,4 +0,0 @@
package cn.estsh.i3plus.ext.mes.pcn.apiservice.controller.busi;
public class TestBusiController {
}

@ -0,0 +1,36 @@
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.base;
import cn.estsh.i3plus.ext.mes.pcn.api.base.ISxOrganizeExtService;
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
import cn.estsh.i3plus.pojo.base.enumutil.MesPcnEnumUtil;
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
import cn.estsh.i3plus.pojo.mes.bean.MesWorkCell;
import cn.estsh.i3plus.pojo.mes.repository.MesWorkCellRepository;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @author wangjie
* @version 1.0
* @date 2021/1/13 9:28
**/
@Slf4j
@Service
public class SxOrganizeExtService implements ISxOrganizeExtService {
@Autowired
private MesWorkCellRepository workCellRepository;
@Override
public List<MesWorkCell> findWorkCell(String organizeCode, String workCenterCode) {
DdlPackBean packBean = DdlPackBean.getDdlPackBean(organizeCode);
DdlPreparedPack.getStringEqualPack(workCenterCode, "workCenterCode", packBean);
DdlPreparedPack.getNumNOEqualPack(MesPcnEnumUtil.MES_WORK_CELL_TYPE.REWORK.getValue(), "workCellType", packBean);
DdlPreparedPack.getOrderByPack(new Object[]{1}, new String[]{"seq"}, packBean);
return this.workCellRepository.findByHqlWhere(packBean);
}
}

@ -71,7 +71,7 @@ public class MesWorkOrderService implements IMesWorkOrderService {
DdlPackBean packBean = DdlPackBean.getDdlPackBean(workOrder.getOrganizeCode());
DdlPreparedPack.getStringLikerPack(workOrder.getWorkCenterCode(), "workCenterCode", packBean);
DdlPreparedPack.getStringLikerPack(workOrder.getWorkCellCode(), "workCellCode", packBean);
DdlPreparedPack.getStringLikerPack(workOrder.getOrderNo(), "orderNo", packBean);
DdlPreparedPack.getStringLikerPack(workOrder.getWorkOrderNo(), "workOrderNo", packBean);
DdlPreparedPack.getInPackList(workOrder.getStatusList(), "status", packBean);
return packBean;
}

@ -0,0 +1,46 @@
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.station;
import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.BaseModuleService;
import cn.estsh.i3plus.pojo.base.enumutil.MesPcnEnumUtil;
import cn.estsh.i3plus.pojo.mes.bean.MesStateMachineStatus;
import cn.estsh.i3plus.pojo.mes.model.StationRequestBean;
import cn.estsh.i3plus.pojo.mes.model.StationResultBean;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
* @Description :
* @Reference :
* @Author :wangjie
* @CreateDate : 2020-06-26 11:18
* @Modify:
**/
@Slf4j
@Service("yfManyCellMonitorModuleService")
public class YfManyCellMonitorModuleService extends BaseModuleService {
private static final String YF_MANY_CELL_MONITOR_MODULE = "YF_MANY_CELL_MONITOR_MODULE";
private static final String CELL_LOCATION = "CELL_LOCATION";
@Override
public void init(StationRequestBean reqBean) {
StationResultBean resultBean = new StationResultBean();
resultBean.setBusiType(MesPcnEnumUtil.STATION_BUSI_TYPE.MODULE_CONTENT.getValue());
resultBean.setDataType(MesPcnEnumUtil.STATION_DATA_TYPE.CUSTOM.getValue());
resultBean.setCustomPageName(YF_MANY_CELL_MONITOR_MODULE);
resultBean.setSpecialDisplayData(getStepColIndent(reqBean));
this.sendMessage(reqBean, resultBean);
}
@Override
public boolean execStateModule(StationRequestBean reqBean, List<MesStateMachineStatus> states, Map<String, String> wcpcMap) {
init(reqBean);
return true;
}
}

@ -0,0 +1,49 @@
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.step;
import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.BaseStepService;
import cn.estsh.i3plus.pojo.mes.model.StationRequestBean;
import cn.estsh.i3plus.pojo.mes.model.StationResultBean;
import cn.estsh.i3plus.pojo.mes.model.StepResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
/**
* @Description :
* @Author : wangjie
**/
@Slf4j
@Service("mesWorkResultReadStepService")
public class MesWorkResultReadStepService extends BaseStepService {
@Override
public StepResult init(StationRequestBean reqBean) {
StationResultBean resultBean = new StationResultBean();
if (StringUtils.isEmpty(reqBean.getScanInfo())) execSendGuideAndThrowEx(reqBean, resultBean, "请扫描产品条码!");
StepResult stepResult = StepResult.getSuccessComplete();
return stepResult;
}
@Override
public StepResult execute(StationRequestBean reqBean) {
StationResultBean resultBean = new StationResultBean();
if (StringUtils.isEmpty(reqBean.getScanInfo())) execSendGuideAndThrowEx(reqBean, resultBean, "请扫描产品条码!");
StepResult stepResult = StepResult.getSuccessComplete();
return stepResult;
}
}

@ -23,11 +23,6 @@
<artifactId>i3plus-pojo-mes</artifactId>
</dependency>
<dependency>
<groupId>i3plus.pojo</groupId>
<artifactId>i3plus-pojo-andon</artifactId>
</dependency>
</dependencies>
</project>

@ -30,12 +30,10 @@
<skipTests>true</skipTests>
<app.charset>UTF-8</app.charset>
<impp.framework.version>1.0.0.3</impp.framework.version>
<impp.framework.version>1.0.0.4-patch</impp.framework.version>
<i3plus.pojo.version>1.0.0-yfai</i3plus.pojo.version>
<i3plus.platform.version>1.0.0.1-patch</i3plus.platform.version>
<i3plus.icloud.version>1.0.0.1-patch</i3plus.icloud.version>
<i3plus.mes.pcn.version>1.0.0-yfai</i3plus.mes.pcn.version>
<i3plus.mes.pcn.ext.version>1.0.0-yfai</i3plus.mes.pcn.ext.version>
<log4j2.version>2.17.1</log4j2.version>
</properties>
@ -56,14 +54,6 @@
</dependency>
<dependency>
<groupId>i3plus.icloud</groupId>
<artifactId>i3plus-icloud</artifactId>
<version>${i3plus.icloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>i3plus.pojo</groupId>
<artifactId>i3plus-pojo</artifactId>
<version>${i3plus.pojo.version}</version>
@ -118,6 +108,27 @@
</dependency>
<dependency>
<groupId>i3plus.pojo</groupId>
<artifactId>i3plus-pojo-mes</artifactId>
<version>${i3plus.pojo.version}</version>
</dependency>
<dependency>
<groupId>i3plus.pojo</groupId>
<artifactId>i3plus-pojo-base</artifactId>
<version>${i3plus.pojo.version}</version>
</dependency>
<dependency>
<groupId>i3plus.platform</groupId>
<artifactId>i3plus-platform-common</artifactId>
<version>${i3plus.platform.version}</version>
</dependency>
<dependency>
<groupId>i3plus.platform</groupId>
<artifactId>i3plus-platform-plugin</artifactId>
<version>${i3plus.platform.version}</version>
</dependency>
<dependency>
<groupId>impp.framework</groupId>
<artifactId>impp-framework-boot</artifactId>
<version>${impp.framework.version}</version>

Loading…
Cancel
Save