Merge remote-tracking branch 'origin/master'

master
zpl 3 years ago
commit a41cb639ed

@ -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 +
'}';
}
}

@ -26,10 +26,10 @@ public class NcCodeController {
public NcCodeService ncCodeService;
@ResponseBody
@GetMapping("/selectPageByNcGroup")
public R selectPageByNcGroup(FrontPage<NcGroup> frontPage, String ncGroup){
IPage result;
result = ncCodeService.selectPageByNcGroup(frontPage.getPagePlus(), frontPage.getGlobalQuery(),ncGroup);
@GetMapping("/selectByNcGroup")
public R selectPageByNcGroup(String ncGroup){
List<NcCode> result;
result = ncCodeService.selectByNcGroup(ncGroup);
return R.ok(result);
}
/**

@ -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<NcGroup> frontPage, String operation){
IPage result;
result = ncGroupService.selectPageByOperation(frontPage.getPagePlus(), frontPage.getGlobalQuery(),operation);
@GetMapping("/selectByOperation")
public R selectPageByOperation(OperationDto dto){
List<NcGroup> result;
result = ncGroupService.selectPageByOperation(dto);
return R.ok(result);
}

@ -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;
}
}

@ -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<NcCode> {
/*暂时不用*/
List<NcCode> findSecondaryNcByNc(@Param("site")String site,@Param("locale")String locale,@Param("ncCode")String ncCode);
IPage selectPageByNcGroup(Page<NcGroup> pagePlus,@Param("ncGroupBO") String ncGroupBO,@Param("globalQuery") String globalQuery,@Param("locale") String locale);
List<NcCode> selectPageByNcGroup(@Param("ncGroupBO") String ncGroupBO,@Param("locale") String locale);
/**
*

@ -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<NcGroup> {
IPage selectPageByOperation(Page<NcGroup> frontPage, @Param("site") String site, @Param("operationBO") String operationBO,@Param("globalQuery") String globalQuery);
List<NcGroup> findNgGroupByOperationBo(@Param("operation") Operation operation);
List<NcGroup> selectPageByOperation(@Param("site") String site, @Param("operationBO") String operationBO, @Param("globalQuery") Object o);
List<NcGroup> selectPageByOperation(@Param("site") String site, @Param("operationBO") String operationBO, @Param("ncGroup") String ncGroup);
}

@ -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<NcCode> {
List<NcCode> findSecondaryNcByNc(String ncCode);
IPage selectPageByNcGroup(Page<NcGroup> pagePlus, String globalQuery, String ncGroup);
List<NcCode> selectByNcGroup(String ncGroup);
List<NcCode> findNcCodeByNcGroup(NcGroup ncGroup);

@ -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<NcGroup> {
List<NcGroup> selectList(NcGroup ncGroup);
IPage selectPageByOperation(Page<NcGroup> pagePlus, String globalQuery, String operation);
List<NcGroup> selectPageByOperation(OperationDto operation);
List<NcGroup> findNgGroupByOperationBo(Operation operation);

@ -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<NcCodeMapper, NcCode> impleme
}
@Override
public IPage selectPageByNcGroup(Page<NcGroup> pagePlus, String globalQuery, String ncGroup) {
public List<NcCode> 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

@ -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<NcGroupMapper, NcGroup> impl
}
@Override
public IPage selectPageByOperation(Page<NcGroup> frontPage, String globalQuery, String operation) {
public List<NcGroup> 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

@ -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'
<if test="globalQuery!=null and globalQuery!=''">
AND (nc.NC_CODE LIKE '%${globalQuery}%' or nct.DESCRIPTION LIKE '%${globalQuery}%')
</if>
</select>
<select id="checkNcCode" resultType="integer">

@ -349,9 +349,7 @@
SELECT DISTINCT ng.NC_GROUP,NG.DESCRIPTION FROM NC_GROUP ng
LEFT JOIN NC_GROUP_VALID_OPER ngvo ON ng.HANDLE=ngvo.NC_GROUP_BO
WHERE SITE=#{site} AND (ng.VALID_AT_ALL_OPERATIONS='true' OR ngvo.OPERATION_BO=#{operationBO})
<if test="globalQuery!=null and globalQuery!=''">
AND (ng.NC_GROUP LIKE '%${globalQuery}%' or NG.DESCRIPTION LIKE '%${globalQuery}%')
</if>
AND ng.NC_GROUP LIKE '${ncGroup}%'
</select>
<select id="findNgGroupByOperationBo" resultMap="BaseResultMap">

Loading…
Cancel
Save