检验项目维护提交 (物料、工序、工步弹出框)

赵嘉伟 4 years ago
parent fa58163678
commit e489b24c9f

@ -147,7 +147,7 @@ public class OperationController {
queryWrapper
.like("O.OPERATION", frontPage.getGlobalQuery())
.or().like("OT.DESCRIPTION", frontPage.getGlobalQuery())
.or().like("RS.SUB_STEP",frontPage.getGlobalQuery());
.or().like("RS.STEP_ID",frontPage.getGlobalQuery());
}
result = operationService.selectPage(frontPage.getPagePlus(), queryWrapper);
} catch (Exception e) {

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.meapi.model.RouterSubstep;
import com.foreverwin.mesnac.meapi.service.RouterSubstepService;
import com.foreverwin.mesnac.meapi.util.StringUtils;
import com.foreverwin.modular.core.util.FrontPage;
import com.foreverwin.modular.core.util.R;
import org.springframework.beans.factory.annotation.Autowired;
@ -120,5 +121,14 @@ public class RouterSubstepController {
public R removeByIds(List<String> ids){
return R.ok(routerSubstepService.removeByIds(ids));
}
@GetMapping("getRouterStepBo")
public R getRouterStepBo(FrontPage<RouterSubstep> page,String item,String operation){
String globalQuery = page.getGlobalQuery();
if(StringUtils.notBlank(globalQuery)){
globalQuery = globalQuery.toUpperCase();
}
return R.ok(routerSubstepService.getRouterStepBo(page.getPagePlus(),globalQuery,item,operation));
}
}

@ -1,7 +1,9 @@
package com.foreverwin.mesnac.meapi.mapper;
import com.foreverwin.mesnac.meapi.model.RouterSubstep;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.meapi.model.RouterSubstep;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
/**
@ -14,5 +16,5 @@ import org.springframework.stereotype.Repository;
*/
@Repository
public interface RouterSubstepMapper extends BaseMapper<RouterSubstep> {
IPage<RouterSubstep> findRoutetStepBoByOperation(IPage<RouterSubstep>page,@Param("globalQuery") String globalQuery, @Param("language")String language,@Param("item")String item, @Param("site") String site, @Param("operation")String operation);
}

@ -41,7 +41,8 @@ public class RouterSubstep extends Model<RouterSubstep> {
private String description;
@TableField("LONG_DESCRIPTION")
private String longDescription;
@TableField(exist = false)
private String site;
public String getHandle() {
return handle;

@ -1,8 +1,9 @@
package com.foreverwin.mesnac.meapi.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.meapi.model.RouterSubstep;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.foreverwin.mesnac.meapi.model.RouterSubstep;
import com.foreverwin.modular.core.util.FrontPage;
import java.util.List;
@ -26,4 +27,6 @@ public interface RouterSubstepService extends IService<RouterSubstep> {
List<RouterSubstep> selectList(RouterSubstep routerSubstep);
IPage<RouterSubstep> getRouterStepBo(Page<RouterSubstep> page,String globalQuery, String item, String operation);
}

@ -1,14 +1,17 @@
package com.foreverwin.mesnac.meapi.service.impl;
import com.foreverwin.modular.core.util.FrontPage;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.meapi.model.RouterSubstep;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.foreverwin.mesnac.meapi.mapper.RouterSubstepMapper;
import com.foreverwin.mesnac.meapi.model.RouterSubstep;
import com.foreverwin.mesnac.meapi.service.RouterSubstepService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import com.foreverwin.modular.core.util.CommonMethods;
import com.foreverwin.modular.core.util.FrontPage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@ -42,5 +45,12 @@ public class RouterSubstepServiceImpl extends ServiceImpl<RouterSubstepMapper, R
return super.list(queryWrapper);
}
@Override
public IPage<RouterSubstep> getRouterStepBo(Page<RouterSubstep> page,String globalQuery, String item, String operation) {
String site = CommonMethods.getSite();
String language = LocaleContextHolder.getLocale().getLanguage();
return routerSubstepMapper.findRoutetStepBoByOperation(page,globalQuery,language,item,site,operation);
}
}

@ -283,17 +283,16 @@
</select>
<select id="selectPage" resultMap="BaseResultMap">
SELECT DISTINCT o.OPERATION,rs.STEP_ID,OT.DESCRIPTION
SELECT DISTINCT O.OPERATION,RS.STEP_ID,OT.DESCRIPTION
FROM OPERATION O
LEFT JOIN OPERATION_T OT ON O.HANDLE = OT.OPERATION_BO AND OT.LOCALE = #{locale}
-- LEFT JOIN ROUTER_OPERATION RO ON RO.OPERATION_BO = (SUBSTR(O.HANDLE,1,(SELECT INSTR(O.HANDLE , ',', -1, 1)
-- FROM dual)-1) || ',#'
-- )
-- LEFT JOIN ROUTER_STEP RS ON RS.HANDLE = RO.ROUTER_STEP_BO
INNER JOIN ROUTER_STEP rs ON o.OPERATION = rs.DESCRIPTION
INNER JOIN ROUTER r ON r.HANDLE = rs.ROUTER_BO
INNER JOIN SHOP_ORDER so ON so.PLANNED_ROUTER_BO = r.HANDLE
INNER JOIN ITEM i ON i.HANDLE = so.PLANNED_ITEM_BO
INNER JOIN ROUTER_OPERATION RO ON RO.OPERATION_BO = (SUBSTR(O.HANDLE,1,(SELECT INSTR(O.HANDLE , ',', -1, 1)
FROM DUAL)-1) || ',#'
)
INNER JOIN ROUTER_STEP RS ON rs.HANDLE = RO.ROUTER_STEP_BO
INNER JOIN ROUTER R ON R.HANDLE = RS.ROUTER_BO
INNER JOIN SHOP_ORDER SO ON SO.PLANNED_ROUTER_BO = R.HANDLE
INNER JOIN ITEM I ON I.HANDLE = SO.PLANNED_ITEM_BO
<where>
<if test="ew!=null">
<if test="ew.entity!=null">

@ -357,4 +357,32 @@
<!-- BaseMapper标准查询/修改/删除 -->
<select id="findRoutetStepBoByOperation" resultMap="BaseResultMap">
SELECT DISTINCT RS2.SUBSTEP ,RS2.DESCRIPTION
FROM OPERATION O
LEFT JOIN OPERATION_T OT ON O.HANDLE = OT.OPERATION_BO AND OT.LOCALE=#{language}
INNER JOIN ROUTER_OPERATION RO ON RO.OPERATION_BO = (SUBSTR(O.HANDLE,1,(SELECT INSTR(O.HANDLE , ',', -1, 1)
FROM DUAL)-1) || ',#' )
INNER JOIN ROUTER_STEP RS ON RS.HANDLE = RO.ROUTER_STEP_BO
INNER JOIN ROUTER_SUBSTEP RS2 ON RS2.ROUTER_STEP_BO = RS.HANDLE
INNER JOIN ROUTER R ON R.HANDLE = RS.ROUTER_BO
INNER JOIN SHOP_ORDER SO ON SO.PLANNED_ROUTER_BO = R.HANDLE
INNER JOIN ITEM I ON I.HANDLE = SO.PLANNED_ITEM_BO
<where>
O.SITE = #{site}
<if test="operation!=null and !operation.isEmpty">
AND O.OPERATION = #{operation}
</if>
<if test="item!=null and !item.isEmpty">
AND I.ITEM = #{item}
</if>
<if test="globalQuery!=null and !globalQuery.isEmpty">
AND (
rs2.SUBSTEP LIKE '%${globalQuery}%'
OR rs2.DESCRIPTION LIKE '%${globalQuery}%'
)
</if>
</where>
ORDER BY rs2.SUBSTEP
</select>
</mapper>

Loading…
Cancel
Save