diff --git a/common/src/main/java/com/foreverwin/mesnac/common/erp/ZprodordconfStruIn.java b/common/src/main/java/com/foreverwin/mesnac/common/erp/ZprodordconfStruIn.java index 87f5382d..970756d6 100644 --- a/common/src/main/java/com/foreverwin/mesnac/common/erp/ZprodordconfStruIn.java +++ b/common/src/main/java/com/foreverwin/mesnac/common/erp/ZprodordconfStruIn.java @@ -476,4 +476,22 @@ public class ZprodordconfStruIn implements java.io.Serializable { _javaType, _xmlType, typeDesc); } + @Override + public String toString() { + return "ZprodordconfStruIn{" + + "aufnr='" + aufnr + '\'' + + ", vornr='" + vornr + '\'' + + ", aueru='" + aueru + '\'' + + ", lmnga=" + lmnga + + ", xmnga=" + xmnga + + ", ism01=" + ism01 + + ", ism02=" + ism02 + + ", ism03=" + ism03 + + ", ism04=" + ism04 + + ", ism05=" + ism05 + + ", ism06=" + ism06 + + ", __equalsCalc=" + __equalsCalc + + ", __hashCodeCalc=" + __hashCodeCalc + + '}'; + } } diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/controller/NcCodeController.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/controller/NcCodeController.java index b55e1422..9ae60bb6 100644 --- a/meapi/src/main/java/com/foreverwin/mesnac/meapi/controller/NcCodeController.java +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/controller/NcCodeController.java @@ -26,10 +26,10 @@ public class NcCodeController { public NcCodeService ncCodeService; @ResponseBody - @GetMapping("/selectPageByNcGroup") - public R selectPageByNcGroup(FrontPage frontPage, String ncGroup){ - IPage result; - result = ncCodeService.selectPageByNcGroup(frontPage.getPagePlus(), frontPage.getGlobalQuery(),ncGroup); + @GetMapping("/selectByNcGroup") + public R selectPageByNcGroup(String ncGroup){ + List result; + result = ncCodeService.selectByNcGroup(ncGroup); return R.ok(result); } /** diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/controller/NcGroupController.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/controller/NcGroupController.java index 8f911cc0..05698ef0 100644 --- a/meapi/src/main/java/com/foreverwin/mesnac/meapi/controller/NcGroupController.java +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/controller/NcGroupController.java @@ -2,6 +2,7 @@ package com.foreverwin.mesnac.meapi.controller; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.foreverwin.mesnac.meapi.dto.OperationDto; import com.foreverwin.mesnac.meapi.model.NcGroup; import com.foreverwin.mesnac.meapi.model.Operation; import com.foreverwin.mesnac.meapi.service.NcGroupService; @@ -26,10 +27,10 @@ public class NcGroupController { public NcGroupService ncGroupService; @ResponseBody - @GetMapping("/selectPageByOperation") - public R selectPageByOperation(FrontPage frontPage, String operation){ - IPage result; - result = ncGroupService.selectPageByOperation(frontPage.getPagePlus(), frontPage.getGlobalQuery(),operation); + @GetMapping("/selectByOperation") + public R selectPageByOperation(OperationDto dto){ + List result; + result = ncGroupService.selectPageByOperation(dto); return R.ok(result); } diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/dto/OperationDto.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/dto/OperationDto.java new file mode 100644 index 00000000..cc5615b5 --- /dev/null +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/dto/OperationDto.java @@ -0,0 +1,17 @@ +package com.foreverwin.mesnac.meapi.dto; + +import com.foreverwin.mesnac.meapi.model.Operation; + +public class OperationDto extends Operation { + private String type; + + @Override + public String getType() { + return type; + } + + @Override + public void setType(String type) { + this.type = type; + } +} diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/mapper/NcCodeMapper.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/mapper/NcCodeMapper.java index ecedb734..75c9502d 100644 --- a/meapi/src/main/java/com/foreverwin/mesnac/meapi/mapper/NcCodeMapper.java +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/mapper/NcCodeMapper.java @@ -1,8 +1,6 @@ package com.foreverwin.mesnac.meapi.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.foreverwin.mesnac.meapi.dto.NcCodeDto; import com.foreverwin.mesnac.meapi.model.NcCode; import com.foreverwin.mesnac.meapi.model.NcGroup; @@ -37,7 +35,7 @@ public interface NcCodeMapper extends BaseMapper { /*暂时不用*/ List findSecondaryNcByNc(@Param("site")String site,@Param("locale")String locale,@Param("ncCode")String ncCode); - IPage selectPageByNcGroup(Page pagePlus,@Param("ncGroupBO") String ncGroupBO,@Param("globalQuery") String globalQuery,@Param("locale") String locale); + List selectPageByNcGroup(@Param("ncGroupBO") String ncGroupBO,@Param("locale") String locale); /** * 判断不良代码是否正确 diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/mapper/NcGroupMapper.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/mapper/NcGroupMapper.java index 091e52e1..170da2b8 100644 --- a/meapi/src/main/java/com/foreverwin/mesnac/meapi/mapper/NcGroupMapper.java +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/mapper/NcGroupMapper.java @@ -1,8 +1,6 @@ package com.foreverwin.mesnac.meapi.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.foreverwin.mesnac.meapi.model.NcGroup; import com.foreverwin.mesnac.meapi.model.Operation; import org.apache.ibatis.annotations.Param; @@ -21,9 +19,8 @@ import java.util.List; @Repository public interface NcGroupMapper extends BaseMapper { - IPage selectPageByOperation(Page frontPage, @Param("site") String site, @Param("operationBO") String operationBO,@Param("globalQuery") String globalQuery); List findNgGroupByOperationBo(@Param("operation") Operation operation); - List selectPageByOperation(@Param("site") String site, @Param("operationBO") String operationBO, @Param("globalQuery") Object o); + List selectPageByOperation(@Param("site") String site, @Param("operationBO") String operationBO, @Param("ncGroup") String ncGroup); } \ No newline at end of file diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/NcCodeService.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/NcCodeService.java index 356127f7..c1eceada 100644 --- a/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/NcCodeService.java +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/NcCodeService.java @@ -1,10 +1,9 @@ package com.foreverwin.mesnac.meapi.service; import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; import com.foreverwin.mesnac.meapi.dto.NcCodeDto; import com.foreverwin.mesnac.meapi.model.NcCode; -import com.baomidou.mybatisplus.extension.service.IService; import com.foreverwin.mesnac.meapi.model.NcGroup; import com.foreverwin.modular.core.util.FrontPage; @@ -33,7 +32,7 @@ public interface NcCodeService extends IService { List findSecondaryNcByNc(String ncCode); - IPage selectPageByNcGroup(Page pagePlus, String globalQuery, String ncGroup); + List selectByNcGroup(String ncGroup); List findNcCodeByNcGroup(NcGroup ncGroup); diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/NcGroupService.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/NcGroupService.java index 4079b0f3..85fdca40 100644 --- a/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/NcGroupService.java +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/NcGroupService.java @@ -1,8 +1,8 @@ package com.foreverwin.mesnac.meapi.service; import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; +import com.foreverwin.mesnac.meapi.dto.OperationDto; import com.foreverwin.mesnac.meapi.model.NcGroup; import com.foreverwin.mesnac.meapi.model.Operation; import com.foreverwin.modular.core.util.FrontPage; @@ -28,7 +28,7 @@ public interface NcGroupService extends IService { List selectList(NcGroup ncGroup); - IPage selectPageByOperation(Page pagePlus, String globalQuery, String operation); + List selectPageByOperation(OperationDto operation); List findNgGroupByOperationBo(Operation operation); diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/impl/NcCodeServiceImpl.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/impl/NcCodeServiceImpl.java index b088a713..10d4c511 100644 --- a/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/impl/NcCodeServiceImpl.java +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/impl/NcCodeServiceImpl.java @@ -2,7 +2,6 @@ package com.foreverwin.mesnac.meapi.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.foreverwin.mesnac.meapi.dto.NcCodeDto; import com.foreverwin.mesnac.meapi.mapper.NcCodeMapper; @@ -66,13 +65,13 @@ public class NcCodeServiceImpl extends ServiceImpl impleme } @Override - public IPage selectPageByNcGroup(Page pagePlus, String globalQuery, String ncGroup) { + public List selectByNcGroup(String ncGroup) { String site = CommonMethods.getSite(); if (StringUtils.isBlank(ncGroup)) { throw new BaseException("不良代码组不能为空"); } String ncGroupBO = new NCGroupBOHandle(site, ncGroup).getValue(); - return ncCodeMapper.selectPageByNcGroup(pagePlus, ncGroupBO, globalQuery,LocaleContextHolder.getLocale().getLanguage()); + return ncCodeMapper.selectPageByNcGroup(ncGroupBO,LocaleContextHolder.getLocale().getLanguage()); } @Override diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/impl/NcGroupServiceImpl.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/impl/NcGroupServiceImpl.java index 15e96f72..db42ca80 100644 --- a/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/impl/NcGroupServiceImpl.java +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/impl/NcGroupServiceImpl.java @@ -2,8 +2,8 @@ package com.foreverwin.mesnac.meapi.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.foreverwin.mesnac.meapi.dto.OperationDto; import com.foreverwin.mesnac.meapi.mapper.NcGroupMapper; import com.foreverwin.mesnac.meapi.model.NcGroup; import com.foreverwin.mesnac.meapi.model.Operation; @@ -18,6 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.util.ArrayList; import java.util.List; /** @@ -51,13 +52,21 @@ public class NcGroupServiceImpl extends ServiceImpl impl } @Override - public IPage selectPageByOperation(Page frontPage, String globalQuery, String operation) { + public List selectPageByOperation(OperationDto dto) { String site = CommonMethods.getSite(); - if (StringUtils.isBlank(operation)) { + if (StringUtils.isBlank(dto.getOperation())) { throw new BaseException("工序不能为空"); } - String operationBO = new OperationBOHandle(site, operation, "#").getValue(); - return ncGroupMapper.selectPageByOperation(frontPage, site, operationBO, globalQuery); + String operationBO = new OperationBOHandle(site, dto.getOperation(), "#").getValue(); + String ncGroup=""; + if (dto.getType().equals("Z")){ + ncGroup="QC_"; + }else if (dto.getType().equals("S")){ + ncGroup="E_"; + }else { + return new ArrayList<>(); + } + return ncGroupMapper.selectPageByOperation(site, operationBO,ncGroup); } @Override diff --git a/meapi/src/main/resources/mapper/NcCodeMapper.xml b/meapi/src/main/resources/mapper/NcCodeMapper.xml index ec09cf91..0ce04624 100644 --- a/meapi/src/main/resources/mapper/NcCodeMapper.xml +++ b/meapi/src/main/resources/mapper/NcCodeMapper.xml @@ -384,9 +384,6 @@ LEFT JOIN NC_CODE_T NCT ON nc.HANDLE=NCT.NC_CODE_BO AND NCT.LOCALE=#{locale} JOIN NC_GROUP_MEMBER NGM ON nc.HANDLE=NGM.NC_CODE_OR_GROUP_GBO WHERE NGM.NC_GROUP_BO = #{ncGroupBO} and nc.NC_CATEGORY='FAILURE' - - AND (nc.NC_CODE LIKE '%${globalQuery}%' or nct.DESCRIPTION LIKE '%${globalQuery}%') -