Merge remote-tracking branch 'origin/master'

赵嘉伟 4 years ago
commit 7f25989760

@ -74,4 +74,21 @@ public class OperationController {
return R.ok(result); return R.ok(result);
} }
@ResponseBody
@GetMapping("/getOperationStep")
public R getOperationStep(FrontPage<Operation> frontPage, Operation operation){
IPage result;
try {
QueryWrapper<Operation> queryWrapper = new QueryWrapper<>();
operation.setSite(CommonMethods.getSite());
operation.setOperation(frontPage.getGlobalQuery());
queryWrapper.setEntity(operation);
result = operationService.selectOperationStep(frontPage.getPagePlus(), queryWrapper);
} catch (Exception e) {
return R.failed(e.getMessage());
}
return R.ok(result);
}
} }

@ -25,4 +25,7 @@ public interface OperationMapper extends BaseMapper<Operation> {
Operation getCurrentRevisionRef(@Param("site") String site, @Param("operation") String operation); Operation getCurrentRevisionRef(@Param("site") String site, @Param("operation") String operation);
IPage<Operation> selectOperationStep( IPage<Operation> page, @Param("locale") String locale,@Param("ew") Wrapper<Operation> wrapper);
} }

@ -25,6 +25,8 @@ public interface OperationService extends IService<Operation> {
*/ */
IPage<Operation> selectPage(Page<Operation> page, QueryWrapper<Operation> operation); IPage<Operation> selectPage(Page<Operation> page, QueryWrapper<Operation> operation);
IPage<Operation> selectOperationStep(Page<Operation> page, QueryWrapper<Operation> queryWrapper);
List<Operation> selectList(Operation operation); List<Operation> selectList(Operation operation);
Operation getCurrentRevisionRef(String site, String operation); Operation getCurrentRevisionRef(String site, String operation);

@ -40,6 +40,11 @@ public class OperationServiceImpl extends ServiceImpl<OperationMapper, Operation
return page; return page;
} }
@Override
public IPage<Operation> selectOperationStep(Page<Operation> page, QueryWrapper<Operation> queryWrapper) {
Locale locale = LocaleContextHolder.getLocale();
return operationMapper.selectOperationStep(page,locale.getLanguage(),queryWrapper);
}
@Override @Override
public List<Operation> selectList(Operation operation) { public List<Operation> selectList(Operation operation) {
QueryWrapper<Operation> queryWrapper = new QueryWrapper<>(); QueryWrapper<Operation> queryWrapper = new QueryWrapper<>();

@ -615,4 +615,16 @@
AND OPERATION = #{operation} AND OPERATION = #{operation}
AND CURRENT_REVISION = 'true' AND CURRENT_REVISION = 'true'
</select> </select>
<select id="selectOperationStep" resultMap="BaseResultMap">
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}
INNER JOIN ROUTER_OPERATION RO ON (RO.OPERATION_BO = O.HANDLE or 'OperationBO:'|| O.SITE ||','|| O.OPERATION||',#'=RO.OPERATION_BO )
INNER JOIN ROUTER_STEP RS ON rs.HANDLE = RO.ROUTER_STEP_BO
where O.SITE = #{ew.entity.site}
<if test="ew.entity.operation!=null and ew.entity.operation!='' " >
AND (O.OPERATION LIKE '%${ew.entity.operation}%' OR O.REVISION LIKE '%${ew.entity.operation}%' OR OT.DESCRIPTION LIKE '%${ew.entity.operation}%')
</if>
ORDER BY RS.STEP_ID
</select>
</mapper> </mapper>

Loading…
Cancel
Save